delete words option + confirmDialog refactor
This commit is contained in:
parent
ee04b7f318
commit
04c0d20525
10 changed files with 115 additions and 57 deletions
37
src/js/services/confirmDialog.js
Normal file
37
src/js/services/confirmDialog.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').factory('confirmDialog', function($log, profileService, configService, gettextCatalog, isCordova, isChromeApp) {
|
||||
var root = {};
|
||||
|
||||
|
||||
var acceptMsg = gettextCatalog.getString('Accept');
|
||||
var cancelMsg = gettextCatalog.getString('Cancel');
|
||||
var confirmMsg = gettextCatalog.getString('Confirm');
|
||||
|
||||
root.show = function(msg, cb) {
|
||||
if (isCordova) {
|
||||
navigator.notification.confirm(
|
||||
msg,
|
||||
function(buttonIndex) {
|
||||
if (buttonIndex == 1) {
|
||||
$timeout(function() {
|
||||
return cb(true);
|
||||
}, 1);
|
||||
} else {
|
||||
return cb(false);
|
||||
}
|
||||
},
|
||||
confirmMsg, [acceptMsg, cancelMsg]
|
||||
);
|
||||
} else if (isChromeApp) {
|
||||
// No feedback, alert/confirm not supported.
|
||||
return cb(true);
|
||||
} else {
|
||||
return cb(confirm(msg));
|
||||
}
|
||||
};
|
||||
|
||||
return root;
|
||||
});
|
||||
|
||||
|
|
@ -174,14 +174,8 @@ angular.module('copayApp.services')
|
|||
var walletClient = bwcService.getClient();
|
||||
// TODO LANG...
|
||||
// TODO...
|
||||
log.warn("TODO LANG!")
|
||||
walletClient.seedFromRandomWithMnemonic('livenet');
|
||||
console.log('[profileService.js.200:walletClient:]',walletClient); //TODO
|
||||
|
||||
console.log('[profileService.js.180]'); //TODO
|
||||
console.log('[profileService.js.180]'); //TODO
|
||||
console.log('[profileService.js.180]'); //TODO
|
||||
console.log('[profileService.js.180]'); //TODO
|
||||
console.log('[profileService.js.180]'); //TODO
|
||||
|
||||
walletClient.createWallet('Personal Wallet', 'me', 1, 1, {
|
||||
network: 'livenet'
|
||||
|
|
@ -213,8 +207,8 @@ console.log('[profileService.js.180]'); //TODO
|
|||
}
|
||||
// TODO LANG...
|
||||
// TODO...
|
||||
log.warn("TODO LANG!")
|
||||
walletClient.seedFromRandomWithMnemonic(opts.networkName);
|
||||
console.log('[profileService.js.200:walletClient:]',walletClient); //TODO
|
||||
|
||||
walletClient.createWallet(opts.name, opts.myName || 'me', opts.m, opts.n, {
|
||||
network: opts.networkName
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue