You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on an acceptance test I noticed that the zero value for the HBAR_RATE_LIMIT_TINYBAR was not getting picked up. Most likely because the logical OR operator || returns the first truthy value and 0 is falsy. The nullish coalescing operator ?? falls back to the default value when the left-hand operand is null or undefined, not when it's 0 or any other falsy value.
Steps to reproduce
Look for an environment variable that would take an integer number and set it to 0 for the default value. See if it gets picked up.
Go through all the environment variables of number type and see how they are mapped in the constants. Something like this could be problematic:
Description
While working on an acceptance test I noticed that the zero value for the
HBAR_RATE_LIMIT_TINYBAR
was not getting picked up. Most likely because the logical OR operator || returns the first truthy value and 0 is falsy. The nullish coalescing operator ?? falls back to the default value when the left-hand operand is null or undefined, not when it's 0 or any other falsy value.Steps to reproduce
Look for an environment variable that would take an integer number and set it to 0 for the default value. See if it gets picked up.
Go through all the environment variables of number type and see how they are mapped in the constants. Something like this could be problematic:
Additional context
No response
Hedera network
other
Version
v0.59.3
Operating system
macOS
The text was updated successfully, but these errors were encountered: