mirror of https://github.com/BTCPrivate/copay.git
added notification for wallet storage error
This commit is contained in:
parent
b6583c7405
commit
af721f697e
|
@ -248,6 +248,12 @@ Identity.prototype.storeWallet = function(wallet, cb) {
|
|||
if (err) {
|
||||
log.error('Wallet:' + wallet.getName() + ' couldnt be stored:', err);
|
||||
log.error('Wallet:' + wallet.getName() + ' Size:', JSON.stringify(wallet.sizes()));
|
||||
|
||||
if (err.match('OVERQUOTA')) {
|
||||
self.emitAndKeepAlive('walletStorageError', w.getId(), 'Storage limits on remote server exceeded');
|
||||
} else {
|
||||
self.emitAndKeepAlive('walletStorageError', w.getId(), err);
|
||||
}
|
||||
}
|
||||
if (cb)
|
||||
return cb(err);
|
||||
|
|
|
@ -307,6 +307,10 @@ angular.module('copayApp.services')
|
|||
// do nothing. this is handled 'on sync' on controller.
|
||||
});
|
||||
|
||||
iden.on('walletStorageError', function (wid, message) {
|
||||
notification.error('Error storing wallet', message);
|
||||
});
|
||||
|
||||
iden.on('closed', function() {
|
||||
delete $rootScope['wallet'];
|
||||
delete $rootScope['iden'];
|
||||
|
|
Loading…
Reference in New Issue