-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Description
- Expected behavior and actual behavior.
When using the UInt64.fromUInt method, there is no error handling done when negative values are used to create the instance. As a result, because it does not produce an error, requests to the API are sent with 4294867296 amounts when you initialize them with UInt64.fromUint(-1).
The expected behaviour would be to throw an Error in case of malformed Unsigned Integer amounts as this would avoid such collaterals.
- Steps to reproduce the problem.
This example is not from me, but will reproduce the problem at hand:
MosaicSupplyChangeTransaction.create(
Deadline.create(),
mosaicID,
MosaicSupplyType.Decrease,
UInt64.fromUint(-1),
NetworkType.MIJIN_TEST);
- Specifications like the version of the project, operating system, or hardware.
nem2-sdk@0.10.1
Metadata
Metadata
Assignees
Labels
No labels