Fix paperWallet variables. Hide for testnet

This commit is contained in:
Gustavo Maximiliano Cortez 2015-10-02 17:29:57 -03:00
parent 82ee52c6fe
commit 458615a49f
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
3 changed files with 6 additions and 5 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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;
}