* redesigned sync, so no external node is needed
+ allow only once instance of the wallet + store txhash and use it as single ID for transactions
This commit is contained in:
@@ -14,7 +14,7 @@ db.ensureIndex({ fieldName: 'block' }, function (err) {
|
||||
});
|
||||
|
||||
ipcMain.on('storeTransaction', (event, arg) => {
|
||||
db.update({ block: arg.block, fromaddr: arg.fromaddr, toaddr: arg.toaddr }, arg, { upsert: true }, function (err, numReplaced, upsert) {
|
||||
db.update({ txhash: arg.txhash }, arg, { upsert: true }, function (err, numReplaced, upsert) {
|
||||
// do nothing for now
|
||||
});
|
||||
});
|
||||
@@ -29,8 +29,7 @@ ipcMain.on('getTransactions', (event, arg) => {
|
||||
docs[i].timestamp,
|
||||
docs[i].fromaddr,
|
||||
docs[i].toaddr,
|
||||
docs[i].value,
|
||||
docs[i].confirmed || 1
|
||||
docs[i].value
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@ class Geth {
|
||||
this.gethProcess.stdout.on('data', function(data) {
|
||||
EthoGeth._writeLog(data.toString() + '\n');
|
||||
});
|
||||
} catch (e) {
|
||||
dialog.showErrorBox("Error starting application", e);
|
||||
} catch (err) {
|
||||
dialog.showErrorBox("Error starting application", err.message);
|
||||
app.quit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user