Merge branch 'wallet/task/514' of https://github.com/Bitcoin-com/Wallet into wallet/task/514
This commit is contained in:
commit
37402e45af
2 changed files with 19 additions and 4 deletions
|
|
@ -470,11 +470,26 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
|
||||||
}
|
}
|
||||||
|
|
||||||
var toWallet = profileService.getWallet(destinationWalletId);
|
var toWallet = profileService.getWallet(destinationWalletId);
|
||||||
|
vm.destination.name = toWallet.name;
|
||||||
|
vm.destination.color = toWallet.color;
|
||||||
|
vm.destination.currency = toWallet.coin.toUpperCase();
|
||||||
|
|
||||||
$ionicLoading.show();
|
$ionicLoading.show();
|
||||||
walletService.getAddress(vm.originWallet, false, function onWalletAddress(err, returnAddr) {
|
walletService.getAddress(vm.originWallet, false, function onReturnWalletAddress(err, returnAddr) {
|
||||||
walletService.getAddress(toWallet, false, function onWalletAddress(err, withdrawalAddr) {
|
if (err) {
|
||||||
$ionicLoading.hide();
|
$ionicLoading.hide();
|
||||||
shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function(shapeshiftData) {
|
popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
walletService.getAddress(toWallet, false, function onWithdrawalWalletAddress(err, withdrawalAddr) {
|
||||||
|
if (err) {
|
||||||
|
$ionicLoading.hide();
|
||||||
|
popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$ionicLoading.hide();
|
||||||
|
shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function onShiftIt(shapeshiftData) {
|
||||||
vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId;
|
vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId;
|
||||||
toAddress = shapeshiftData.toAddress;
|
toAddress = shapeshiftData.toAddress;
|
||||||
vm.destination.address = toAddress;
|
vm.destination.address = toAddress;
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
<div class="item item-compact" translate>To:</div>
|
<div class="item item-compact" translate>To:</div>
|
||||||
<div class="item item-gutterless item-complex item-avatar">
|
<div class="item item-gutterless item-complex item-avatar">
|
||||||
<div class="item-content item-content-avatar"
|
<div class="item-content item-content-avatar"
|
||||||
ng-if="vm.destination.kind === 'contact' || vm.destination.kind === 'wallet'">
|
ng-if="vm.destination.kind === 'contact' || vm.destination.kind === 'wallet' || vm.destination.kind == 'shapeshift'">
|
||||||
<img src="img/contact-placeholder.svg" class="bg" ng-if="vm.destination.kind === 'contact'">
|
<img src="img/contact-placeholder.svg" class="bg" ng-if="vm.destination.kind === 'contact'">
|
||||||
<i class="icon big-icon-svg theme-circle theme-circle-services" ng-if="vm.destination.kind === 'wallet' || vm.destination.kind === 'shapeshift'">
|
<i class="icon big-icon-svg theme-circle theme-circle-services" ng-if="vm.destination.kind === 'wallet' || vm.destination.kind === 'shapeshift'">
|
||||||
<div class="bg icon-wallet"
|
<div class="bg icon-wallet"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue