Merge pull request #3762 from cmgustavo/feat/2-step-balance

Adds support for 2-step balance
This commit is contained in:
Matias Alejo Garcia 2016-01-14 10:12:17 -03:00
commit dd47185402
4 changed files with 9 additions and 3 deletions

View file

@ -300,7 +300,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
return cb(null, opts.walletStatus);
else {
self.updateError = false;
return fc.getStatus({}, function(err, ret) {
return fc.getStatus({ twoStep : true }, function(err, ret) {
if (err) {
self.updateError = bwsError.msg(err, gettext('Could not update Wallet'));
} else {
@ -1342,6 +1342,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
}
});
$rootScope.$on('BalanceUpdated', function(e, n) {
self.setBalance(n.data);
});
$rootScope.$on('NewOutgoingTx', function() {
self.newTx = true;

View file

@ -26,7 +26,7 @@ angular.module('copayApp.services')
$log.debug('Creating address for wallet:', walletId);
client.createAddress(function(err, addr) {
client.createAddress({}, function(err, addr) {
if (err) {
var prefix = gettextCatalog.getString('Could not create address');
if (err.error && err.error.match(/locked/gi)) {

View file

@ -91,6 +91,9 @@ angular.module('copayApp.services')
case 'NewCopayer':
// No UX notification
break;
case 'BalanceUpdated':
// No UX notification
break;
}
};

View file

@ -81,7 +81,7 @@ angular.module('copayApp.services')
client.credentials.walletId, client.credentials.walletName);
if (root.focusedClient.credentials.walletId == client.credentials.walletId) {
$rootScope.$emit(n.type);
$rootScope.$emit(n.type, n);
} else {
$rootScope.$apply();
}