From a43458891e17f003074f1c5dcd69b2b7e5c2f59d Mon Sep 17 00:00:00 2001 From: ymekuria Date: Fri, 20 Sep 2024 12:20:00 -0700 Subject: [PATCH] feat(index.page.tsx): update fetchAccount calls to use publicKeyBase58 and zkappPublicKeyBase58 properties for better readability and consistency --- .../04-zkapp-browser-ui/ui/src/pages/index.page.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/index.page.tsx b/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/index.page.tsx index 9a0486d1d..0d9d24a89 100644 --- a/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/index.page.tsx +++ b/examples/zkapps/04-zkapp-browser-ui/ui/src/pages/index.page.tsx @@ -114,9 +114,7 @@ export default function Home() { for (;;) { setDisplayText('Checking if fee payer account exists...'); console.log('Checking if fee payer account exists...'); - const res = await state.zkappWorkerClient!.fetchAccount({ - publicKey: state.publicKey!, - }); + const res = await state.zkappWorkerClient!.fetchAccount(state.publicKeyBase58); const accountExists = res.error == null; if (accountExists) { break; @@ -137,9 +135,7 @@ export default function Home() { setDisplayText('Creating a transaction...'); console.log('Creating a transaction...'); - await state.zkappWorkerClient!.fetchAccount({ - publicKey: state.publicKey!, - }); + await state.zkappWorkerClient!.fetchAccount(state.publicKeyBase58); await state.zkappWorkerClient!.createUpdateTransaction(); @@ -177,9 +173,7 @@ export default function Home() { console.log('Getting zkApp state...'); setDisplayText('Getting zkApp state...'); - await state.zkappWorkerClient!.fetchAccount({ - publicKey: state.zkappPublicKey!, - }); + await state.zkappWorkerClient!.fetchAccount(state.zkappPublicKeyBase58!); const currentNum = await state.zkappWorkerClient!.getNum(); setState({ ...state, currentNum }); console.log(`Current state in zkApp: ${currentNum.toString()}`);