hashgraph / hedera-sdk-js

Hedera™ Hashgraph SDK for JavaScript/TypeScript
https://docs.hedera.com/guides/docs/sdks
Apache License 2.0
277 stars 146 forks source link

Account Balance query failing #1068

Closed teacoat closed 2 years ago

teacoat commented 2 years ago

Description

Account balance query failing in 2.12.1 when it was working in 2.11.0

Steps to reproduce

Do a account balance query:

this.unauthClient = Client.forNetwork(network_env as any);

const account_id = AccountId.fromString(acc_id);

        const query = new AccountBalanceQuery()
            .setAccountId(account_id);

        const account_balance = await query.execute(this.unauthClient);

This code does not work in the latest update, no mention of account balance query changing in the release notes

Additional context

No response

Hedera network

testnet

Version

2.12.1

Operating system

No response

janaakhterov commented 2 years ago

Can you post the error? I'm not able to reproduce any error at the moment. I've tried updating our examples/ to use v2.12.1 and ran our get-account-balance.js example.

janaakhterov commented 2 years ago

Not sure if this is related, but while I was working on other things I found out WebChannel was broken. Fixed: https://github.com/hashgraph/hedera-sdk-js/commit/50dad309e413e69b8fa24170c55bf812f04caed4

Created test for this to hopefully prevent this from happening again: https://github.com/hashgraph/hedera-sdk-js/commit/11dfb2ffe4388e8430121c726f896181294189c5

teacoat commented 2 years ago

seems to be fixed now