Ref chain to coin. Adds create wallet
This commit is contained in:
parent
ac5ede702d
commit
2c33f186af
37 changed files with 90 additions and 89 deletions
|
|
@ -1,13 +1,8 @@
|
||||||
'use strict';
|
'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 UNUSED_ADDRESS_LIMIT = 5;
|
||||||
var BALANCE_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;
|
var withBalance, cachedWallet;
|
||||||
|
|
||||||
$scope.isCordova = platformInfo.isCordova;
|
$scope.isCordova = platformInfo.isCordova;
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
$scope.nextStep = data.stateParams.nextStep;
|
$scope.nextStep = data.stateParams.nextStep;
|
||||||
$scope.currency = data.stateParams.currency;
|
$scope.currency = data.stateParams.currency;
|
||||||
$scope.forceCurrency = data.stateParams.forceCurrency;
|
$scope.forceCurrency = data.stateParams.forceCurrency;
|
||||||
$scope.forceChain = data.stateParams.forceChain || null;
|
$scope.forceCoin = data.stateParams.forceCoin;
|
||||||
$scope.chain = $scope.forceChain || data.stateParams.chain || 'BTC';
|
$scope.coin = data.stateParams.coin || 'btc';
|
||||||
|
|
||||||
$scope.showMenu = $ionicHistory.backView() && ($ionicHistory.backView().stateName == 'tabs.send' ||
|
$scope.showMenu = $ionicHistory.backView() && ($ionicHistory.backView().stateName == 'tabs.send' ||
|
||||||
$ionicHistory.backView().stateName == 'tabs.bitpayCard');
|
$ionicHistory.backView().stateName == 'tabs.bitpayCard');
|
||||||
|
|
@ -125,10 +125,10 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.toggleChain = function() {
|
$scope.toggleCoin = function() {
|
||||||
if ($scope.forceCurrency || $scope.forceChain) return;
|
if ($scope.forceCurrency || $scope.forceCoin) return;
|
||||||
|
|
||||||
$scope.chain = $scope.chain == 'BTC' ? 'BCH' : 'BTC';
|
$scope.coin = $scope.coin == 'btc' ? 'bch' : 'btc';
|
||||||
};
|
};
|
||||||
|
|
||||||
function checkFontSize() {
|
function checkFontSize() {
|
||||||
|
|
@ -234,8 +234,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
$state.transitionTo($scope.nextStep, {
|
$state.transitionTo($scope.nextStep, {
|
||||||
id: _id,
|
id: _id,
|
||||||
amount: $scope.useSendMax ? null : _amount,
|
amount: $scope.useSendMax ? null : _amount,
|
||||||
currency: $scope.showAlternativeAmount ? $scope.alternativeIsoCode : $scope.chain,
|
currency: $scope.showAlternativeAmount ? $scope.alternativeIsoCode : $scope.coin,
|
||||||
chain: $scope.chain,
|
coin: $scope.coin,
|
||||||
useSendMax: $scope.useSendMax
|
useSendMax: $scope.useSendMax
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -247,7 +247,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
toName: $scope.toName,
|
toName: $scope.toName,
|
||||||
toEmail: $scope.toEmail,
|
toEmail: $scope.toEmail,
|
||||||
toColor: $scope.toColor,
|
toColor: $scope.toColor,
|
||||||
chain: $scope.chain,
|
coin: $scope.coin,
|
||||||
useSendMax: $scope.useSendMax
|
useSendMax: $scope.useSendMax
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
|
||||||
onlyComplete: true,
|
onlyComplete: true,
|
||||||
network: $scope.network,
|
network: $scope.network,
|
||||||
hasFunds: true,
|
hasFunds: true,
|
||||||
chain: 'BTC'
|
coin: 'btc'
|
||||||
});
|
});
|
||||||
if (lodash.isEmpty($scope.wallets)) {
|
if (lodash.isEmpty($scope.wallets)) {
|
||||||
showErrorAndBack(null, gettextCatalog.getString('No wallets available'));
|
showErrorAndBack(null, gettextCatalog.getString('No wallets available'));
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController', funct
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$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;
|
amount = data.stateParams.amount;
|
||||||
currency = data.stateParams.currency;
|
currency = data.stateParams.currency;
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController', funct
|
||||||
$scope.wallets = profileService.getWallets({
|
$scope.wallets = profileService.getWallets({
|
||||||
onlyComplete: true,
|
onlyComplete: true,
|
||||||
network: $scope.network,
|
network: $scope.network,
|
||||||
chain: 'BTC'
|
coin: 'btc'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (lodash.isEmpty($scope.wallets)) {
|
if (lodash.isEmpty($scope.wallets)) {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController', functi
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$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;
|
amount = data.stateParams.amount;
|
||||||
currency = data.stateParams.currency;
|
currency = data.stateParams.currency;
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController', functi
|
||||||
$scope.wallets = profileService.getWallets({
|
$scope.wallets = profileService.getWallets({
|
||||||
onlyComplete: true,
|
onlyComplete: true,
|
||||||
network: $scope.network,
|
network: $scope.network,
|
||||||
chain: 'BTC'
|
coin: 'btc'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (lodash.isEmpty($scope.wallets)) {
|
if (lodash.isEmpty($scope.wallets)) {
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,7 @@ angular.module('copayApp.controllers').controller('buyMercadoLibreController', f
|
||||||
$scope.wallets = profileService.getWallets({
|
$scope.wallets = profileService.getWallets({
|
||||||
onlyComplete: true,
|
onlyComplete: true,
|
||||||
network: $scope.network,
|
network: $scope.network,
|
||||||
chain: 'BTC'
|
coin: 'btc'
|
||||||
});
|
});
|
||||||
if (lodash.isEmpty($scope.wallets)) {
|
if (lodash.isEmpty($scope.wallets)) {
|
||||||
showErrorAndBack(null, gettextCatalog.getString('No wallets available'));
|
showErrorAndBack(null, gettextCatalog.getString('No wallets available'));
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$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
|
// no min amount? (sendMax) => look for no empty wallets
|
||||||
minAmount = minAmount || 1;
|
minAmount = minAmount || 1;
|
||||||
|
|
@ -77,7 +77,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
$scope.wallets = profileService.getWallets({
|
$scope.wallets = profileService.getWallets({
|
||||||
onlyComplete: true,
|
onlyComplete: true,
|
||||||
network: network,
|
network: network,
|
||||||
chain: chain
|
coin: coin
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!$scope.wallets || !$scope.wallets.length) {
|
if (!$scope.wallets || !$scope.wallets.length) {
|
||||||
|
|
@ -138,7 +138,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
toEmail: data.stateParams.toEmail,
|
toEmail: data.stateParams.toEmail,
|
||||||
toColor: data.stateParams.toColor,
|
toColor: data.stateParams.toColor,
|
||||||
network: (new bitcore.Address(data.stateParams.toAddress)).network.name,
|
network: (new bitcore.Address(data.stateParams.toAddress)).network.name,
|
||||||
chain: data.stateParams.chain,
|
coin: data.stateParams.coin,
|
||||||
txp: {},
|
txp: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -151,7 +151,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
|
|
||||||
$scope.walletSelectorTitle = gettextCatalog.getString('Send from');
|
$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) {
|
if (err) {
|
||||||
return exitWithError('Could not update wallets');
|
return exitWithError('Could not update wallets');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func
|
||||||
|
|
||||||
$scope.address = addr;
|
$scope.address = addr;
|
||||||
|
|
||||||
$scope.chain = (data.stateParams.chain).toLowerCase();
|
$scope.coin = (data.stateParams.coin).toLowerCase();
|
||||||
var parsedAmount = txFormatService.parseAmount(
|
var parsedAmount = txFormatService.parseAmount(
|
||||||
$scope.wallet,
|
$scope.wallet,
|
||||||
data.stateParams.amount,
|
data.stateParams.amount,
|
||||||
|
|
@ -43,7 +43,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func
|
||||||
// Convert to BTC or BCH
|
// Convert to BTC or BCH
|
||||||
var config = configService.getSync().wallet.settings;
|
var config = configService.getSync().wallet.settings;
|
||||||
var amountUnit = txFormatService.satToUnit(parsedAmount.amountSat);
|
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.amountBtc = btcParsedAmount.amount;
|
||||||
$scope.altAmountStr = btcParsedAmount.amountUnitStr;
|
$scope.altAmountStr = btcParsedAmount.amountUnitStr;
|
||||||
|
|
@ -68,7 +68,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.copyToClipboard = function() {
|
$scope.copyToClipboard = function() {
|
||||||
return 'bitcoin:' + $scope.address + '?amount=' + $scope.amountBtc + '&chain=' + $scope.chain;
|
return 'bitcoin:' + $scope.address + '?amount=' + $scope.amountBtc + '&coin=' + $scope.coin;
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ angular.module('copayApp.controllers').controller('sellCoinbaseController', func
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$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;
|
amount = data.stateParams.amount;
|
||||||
currency = data.stateParams.currency;
|
currency = data.stateParams.currency;
|
||||||
|
|
||||||
|
|
@ -183,7 +183,7 @@ angular.module('copayApp.controllers').controller('sellCoinbaseController', func
|
||||||
onlyComplete: true,
|
onlyComplete: true,
|
||||||
network: $scope.network,
|
network: $scope.network,
|
||||||
hasFunds: true,
|
hasFunds: true,
|
||||||
chain: 'BTC'
|
coin: 'btc'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (lodash.isEmpty($scope.wallets)) {
|
if (lodash.isEmpty($scope.wallets)) {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController', funct
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$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;
|
amount = data.stateParams.amount;
|
||||||
currency = data.stateParams.currency;
|
currency = data.stateParams.currency;
|
||||||
|
|
||||||
|
|
@ -80,7 +80,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController', funct
|
||||||
onlyComplete: true,
|
onlyComplete: true,
|
||||||
network: $scope.network,
|
network: $scope.network,
|
||||||
hasFunds: true,
|
hasFunds: true,
|
||||||
chain: 'BTC'
|
coin: 'btc'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (lodash.isEmpty($scope.wallets)) {
|
if (lodash.isEmpty($scope.wallets)) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
$scope.requestSpecificAmount = function() {
|
$scope.requestSpecificAmount = function() {
|
||||||
$state.go('tabs.paymentRequest.amount', {
|
$state.go('tabs.paymentRequest.amount', {
|
||||||
id: $scope.wallet.credentials.walletId,
|
id: $scope.wallet.credentials.walletId,
|
||||||
forceChain: $scope.wallet.chain
|
coin: $scope.wallet.coin
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ angular.module('copayApp.controllers').controller('topUpController', function($s
|
||||||
onlyComplete: true,
|
onlyComplete: true,
|
||||||
network: bitpayService.getEnvironment().network,
|
network: bitpayService.getEnvironment().network,
|
||||||
hasFunds: true,
|
hasFunds: true,
|
||||||
chain: 'BTC'
|
coin: 'btc'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (lodash.isEmpty($scope.wallets)) {
|
if (lodash.isEmpty($scope.wallets)) {
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.state('tabs.send.amount', {
|
.state('tabs.send.amount', {
|
||||||
url: '/amount/:recipientType/:toAddress/:toName/:toEmail/:toColor/:chain',
|
url: '/amount/:recipientType/:toAddress/:toName/:toEmail/:toColor/:coin',
|
||||||
views: {
|
views: {
|
||||||
'tab-send@tabs': {
|
'tab-send@tabs': {
|
||||||
controller: 'amountController',
|
controller: 'amountController',
|
||||||
|
|
@ -296,7 +296,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.send.confirm', {
|
.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: {
|
views: {
|
||||||
'tab-send@tabs': {
|
'tab-send@tabs': {
|
||||||
controller: 'confirmController',
|
controller: 'confirmController',
|
||||||
|
|
@ -672,7 +672,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
})
|
})
|
||||||
|
|
||||||
.state('tabs.paymentRequest.amount', {
|
.state('tabs.paymentRequest.amount', {
|
||||||
url: '/amount/:forceChain',
|
url: '/amount/:coin',
|
||||||
views: {
|
views: {
|
||||||
'tab-receive@tabs': {
|
'tab-receive@tabs': {
|
||||||
controller: 'amountController',
|
controller: 'amountController',
|
||||||
|
|
@ -681,7 +681,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.paymentRequest.confirm', {
|
.state('tabs.paymentRequest.confirm', {
|
||||||
url: '/confirm/:amount/:currency/:chain',
|
url: '/confirm/:amount/:currency/:coin',
|
||||||
views: {
|
views: {
|
||||||
'tab-receive@tabs': {
|
'tab-receive@tabs': {
|
||||||
controller: 'customAmountController',
|
controller: 'customAmountController',
|
||||||
|
|
@ -916,7 +916,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
forceChain: 'BTC'
|
coin: 'btc',
|
||||||
|
forceCoin: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.buyandsell.glidera.amount', {
|
.state('tabs.buyandsell.glidera.amount', {
|
||||||
|
|
@ -972,7 +973,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
params: {
|
params: {
|
||||||
forceChain: 'BTC'
|
coin: 'btc',
|
||||||
|
forceCoin: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.preferences.coinbase', {
|
.state('tabs.preferences.coinbase', {
|
||||||
|
|
@ -1062,7 +1064,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
nextStep: 'tabs.giftcards.mercadoLibre.buy',
|
nextStep: 'tabs.giftcards.mercadoLibre.buy',
|
||||||
currency: 'BRL',
|
currency: 'BRL',
|
||||||
forceCurrency: true,
|
forceCurrency: true,
|
||||||
forceChain: 'BTC'
|
coin: 'btc',
|
||||||
|
forceCoin: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.giftcards.mercadoLibre.buy', {
|
.state('tabs.giftcards.mercadoLibre.buy', {
|
||||||
|
|
@ -1114,7 +1117,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
nextStep: 'tabs.giftcards.amazon.buy',
|
nextStep: 'tabs.giftcards.amazon.buy',
|
||||||
currency: 'USD',
|
currency: 'USD',
|
||||||
forceCurrency: true,
|
forceCurrency: true,
|
||||||
forceChain: 'BTC'
|
coin: 'btc',
|
||||||
|
forceCoin: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.giftcards.amazon.buy', {
|
.state('tabs.giftcards.amazon.buy', {
|
||||||
|
|
@ -1154,7 +1158,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
params: {
|
params: {
|
||||||
id: null,
|
id: null,
|
||||||
currency: 'USD',
|
currency: 'USD',
|
||||||
forceChain: 'BTC',
|
coin: 'btc',
|
||||||
|
forceCoin: true,
|
||||||
useSendMax: null
|
useSendMax: null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,8 @@ angular.module('copayApp.services').factory('feeService', function($log, $timeou
|
||||||
|
|
||||||
var walletClient = bwcService.getClient();
|
var walletClient = bwcService.getClient();
|
||||||
|
|
||||||
walletClient.getFeeLevels('livenet', function(errLivenet, levelsLivenet) {
|
walletClient.getFeeLevels('btc', 'livenet', function(errLivenet, levelsLivenet) {
|
||||||
walletClient.getFeeLevels('testnet', function(errTestnet, levelsTestnet) {
|
walletClient.getFeeLevels('btc', 'testnet', function(errTestnet, levelsTestnet) {
|
||||||
if (errLivenet || errTestnet) {
|
if (errLivenet || errTestnet) {
|
||||||
return cb(gettextCatalog.getString('Could not get dynamic fee'));
|
return cb(gettextCatalog.getString('Could not get dynamic fee'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function goSend(addr, amount, message, chain) {
|
function goSend(addr, amount, message, coin) {
|
||||||
$state.go('tabs.send', {}, {
|
$state.go('tabs.send', {}, {
|
||||||
'reload': true,
|
'reload': true,
|
||||||
'notify': $state.current.name == 'tabs.send' ? false : true
|
'notify': $state.current.name == 'tabs.send' ? false : true
|
||||||
|
|
@ -58,12 +58,12 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
||||||
toAmount: amount,
|
toAmount: amount,
|
||||||
toAddress: addr,
|
toAddress: addr,
|
||||||
description: message,
|
description: message,
|
||||||
chain: chain
|
coin: coin
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$state.transitionTo('tabs.send.amount', {
|
$state.transitionTo('tabs.send.amount', {
|
||||||
toAddress: addr,
|
toAddress: addr,
|
||||||
chain: chain
|
coin: coin
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
@ -92,17 +92,17 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
||||||
var message = parsed.message;
|
var message = parsed.message;
|
||||||
|
|
||||||
var amount = parsed.amount ? parsed.amount : '';
|
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) {
|
if (parsed.r) {
|
||||||
payproService.getPayProDetails(parsed.r, function(err, details) {
|
payproService.getPayProDetails(parsed.r, function(err, details) {
|
||||||
if (err) {
|
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 popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||||
} else handlePayPro(details);
|
} else handlePayPro(details);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
goSend(addr, amount, message, chain);
|
goSend(addr, amount, message, coin);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,10 +89,11 @@ angular.module('copayApp.services')
|
||||||
wallet.copayerId = wallet.credentials.copayerId;
|
wallet.copayerId = wallet.credentials.copayerId;
|
||||||
wallet.m = wallet.credentials.m;
|
wallet.m = wallet.credentials.m;
|
||||||
wallet.n = wallet.credentials.n;
|
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"
|
// TODO: Should return "coin" = "btc" or "bch"
|
||||||
client.credentials.chain = 'BTC';
|
//client.credentials.coin = 'btc';
|
||||||
|
|
||||||
root.updateWalletSettings(wallet);
|
root.updateWalletSettings(wallet);
|
||||||
root.wallet[walletId] = wallet;
|
root.wallet[walletId] = wallet;
|
||||||
|
|
@ -756,9 +757,9 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
var ret = lodash.values(root.wallet);
|
var ret = lodash.values(root.wallet);
|
||||||
|
|
||||||
if (opts.chain) {
|
if (opts.coin) {
|
||||||
ret = lodash.filter(ret, function(x) {
|
ret = lodash.filter(ret, function(x) {
|
||||||
return (x.credentials.chain == opts.chain);
|
return (x.credentials.coin == opts.coin);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ angular.module('copayApp.services').factory('txFormatService', function($filter,
|
||||||
|
|
||||||
root.formatAmountStr = function(wallet, satoshis) {
|
root.formatAmountStr = function(wallet, satoshis) {
|
||||||
if (isNaN(satoshis)) return;
|
if (isNaN(satoshis)) return;
|
||||||
return root.formatAmount(satoshis) + ' ' + wallet.chain;
|
return root.formatAmount(satoshis) + ' ' + wallet.coin;
|
||||||
};
|
};
|
||||||
|
|
||||||
root.toFiat = function(satoshis, code, cb) {
|
root.toFiat = function(satoshis, code, cb) {
|
||||||
|
|
@ -196,13 +196,13 @@ angular.module('copayApp.services').factory('txFormatService', function($filter,
|
||||||
amountUnitStr = root.formatAmountStr(wallet, amountSat);
|
amountUnitStr = root.formatAmountStr(wallet, amountSat);
|
||||||
// convert sat to BTC or BCH
|
// convert sat to BTC or BCH
|
||||||
amount = (amountSat * satToBtc).toFixed(8);
|
amount = (amountSat * satToBtc).toFixed(8);
|
||||||
currency = wallet.chain;
|
currency = (wallet.coin).toUpperCase();
|
||||||
} else {
|
} else {
|
||||||
amountSat = parseInt((amount * unitToSatoshi).toFixed(0));
|
amountSat = parseInt((amount * unitToSatoshi).toFixed(0));
|
||||||
amountUnitStr = root.formatAmountStr(wallet, amountSat);
|
amountUnitStr = root.formatAmountStr(wallet, amountSat);
|
||||||
// convert unit to BTC or BCH
|
// convert unit to BTC or BCH
|
||||||
amount = (amountSat * satToBtc).toFixed(8);
|
amount = (amountSat * satToBtc).toFixed(8);
|
||||||
currency = wallet.chain;
|
currency = (wallet.coin).toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -215,11 +215,11 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
cache.satToUnit = 1 / cache.unitToSatoshi;
|
cache.satToUnit = 1 / cache.unitToSatoshi;
|
||||||
|
|
||||||
//STR
|
//STR
|
||||||
cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + wallet.chain;
|
cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + wallet.coin;
|
||||||
cache.lockedBalanceStr = txFormatService.formatAmount(cache.lockedBalanceSat) + ' ' + wallet.chain;
|
cache.lockedBalanceStr = txFormatService.formatAmount(cache.lockedBalanceSat) + ' ' + wallet.coin;
|
||||||
cache.availableBalanceStr = txFormatService.formatAmount(cache.availableBalanceSat) + ' ' + wallet.chain;
|
cache.availableBalanceStr = txFormatService.formatAmount(cache.availableBalanceSat) + ' ' + wallet.coin;
|
||||||
cache.spendableBalanceStr = txFormatService.formatAmount(cache.spendableAmount) + ' ' + wallet.chain;
|
cache.spendableBalanceStr = txFormatService.formatAmount(cache.spendableAmount) + ' ' + wallet.coin;
|
||||||
cache.pendingBalanceStr = txFormatService.formatAmount(cache.pendingAmount) + ' ' + wallet.chain;
|
cache.pendingBalanceStr = txFormatService.formatAmount(cache.pendingAmount) + ' ' + wallet.coin;
|
||||||
|
|
||||||
cache.alternativeName = config.settings.alternativeName;
|
cache.alternativeName = config.settings.alternativeName;
|
||||||
cache.alternativeIsoCode = config.settings.alternativeIsoCode;
|
cache.alternativeIsoCode = config.settings.alternativeIsoCode;
|
||||||
|
|
@ -412,12 +412,12 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
var fixTxsUnit = function(txs) {
|
var fixTxsUnit = function(txs) {
|
||||||
if (!txs || !txs[0] || !txs[0].amountStr) return;
|
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;
|
return;
|
||||||
|
|
||||||
$log.debug('Fixing Tx Cache Unit to: ' + wallet.chain)
|
$log.debug('Fixing Tx Cache Unit to: ' + wallet.coin)
|
||||||
lodash.each(txs, function(tx) {
|
lodash.each(txs, function(tx) {
|
||||||
tx.amountStr = txFormatService.formatAmountStr(wallet, tx.amount);
|
tx.amountStr = txFormatService.formatAmountStr(wallet, tx.amount);
|
||||||
tx.feeStr = txFormatService.formatAmountStr(wallet, tx.fees);
|
tx.feeStr = txFormatService.formatAmountStr(wallet, tx.fees);
|
||||||
|
|
|
||||||
|
|
@ -49,18 +49,18 @@
|
||||||
<div class="amount__editable" ng-class="{'amount__editable--minimize': smallFont, 'amount__editable--standard': !smallFont, 'amount__editable--placeholder': !amount}">
|
<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>
|
<span class="amount__number">{{amount || "0.00" }}</span>
|
||||||
<a class="amount__currency-toggle" ng-show="showAlternativeAmount">{{alternativeIsoCode}}</a>
|
<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>
|
||||||
<div class="icon-toggle" ng-if="!forceCurrency" ng-click="toggleAlternative()">
|
<div class="icon-toggle" ng-if="!forceCurrency" ng-click="toggleAlternative()">
|
||||||
<i class="icon ion-arrow-swap"></i>
|
<i class="icon ion-arrow-swap"></i>
|
||||||
</div>
|
</div>
|
||||||
<div ng-class="{'amount__results--minimize': smallFont, 'amount__results--standard': !smallFont, 'amount__results--placeholder': !amountResult}" ng-show="!showAlternativeAmount">
|
<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">≈ {{amountResult || '0.00'}} {{alternativeIsoCode}}</div>
|
<div class="amount__result-equiv">≈ {{amountResult || '0.00'}} {{alternativeIsoCode}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-class="{'amount__results--minimize': smallFont, 'amount__results--standard': !smallFont, 'amount__results--placeholder': !amountResult}" ng-show="showAlternativeAmount">
|
<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" 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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
<div class="label" translate>From</div>
|
<div class="label" translate>From</div>
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
{{wallet ? wallet.name : '...'}}
|
{{wallet ? wallet.name : '...'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
<div class="label">Receive in</div>
|
<div class="label">Receive in</div>
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
{{wallet ? wallet.name : '...'}}
|
{{wallet ? wallet.name : '...'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="label">Receive in</div>
|
<div class="label">Receive in</div>
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
{{wallet ? wallet.name : '...'}}
|
{{wallet ? wallet.name : '...'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<div class="label" translate>From</div>
|
<div class="label" translate>From</div>
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
{{wallet ? wallet.name : '...'}}
|
{{wallet ? wallet.name : '...'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
<span class="label" translate>From</span>
|
<span class="label" translate>From</span>
|
||||||
<div class="wallet" ng-if="wallet">
|
<div class="wallet" ng-if="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
<div>{{wallet.name}}</div>
|
<div>{{wallet.name}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
<ion-content scroll="false">
|
<ion-content scroll="false">
|
||||||
<div class="address" ng-if="address && amountBtc">
|
<div class="address" ng-if="address && amountBtc">
|
||||||
<div class="qr-code" copy-to-clipboard="copyToClipboard()">
|
<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>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="item single-line" copy-to-clipboard="address">
|
<div class="item single-line" copy-to-clipboard="address">
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<div class="item single-line">
|
<div class="item single-line">
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
{{wallet.name}}
|
{{wallet.name}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="wallet-item">
|
<div class="wallet-item">
|
||||||
<i class="icon big-icon-svg circle">
|
<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>
|
</i>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
{{wallet.name || wallet.id}}
|
{{wallet.name || wallet.id}}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
ng-click="selectWallet(w)"
|
ng-click="selectWallet(w)"
|
||||||
>
|
>
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
<div class="wallet-inner">
|
<div class="wallet-inner">
|
||||||
<div class="wallet-details">
|
<div class="wallet-details">
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
<span class="label" translate>From</span>
|
<span class="label" translate>From</span>
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
<div>{{wallet.name}}</div>
|
<div>{{wallet.name}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="list card" ng-click="showWalletSelector()" ng-if="wallets[0]">
|
<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">
|
<a ng-if="wallet" class="item item-sub item-icon-left item-big-icon-left item-icon-right">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
<span>
|
<span>
|
||||||
{{wallet.name || wallet.id}}
|
{{wallet.name || wallet.id}}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
<div class="label">From</div>
|
<div class="label">From</div>
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
{{wallet ? wallet.name : '...'}}
|
{{wallet ? wallet.name : '...'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="label">From</div>
|
<div class="label">From</div>
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
{{wallet ? wallet.name : '...'}}
|
{{wallet ? wallet.name : '...'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
class="item item-sub item-icon-left item-big-icon-left item-icon-right wallet"
|
class="item item-sub item-icon-left item-big-icon-left item-icon-right wallet"
|
||||||
ng-click="openWallet(wallet)">
|
ng-click="openWallet(wallet)">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
<span>
|
<span>
|
||||||
{{wallet.name || wallet.id}}
|
{{wallet.name || wallet.id}}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
<div class="wallet-selector" ng-click="showWalletSelector()" ng-if="wallets[0] && wallet">
|
<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">
|
<a ng-if="wallet" class="item item-sub item-icon-left item-big-icon-left item-icon-right">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
<span>
|
<span>
|
||||||
{{wallet.name || wallet.id}}
|
{{wallet.name || wallet.id}}
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
<div class="list">
|
<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)">
|
<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'">
|
<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>
|
</i>
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@
|
||||||
ui-sref="tabs.preferences({'walletId': item.id})"
|
ui-sref="tabs.preferences({'walletId': item.id})"
|
||||||
ng-repeat="item in wallets track by $index">
|
ng-repeat="item in wallets track by $index">
|
||||||
<i class="icon big-icon-svg circle">
|
<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>
|
</i>
|
||||||
<span>
|
<span>
|
||||||
{{item.name || item.id}}
|
{{item.name || item.id}}
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,10 @@
|
||||||
<div class="info">
|
<div class="info">
|
||||||
|
|
||||||
<div class="item item-icon-right" ng-click="showWalletSelector()">
|
<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">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
{{wallet ? wallet.name : '...'}}
|
{{wallet ? wallet.name : '...'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
<span class="label" ng-if="btx.action !== 'sent'" translate>To</span>
|
<span class="label" ng-if="btx.action !== 'sent'" translate>To</span>
|
||||||
<div class="wallet">
|
<div class="wallet">
|
||||||
<i class="icon big-icon-svg">
|
<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>
|
</i>
|
||||||
<div>{{wallet.name}}</div>
|
<div>{{wallet.name}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue