hedera-sdk-js
hedera-sdk-js copied to clipboard
setDefaultMaxQueryPayment integer overflow
Description
Currently, setDefaultMaxQueryPayment has a integer overflow problem. If setDefaultMaxQueryPayment is set to 25 hbar or more, the SDK will throw giving Error: defaultMaxQueryPayment must be non-negative
.
This bug is caused by this line of code. https://github.com/hashgraph/hedera-sdk-js/blob/76820600d6d7f0ea7a200b599be1c8a7b4f24d1c/src/client/Client.js#L452
Steps to reproduce
Try to set setDefaultMaxQueryPayment
like following and run the script
client.setDefaultMaxQueryPayment(new Hbar(25));
Additional context
No response
Hedera network
mainnet, testnet, previewnet, other
Version
v2.40
Operating system
None