set disclaimer flag when import wallet
This commit is contained in:
parent
6eb87704ba
commit
a595c60892
2 changed files with 31 additions and 1 deletions
|
|
@ -110,6 +110,11 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
|
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
|
||||||
|
if ($stateParams.fromOnboarding)
|
||||||
|
profileService.setDisclaimerAccepted(function(err) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
});
|
||||||
|
|
||||||
$state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
@ -137,6 +142,11 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
|
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
|
||||||
|
if ($stateParams.fromOnboarding)
|
||||||
|
profileService.setDisclaimerAccepted(function(err) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
});
|
||||||
|
|
||||||
$state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
@ -157,6 +167,11 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$rootScope.$emit('Local/WalletImported', walletId);
|
$rootScope.$emit('Local/WalletImported', walletId);
|
||||||
|
if ($stateParams.fromOnboarding)
|
||||||
|
profileService.setDisclaimerAccepted(function(err) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
});
|
||||||
|
|
||||||
$state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
@ -186,6 +201,11 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
|
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
|
||||||
|
if ($stateParams.fromOnboarding)
|
||||||
|
profileService.setDisclaimerAccepted(function(err) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
});
|
||||||
|
|
||||||
$state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
@ -320,6 +340,11 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
$log.debug('Remote preferences saved for:' + wallet.walletId)
|
$log.debug('Remote preferences saved for:' + wallet.walletId)
|
||||||
});
|
});
|
||||||
$rootScope.$emit('Local/WalletImported', wallet.walletId);
|
$rootScope.$emit('Local/WalletImported', wallet.walletId);
|
||||||
|
if ($stateParams.fromOnboarding)
|
||||||
|
profileService.setDisclaimerAccepted(function(err) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
});
|
||||||
|
|
||||||
$state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
@ -397,6 +422,12 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
$log.debug('Remote preferences saved for:' + wallet.walletId)
|
$log.debug('Remote preferences saved for:' + wallet.walletId)
|
||||||
});
|
});
|
||||||
$rootScope.$emit('Local/WalletImported', wallet.walletId);
|
$rootScope.$emit('Local/WalletImported', wallet.walletId);
|
||||||
|
|
||||||
|
if ($stateParams.fromOnboarding)
|
||||||
|
profileService.setDisclaimerAccepted(function(err) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
});
|
||||||
|
|
||||||
$state.go('tabs.home');
|
$state.go('tabs.home');
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
|
||||||
|
|
@ -462,7 +462,6 @@ angular.module('copayApp.services')
|
||||||
if (!client || !client.credentials)
|
if (!client || !client.credentials)
|
||||||
return cb(gettext('Could not access wallet'));
|
return cb(gettext('Could not access wallet'));
|
||||||
|
|
||||||
if (root.profile) root.profile = Profile.create();
|
|
||||||
var walletId = client.credentials.walletId
|
var walletId = client.credentials.walletId
|
||||||
|
|
||||||
if (!root.profile.addWallet(JSON.parse(client.export())))
|
if (!root.profile.addWallet(JSON.parse(client.export())))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue