Address constructor allows an address instance

This commit is contained in:
Yemel Jardi 2014-11-26 15:40:58 -03:00
parent 1175c475a2
commit 80937362be
1 changed files with 2 additions and 0 deletions

View File

@ -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 {