From e8190730030b8a37e077eaccb865115ab83b965b 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 | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 809c7aaa3..c2278b820 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 d6b765b46..983cfc076 100644 --- a/test/test.Wallet.js +++ b/test/test.Wallet.js @@ -829,6 +829,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(); @@ -1533,4 +1550,4 @@ describe('Wallet model', function() { should.exist(n.networkNonce); }); -}); \ No newline at end of file +});