Skip to content

Commit d8fd73d

Browse files
fix: resolve remaining soroban client type errors
1 parent 36ae717 commit d8fd73d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

frontend/src/lib/contract/soroban-client.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { STELLAR_NETWORK, CONTRACT_ID } from "@/lib/env";
2+
import type { Account, ScVal } from "@stellar/stellar-sdk";
23

34
let rpcClient: unknown = null;
45

@@ -41,7 +42,7 @@ export async function simulateContractCall(
4142
const tempKeypair = Keypair.random();
4243

4344
// Get the account details from RPC
44-
const sourceAccount = await (client as { getAccount: (key: string) => Promise<unknown> }).getAccount(tempKeypair.publicKey());
45+
const sourceAccount = await (client as { getAccount: (key: string) => Promise<Account> }).getAccount(tempKeypair.publicKey());
4546

4647
// Create contract instance and add operation
4748
const contract = new Contract(contractId);
@@ -76,7 +77,7 @@ export async function simulateContractCall(
7677
const preparedTx = await (client as { prepareTransaction: (tx: unknown) => Promise<unknown> }).prepareTransaction(tx);
7778

7879
// Extract result from prepared transaction
79-
const result = (preparedTx as { result?: { retval: unknown } }).result?.retval;
80+
const result = (preparedTx as { result?: { retval: ScVal } }).result?.retval;
8081
if (result) {
8182
return scValToNative(result);
8283
}

0 commit comments

Comments
 (0)