Skip to content

Commit 8f184ce

Browse files
author
Nguyen Anh Tu
committed
WIP
1 parent 196e30a commit 8f184ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

demo/vue-app-new/src/services/ethHandlers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ export const getAccounts = async (provider: IProvider, uiConsole: any): Promise<
5555
};
5656
export const getChainId = async (provider: IProvider, uiConsole: any): Promise<string | undefined> => {
5757
try {
58+
const ethProvider = new BrowserProvider(provider);
59+
const req = ethProvider.getRpcRequest({ method: "chainId" });
60+
const res = await provider.request(req!);
61+
console.log(">>>> in herher", res);
5862
const { chainId } = provider;
5963
uiConsole("chainId", chainId.toString());
6064
return chainId.toString();

0 commit comments

Comments
 (0)