Skip to content

Commit

Permalink
Add noop for add eth chain
Browse files Browse the repository at this point in the history
  • Loading branch information
chasefleming committed Feb 3, 2025
1 parent 4829b5a commit 3071c76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/fcl-ethereum-provider/src/network/network-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,12 @@ export class NetworkManager {
}
return chainId
}

/**
* No-op implementation for wallet_addEthereumChain.
* Since FCL does support dynamic chain additions.
*/
public async wallet_addEthereumChain(): Promise<null> {
return null;
}
}
2 changes: 2 additions & 0 deletions packages/fcl-ethereum-provider/src/rpc/rpc-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export class RpcProcessor {
this.accountManager,
params as PersonalSignParams
)
case "wallet_addEthereumChain":
return await this.networkManager.wallet_addEthereumChain();
default:
return await this.gateway.request({
chainId,
Expand Down

0 comments on commit 3071c76

Please sign in to comment.