This commit is contained in:
Josh Harvey 2017-03-05 18:39:52 +02:00
parent bef0a8d98d
commit 0bf54fa1d8
7 changed files with 115 additions and 14 deletions

View file

@ -133,8 +133,8 @@ function plugins (settings) {
}
// NOTE: This will fail if we have already sent coins because there will be
// a dbm unique dbm record in the table already.
function executeTx (deviceId, tx) {
// a unique dbm record in the table already.
function sendCoins (deviceId, tx) {
return dbm.addOutgoingTx(deviceId, tx)
.then(() => wallet.sendCoins(settings, tx.toAddress, tx.cryptoAtoms, tx.cryptoCode))
.then(txHash => {
@ -185,10 +185,6 @@ function plugins (settings) {
return dbm.machineEvent(event)
}
function sendCoins (deviceId, rawTx) {
return executeTx(deviceId, rawTx)
}
function cashOut (deviceId, tx) {
const cryptoCode = tx.cryptoCode