Show pasted address instead of always cashaddr format on bch
This commit is contained in:
parent
448679d1a6
commit
99d8de02da
6 changed files with 19 additions and 9 deletions
|
|
@ -456,6 +456,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory,
|
||||||
|
|
||||||
var confirmData = {
|
var confirmData = {
|
||||||
amount: useSendMax ? undefined : satoshis,
|
amount: useSendMax ? undefined : satoshis,
|
||||||
|
displayAddress: passthroughParams.displayAddress,
|
||||||
fromWalletId: passthroughParams.fromWalletId,
|
fromWalletId: passthroughParams.fromWalletId,
|
||||||
sendMax: useSendMax,
|
sendMax: useSendMax,
|
||||||
toAddress: passthroughParams.toAddress,
|
toAddress: passthroughParams.toAddress,
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
|
||||||
kind: '', // 'address', 'contact', 'wallet'
|
kind: '', // 'address', 'contact', 'wallet'
|
||||||
name: ''
|
name: ''
|
||||||
};
|
};
|
||||||
|
vm.displayAddress = '';
|
||||||
vm.feeCrypto = '';
|
vm.feeCrypto = '';
|
||||||
vm.feeFiat = '';
|
vm.feeFiat = '';
|
||||||
vm.fiatCurrency = '';
|
vm.fiatCurrency = '';
|
||||||
|
|
@ -56,10 +57,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
|
||||||
|
|
||||||
var sendFlowData;
|
var sendFlowData;
|
||||||
var config = null;
|
var config = null;
|
||||||
var countDown = null;
|
|
||||||
var defaults = {};
|
|
||||||
var coin = '';
|
var coin = '';
|
||||||
var countDown = null;
|
var countDown = null;
|
||||||
|
var defaults = {};
|
||||||
var usingCustomFee = false;
|
var usingCustomFee = false;
|
||||||
var usingMerchantFee = false;
|
var usingMerchantFee = false;
|
||||||
var destinationWalletId = '';
|
var destinationWalletId = '';
|
||||||
|
|
@ -86,6 +86,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
|
||||||
toAddress = sendFlowData.toAddress;
|
toAddress = sendFlowData.toAddress;
|
||||||
destinationWalletId = sendFlowData.toWalletId;
|
destinationWalletId = sendFlowData.toWalletId;
|
||||||
|
|
||||||
|
vm.displayAddress = sendFlowData.displayAddress;
|
||||||
vm.originWallet = profileService.getWallet(originWalletId);
|
vm.originWallet = profileService.getWallet(originWalletId);
|
||||||
vm.origin.currency = vm.originWallet.coin.toUpperCase();
|
vm.origin.currency = vm.originWallet.coin.toUpperCase();
|
||||||
coin = vm.originWallet.coin;
|
coin = vm.originWallet.coin;
|
||||||
|
|
|
||||||
|
|
@ -390,6 +390,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
var stateParams = {
|
var stateParams = {
|
||||||
toAddress: toAddress,
|
toAddress: toAddress,
|
||||||
|
displayAddress: toAddress,
|
||||||
coin: coin,
|
coin: coin,
|
||||||
noPrefix: 1
|
noPrefix: 1
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ angular
|
||||||
// even other properties added that this service does not know about. (such as "coin")
|
// even other properties added that this service does not know about. (such as "coin")
|
||||||
state: {
|
state: {
|
||||||
amount: '',
|
amount: '',
|
||||||
|
displayAddress: null,
|
||||||
fromWalletId: '',
|
fromWalletId: '',
|
||||||
sendMax: false,
|
sendMax: false,
|
||||||
thirdParty: null,
|
thirdParty: null,
|
||||||
|
|
@ -42,6 +43,7 @@ angular
|
||||||
console.log("sendFlow clearCurrent()");
|
console.log("sendFlow clearCurrent()");
|
||||||
service.state = {
|
service.state = {
|
||||||
amount: '',
|
amount: '',
|
||||||
|
displayAddress: null,
|
||||||
fromWalletId: '',
|
fromWalletId: '',
|
||||||
sendMax: false,
|
sendMax: false,
|
||||||
thirdParty: null,
|
thirdParty: null,
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
&.expanded {
|
&.expanded {
|
||||||
white-space: pre-wrap;
|
white-space: normal;
|
||||||
word-break: break-all;
|
text-overflow: clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prefix {
|
.prefix {
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="item-content item-content-compact" ng-init="addressExpanded = false" ng-if="vm.destination.kind === 'address' && !vm.thirdParty">
|
<div class="item-content item-content-compact" ng-init="addressExpanded = false" ng-if="vm.destination.kind === 'address' && !vm.thirdParty">
|
||||||
<div class="address-frame" ng-class="{ 'expanded': addressExpanded }" ng-click="addressExpanded = !addressExpanded">
|
<div class="address-frame" ng-class="{ 'expanded': addressExpanded }" ng-click="addressExpanded = !addressExpanded">
|
||||||
<span class="prefix">{{vm.destination.address.substring(0,5)}}</span><span class="mid">{{vm.destination.address.substring(5,vm.destination.address.length-4)}}</span><span class="suffix">{{vm.destination.address.substring(vm.destination.address.length-4)}}</span>
|
<span ng-if="!vm.displayAddress">
|
||||||
|
<span class="prefix">{{vm.destination.address.substring(0,5)}}</span><span class="mid">{{vm.destination.address.substring(5,vm.destination.address.length-4)}}</span><span class="suffix">{{vm.destination.address.substring(vm.destination.address.length-4)}}</span>
|
||||||
|
</span>
|
||||||
|
<span ng-if="vm.displayAddress">
|
||||||
|
<span class="prefix">{{vm.displayAddress.substring(0,5)}}</span><span class="mid">{{vm.displayAddress.substring(5,vm.displayAddress.length-4)}}</span><span class="suffix">{{vm.displayAddress.substring(vm.displayAddress.length-4)}}</span>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue