fixed bug where user could send to shapeshift from wrong wallet

This commit is contained in:
Kadir Sekha 2018-01-02 15:38:40 +00:00
commit 64b11fba3a
7 changed files with 31 additions and 3 deletions

View file

@ -81,6 +81,14 @@ angular.module('copayApp.controllers').controller('confirmController', function(
coin: coin
});
if (tx.fromWalletId) {
$scope.wallets = lodash.filter($scope.wallets, function(w) {
return w.id == tx.fromWalletId;
});
}
if (!$scope.wallets || !$scope.wallets.length) {
setNoWallet(gettextCatalog.getString('No wallets available'), true);
return cb();
@ -150,6 +158,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
tx = {
toAmount: parseInt(data.stateParams.toAmount),
sendMax: data.stateParams.useSendMax == 'true' ? true : false,
fromWalletId: data.stateParams.fromWalletId,
toAddress: data.stateParams.toAddress,
description: data.stateParams.description,
paypro: data.stateParams.paypro,