Merge pull request #3762 from cmgustavo/feat/2-step-balance
Adds support for 2-step balance
This commit is contained in:
commit
dd47185402
4 changed files with 9 additions and 3 deletions
|
|
@ -300,7 +300,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
return cb(null, opts.walletStatus);
|
return cb(null, opts.walletStatus);
|
||||||
else {
|
else {
|
||||||
self.updateError = false;
|
self.updateError = false;
|
||||||
return fc.getStatus({}, function(err, ret) {
|
return fc.getStatus({ twoStep : true }, function(err, ret) {
|
||||||
if (err) {
|
if (err) {
|
||||||
self.updateError = bwsError.msg(err, gettext('Could not update Wallet'));
|
self.updateError = bwsError.msg(err, gettext('Could not update Wallet'));
|
||||||
} else {
|
} 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() {
|
$rootScope.$on('NewOutgoingTx', function() {
|
||||||
self.newTx = true;
|
self.newTx = true;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
$log.debug('Creating address for wallet:', walletId);
|
$log.debug('Creating address for wallet:', walletId);
|
||||||
|
|
||||||
client.createAddress(function(err, addr) {
|
client.createAddress({}, function(err, addr) {
|
||||||
if (err) {
|
if (err) {
|
||||||
var prefix = gettextCatalog.getString('Could not create address');
|
var prefix = gettextCatalog.getString('Could not create address');
|
||||||
if (err.error && err.error.match(/locked/gi)) {
|
if (err.error && err.error.match(/locked/gi)) {
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,9 @@ angular.module('copayApp.services')
|
||||||
case 'NewCopayer':
|
case 'NewCopayer':
|
||||||
// No UX notification
|
// No UX notification
|
||||||
break;
|
break;
|
||||||
|
case 'BalanceUpdated':
|
||||||
|
// No UX notification
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ angular.module('copayApp.services')
|
||||||
client.credentials.walletId, client.credentials.walletName);
|
client.credentials.walletId, client.credentials.walletName);
|
||||||
|
|
||||||
if (root.focusedClient.credentials.walletId == client.credentials.walletId) {
|
if (root.focusedClient.credentials.walletId == client.credentials.walletId) {
|
||||||
$rootScope.$emit(n.type);
|
$rootScope.$emit(n.type, n);
|
||||||
} else {
|
} else {
|
||||||
$rootScope.$apply();
|
$rootScope.$apply();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue