mapValuesToProperValueType<T>(object: T, messageTypeUrl?: string): T
We need to represent some of the values in a proper format acceptable by the chain.
We need to represent some values from a number to string
This needs to be done for every number value except for maps (ex: vote option)
We need to convert every sdk.Dec value from a raw value to shifted by 1e18 value
ex: 0.01 -> 0.01000000000000000000, 1 -> 1.000000000000000000
For some fields, like 'amount' in the 'MsgIncreasePositionMargin' we have
to also specify the Message type to apply the sdk.Dec conversion because there
are other amount fields in other messages as well and we don't want to affect them
We need to represent some of the values in a proper format acceptable by the chain.
We need to represent some values from a number to string This needs to be done for every number value except for maps (ex: vote option)
We need to convert every
sdk.Dec
value from a raw value to shifted by 1e18 value ex: 0.01 -> 0.01000000000000000000, 1 -> 1.000000000000000000For some fields, like 'amount' in the 'MsgIncreasePositionMargin' we have to also specify the Message type to apply the sdk.Dec conversion because there are other amount fields in other messages as well and we don't want to affect them