mirror of https://github.com/BTCPrivate/copay.git
Fix paperWallet variables. Hide for testnet
This commit is contained in:
parent
82ee52c6fe
commit
458615a49f
|
@ -52,7 +52,7 @@
|
|||
<div class="text-center m20b">
|
||||
<h4 class="text-bold" translate>Funds founds</h4>
|
||||
<div class="size-24">
|
||||
{{paperWallet.balance}} BTC
|
||||
{{paperWallet.balance}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<span translate>Scan addresses for funds</span>
|
||||
</li>
|
||||
|
||||
<li class="line-b p20" ng-click="$root.go('paperWallet')">
|
||||
<li ng-show="index.network == 'livenet'" class="line-b p20" ng-click="$root.go('paperWallet')">
|
||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||
<span translate>Sweep paper wallet</span>
|
||||
</li>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('copayApp.controllers').controller('paperWalletController',
|
||||
function($scope, $http, $timeout, profileService, go, addressService, bitcore) {
|
||||
function($scope, $http, $timeout, configService, profileService, go, addressService, bitcore) {
|
||||
self = this;
|
||||
var fc = profileService.focusedClient;
|
||||
var rawTx;
|
||||
|
@ -9,12 +9,13 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
|||
}
|
||||
|
||||
self.createTx = function(privateKey, passphrase) {
|
||||
if (privateKey.charAt(0) != 6) {
|
||||
if (privateKey.charAt(0) != '6') {
|
||||
var isValidKey = self.checkPrivateKey(privateKey);
|
||||
|
||||
if (!isValidKey) return;
|
||||
}
|
||||
|
||||
var config = configService.getSync().wallet.settings;
|
||||
self.error = null;
|
||||
self.scanning = true;
|
||||
$timeout(function() {
|
||||
|
@ -24,7 +25,7 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
|||
if (err)
|
||||
self.error = err.toString();
|
||||
else {
|
||||
self.balance = (utxos / 1e8).toFixed(8);
|
||||
self.balance = profileService.formatAmount(utxos) + ' ' + config.unitName;
|
||||
rawTx = rawtx;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue