Merge pull request #3271 from cmgustavo/bug/paper-wallet-01
Fix paperWallet variables. Hide for testnet
This commit is contained in:
commit
8dc05e4a0e
3 changed files with 6 additions and 5 deletions
|
|
@ -52,7 +52,7 @@
|
||||||
<div class="text-center m20b">
|
<div class="text-center m20b">
|
||||||
<h4 class="text-bold" translate>Funds founds</h4>
|
<h4 class="text-bold" translate>Funds founds</h4>
|
||||||
<div class="size-24">
|
<div class="size-24">
|
||||||
{{paperWallet.balance}} BTC
|
{{paperWallet.balance}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
<span translate>Scan addresses for funds</span>
|
<span translate>Scan addresses for funds</span>
|
||||||
</li>
|
</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>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<span translate>Sweep paper wallet</span>
|
<span translate>Sweep paper wallet</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
angular.module('copayApp.controllers').controller('paperWalletController',
|
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;
|
self = this;
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var rawTx;
|
var rawTx;
|
||||||
|
|
@ -9,12 +9,13 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
||||||
}
|
}
|
||||||
|
|
||||||
self.createTx = function(privateKey, passphrase) {
|
self.createTx = function(privateKey, passphrase) {
|
||||||
if (privateKey.charAt(0) != 6) {
|
if (privateKey.charAt(0) != '6') {
|
||||||
var isValidKey = self.checkPrivateKey(privateKey);
|
var isValidKey = self.checkPrivateKey(privateKey);
|
||||||
|
|
||||||
if (!isValidKey) return;
|
if (!isValidKey) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var config = configService.getSync().wallet.settings;
|
||||||
self.error = null;
|
self.error = null;
|
||||||
self.scanning = true;
|
self.scanning = true;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
|
|
@ -24,7 +25,7 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
||||||
if (err)
|
if (err)
|
||||||
self.error = err.toString();
|
self.error = err.toString();
|
||||||
else {
|
else {
|
||||||
self.balance = (utxos / 1e8).toFixed(8);
|
self.balance = profileService.formatAmount(utxos) + ' ' + config.unitName;
|
||||||
rawTx = rawtx;
|
rawTx = rawtx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue