Skip to content

Commit

Permalink
fix(deps): update Defly Connect and Pera Connect to latest versions
Browse files Browse the repository at this point in the history
Update `@blockshake/defly-connect` from 1.2.0 to 1.2.1 and `@perawallet/connect`
from 1.4.0 to 1.4.1 across all packages and examples to support ESM imports
  • Loading branch information
drichar committed Jan 9, 2025
1 parent 9562ab4 commit b12d2e3
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 92 deletions.
4 changes: 2 additions & 2 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@blockshake/defly-connect": "^1.2.0",
"@perawallet/connect": "^1.4.0",
"@blockshake/defly-connect": "^1.2.1",
"@perawallet/connect": "^1.4.1",
"@txnlab/use-wallet-react": "workspace:*",
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.2",
Expand Down
4 changes: 2 additions & 2 deletions examples/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0",
"@blockshake/defly-connect": "^1.2.0",
"@perawallet/connect": "^1.4.0",
"@blockshake/defly-connect": "^1.2.1",
"@perawallet/connect": "^1.4.1",
"@txnlab/use-wallet": "workspace:*",
"@txnlab/use-wallet-vue": "workspace:*",
"@walletconnect/modal": "^2.7.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"dependencies": {
"@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0",
"@blockshake/defly-connect": "^1.2.0",
"@perawallet/connect": "^1.4.0",
"@blockshake/defly-connect": "^1.2.1",
"@perawallet/connect": "^1.4.1",
"@txnlab/use-wallet-react": "workspace:*",
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.2",
Expand Down
4 changes: 2 additions & 2 deletions examples/solid-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
},
"dependencies": {
"@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0",
"@blockshake/defly-connect": "^1.2.0",
"@perawallet/connect": "^1.4.0",
"@blockshake/defly-connect": "^1.2.1",
"@perawallet/connect": "^1.4.1",
"@txnlab/use-wallet-solid": "workspace:*",
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.2",
Expand Down
4 changes: 2 additions & 2 deletions examples/vanilla-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"dependencies": {
"@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0",
"@blockshake/defly-connect": "^1.2.0",
"@perawallet/connect": "^1.4.0",
"@blockshake/defly-connect": "^1.2.1",
"@perawallet/connect": "^1.4.1",
"@txnlab/use-wallet": "workspace:*",
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.2",
Expand Down
4 changes: 2 additions & 2 deletions examples/vue-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"dependencies": {
"@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0",
"@blockshake/defly-connect": "^1.2.0",
"@perawallet/connect": "^1.4.0",
"@blockshake/defly-connect": "^1.2.1",
"@perawallet/connect": "^1.4.1",
"@txnlab/use-wallet-vue": "workspace:*",
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/use-wallet-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
"typescript": "5.6.3"
},
"peerDependencies": {
"@blockshake/defly-connect": "^1.2.0",
"@blockshake/defly-connect": "^1.2.1",
"@magic-ext/algorand": "^23.18.0",
"@walletconnect/modal": "^2.7.0",
"@perawallet/connect": "^1.4.0",
"@perawallet/connect": "^1.4.1",
"@walletconnect/sign-client": "^2.17.2",
"algosdk": "^3.0.0",
"lute-connect": "^1.4.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/use-wallet-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
"typescript": "5.6.3"
},
"peerDependencies": {
"@blockshake/defly-connect": "^1.2.0",
"@blockshake/defly-connect": "^1.2.1",
"@magic-ext/algorand": "^23.18.0",
"@perawallet/connect": "^1.4.0",
"@perawallet/connect": "^1.4.1",
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.2",
"algosdk": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/use-wallet-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
"vue": "3.5.13"
},
"peerDependencies": {
"@blockshake/defly-connect": "^1.2.0",
"@blockshake/defly-connect": "^1.2.1",
"@magic-ext/algorand": "^23.18.0",
"@perawallet/connect": "^1.4.0",
"@perawallet/connect": "^1.4.1",
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.2",
"algosdk": "^3.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/use-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
"devDependencies": {
"@agoralabs-sh/avm-web-provider": "1.7.0",
"@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0",
"@blockshake/defly-connect": "1.2.0",
"@blockshake/defly-connect": "1.2.1",
"@magic-ext/algorand": "23.18.0",
"@magic-sdk/provider": "28.18.0",
"@perawallet/connect": "1.4.0",
"@perawallet/connect": "1.4.1",
"@types/node": "20.11.30",
"@walletconnect/modal": "2.7.0",
"@walletconnect/modal-core": "2.7.0",
Expand All @@ -60,8 +60,8 @@
"peerDependencies": {
"@agoralabs-sh/avm-web-provider": "^1.7.0",
"@algorandfoundation/liquid-auth-use-wallet-client": "1.1.0",
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.4.0",
"@blockshake/defly-connect": "^1.2.1",
"@perawallet/connect": "^1.4.1",
"@walletconnect/modal": "^2.7.0",
"@walletconnect/sign-client": "^2.17.2",
"algosdk": "^3.0.0",
Expand Down
9 changes: 2 additions & 7 deletions packages/use-wallet/src/__tests__/wallets/defly.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,9 @@ const mockDeflyWallet = {
}
}

vi.mock('@blockshake/defly-connect', async (importOriginal) => {
const module = await importOriginal<typeof import('@blockshake/defly-connect')>()
vi.mock('@blockshake/defly-connect', async () => {
return {
...module,
default: {
...module,
DeflyWalletConnect: vi.fn(() => mockDeflyWallet)
}
DeflyWalletConnect: vi.fn(() => mockDeflyWallet)
}
})

Expand Down
9 changes: 2 additions & 7 deletions packages/use-wallet/src/__tests__/wallets/pera.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,9 @@ const mockPeraWallet = {
}
}

vi.mock('@perawallet/connect', async (importOriginal) => {
const module = await importOriginal<typeof import('@perawallet/connect')>()
vi.mock('@perawallet/connect', async () => {
return {
...module,
default: {
...module,
PeraWalletConnect: vi.fn(() => mockPeraWallet)
}
PeraWalletConnect: vi.fn(() => mockPeraWallet)
}
})

Expand Down
6 changes: 1 addition & 5 deletions packages/use-wallet/src/wallets/defly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ export class DeflyWallet extends BaseWallet {

private async initializeClient(): Promise<DeflyWalletConnect> {
this.logger.info('Initializing client...')
const module = await import('@blockshake/defly-connect')
const DeflyWalletConnect = module.default
? module.default.DeflyWalletConnect
: module.DeflyWalletConnect

const { DeflyWalletConnect } = await import('@blockshake/defly-connect')
const client = new DeflyWalletConnect(this.options)
this.client = client
this.logger.info('Client initialized')
Expand Down
6 changes: 1 addition & 5 deletions packages/use-wallet/src/wallets/pera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ export class PeraWallet extends BaseWallet {

private async initializeClient(): Promise<PeraWalletConnect> {
this.logger.info('Initializing client...')
const module = await import('@perawallet/connect')
const PeraWalletConnect = module.default
? module.default.PeraWalletConnect
: module.PeraWalletConnect

const { PeraWalletConnect } = await import('@perawallet/connect')
const client = new PeraWalletConnect(this.options)
this.client = client
this.logger.info('Client initialized')
Expand Down
Loading

0 comments on commit b12d2e3

Please sign in to comment.