Merge remote-tracking branch 'origin/wallet/task/416' into wallet/task/416
This commit is contained in:
commit
66f8ac5a5a
5 changed files with 22 additions and 15 deletions
|
|
@ -38,9 +38,11 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
$scope.minShapeshiftAmount = parseFloat(data.stateParams.minShapeshiftAmount);
|
$scope.minShapeshiftAmount = parseFloat(data.stateParams.minShapeshiftAmount);
|
||||||
$scope.maxShapeshiftAmount = parseFloat(data.stateParams.maxShapeshiftAmount);
|
$scope.maxShapeshiftAmount = parseFloat(data.stateParams.maxShapeshiftAmount);
|
||||||
$scope.shapeshiftOrderId = data.stateParams.shapeshiftOrderId;
|
$scope.shapeshiftOrderId = data.stateParams.shapeshiftOrderId;
|
||||||
$scope.fromWalletId = data.stateParams.fromWalletId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// To get the wallet from with the new flow
|
||||||
|
$scope.fromWalletId = data.stateParams.fromWalletId;
|
||||||
|
|
||||||
if (data.stateParams.noPrefix) {
|
if (data.stateParams.noPrefix) {
|
||||||
$scope.showWarningMessage = data.stateParams.noPrefix != 0;
|
$scope.showWarningMessage = data.stateParams.noPrefix != 0;
|
||||||
if ($scope.showWarningMessage) {
|
if ($scope.showWarningMessage) {
|
||||||
|
|
@ -458,7 +460,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
amount: $scope.useSendMax ? null : _amount,
|
amount: $scope.useSendMax ? null : _amount,
|
||||||
currency: unit.id.toUpperCase(),
|
currency: unit.id.toUpperCase(),
|
||||||
coin: coin,
|
coin: coin,
|
||||||
useSendMax: $scope.useSendMax
|
useSendMax: $scope.useSendMax,
|
||||||
|
fromWalletId: $scope.fromWalletId
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var amount = _amount;
|
var amount = _amount;
|
||||||
|
|
@ -479,6 +482,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
toColor: $scope.toColor,
|
toColor: $scope.toColor,
|
||||||
coin: coin,
|
coin: coin,
|
||||||
useSendMax: $scope.useSendMax,
|
useSendMax: $scope.useSendMax,
|
||||||
|
fromWalletId: $scope.fromWalletId
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($scope.shapeshiftOrderId) {
|
if ($scope.shapeshiftOrderId) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo, bwcError, gettextCatalog, scannerService, configService, bitcoinCashJsService, $ionicPopup, $ionicNavBarDelegate, clipboardService) {
|
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, $ionicLoading, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo, bwcError, gettextCatalog, scannerService, configService, bitcoinCashJsService, $ionicPopup, $ionicNavBarDelegate, clipboardService) {
|
||||||
var clipboardHasAddress = false;
|
var clipboardHasAddress = false;
|
||||||
var clipboardHasContent = false;
|
var clipboardHasContent = false;
|
||||||
var originalList;
|
var originalList;
|
||||||
|
|
@ -15,9 +15,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
if ($scope.clipboardHasAddress || $scope.clipboardHasContent) {
|
if ($scope.clipboardHasAddress || $scope.clipboardHasContent) {
|
||||||
clipboardService.readFromClipboard(function(text) {
|
clipboardService.readFromClipboard(function(text) {
|
||||||
$scope.$apply(function() {
|
$scope.$apply(function() {
|
||||||
$scope.formData.search = text;
|
$scope.formData.search = text;
|
||||||
|
$scope.findContact($scope.formData.search);
|
||||||
});
|
});
|
||||||
$scope.findContact($scope.formData.search);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$ionicPopup.alert({
|
$ionicPopup.alert({
|
||||||
|
|
@ -70,11 +70,13 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
||||||
}
|
}
|
||||||
$scope.walletSelectorTitleTo = gettextCatalog.getString('Send to');
|
$scope.walletSelectorTitleTo = gettextCatalog.getString('Send to');
|
||||||
} else {
|
} else {
|
||||||
|
$ionicLoading.show();
|
||||||
walletService.getAddress(wallet, true, function(err, addr) {
|
walletService.getAddress(wallet, true, function(err, addr) {
|
||||||
|
$ionicLoading.hide();
|
||||||
return $state.transitionTo('tabs.send.amount', {
|
return $state.transitionTo('tabs.send.amount', {
|
||||||
displayAddress: $scope.walletToWalletFrom.coin === 'bch' ? bitcoinCashJsService.translateAddresses(addr).cashaddr : addr,
|
displayAddress: $scope.walletToWalletFrom.coin === 'bch' ? bitcoinCashJsService.translateAddresses(addr).cashaddr : addr,
|
||||||
recipientType: 'wallet',
|
recipientType: 'wallet',
|
||||||
fromWalletId: $scope.walletToWalletFrom.walletId,
|
fromWalletId: $scope.walletToWalletFrom.id,
|
||||||
toAddress: addr,
|
toAddress: addr,
|
||||||
coin: $scope.walletToWalletFrom.coin
|
coin: $scope.walletToWalletFrom.coin
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,10 @@ angular.module('copayApp.services').factory('clipboardService', function ($http,
|
||||||
},0);
|
},0);
|
||||||
} else {
|
} else {
|
||||||
navigator.clipboard.readText()
|
navigator.clipboard.readText()
|
||||||
.then(text => {
|
.then(function (text) {
|
||||||
cb(text);
|
cb(text);
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(function (err) {
|
||||||
$log.debug("Clipboard reading is not supported in browser..");
|
$log.debug("Clipboard reading is not supported in browser..");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -228,10 +228,12 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
||||||
} else if (/^https?:\/\//.test(data)) {
|
} else if (/^https?:\/\//.test(data)) {
|
||||||
payproService.getPayProDetails(data, coin, function(err, details) {
|
payproService.getPayProDetails(data, coin, function(err, details) {
|
||||||
if (err) {
|
if (err) {
|
||||||
root.showMenu({
|
if ($state.includes('tabs.scan')) {
|
||||||
data: data,
|
root.showMenu({
|
||||||
type: 'url'
|
data: data,
|
||||||
});
|
type: 'url'
|
||||||
|
});
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
handlePayPro(details);
|
handlePayPro(details);
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@
|
||||||
wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">
|
wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">
|
||||||
</wallet-selector>
|
</wallet-selector>
|
||||||
<wallet-selector
|
<wallet-selector
|
||||||
wallet-selector-on-hide="showWalletSelector"
|
wallet-selector-on-hide=""
|
||||||
wallet-selector-title="walletSelectorTitleTo"
|
wallet-selector-title="walletSelectorTitleTo"
|
||||||
wallet-selector-wallets="walletsBch"
|
wallet-selector-wallets="walletsBch"
|
||||||
wallet-selector-selected-wallet="wallet"
|
wallet-selector-selected-wallet="wallet"
|
||||||
|
|
@ -124,7 +124,7 @@
|
||||||
wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">
|
wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">
|
||||||
</wallet-selector>
|
</wallet-selector>
|
||||||
<wallet-selector
|
<wallet-selector
|
||||||
wallet-selector-on-hide="showWalletSelector"
|
wallet-selector-on-hide=""
|
||||||
wallet-selector-title="walletSelectorTitleTo"
|
wallet-selector-title="walletSelectorTitleTo"
|
||||||
wallet-selector-wallets="walletsBtc"
|
wallet-selector-wallets="walletsBtc"
|
||||||
wallet-selector-selected-wallet="wallet"
|
wallet-selector-selected-wallet="wallet"
|
||||||
|
|
@ -132,5 +132,4 @@
|
||||||
wallet-selector-on-select="onWalletSelect"
|
wallet-selector-on-select="onWalletSelect"
|
||||||
wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">
|
wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">
|
||||||
</wallet-selector>
|
</wallet-selector>
|
||||||
|
|
||||||
</ion-view>
|
</ion-view>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue