Ref chain to coin. Adds create wallet

This commit is contained in:
Gustavo Maximiliano Cortez 2017-08-27 23:50:27 -03:00
commit 2c33f186af
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
37 changed files with 90 additions and 89 deletions

View file

@ -1,13 +1,8 @@
'use strict';
angular.module('copayApp.controllers').controller('addressesController', function($scope, $log, $stateParams, $state, $timeout, $ionicHistory, $ionicScrollDelegate, configService, popupService, gettextCatalog, ongoingProcess, lodash, profileService, walletService, bwcError, platformInfo, appConfigService, txFormatService, feeService) {
angular.module('copayApp.controllers').controller('addressesController', function($scope, $log, $stateParams, $state, $timeout, $ionicHistory, $ionicScrollDelegate, popupService, gettextCatalog, ongoingProcess, lodash, profileService, walletService, bwcError, platformInfo, appConfigService, txFormatService, feeService) {
var UNUSED_ADDRESS_LIMIT = 5;
var BALANCE_ADDRESS_LIMIT = 5;
var config = configService.getSync().wallet.settings;
var unitName = config.unitName;
var unitToSatoshi = config.unitToSatoshi;
var satToUnit = 1 / unitToSatoshi;
var unitDecimals = config.unitDecimals;
var withBalance, cachedWallet;
$scope.isCordova = platformInfo.isCordova;

View file

@ -21,8 +21,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.nextStep = data.stateParams.nextStep;
$scope.currency = data.stateParams.currency;
$scope.forceCurrency = data.stateParams.forceCurrency;
$scope.forceChain = data.stateParams.forceChain || null;
$scope.chain = $scope.forceChain || data.stateParams.chain || 'BTC';
$scope.forceCoin = data.stateParams.forceCoin;
$scope.coin = data.stateParams.coin || 'btc';
$scope.showMenu = $ionicHistory.backView() && ($ionicHistory.backView().stateName == 'tabs.send' ||
$ionicHistory.backView().stateName == 'tabs.bitpayCard');
@ -125,10 +125,10 @@ angular.module('copayApp.controllers').controller('amountController', function($
}
};
$scope.toggleChain = function() {
if ($scope.forceCurrency || $scope.forceChain) return;
$scope.toggleCoin = function() {
if ($scope.forceCurrency || $scope.forceCoin) return;
$scope.chain = $scope.chain == 'BTC' ? 'BCH' : 'BTC';
$scope.coin = $scope.coin == 'btc' ? 'bch' : 'btc';
};
function checkFontSize() {
@ -234,8 +234,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
$state.transitionTo($scope.nextStep, {
id: _id,
amount: $scope.useSendMax ? null : _amount,
currency: $scope.showAlternativeAmount ? $scope.alternativeIsoCode : $scope.chain,
chain: $scope.chain,
currency: $scope.showAlternativeAmount ? $scope.alternativeIsoCode : $scope.coin,
coin: $scope.coin,
useSendMax: $scope.useSendMax
});
} else {
@ -247,7 +247,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
toName: $scope.toName,
toEmail: $scope.toEmail,
toColor: $scope.toColor,
chain: $scope.chain,
coin: $scope.coin,
useSendMax: $scope.useSendMax
});
}

View file

@ -293,7 +293,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
onlyComplete: true,
network: $scope.network,
hasFunds: true,
chain: 'BTC'
coin: 'btc'
});
if (lodash.isEmpty($scope.wallets)) {
showErrorAndBack(null, gettextCatalog.getString('No wallets available'));

View file

@ -88,7 +88,7 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController', funct
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isFiat = data.stateParams.currency != 'BCH' && data.stateParams.currency != 'BTC' ? true : false;
$scope.isFiat = data.stateParams.currency != 'BTC' ? true : false;
amount = data.stateParams.amount;
currency = data.stateParams.currency;
@ -96,7 +96,7 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController', funct
$scope.wallets = profileService.getWallets({
onlyComplete: true,
network: $scope.network,
chain: 'BTC'
coin: 'btc'
});
if (lodash.isEmpty($scope.wallets)) {

View file

@ -70,7 +70,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController', functi
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isFiat = data.stateParams.currency != 'BCH' && data.stateParams.currency != 'BTC' ? true : false;
$scope.isFiat = data.stateParams.currency != 'BTC' ? true : false;
amount = data.stateParams.amount;
currency = data.stateParams.currency;
@ -78,7 +78,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController', functi
$scope.wallets = profileService.getWallets({
onlyComplete: true,
network: $scope.network,
chain: 'BTC'
coin: 'btc'
});
if (lodash.isEmpty($scope.wallets)) {

View file

@ -285,7 +285,7 @@ angular.module('copayApp.controllers').controller('buyMercadoLibreController', f
$scope.wallets = profileService.getWallets({
onlyComplete: true,
network: $scope.network,
chain: 'BTC'
coin: 'btc'
});
if (lodash.isEmpty($scope.wallets)) {
showErrorAndBack(null, gettextCatalog.getString('No wallets available'));

View file

@ -69,7 +69,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.$on("$ionicView.beforeEnter", function(event, data) {
function setWalletSelector(chain, network, minAmount, cb) {
function setWalletSelector(coin, network, minAmount, cb) {
// no min amount? (sendMax) => look for no empty wallets
minAmount = minAmount || 1;
@ -77,7 +77,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.wallets = profileService.getWallets({
onlyComplete: true,
network: network,
chain: chain
coin: coin
});
if (!$scope.wallets || !$scope.wallets.length) {
@ -138,7 +138,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
toEmail: data.stateParams.toEmail,
toColor: data.stateParams.toColor,
network: (new bitcore.Address(data.stateParams.toAddress)).network.name,
chain: data.stateParams.chain,
coin: data.stateParams.coin,
txp: {},
};
@ -151,7 +151,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.walletSelectorTitle = gettextCatalog.getString('Send from');
setWalletSelector(tx.chain, tx.network, tx.toAmount, function(err) {
setWalletSelector(tx.coin, tx.network, tx.toAmount, function(err) {
if (err) {
return exitWithError('Could not update wallets');
}

View file

@ -28,7 +28,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func
$scope.address = addr;
$scope.chain = (data.stateParams.chain).toLowerCase();
$scope.coin = (data.stateParams.coin).toLowerCase();
var parsedAmount = txFormatService.parseAmount(
$scope.wallet,
data.stateParams.amount,
@ -43,7 +43,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func
// Convert to BTC or BCH
var config = configService.getSync().wallet.settings;
var amountUnit = txFormatService.satToUnit(parsedAmount.amountSat);
var btcParsedAmount = txFormatService.parseAmount($scope.wallet, amountUnit, $scope.wallet.chain);
var btcParsedAmount = txFormatService.parseAmount($scope.wallet, amountUnit, $scope.wallet.coin);
$scope.amountBtc = btcParsedAmount.amount;
$scope.altAmountStr = btcParsedAmount.amountUnitStr;
@ -68,7 +68,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func
}
$scope.copyToClipboard = function() {
return 'bitcoin:' + $scope.address + '?amount=' + $scope.amountBtc + '&chain=' + $scope.chain;
return 'bitcoin:' + $scope.address + '?amount=' + $scope.amountBtc + '&coin=' + $scope.coin;
};
});

View file

@ -170,7 +170,7 @@ angular.module('copayApp.controllers').controller('sellCoinbaseController', func
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isFiat = data.stateParams.currency != 'BCH' && data.stateParams.currency != 'BTC' ? true : false;
$scope.isFiat = data.stateParams.currency != 'BTC' ? true : false;
amount = data.stateParams.amount;
currency = data.stateParams.currency;
@ -183,7 +183,7 @@ angular.module('copayApp.controllers').controller('sellCoinbaseController', func
onlyComplete: true,
network: $scope.network,
hasFunds: true,
chain: 'BTC'
coin: 'btc'
});
if (lodash.isEmpty($scope.wallets)) {

View file

@ -70,7 +70,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController', funct
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isFiat = data.stateParams.currency != 'BCH' && data.stateParams.currency != 'BTC' ? true : false;
$scope.isFiat = data.stateParams.currency != 'BTC' ? true : false;
amount = data.stateParams.amount;
currency = data.stateParams.currency;
@ -80,7 +80,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController', funct
onlyComplete: true,
network: $scope.network,
hasFunds: true,
chain: 'BTC'
coin: 'btc'
});
if (lodash.isEmpty($scope.wallets)) {

View file

@ -9,7 +9,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.requestSpecificAmount = function() {
$state.go('tabs.paymentRequest.amount', {
id: $scope.wallet.credentials.walletId,
forceChain: $scope.wallet.chain
coin: $scope.wallet.coin
});
};

View file

@ -257,7 +257,7 @@ angular.module('copayApp.controllers').controller('topUpController', function($s
onlyComplete: true,
network: bitpayService.getEnvironment().network,
hasFunds: true,
chain: 'BTC'
coin: 'btc'
});
if (lodash.isEmpty($scope.wallets)) {

View file

@ -287,7 +287,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*/
.state('tabs.send.amount', {
url: '/amount/:recipientType/:toAddress/:toName/:toEmail/:toColor/:chain',
url: '/amount/:recipientType/:toAddress/:toName/:toEmail/:toColor/:coin',
views: {
'tab-send@tabs': {
controller: 'amountController',
@ -296,7 +296,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('tabs.send.confirm', {
url: '/confirm/:recipientType/:toAddress/:toName/:toAmount/:toEmail/:toColor/:description/:chain/:useSendMax',
url: '/confirm/:recipientType/:toAddress/:toName/:toAmount/:toEmail/:toColor/:description/:coin/:useSendMax',
views: {
'tab-send@tabs': {
controller: 'confirmController',
@ -672,7 +672,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
})
.state('tabs.paymentRequest.amount', {
url: '/amount/:forceChain',
url: '/amount/:coin',
views: {
'tab-receive@tabs': {
controller: 'amountController',
@ -681,7 +681,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('tabs.paymentRequest.confirm', {
url: '/confirm/:amount/:currency/:chain',
url: '/confirm/:amount/:currency/:coin',
views: {
'tab-receive@tabs': {
controller: 'customAmountController',
@ -916,7 +916,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
},
params: {
forceChain: 'BTC'
coin: 'btc',
forceCoin: true
}
})
.state('tabs.buyandsell.glidera.amount', {
@ -972,7 +973,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
},
params: {
forceChain: 'BTC'
coin: 'btc',
forceCoin: true
}
})
.state('tabs.preferences.coinbase', {
@ -1062,7 +1064,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
nextStep: 'tabs.giftcards.mercadoLibre.buy',
currency: 'BRL',
forceCurrency: true,
forceChain: 'BTC'
coin: 'btc',
forceCoin: true
}
})
.state('tabs.giftcards.mercadoLibre.buy', {
@ -1114,7 +1117,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
nextStep: 'tabs.giftcards.amazon.buy',
currency: 'USD',
forceCurrency: true,
forceChain: 'BTC'
coin: 'btc',
forceCoin: true
}
})
.state('tabs.giftcards.amazon.buy', {
@ -1154,7 +1158,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
params: {
id: null,
currency: 'USD',
forceChain: 'BTC',
coin: 'btc',
forceCoin: true,
useSendMax: null
}
})

View file

@ -65,8 +65,8 @@ angular.module('copayApp.services').factory('feeService', function($log, $timeou
var walletClient = bwcService.getClient();
walletClient.getFeeLevels('livenet', function(errLivenet, levelsLivenet) {
walletClient.getFeeLevels('testnet', function(errTestnet, levelsTestnet) {
walletClient.getFeeLevels('btc', 'livenet', function(errLivenet, levelsLivenet) {
walletClient.getFeeLevels('btc', 'testnet', function(errTestnet, levelsTestnet) {
if (errLivenet || errTestnet) {
return cb(gettextCatalog.getString('Could not get dynamic fee'));
}

View file

@ -46,7 +46,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
return true;
}
function goSend(addr, amount, message, chain) {
function goSend(addr, amount, message, coin) {
$state.go('tabs.send', {}, {
'reload': true,
'notify': $state.current.name == 'tabs.send' ? false : true
@ -58,12 +58,12 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
toAmount: amount,
toAddress: addr,
description: message,
chain: chain
coin: coin
});
} else {
$state.transitionTo('tabs.send.amount', {
toAddress: addr,
chain: chain
coin: coin
});
}
}, 100);
@ -92,17 +92,17 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
var message = parsed.message;
var amount = parsed.amount ? parsed.amount : '';
var chain = parsed.extras && parsed.extras.chain ? (parsed.extras.chain).toUpperCase() : '';
var coin = parsed.extras && parsed.extras.coin ? (parsed.extras.coin).toUpperCase() : '';
if (parsed.r) {
payproService.getPayProDetails(parsed.r, function(err, details) {
if (err) {
if (addr && amount) goSend(addr, amount, message, chain);
if (addr && amount) goSend(addr, amount, message, coin);
else popupService.showAlert(gettextCatalog.getString('Error'), err);
} else handlePayPro(details);
});
} else {
goSend(addr, amount, message, chain);
goSend(addr, amount, message, coin);
}
return true;

View file

@ -89,10 +89,11 @@ angular.module('copayApp.services')
wallet.copayerId = wallet.credentials.copayerId;
wallet.m = wallet.credentials.m;
wallet.n = wallet.credentials.n;
wallet.chain = wallet.credentials.chain ? (wallet.credentials.chain).toUpperCase() : 'BTC';
wallet.coin = wallet.credentials.coin ? wallet.credentials.coin : 'btc';
console.log('[profileService.js:92]',wallet); //TODO/
// TODO: Should return "chain" = "BTC" or "BCH"
client.credentials.chain = 'BTC';
// TODO: Should return "coin" = "btc" or "bch"
//client.credentials.coin = 'btc';
root.updateWalletSettings(wallet);
root.wallet[walletId] = wallet;
@ -756,9 +757,9 @@ angular.module('copayApp.services')
var ret = lodash.values(root.wallet);
if (opts.chain) {
if (opts.coin) {
ret = lodash.filter(ret, function(x) {
return (x.credentials.chain == opts.chain);
return (x.credentials.coin == opts.coin);
});
}

View file

@ -19,7 +19,7 @@ angular.module('copayApp.services').factory('txFormatService', function($filter,
root.formatAmountStr = function(wallet, satoshis) {
if (isNaN(satoshis)) return;
return root.formatAmount(satoshis) + ' ' + wallet.chain;
return root.formatAmount(satoshis) + ' ' + wallet.coin;
};
root.toFiat = function(satoshis, code, cb) {
@ -196,13 +196,13 @@ angular.module('copayApp.services').factory('txFormatService', function($filter,
amountUnitStr = root.formatAmountStr(wallet, amountSat);
// convert sat to BTC or BCH
amount = (amountSat * satToBtc).toFixed(8);
currency = wallet.chain;
currency = (wallet.coin).toUpperCase();
} else {
amountSat = parseInt((amount * unitToSatoshi).toFixed(0));
amountUnitStr = root.formatAmountStr(wallet, amountSat);
// convert unit to BTC or BCH
amount = (amountSat * satToBtc).toFixed(8);
currency = wallet.chain;
currency = (wallet.coin).toUpperCase();
}
return {

View file

@ -215,11 +215,11 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
cache.satToUnit = 1 / cache.unitToSatoshi;
//STR
cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + wallet.chain;
cache.lockedBalanceStr = txFormatService.formatAmount(cache.lockedBalanceSat) + ' ' + wallet.chain;
cache.availableBalanceStr = txFormatService.formatAmount(cache.availableBalanceSat) + ' ' + wallet.chain;
cache.spendableBalanceStr = txFormatService.formatAmount(cache.spendableAmount) + ' ' + wallet.chain;
cache.pendingBalanceStr = txFormatService.formatAmount(cache.pendingAmount) + ' ' + wallet.chain;
cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + wallet.coin;
cache.lockedBalanceStr = txFormatService.formatAmount(cache.lockedBalanceSat) + ' ' + wallet.coin;
cache.availableBalanceStr = txFormatService.formatAmount(cache.availableBalanceSat) + ' ' + wallet.coin;
cache.spendableBalanceStr = txFormatService.formatAmount(cache.spendableAmount) + ' ' + wallet.coin;
cache.pendingBalanceStr = txFormatService.formatAmount(cache.pendingAmount) + ' ' + wallet.coin;
cache.alternativeName = config.settings.alternativeName;
cache.alternativeIsoCode = config.settings.alternativeIsoCode;
@ -412,12 +412,12 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
var fixTxsUnit = function(txs) {
if (!txs || !txs[0] || !txs[0].amountStr) return;
var cacheChain = txs[0].amountStr.split(' ')[1];
var cacheCoin = txs[0].amountStr.split(' ')[1];
if (cacheChain == wallet.chain)
if (cacheCoin == wallet.coin)
return;
$log.debug('Fixing Tx Cache Unit to: ' + wallet.chain)
$log.debug('Fixing Tx Cache Unit to: ' + wallet.coin)
lodash.each(txs, function(tx) {
tx.amountStr = txFormatService.formatAmountStr(wallet, tx.amount);
tx.feeStr = txFormatService.formatAmountStr(wallet, tx.fees);

View file

@ -49,18 +49,18 @@
<div class="amount__editable" ng-class="{'amount__editable--minimize': smallFont, 'amount__editable--standard': !smallFont, 'amount__editable--placeholder': !amount}">
<span class="amount__number">{{amount || "0.00" }}</span>
<a class="amount__currency-toggle" ng-show="showAlternativeAmount">{{alternativeIsoCode}}</a>
<a class="amount__currency-toggle" ng-click="toggleChain()" ng-show="!showAlternativeAmount">{{chain}}</a>
<a class="amount__currency-toggle" ng-click="toggleCoin()" ng-show="!showAlternativeAmount">{{coin}}</a>
</div>
<div class="icon-toggle" ng-if="!forceCurrency" ng-click="toggleAlternative()">
<i class="icon ion-arrow-swap"></i>
</div>
<div ng-class="{'amount__results--minimize': smallFont, 'amount__results--standard': !smallFont, 'amount__results--placeholder': !amountResult}" ng-show="!showAlternativeAmount">
<div class="amount__result" ng-show="globalResult">{{globalResult}} {{chain}}</div>
<div class="amount__result" ng-show="globalResult">{{globalResult}} {{coin}}</div>
<div class="amount__result-equiv">&asymp; {{amountResult || '0.00'}} {{alternativeIsoCode}}</div>
</div>
<div ng-class="{'amount__results--minimize': smallFont, 'amount__results--standard': !smallFont, 'amount__results--placeholder': !amountResult}" ng-show="showAlternativeAmount">
<div class="amount__result" ng-show="globalResult">{{globalResult}} {{alternativeIsoCode}}</div>
<div class="amount__result-equiv">{{alternativeResult || '0.00'}} {{chain}}</div>
<div class="amount__result-equiv">{{alternativeResult || '0.00'}} {{coin}}</div>
</div>
</div>
</div>

View file

@ -29,7 +29,7 @@
<div class="label" translate>From</div>
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
</i>
{{wallet ? wallet.name : '...'}}
</div>

View file

@ -38,7 +38,7 @@
<div class="label">Receive in</div>
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
</i>
{{wallet ? wallet.name : '...'}}
</div>

View file

@ -30,7 +30,7 @@
<div class="label">Receive in</div>
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-style="{'background-color': wallet.color}" class="bg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-style="{'background-color': wallet.color}" class="bg">
</i>
{{wallet ? wallet.name : '...'}}
</div>

View file

@ -28,7 +28,7 @@
<div class="label" translate>From</div>
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
</i>
{{wallet ? wallet.name : '...'}}
</div>

View file

@ -65,7 +65,7 @@
<span class="label" translate>From</span>
<div class="wallet" ng-if="wallet">
<i class="icon big-icon-svg">
<img src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg"/>
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg"/>
</i>
<div>{{wallet.name}}</div>
</div>

View file

@ -21,7 +21,7 @@
<ion-content scroll="false">
<div class="address" ng-if="address && amountBtc">
<div class="qr-code" copy-to-clipboard="copyToClipboard()">
<qrcode size="220" data="bitcoin:{{address + '?amount=' + amountBtc + '&chain=' + chain}}" color="#334"></qrcode>
<qrcode size="220" data="bitcoin:{{address + '?amount=' + amountBtc + '&coin=' + coin}}" color="#334"></qrcode>
</div>
<div class="info">
<div class="item single-line" copy-to-clipboard="address">
@ -39,7 +39,7 @@
<div class="item single-line">
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
</i>
{{wallet.name}}
</div>

View file

@ -1,6 +1,6 @@
<div class="wallet-item">
<i class="icon big-icon-svg circle">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg"/>
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg"/>
</i>
<div class="name">
{{wallet.name || wallet.id}}

View file

@ -7,7 +7,7 @@
ng-click="selectWallet(w)"
>
<i class="icon big-icon-svg">
<img ng-src="img/{{w.network == 'testnet' ? 'icon-wallet-testnet' : (w.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !w.color}" ng-style="{'background-color': w.color}" class="bg">
<img ng-src="img/{{w.network == 'testnet' ? 'icon-wallet-testnet' : (w.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !w.color}" ng-style="{'background-color': w.color}" class="bg">
</i>
<div class="wallet-inner">
<div class="wallet-details">

View file

@ -74,7 +74,7 @@
<span class="label" translate>From</span>
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg"/>
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg"/>
</i>
<div>{{wallet.name}}</div>
</div>

View file

@ -24,7 +24,7 @@
<div class="list card" ng-click="showWalletSelector()" ng-if="wallets[0]">
<a ng-if="wallet" class="item item-sub item-icon-left item-big-icon-left item-icon-right">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg wallet"/>
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg wallet"/>
</i>
<span>
{{wallet.name || wallet.id}}

View file

@ -29,7 +29,7 @@
<div class="label">From</div>
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
</i>
{{wallet ? wallet.name : '...'}}
</div>

View file

@ -30,7 +30,7 @@
<div class="label">From</div>
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-style="{'background-color': wallet.color}" class="bg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-style="{'background-color': wallet.color}" class="bg">
</i>
{{wallet ? wallet.name : '...'}}
</div>

View file

@ -81,7 +81,7 @@
class="item item-sub item-icon-left item-big-icon-left item-icon-right wallet"
ng-click="openWallet(wallet)">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg wallet"/>
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg wallet"/>
</i>
<span>
{{wallet.name || wallet.id}}

View file

@ -63,7 +63,7 @@
<div class="wallet-selector" ng-click="showWalletSelector()" ng-if="wallets[0] && wallet">
<a ng-if="wallet" class="item item-sub item-icon-left item-big-icon-left item-icon-right">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg wallet"/>
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg wallet"/>
</i>
<span>
{{wallet.name || wallet.id}}

View file

@ -69,7 +69,7 @@
<div class="list">
<a class="item item-icon-left item-icon-right" ng-repeat="item in list" ng-if="hasWallets && item.recipientType == 'wallet'" ng-click="goToAmount(item)">
<i class="icon big-icon-svg" ng-if="item.recipientType == 'wallet'">
<img ng-src="img/{{item.network == 'testnet' ? 'icon-wallet-testnet' : (item.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !item.color}" ng-style="{'background-color': item.color}" class="bg"/>
<img ng-src="img/{{item.network == 'testnet' ? 'icon-wallet-testnet' : (item.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !item.color}" ng-style="{'background-color': item.color}" class="bg"/>
</i>
{{item.name}}
<i class="icon bp-arrow-right"></i>

View file

@ -95,7 +95,7 @@
ui-sref="tabs.preferences({'walletId': item.id})"
ng-repeat="item in wallets track by $index">
<i class="icon big-icon-svg circle">
<img ng-src="img/{{item.network == 'testnet' ? 'icon-wallet-testnet' : (item.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !item.color}" ng-style="{'background-color': item.color}" class="bg"/>
<img ng-src="img/{{item.network == 'testnet' ? 'icon-wallet-testnet' : (item.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !item.color}" ng-style="{'background-color': item.color}" class="bg"/>
</i>
<span>
{{item.name || item.id}}

View file

@ -31,10 +31,10 @@
<div class="info">
<div class="item item-icon-right" ng-click="showWalletSelector()">
<div class="label" translate>From {{wallet.chain}}</div>
<div class="label" translate>From {{wallet.coin}}</div>
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg">
</i>
{{wallet ? wallet.name : '...'}}
</div>

View file

@ -53,7 +53,7 @@
<span class="label" ng-if="btx.action !== 'sent'" translate>To</span>
<div class="wallet">
<i class="icon big-icon-svg">
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.chain == 'BTC' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg"/>
<img ng-src="img/{{wallet.network == 'testnet' ? 'icon-wallet-testnet' : (wallet.coin == 'btc' ? 'icon-btc' : 'icon-bch')}}.svg" ng-class="{'wallet-background-color-default': !wallet.color}" ng-style="{'background-color': wallet.color}" class="bg"/>
</i>
<div>{{wallet.name}}</div>
</div>