From 2b540264a5631ceab159b92bd240cf0852e8baab Mon Sep 17 00:00:00 2001 From: Matias Pando Date: Thu, 11 Sep 2014 10:28:56 -0300 Subject: [PATCH] Conflicts solved --- js/models/core/Wallet.js | 2 +- test/test.Wallet.js | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 358037fb7..06c2a08c5 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -87,7 +87,7 @@ function Wallet(opts) { this.lastMessageFrom = {}; //to avoid confirmation of copayer's backups if is imported from a file - this.isImported = opts.isImported; + this.isImported = opts.isImported || false; this.paymentRequests = opts.paymentRequests || {}; diff --git a/test/test.Wallet.js b/test/test.Wallet.js index c8ae349e5..94bef86f8 100644 --- a/test/test.Wallet.js +++ b/test/test.Wallet.js @@ -840,6 +840,23 @@ describe('Wallet model', function() { }); }); + describe('#createTxSync', function() { + it('should fail if amount below min value', function() { + var w = cachedCreateW2(); + var utxo = createUTXO(w); + + var badCreate = function() { + w.createTxSync( + 'mgGJEugdPnvhmRuFdbdQcFfoFLc1XXeB79', + '123', + null, + utxo + ); + } + chai.expect(badCreate).to.throw('invalid amount'); + }); + }); + describe('removeTxWithSpentInputs', function() { it('should remove pending TxProposal with spent inputs', function(done) { var w = cachedCreateW2();