use regular addresses for wallet prefix.
This commit is contained in:
parent
87d4d4b0ad
commit
d28716c98d
@ -80,6 +80,8 @@ function Wallet(options, passphrase) {
|
||||
this.m = 1;
|
||||
this.n = 1;
|
||||
|
||||
this.prefix = 'bt/' + this.getOwnAddress() + '/';
|
||||
|
||||
this.multisig(options.multisig || {});
|
||||
|
||||
this.tx = new bcoin.txPool(this);
|
||||
@ -122,9 +124,10 @@ Wallet.prototype._init = function init() {
|
||||
});
|
||||
};
|
||||
|
||||
Wallet.prototype.__defineGetter__('prefix', function() {
|
||||
return 'bt/' + this.getFullAddress() + '/';
|
||||
});
|
||||
// If we want to use p2sh addresses for the prefix:
|
||||
// Wallet.prototype.__defineGetter__('prefix', function() {
|
||||
// return 'bt/' + this.getFullAddress() + '/';
|
||||
// });
|
||||
|
||||
Wallet.prototype.multisig = function multisig(options) {
|
||||
var pub = this.getOwnPublicKey();
|
||||
@ -200,7 +203,7 @@ Wallet.prototype.derive = function derive() {
|
||||
|
||||
options.priv = this.hd.derive.apply(this.hd, arguments);
|
||||
|
||||
return bcoin.wallet(options);
|
||||
return new Wallet(options);
|
||||
};
|
||||
|
||||
Wallet.prototype.getPrivateKey = function getPrivateKey(enc) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user