mtx: allow base58 addrs in outputs.

This commit is contained in:
Christopher Jeffrey 2017-01-12 03:28:03 -08:00
parent fed7d0de54
commit 72f6a1d239
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -225,6 +225,9 @@ MTX.prototype.addTX = function addTX(tx, index, height) {
MTX.prototype.addOutput = function addOutput(options, value) {
var output;
if (typeof options === 'string')
options = Address.fromBase58(options);
if (options instanceof Address)
options = Script.fromAddress(options);