Fix btc/bch icons. Adds coin param to createWallet method
This commit is contained in:
parent
ef8302f854
commit
ac5ede702d
20 changed files with 36 additions and 20 deletions
|
|
@ -27,6 +27,7 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
$scope.formData.bwsurl = defaults.bws.url;
|
||||
$scope.TCValues = lodash.range(2, defaults.limits.totalCopayers + 1);
|
||||
$scope.formData.derivationPath = derivationPathHelper.default;
|
||||
$scope.formData.coin = 'btc';
|
||||
$scope.setTotalCopayers(tc);
|
||||
updateRCSelect(tc);
|
||||
resetPasswordFields();
|
||||
|
|
@ -137,6 +138,7 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
bwsurl: $scope.formData.bwsurl,
|
||||
singleAddress: $scope.formData.singleAddressEnabled,
|
||||
walletPrivKey: $scope.formData._walletPrivKey, // Only for testing
|
||||
coin: $scope.formData.coin
|
||||
};
|
||||
|
||||
var setSeed = $scope.formData.seedSource.id == 'set';
|
||||
|
|
|
|||
|
|
@ -89,7 +89,10 @@ angular.module('copayApp.services')
|
|||
wallet.copayerId = wallet.credentials.copayerId;
|
||||
wallet.m = wallet.credentials.m;
|
||||
wallet.n = wallet.credentials.n;
|
||||
wallet.chain = wallet.credentials.chain;
|
||||
wallet.chain = wallet.credentials.chain ? (wallet.credentials.chain).toUpperCase() : 'BTC';
|
||||
|
||||
// TODO: Should return "chain" = "BTC" or "BCH"
|
||||
client.credentials.chain = 'BTC';
|
||||
|
||||
root.updateWalletSettings(wallet);
|
||||
root.wallet[walletId] = wallet;
|
||||
|
|
@ -227,8 +230,7 @@ angular.module('copayApp.services')
|
|||
bwsurl: getBWSURL(credentials.walletId),
|
||||
});
|
||||
|
||||
// TODO: Should return "chain" = "BTC" or "BCH"
|
||||
client.credentials.chain = 'BTC';
|
||||
|
||||
|
||||
var skipKeyValidation = shouldSkipValidation(credentials.walletId);
|
||||
if (!skipKeyValidation)
|
||||
|
|
@ -395,6 +397,7 @@ angular.module('copayApp.services')
|
|||
network: opts.networkName,
|
||||
singleAddress: opts.singleAddress,
|
||||
walletPrivKey: opts.walletPrivKey,
|
||||
coin: opts.coin
|
||||
}, function(err, secret) {
|
||||
if (err) return bwcError.cb(err, gettextCatalog.getString('Error creating wallet'), cb);
|
||||
return cb(null, walletClient, secret);
|
||||
|
|
@ -687,6 +690,7 @@ angular.module('copayApp.services')
|
|||
opts.m = 1;
|
||||
opts.n = 1;
|
||||
opts.networkName = 'livenet';
|
||||
opts.coin = 'btc';
|
||||
root.createWallet(opts, cb);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue