Skip to content

Commit 9a4496d

Browse files
authoredOct 12, 2021
Merge pull request #20 from AlphaWallet/add-support-eip3326-wallet_switchEthereumChain
Add support for EIP3326. `wallet_switchEthereumChain`
2 parents 459edbe + 4a72bb1 commit 9a4496d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
 

‎dist/AlphaWallet-min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/AlphaWallet.js

+10
Original file line numberDiff line numberDiff line change
@@ -62591,6 +62591,8 @@ function HookedWalletSubprovider(opts){
6259162591
if (opts.ethCall) self.ethCall = opts.ethCall
6259262592
// EIP3085
6259362593
if (opts.walletAddEthereumChain) self.walletAddEthereumChain = opts.walletAddEthereumChain
62594+
// EIP3326
62595+
if (opts.walletSwitchEthereumChain) self.walletSwitchEthereumChain = opts.walletSwitchEthereumChain
6259462596
}
6259562597

6259662598
HookedWalletSubprovider.prototype.handleRequest = function(payload, next, end){
@@ -62638,6 +62640,14 @@ HookedWalletSubprovider.prototype.handleRequest = function(payload, next, end){
6263862640
], end)
6263962641
return
6264062642

62643+
case 'wallet_switchEthereumChain':
62644+
txParams = payload.params[0]
62645+
txParams.chainType = "ETH"
62646+
waterfall([
62647+
(cb) => self.walletSwitchEthereumChain(txParams, cb),
62648+
], end)
62649+
return
62650+
6264162651
case 'eth_sendTransaction':
6264262652
txParams = payload.params[0]
6264362653
txParams.chainType = "ETH"

0 commit comments

Comments
 (0)
Please sign in to comment.