|
| 1 | +diff --git a/node_modules/@joyid/ethereum-provider/dist/index.js b/node_modules/@joyid/ethereum-provider/dist/index.js |
| 2 | +index 994b6cc..922a08d 100644 |
| 3 | +--- a/node_modules/@joyid/ethereum-provider/dist/index.js |
| 4 | ++++ b/node_modules/@joyid/ethereum-provider/dist/index.js |
| 5 | +@@ -52,6 +52,7 @@ var EthereumProvider = class extends _eventemitter32.default { |
| 6 | + } |
| 7 | + case "wallet_switchEthereumChain": { |
| 8 | + const [chainId] = args.params; |
| 9 | ++ this.switchChain(chainId); |
| 10 | + this.emit("chainChanged", chainId); |
| 11 | + return void 0; |
| 12 | + } |
| 13 | +diff --git a/node_modules/@joyid/ethereum-provider/dist/index.mjs b/node_modules/@joyid/ethereum-provider/dist/index.mjs |
| 14 | +index e182344..3746b80 100644 |
| 15 | +--- a/node_modules/@joyid/ethereum-provider/dist/index.mjs |
| 16 | ++++ b/node_modules/@joyid/ethereum-provider/dist/index.mjs |
| 17 | +@@ -52,6 +52,7 @@ var EthereumProvider = class extends EventEmitter { |
| 18 | + } |
| 19 | + case "wallet_switchEthereumChain": { |
| 20 | + const [chainId] = args.params; |
| 21 | ++ this.switchChain(chainId); |
| 22 | + this.emit("chainChanged", chainId); |
| 23 | + return void 0; |
| 24 | + } |
| 25 | +diff --git a/node_modules/@joyid/ethereum-provider/src/index.ts b/node_modules/@joyid/ethereum-provider/src/index.ts |
| 26 | +index 2bb2aa8..0c55f0c 100644 |
| 27 | +--- a/node_modules/@joyid/ethereum-provider/src/index.ts |
| 28 | ++++ b/node_modules/@joyid/ethereum-provider/src/index.ts |
| 29 | +@@ -150,6 +150,7 @@ export class EthereumProvider extends EventEmitter { |
| 30 | + } |
| 31 | + case 'wallet_switchEthereumChain': { |
| 32 | + const [chainId] = args.params as [chainId: string] |
| 33 | ++ this.switchChain(chainId) |
| 34 | + this.emit('chainChanged', chainId) |
| 35 | + return undefined |
| 36 | + } |
0 commit comments