File tree Expand file tree Collapse file tree
frontend/src/lib/contract Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { STELLAR_NETWORK , CONTRACT_ID } from "@/lib/env" ;
2+ import type { Account , ScVal } from "@stellar/stellar-sdk" ;
23
34let 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 }
You can’t perform that action at this time.
0 commit comments