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
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: