diff --git a/public/views/paperWallet.html b/public/views/paperWallet.html index 9f45ea91e..3975efcad 100644 --- a/public/views/paperWallet.html +++ b/public/views/paperWallet.html @@ -52,7 +52,7 @@

Funds founds

- {{paperWallet.balance}} BTC + {{paperWallet.balance}}
diff --git a/public/views/preferencesAdvanced.html b/public/views/preferencesAdvanced.html index a7d41335e..95fe861d3 100644 --- a/public/views/preferencesAdvanced.html +++ b/public/views/preferencesAdvanced.html @@ -17,7 +17,7 @@ Scan addresses for funds -
  • +
  • Sweep paper wallet
  • diff --git a/src/js/controllers/paperWallet.js b/src/js/controllers/paperWallet.js index d58664bf8..e7aacf700 100644 --- a/src/js/controllers/paperWallet.js +++ b/src/js/controllers/paperWallet.js @@ -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; }