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
We currently allow number NatValues for backwards compatibility, but we should only allow bigint NatValues. Currently, any number NatValue is coerced to bigint, and AmountMath does not throw.
Description of the Design
AmountMath.coerce should throw when it encounters a number NatValue.
Security Considerations
It is easier to reason about fewer inputs.
Test Plan
Current agoric-sdk tests.
Potentially a test for the case in which a number throws.
The text was updated successfully, but these errors were encountered:
What is the Problem Being Solved?
We currently allow
number
NatValues for backwards compatibility, but we should only allowbigint
NatValues. Currently, anynumber
NatValue iscoerced
tobigint
, and AmountMath does not throw.Description of the Design
AmountMath.coerce should throw when it encounters a
number
NatValue.Security Considerations
It is easier to reason about fewer inputs.
Test Plan
Current agoric-sdk tests.
Potentially a test for the case in which a
number
throws.The text was updated successfully, but these errors were encountered: