Ensure next steps for card is enabled if no bitpay accounts cards after validation.
This commit is contained in:
parent
901f8e9f57
commit
6323cc5264
1 changed files with 7 additions and 0 deletions
|
|
@ -233,6 +233,13 @@ angular.module('copayApp.services')
|
||||||
}
|
}
|
||||||
storage.set('bitpayAccounts-v2-' + network, JSON.stringify(data), function(err) {
|
storage.set('bitpayAccounts-v2-' + network, JSON.stringify(data), function(err) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
// Ensure next step for cards is visible
|
||||||
|
storage.get('bitpayAccounts-v2-' + network, function(err, data) {
|
||||||
|
if (err) return cb(err);
|
||||||
|
if (lodash.isEmpty(data)) {
|
||||||
|
root.removeNextStep('BitpayCard', function(err) {});
|
||||||
|
}
|
||||||
|
});
|
||||||
cb(null, 'removed invalid account records, please re-pair cards for these accounts:' + removed + '; ' +
|
cb(null, 'removed invalid account records, please re-pair cards for these accounts:' + removed + '; ' +
|
||||||
'the following accounts validated OK: ' + (verified.length > 0 ? verified : 'none'));
|
'the following accounts validated OK: ' + (verified.length > 0 ? verified : 'none'));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue