mirror of https://github.com/BTCPrivate/copay.git
commit
cfaaca1370
|
@ -159,7 +159,7 @@ angular.module('copayApp.controllers').controller('createController',
|
||||||
this._create = function(opts) {
|
this._create = function(opts) {
|
||||||
self.loading = true;
|
self.loading = true;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
profileService.createWallet(opts, function(err, secret, walletId) {
|
profileService.createWallet(opts, function(err, walletId) {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
if (err) {
|
if (err) {
|
||||||
$log.warn(err);
|
$log.warn(err);
|
||||||
|
|
|
@ -796,7 +796,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.getTxsFromServer(client, skip, endingTxid, requestLimit, function(err, res, shouldContinue) {
|
self.getTxsFromServer(client, skip, endingTxid, requestLimit, function(err, res, shouldContinue) {
|
||||||
if (err) return i_cb(err);
|
if (err) return i_cb(err);
|
||||||
|
|
||||||
|
|
||||||
newTxs = newTxs.concat(lodash.compact(res));
|
newTxs = newTxs.concat(lodash.compact(res));
|
||||||
skip = skip + requestLimit;
|
skip = skip + requestLimit;
|
||||||
|
|
||||||
|
@ -820,7 +819,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
|
|
||||||
getNewTxs([], 0, function(err, txs) {
|
getNewTxs([], 0, function(err, txs) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
var newHistory = lodash.compact(txs.concat(txsFromLocal));
|
var newHistory = lodash.compact(txs.concat(txsFromLocal));
|
||||||
$log.debug('Tx History synced. Total Txs: ' + newHistory.length);
|
$log.debug('Tx History synced. Total Txs: ' + newHistory.length);
|
||||||
|
|
||||||
|
@ -1071,7 +1069,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
|
|
||||||
$rootScope.$on('Local/ClearHistory', function(event) {
|
$rootScope.$on('Local/ClearHistory', function(event) {
|
||||||
$log.debug('The wallet transaction history has been deleted');
|
$log.debug('The wallet transaction history has been deleted');
|
||||||
self.txHistory = [];
|
self.txHistory = self.completeHistory = [];
|
||||||
self.updateHistory();
|
self.updateHistory();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1200,7 +1198,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
$log.debug('Backup done stored');
|
$log.debug('Backup done stored');
|
||||||
addressService.expireAddress(walletId, function(err) {
|
addressService.expireAddress(walletId, function(err) {
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
self.startScan(walletId);
|
self.txHistory = self.completeHistory = [];
|
||||||
|
storageService.removeTxHistory(walletId, function() {
|
||||||
|
self.startScan(walletId);
|
||||||
|
});
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1247,7 +1248,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
});
|
});
|
||||||
|
|
||||||
lodash.each(['NewTxProposal', 'TxProposalFinallyRejected', 'TxProposalRemoved', 'NewOutgoingTxByThirdParty',
|
lodash.each(['NewTxProposal', 'TxProposalFinallyRejected', 'TxProposalRemoved', 'NewOutgoingTxByThirdParty',
|
||||||
'Local/NewTxProposal', 'Local/TxProposalAction', 'ScanFinished', 'Local/GlideraTx'
|
'Local/NewTxProposal', 'Local/TxProposalAction', 'Local/GlideraTx'
|
||||||
], function(eventName) {
|
], function(eventName) {
|
||||||
$rootScope.$on(eventName, function(event, untilItChanges) {
|
$rootScope.$on(eventName, function(event, untilItChanges) {
|
||||||
self.updateAll({
|
self.updateAll({
|
||||||
|
@ -1258,6 +1259,15 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$rootScope.$on('ScanFinished', function() {
|
||||||
|
$log.debug('Scan Finished. Updating history');
|
||||||
|
storageService.removeTxHistory(self.walletId, function() {
|
||||||
|
self.updateAll({
|
||||||
|
walletStatus: null,
|
||||||
|
triggerTxUpdate: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
lodash.each(['TxProposalRejectedBy', 'TxProposalAcceptedBy'], function(eventName) {
|
lodash.each(['TxProposalRejectedBy', 'TxProposalAcceptedBy'], function(eventName) {
|
||||||
$rootScope.$on(eventName, function() {
|
$rootScope.$on(eventName, function() {
|
||||||
|
|
|
@ -100,7 +100,6 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||||
$log.error(err);
|
$log.error(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.$emit('Local/ClearHistory');
|
$scope.$emit('Local/ClearHistory');
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
|
|
Loading…
Reference in New Issue