diff --git a/API.js b/API.js index 76f30a29e..a97c821a2 100644 --- a/API.js +++ b/API.js @@ -169,13 +169,13 @@ API.prototype.getCommands = decorate('getCommands', [ ['callback', 'function'] ]); -API.prototype._cmd_getWalletIds = function(callback) { +API.prototype._cmd_getWallets = function(callback) { var self = this; - return callback(null, self.walletFactory.getWalletIds()); + return callback(null, self.walletFactory.getWallets()); }; -API.prototype.getWalletIds = decorate('getWalletIds', [ +API.prototype.getWallets = decorate('getWallets', [ ['callback', 'function'] ]); diff --git a/test/mocks/FakeStorage.js b/test/mocks/FakeStorage.js index 5ab31ef54..4e12e25fb 100644 --- a/test/mocks/FakeStorage.js +++ b/test/mocks/FakeStorage.js @@ -23,7 +23,7 @@ FakeStorage.prototype.clear = function() { delete this['storage']; } -FakeStorage.prototype.getWalletIds = function() { +FakeStorage.prototype.getWallets = function() { return []; }; diff --git a/test/test.API.js b/test/test.API.js index 96795f75a..8cbd450cf 100644 --- a/test/test.API.js +++ b/test/test.API.js @@ -110,10 +110,10 @@ describe('API', function() { }); }); - describe('#getWalletIds', function() { + describe('#getWallets', function() { it('should get the wallet ids', function(done) { var api = new API({Storage: Storage}); - api.getWalletIds(function(err, result) { + api.getWallets(function(err, result) { result.length.should.be.greaterThan(-1); done(); }); diff --git a/test/test.Wallet.js b/test/test.Wallet.js index 73985c867..9fdaaac4e 100644 --- a/test/test.Wallet.js +++ b/test/test.Wallet.js @@ -5,7 +5,7 @@ var should = chai.should(); var copay = copay || require('../copay'); var Wallet = require('../js/models/core/Wallet'); var Storage= require('./mocks/FakeStorage'); -var Network= copay.WebRTC; +var Network= require('./mocks/FakeNetwork'); var Blockchain= copay.Insight; var addCopayers = function (w) {