Skip to content

Commit d0f027b

Browse files
committed
fix: avoid circular refs
1 parent aef612e commit d0f027b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/types/account-manager.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,11 @@ export class AccountManager {
445445
const acct = addrWithSigners.addr as Address & AddressWithSigners
446446

447447
for (const prop in addrWithSigners) {
448+
// Create a new Address instance for avoid circular references
449+
if (prop === 'addr') {
450+
acct.addr = new Address(addrWithSigners.addr.publicKey)
451+
continue
452+
}
448453
// eslint-disable-next-line @typescript-eslint/no-explicit-any
449454
;(acct as any)[prop] = (addrWithSigners as any)[prop]
450455
}

0 commit comments

Comments
 (0)