From bec13978d67d794b2f5cdc71279d67e43dbb9bfb Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 1 Nov 2014 16:16:44 -0300 Subject: [PATCH] v1 --- util/swipeWallet.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/swipeWallet.js b/util/swipeWallet.js index 6185dcc18..de526ef9b 100755 --- a/util/swipeWallet.js +++ b/util/swipeWallet.js @@ -130,7 +130,12 @@ firstWallet.updateIndexes(function() { var amount = balance - DFLT_FEE; firstWallet.createTx(destAddr, amount, '', {}, function(err, ntxid) { console.log('\n\t### Tx Proposal Created...\n\tWith copayer 0 signature.'); - if (requiredCopayers === 1) { + if (!ntxid) + throw new Error('Counld not create tx' + err); + + console.log('\n\t### Tx Proposal Created... With copayer 0 signature.'); + + if (requiredCopayers ===1) { firstWallet.sendTx(ntxid, function(txid) { console.log('\t ####### SENT TXID:', txid); process.exit(1);