refactor baseUrl in angular-bwc
This commit is contained in:
parent
a8ef458941
commit
6bd316424a
4 changed files with 21 additions and 43 deletions
|
|
@ -67,7 +67,6 @@ angular.module('copayApp.services')
|
|||
var defaults = configService.getDefaults();
|
||||
|
||||
bwcService.setBaseUrl((config.bwsFor && config.bwsFor[walletId]) || defaults.bws.url);
|
||||
bwcService.setTransports(['polling']);
|
||||
}
|
||||
|
||||
root.setWalletClient = function(credentials) {
|
||||
|
|
@ -219,10 +218,7 @@ angular.module('copayApp.services')
|
|||
|
||||
root._seedWallet = function(opts, cb) {
|
||||
opts = opts || {};
|
||||
if (opts.bwsurl)
|
||||
bwcService.setBaseUrl(opts.bwsurl);
|
||||
|
||||
var walletClient = bwcService.getClient();
|
||||
var walletClient = bwcService.getClient(null, opts);
|
||||
var network = opts.networkName || 'livenet';
|
||||
|
||||
|
||||
|
|
@ -471,10 +467,8 @@ angular.module('copayApp.services')
|
|||
};
|
||||
|
||||
root.importWallet = function(str, opts, cb) {
|
||||
if (opts.bwsurl)
|
||||
bwcService.setBaseUrl(opts.bwsurl);
|
||||
|
||||
var walletClient = bwcService.getClient();
|
||||
var walletClient = bwcService.getClient(null, opts);
|
||||
|
||||
$log.debug('Importing Wallet:', opts);
|
||||
try {
|
||||
|
|
@ -573,7 +567,6 @@ angular.module('copayApp.services')
|
|||
|
||||
configService.get(function(err) {
|
||||
bwcService.setBaseUrl(defaults.bws.url);
|
||||
bwcService.setTransports(['polling']);
|
||||
root._createNewProfile(opts, function(err, p) {
|
||||
if (err) return cb(err);
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,14 @@ angular.module('copayApp.services')
|
|||
storage.remove('backup-' + walletId, cb);
|
||||
};
|
||||
|
||||
root.setDerivationTestFlag = function(walletId, ua, cb) {
|
||||
storage.set('DerivationTest-'+walletId+ua.replace(' ', ''), true, cb);
|
||||
};
|
||||
|
||||
root.getDerivationTestFlag = function(walletId, ua, cb) {
|
||||
storage.get('DerivationTest-'+walletId+ua.replace(' ', ''), cb);
|
||||
};
|
||||
|
||||
root.setCleanAndScanAddresses = function(walletId, cb) {
|
||||
storage.set('CleanAndScanAddresses', walletId, cb);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue