Merge remote-tracking branch 'origin/wallet/task/416' into wallet/task/416

This commit is contained in:
Sebastiaan Pasma 2018-07-19 17:11:43 +02:00
commit 66f8ac5a5a
No known key found for this signature in database
GPG key ID: 9A2B0C8B95A1D26F
5 changed files with 22 additions and 15 deletions

View file

@ -38,9 +38,11 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.minShapeshiftAmount = parseFloat(data.stateParams.minShapeshiftAmount);
$scope.maxShapeshiftAmount = parseFloat(data.stateParams.maxShapeshiftAmount);
$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) {
$scope.showWarningMessage = data.stateParams.noPrefix != 0;
if ($scope.showWarningMessage) {
@ -458,7 +460,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
amount: $scope.useSendMax ? null : _amount,
currency: unit.id.toUpperCase(),
coin: coin,
useSendMax: $scope.useSendMax
useSendMax: $scope.useSendMax,
fromWalletId: $scope.fromWalletId
});
} else {
var amount = _amount;
@ -479,6 +482,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
toColor: $scope.toColor,
coin: coin,
useSendMax: $scope.useSendMax,
fromWalletId: $scope.fromWalletId
};
if ($scope.shapeshiftOrderId) {

View file

@ -1,6 +1,6 @@
'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 clipboardHasContent = false;
var originalList;
@ -15,9 +15,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
if ($scope.clipboardHasAddress || $scope.clipboardHasContent) {
clipboardService.readFromClipboard(function(text) {
$scope.$apply(function() {
$scope.formData.search = text;
$scope.formData.search = text;
$scope.findContact($scope.formData.search);
});
$scope.findContact($scope.formData.search);
});
} else {
$ionicPopup.alert({
@ -70,11 +70,13 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
}
$scope.walletSelectorTitleTo = gettextCatalog.getString('Send to');
} else {
$ionicLoading.show();
walletService.getAddress(wallet, true, function(err, addr) {
$ionicLoading.hide();
return $state.transitionTo('tabs.send.amount', {
displayAddress: $scope.walletToWalletFrom.coin === 'bch' ? bitcoinCashJsService.translateAddresses(addr).cashaddr : addr,
recipientType: 'wallet',
fromWalletId: $scope.walletToWalletFrom.walletId,
fromWalletId: $scope.walletToWalletFrom.id,
toAddress: addr,
coin: $scope.walletToWalletFrom.coin
});

View file

@ -31,10 +31,10 @@ angular.module('copayApp.services').factory('clipboardService', function ($http,
},0);
} else {
navigator.clipboard.readText()
.then(text => {
.then(function (text) {
cb(text);
})
.catch(err => {
.catch(function (err) {
$log.debug("Clipboard reading is not supported in browser..");
});

View file

@ -228,10 +228,12 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
} else if (/^https?:\/\//.test(data)) {
payproService.getPayProDetails(data, coin, function(err, details) {
if (err) {
root.showMenu({
data: data,
type: 'url'
});
if ($state.includes('tabs.scan')) {
root.showMenu({
data: data,
type: 'url'
});
}
return;
}
handlePayPro(details);

View file

@ -115,7 +115,7 @@
wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">
</wallet-selector>
<wallet-selector
wallet-selector-on-hide="showWalletSelector"
wallet-selector-on-hide=""
wallet-selector-title="walletSelectorTitleTo"
wallet-selector-wallets="walletsBch"
wallet-selector-selected-wallet="wallet"
@ -124,7 +124,7 @@
wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">
</wallet-selector>
<wallet-selector
wallet-selector-on-hide="showWalletSelector"
wallet-selector-on-hide=""
wallet-selector-title="walletSelectorTitleTo"
wallet-selector-wallets="walletsBtc"
wallet-selector-selected-wallet="wallet"
@ -132,5 +132,4 @@
wallet-selector-on-select="onWalletSelect"
wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">
</wallet-selector>
</ion-view>