fixed bug where user could send to shapeshift from wrong wallet
This commit is contained in:
parent
7c5e6077e6
commit
64b11fba3a
7 changed files with 31 additions and 3 deletions
|
|
@ -13,6 +13,7 @@ angular.module('copayApp.directives').directive('shapeshiftCoinSelector', functi
|
|||
amount:'=amount',
|
||||
marketData:'=marketData',
|
||||
coinAddress:'=coinAddress',
|
||||
walletId:'=walletId',
|
||||
direction:'=direction',
|
||||
},
|
||||
link: function(scope, element, attrs, controllers) {
|
||||
|
|
@ -35,6 +36,12 @@ angular.module('copayApp.directives').directive('shapeshiftCoinSelector', functi
|
|||
scope.$watch('amount', function(newVal) {
|
||||
coinTraderCtrl.amount(newVal)
|
||||
});
|
||||
scope.$watch('walletId', function(newVal) {
|
||||
if(scope.direction === 'in')
|
||||
coinTraderCtrl.fromWalletId(newVal);
|
||||
else if(scope.direction === 'out')
|
||||
coinTraderCtrl.toWalletId(newVal);
|
||||
});
|
||||
},
|
||||
templateUrl: 'views/includes/shapeshift-coin-selector.html'
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue