Skip to content

Deprecate public static func generateBigInt(valueInEther: Double, symbol: String) -> GethBigInt? #107

Description

@xiaowheat

I think we should deprecate public static func generateBigInt(valueInEther: Double, symbol: String) -> GethBigInt?

Double has a precision of 15 decimal digits. For Double type, 1.123456789123456789 will be 1.1234567891234568 It's not correct to assume that valueInEther as a Double type won't be overflow.

It will return an error if users choose max value.

Proposed solution:
Use public static func generate(_ valueInEther: String, _ decimals: Int = 18) -> GethBigInt?

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions