Description:
On the newest version I'm getting the following error if I try to delegate/deposit/send an amount with decimals
math/big: cannot unmarshal "1.2" into a *big.Int
how is it not possible to use decimals if the total value is in decimals?
thank you for asking @jbibla, I find it also very weird
I think we discussed this before but let's pull in @cwgoes and @rigelrozanski for clarification
how is it not possible to use decimals if the total value is in decimals?
🤷♂️
Will report this to the All in Hands
Gaia does not support decimal/fractional tokens; all token amounts are positive integers. As far as I know it has never done so. I don't know what Voyager did previously or what might have changed recently.
Likely we will have some "unit denomination" which should be visualized to the user (so all amounts should be divided by 1e18 or something) - that could be configured entirely in Voyager though, the SDK doesn't need to do anything for it.
Validator Tokens are in SDK.Dec and Shares are in SDK.Dec. Calculating tokens from shares will probably produce a decimal.
But I remember that we said a user can only undelegate full tokens from a validator.
So summing up:
We do display only the possible undelegatable amount of tokens (rounded down) as stake per validator. We don't ever show decimals.
Correct?
Sounds good to me.
Thank you @cwgoes for your patience :)
@faboweb "undelegate full tokens" <- this means nano-atoms though! not full atoms! - the base unit for a "whole token" is a nano-atom... it is _nano-atoms_ which can be undelegated
lol
Thank you @rigelrozanski for following up and clarifying. :) We came to the same solution yesterday with Chris. Let's increase the amount of tokens on the next testnet to x * 10^18 to be more representative of the actual values. We will do the same on our local testnet setups.