Skip to content

Using BigUInt causes uncatchable crashes #216

Description

@simonmcl

While using our app, if the user tries to send the max amount of tez, we do some checks and deduct the fees from the sending amount (and confirm it with the user). While doing these calculations our app will crash if the users balance is less than the fees. As Tez is using BigUInt under the hood which uses uncatchable preconditions.

I'm wondering what your take on this is?

I would have expected some kind of error from trying to send a negative Tez amount. But I wasn't expecting to encounter an uncatchable crash just from trying to work out the sending amount. Something like this: let value = Tez(0.1) - Tez(0.2)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions