Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
chore: bumped @walletconnect/universal-provider version (#42)
Browse files Browse the repository at this point in the history
* chore: updates `universal-provider` to 2.2.0

* test: add msw for requests

* chore: add codeowner

Co-authored-by: Tom Meagher <[email protected]>
  • Loading branch information
ganchoradkov and tmm authored Jan 5, 2023
1 parent c61bd74 commit 7dce4b5
Show file tree
Hide file tree
Showing 6 changed files with 310 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-impalas-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wagmi/connectors': patch
---

Bumped WalletConnect Universal Provider version.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@tmm @jxom

/packages/connectors/src/ledger @hlopes-ledger
/packages/connectors/src/ledger @hlopes-ledger
/packages/connectors/src/walletConnect @ganchoradkov
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"fs-extra": "^11.1.0",
"lint-staged": "^13.0.3",
"lokijs": "^1.5.12",
"msw": "^0.49.2",
"prettier": "^2.7.1",
"simple-git-hooks": "^2.8.1",
"tsup": "^6.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@ledgerhq/connect-kit-loader": "^1.0.1",
"@walletconnect/ethereum-provider": "^1.8.0",
"@walletconnect/qrcode-modal": "^1.8.0",
"@walletconnect/universal-provider": "^2.1.4",
"@walletconnect/universal-provider": "^2.2.0",
"abitype": "^0.1.8",
"eventemitter3": "^4.0.7"
},
Expand Down
30 changes: 29 additions & 1 deletion packages/connectors/src/walletConnect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,41 @@ import { foundry, goerli, mainnet } from '@wagmi/core/chains'
import { testChains } from '@wagmi/core/internal/test'
import WalletConnectProvider from '@walletconnect/ethereum-provider'
import { UniversalProvider } from '@walletconnect/universal-provider'
import { describe, expect, it } from 'vitest'
import { rest } from 'msw'
import { setupServer } from 'msw/node'
import { afterAll, afterEach, beforeAll, describe, expect, it } from 'vitest'

import { WalletConnectConnector } from './walletConnect'

const defaultChains = [mainnet, goerli]

const handlers = [
rest.get('https://*.bridge.walletconnect.org', (_req, res, ctx) => {
return res(
ctx.status(200),
ctx.json({
topic: '222781e3-3fad-4184-acde-077796bf0d3d',
type: 'sub',
payload: '',
silent: true,
}),
)
}),
]

const server = setupServer(...handlers)

describe('WalletConnectConnector', () => {
beforeAll(() =>
server.listen({
onUnhandledRequest: 'warn',
}),
)

afterEach(() => server.resetHandlers())

afterAll(() => server.close())

it('inits', () => {
const connector = new WalletConnectConnector({
chains: testChains,
Expand Down
Loading

0 comments on commit 7dce4b5

Please sign in to comment.