Skip to content

Commit

Permalink
Fixed acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ekenigs committed Sep 6, 2024
1 parent 84d50c6 commit b9a2e89
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 102 deletions.
6 changes: 3 additions & 3 deletions packages/sdk/src/services/evm/EvmService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ export class EvmService {
}

async getBalance(address: string, contract: ContractConfig): Promise<bigint> {
const balance = this.client.readContract({
const balance = await this.client.readContract({
abi: contract.abi,
address: contract.address as Address,
args: [address],
functionName: 'balanceOf',
});

if (!balance || typeof balance !== 'bigint') {
if (typeof balance !== 'bigint') {
throw new Error(
`Could not get balance for ${address}) from contract ${contract.address}`,
`Could not get balance on ${this.chain.name} for ${address} from contract ${contract.address}`,
);
}

Expand Down
Loading

0 comments on commit b9a2e89

Please sign in to comment.