Skip to content

Commit b9ace8f

Browse files
authored
Remove provider events patch now that hex chainId (#1474)
1 parent 9173994 commit b9ace8f

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

packages/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@web3-onboard/phantom": "^2.0.0-alpha.1",
4040
"@web3-onboard/portis": "^2.1.3",
4141
"@web3-onboard/sequence": "^2.0.4",
42-
"@web3-onboard/torus": "^2.2.0",
42+
"@web3-onboard/torus": "^2.2.1-alpha.1",
4343
"@web3-onboard/trezor": "^2.3.2",
4444
"@web3-onboard/tallyho": "^2.0.1",
4545
"@web3-onboard/web3auth": "^2.1.4",

packages/torus/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/torus",
3-
"version": "2.2.0",
3+
"version": "2.2.1-alpha.1",
44
"description": "Torus SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",

packages/torus/src/index.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,6 @@ function torus(options?: TorusOptions): WalletInit {
5555

5656
const torusProvider = instance.provider
5757

58-
// patch the chainChanged event
59-
const on = torusProvider.on.bind(torusProvider)
60-
torusProvider.on = (event, listener) => {
61-
on(event, val => {
62-
if (event === 'chainChanged') {
63-
listener(`0x${(val as number).toString(16)}`)
64-
return
65-
}
66-
67-
listener(val)
68-
})
69-
70-
return torusProvider
71-
}
72-
7358
const provider = createEIP1193Provider(torusProvider, {
7459
eth_requestAccounts: async () => {
7560
try {

0 commit comments

Comments
 (0)