Skip to content

Patch @midnight-ntwrk/wallet-sdk-address-format 3.x for the frontend bundle. - #13

Merged
Yiakman merged 1 commit into
v2from
fix/patch-bundle-wallet-sdk-address-format
Jun 17, 2026
Merged

Yiakman merged 1 commit into
v2from
fix/patch-bundle-wallet-sdk-address-format

Conversation

@Yiakman

@Yiakman Yiakman commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@midnight-ntwrk/wallet-sdk-address-format v3.1.0 declares export class ShieldedAddress { static [Bech32mSymbol] = ShieldedAddress.codec } (and likewise UnshieldedAddress / DustAddress). vite-plugin-top-level-await hoists every top-level binding to a let and rewrites the class declaration into an anonymous class expression (ShieldedAddress = class { ... }). The static field then resolves ShieldedAddress to the outer let, which is still undefined while the class is being evaluated, throwing "Cannot read properties of undefined (reading 'codec')" at app startup.

Fix: make them named class expressions (export const X = class X { ... }) so the inner class name survives the hoist and the self-reference resolves to the class itself.

@Yiakman
Yiakman merged commit cea4c5c into v2 Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant