tap to lock balance
This commit is contained in:
parent
82558a1696
commit
efa36915e1
3 changed files with 30 additions and 2 deletions
|
|
@ -69,6 +69,18 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
go.walletHome();
|
||||
};
|
||||
|
||||
self.hideBalance = function() {
|
||||
storageService.getHideBalanceFlag(self.walletId, function(err, shouldHideBalance) {
|
||||
if (err) self.shouldHideBalance = false;
|
||||
else self.shouldHideBalance = (shouldHideBalance == 'true') ? true : false;
|
||||
});
|
||||
}
|
||||
|
||||
self.onHold = function(){
|
||||
self.shouldHideBalance = !self.shouldHideBalance;
|
||||
storageService.setHideBalanceFlag(self.walletId, self.shouldHideBalance, function() {});
|
||||
}
|
||||
|
||||
self.setOngoingProcess = function(processName, isOn) {
|
||||
$log.debug('onGoingProcess', processName, isOn);
|
||||
self[processName] = isOn;
|
||||
|
|
@ -153,6 +165,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.initGlidera();
|
||||
self.initCoinbase();
|
||||
|
||||
self.hideBalance();
|
||||
|
||||
self.setCustomBWSFlag();
|
||||
|
||||
if (!self.isComplete) {
|
||||
|
|
|
|||
|
|
@ -200,6 +200,14 @@ angular.module('copayApp.services')
|
|||
storage.remove('config', cb);
|
||||
};
|
||||
|
||||
root.setHideBalanceFlag = function(walletId, val, cb) {
|
||||
storage.set('hideBalance-' + walletId, val, cb);
|
||||
};
|
||||
|
||||
root.getHideBalanceFlag = function(walletId, cb) {
|
||||
storage.get('hideBalance-' + walletId, cb);
|
||||
};
|
||||
|
||||
//for compatibility
|
||||
root.getCopayDisclaimerFlag = function(cb) {
|
||||
storage.get('agreeDisclaimer', cb);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue