Skip to content

Commit

Permalink
fix: use websockets for balances (tmp) (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
Romsters authored Dec 19, 2023
1 parent 6f6e34d commit cba9b03
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/worker/src/blockchain/blockchain.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ export class BlockchainService implements OnModuleInit {

if (utils.isETH(tokenAddress)) {
return await this.rpcCall(async () => {
if (this.useWebSocketsForTransactions) {
return await this.wsProvider.getProvider().getBalance(address, blockTag);
}
return await this.provider.getBalance(address, blockTag);
}, "getBalance");
}
Expand Down

0 comments on commit cba9b03

Please sign in to comment.