mtx: allow base58 addrs in outputs.
This commit is contained in:
parent
fed7d0de54
commit
72f6a1d239
@ -225,6 +225,9 @@ MTX.prototype.addTX = function addTX(tx, index, height) {
|
|||||||
MTX.prototype.addOutput = function addOutput(options, value) {
|
MTX.prototype.addOutput = function addOutput(options, value) {
|
||||||
var output;
|
var output;
|
||||||
|
|
||||||
|
if (typeof options === 'string')
|
||||||
|
options = Address.fromBase58(options);
|
||||||
|
|
||||||
if (options instanceof Address)
|
if (options instanceof Address)
|
||||||
options = Script.fromAddress(options);
|
options = Script.fromAddress(options);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user