From 6323cc5264c4e83a00672d1f5f33660611065800 Mon Sep 17 00:00:00 2001 From: Andy Phillipson Date: Tue, 24 Jan 2017 10:59:33 -0500 Subject: [PATCH] Ensure next steps for card is enabled if no bitpay accounts cards after validation. --- src/js/services/storageService.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/services/storageService.js b/src/js/services/storageService.js index a9ebe98e2..72f49a521 100644 --- a/src/js/services/storageService.js +++ b/src/js/services/storageService.js @@ -233,6 +233,13 @@ angular.module('copayApp.services') } storage.set('bitpayAccounts-v2-' + network, JSON.stringify(data), function(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 + '; ' + 'the following accounts validated OK: ' + (verified.length > 0 ? verified : 'none')); });