diff --git a/src/chains/ergo/addresses.ts b/src/chains/ergo/addresses.ts index f71fd0bb..d12cadcb 100644 --- a/src/chains/ergo/addresses.ts +++ b/src/chains/ergo/addresses.ts @@ -12,7 +12,7 @@ export function getChangeAddress( .map((o) => addressFromErgoTree(o.ergoTree)) .filter((a) => ownAddresses.includes(a)); - return last(addresses); + if (addresses.length) return last(addresses); } export function addressFromPk(pk: string) {