Address constructor allows an address instance
This commit is contained in:
parent
1175c475a2
commit
80937362be
|
@ -59,6 +59,8 @@ function Address(data, network, type) {
|
|||
info = Address._transformPublicKey(data);
|
||||
} else if (data.constructor && (data.constructor.name && data.constructor.name === 'Script')) {
|
||||
info = Address._transformScript(data);
|
||||
} else if (data instanceof Address) {
|
||||
return data;
|
||||
} else if (typeof(data) === 'string') {
|
||||
info = Address._transformString(data, network, type);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue