Skip to content

Commit

Permalink
refactor(zkappWorkerClient.ts): update fetchAccount method to pass pu…
Browse files Browse the repository at this point in the history
…blicKey directly without converting it to base58, as it is already in the correct format
  • Loading branch information
ymekuria committed Sep 20, 2024
1 parent 249883b commit 3fd1430
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as Comlink from "comlink";

export default class ZkappWorkerClient {
// ---------------------------------------------------------------------------------------

worker: Worker;
// Proxy to interact with the worker's methods as if they were local
remoteApi: Comlink.Remote<typeof import('./zkappWorker').api>;

Expand All @@ -34,7 +34,7 @@ export default class ZkappWorkerClient {

fetchAccount(publicKey: PublicKey): Promise<ReturnType<typeof fetchAccount>> {
console.log('publicKey', publicKey);
return this.remoteApi.fetchAccount(PublicKey.toBase58(publicKey));
return this.remoteApi.fetchAccount(publicKey);
}

initZkappInstance(publicKey: PublicKey) {
Expand Down

0 comments on commit 3fd1430

Please sign in to comment.