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
When schema is u64 or u128, the input value type can be number, bigint, string, boolean. But when schema is u8, u16, u32, the input value type can only be number, they are not consistent, that is strange.
I think we should make input value type be strict when serialize u64 or u128, I mean ONLY allow bigint.
Alternatively, we should make input type NOT be strict when serialize u8, u16, u32, I mean allow number, bigint, string and boolean
The text was updated successfully, but these errors were encountered:
hanakannzashi
changed the title
type is not strict when serialize bigint
type is not strict when serialize u64 or u128Dec 27, 2023
hanakannzashi
changed the title
type is not strict when serialize u64 or u128
Type is not strict when serialize u64 or u128Dec 27, 2023
While I agree with the simplicity from the theoretical point of view, the reality is that I've seen people always use number for number, but the same people would use BN.js or strings for big values.
To be honest, I think we would break more things that we would fix by doing this (thought I might be wrong)
When schema is
u64
oru128
, the input value type can benumber
,bigint
,string
,boolean
. But when schema isu8
,u16
,u32
, the input value type can only benumber
, they are not consistent, that is strange.I think we should make input value type be strict when serialize
u64
oru128
, I mean ONLY allowbigint
.Alternatively, we should make input type NOT be strict when serialize
u8
,u16
,u32
, I mean allownumber
,bigint
,string
andboolean
The text was updated successfully, but these errors were encountered: