hide xpriv in certain cases in the log
This commit is contained in:
parent
de398bc47b
commit
acb0d176f2
3 changed files with 7 additions and 5 deletions
|
|
@ -56,7 +56,7 @@
|
||||||
"bezier-easing": "^2.0.3",
|
"bezier-easing": "^2.0.3",
|
||||||
"bhttp": "1.2.1",
|
"bhttp": "1.2.1",
|
||||||
"bitauth": "^0.2.1",
|
"bitauth": "^0.2.1",
|
||||||
"bitcore-wallet-client": "6.2.0",
|
"bitcore-wallet-client": "6.2.1",
|
||||||
"bower": "^1.7.9",
|
"bower": "^1.7.9",
|
||||||
"cordova-android": "5.1.1",
|
"cordova-android": "5.1.1",
|
||||||
"cordova-custom-config": "^3.0.5",
|
"cordova-custom-config": "^3.0.5",
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ angular.module('copayApp.services')
|
||||||
};
|
};
|
||||||
|
|
||||||
root.add = function(level, msg) {
|
root.add = function(level, msg) {
|
||||||
|
msg = msg.replace('/xpriv.*/', 'xpriv[Hidden]');
|
||||||
logs.push({
|
logs.push({
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
level: level,
|
level: level,
|
||||||
|
|
|
||||||
|
|
@ -322,7 +322,6 @@ angular.module('copayApp.services')
|
||||||
var walletClient = bwcService.getClient(null, opts);
|
var walletClient = bwcService.getClient(null, opts);
|
||||||
var network = opts.networkName || 'livenet';
|
var network = opts.networkName || 'livenet';
|
||||||
|
|
||||||
console.log('[profileService.js.324]'); //TODO
|
|
||||||
if (opts.mnemonic) {
|
if (opts.mnemonic) {
|
||||||
try {
|
try {
|
||||||
opts.mnemonic = root._normalizeMnemonic(opts.mnemonic);
|
opts.mnemonic = root._normalizeMnemonic(opts.mnemonic);
|
||||||
|
|
@ -392,10 +391,13 @@ console.log('[profileService.js.324]'); //TODO
|
||||||
|
|
||||||
// Creates a wallet on BWC/BWS
|
// Creates a wallet on BWC/BWS
|
||||||
var doCreateWallet = function(opts, cb) {
|
var doCreateWallet = function(opts, cb) {
|
||||||
$log.debug('Creating Wallet:', opts);
|
var showOpts = lodash.clone(opts);
|
||||||
|
if (showOpts.extendedPrivateKey) showOpts.extendedPrivateKey='[hidden]';
|
||||||
|
if (showOpts.mnemonic) showOpts.mnemonic='[hidden]';
|
||||||
|
|
||||||
|
$log.debug('Creating Wallet:', showOpts);
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
seedWallet(opts, function(err, walletClient) {
|
seedWallet(opts, function(err, walletClient) {
|
||||||
console.log('[profileService.js.395:walletClient:]',walletClient); //TODO
|
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
|
|
||||||
var name = opts.name || gettextCatalog.getString('Personal Wallet');
|
var name = opts.name || gettextCatalog.getString('Personal Wallet');
|
||||||
|
|
@ -407,7 +409,6 @@ console.log('[profileService.js.395:walletClient:]',walletClient); //TODO
|
||||||
walletPrivKey: opts.walletPrivKey,
|
walletPrivKey: opts.walletPrivKey,
|
||||||
coin: opts.coin
|
coin: opts.coin
|
||||||
}, function(err, secret) {
|
}, function(err, secret) {
|
||||||
console.log('[profileService.js.407:err:]',err); //TODO
|
|
||||||
if (err) return bwcError.cb(err, gettextCatalog.getString('Error creating wallet'), cb);
|
if (err) return bwcError.cb(err, gettextCatalog.getString('Error creating wallet'), cb);
|
||||||
return cb(null, walletClient, secret);
|
return cb(null, walletClient, secret);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue