mirror of https://github.com/BTCPrivate/copay.git
add feedback print after sweep funds
This commit is contained in:
parent
06e12baa6e
commit
5520399317
|
@ -1,5 +1,5 @@
|
||||||
angular.module('copayApp.controllers').controller('paperWalletController',
|
angular.module('copayApp.controllers').controller('paperWalletController',
|
||||||
function($scope, $http, $timeout, $log, configService, profileService, go, addressService, bitcore) {
|
function($scope, $http, $timeout, $log, configService, profileService, go, addressService, txStatus, bitcore) {
|
||||||
self = this;
|
self = this;
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var rawTx;
|
var rawTx;
|
||||||
|
@ -53,6 +53,7 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
self._scanFunds(function(err, privateKey, balance) {
|
self._scanFunds(function(err, privateKey, balance) {
|
||||||
|
self.scanning = false;
|
||||||
if (err) {
|
if (err) {
|
||||||
$log.error(err);
|
$log.error(err);
|
||||||
self.error = err.message || err.toString();
|
self.error = err.message || err.toString();
|
||||||
|
@ -63,10 +64,7 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
||||||
self.balance = profileService.formatAmount(balance) + ' ' + config.unitName;
|
self.balance = profileService.formatAmount(balance) + ' ' + config.unitName;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.scanning = false;
|
$scope.$apply();
|
||||||
$timeout(function() {
|
|
||||||
$scope.$apply();
|
|
||||||
}, 1);
|
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
@ -95,15 +93,20 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
self._sweepWallet(function(err, destinationAddress, txid) {
|
self._sweepWallet(function(err, destinationAddress, txid) {
|
||||||
|
self.sending = false;
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
self.error = err.message || err.toString();
|
self.error = err.message || err.toString();
|
||||||
$log.error(err);
|
$log.error(err);
|
||||||
|
} else {
|
||||||
|
txStatus.notify({
|
||||||
|
status: 'broadcasted'
|
||||||
|
}, function() {
|
||||||
|
go.walletHome();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
self.sending = false;
|
|
||||||
$timeout(function() {
|
$scope.$apply();
|
||||||
$scope.$apply();
|
|
||||||
if (!err) go.walletHome();
|
|
||||||
}, 1);
|
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue