Skip to content

Commit

Permalink
fix(core): fallbacks for named/default Pera Connect export
Browse files Browse the repository at this point in the history
  • Loading branch information
drichar committed Jun 1, 2024
1 parent 7f6a89a commit b4ccb40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/use-wallet/src/wallets/pera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export class PeraWallet extends BaseWallet {

private async initializeClient(): Promise<PeraWalletConnect> {
console.info('[PeraWallet] Initializing client...')
const PeraWalletConnect = (await import('@perawallet/connect-beta')).PeraWalletConnect
const module = await import('@perawallet/connect-beta')

const PeraWalletConnect = module.PeraWalletConnect || module.default.PeraWalletConnect

const client = new PeraWalletConnect(this.options)
client.client?.on('session_delete', this.onDisconnect)
Expand Down

0 comments on commit b4ccb40

Please sign in to comment.