diff --git a/apps/docs/src/components/test-zkapp.tsx b/apps/docs/src/components/test-zkapp.tsx index 899da82..fb24a28 100644 --- a/apps/docs/src/components/test-zkapp.tsx +++ b/apps/docs/src/components/test-zkapp.tsx @@ -26,6 +26,7 @@ export const TestZkApp = () => { mina_sign: "", mina_signFields: "", mina_signTransaction: "", + mina_switchChain: "", }); const providers = useSyncExternalStore(store.subscribe, store.getProviders); const provider = providers.find( @@ -140,6 +141,14 @@ export const TestZkApp = () => { mina_signTransaction: JSON.stringify(result, undefined, "\t"), })); }; + const switchChain = async (networkId: string) => { + if (!provider) return; + const { result } = await provider.request({ + method: "mina_switchChain", + params: [networkId], + }); + setResults(() => ({ mina_switchChain: result })); + }; return (

Test zkApp

@@ -201,32 +210,56 @@ export const TestZkApp = () => { Request Accounts - +
- + + + +
+
+

Network

+
+
+
+ +
+ +