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
Allows different modules' connected REST APIs to output token values always as a list of StdCoin.
Problem Definition
Currently when connecting to the LCD REST APIs of the distribution and staking module, we receive token values as two different types:
Inside the distribution module they are presented as a list of StdCoin .
Inside the staking module they are presented as strings.
This results in having to perform strange assumptions if we want to create something that puts together those data in a chain that has multiple supported coins.
As an example, let's take Regen.network that supports both seeds and trees tokens.
Now, let's take two API calls to two different endpoints.
Now, what are those shares? And what tokens are those balance? Are those seed or tree?
Proposal
The actual proposal is quite simple: when outputting a value that represents a token, always make it as a list of StdCoin so that multiple coins chain can output the data correctly and wallets an/or explorers can show the data in a better and more significative way than the one that is currently possibile.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
@RiccardoM there is no such type as a StdCoin but I think I understand what you're stating. The difference in types you're expressing is sdk.Coin/s vs sdk.Int. The difference being the former has a denomination.
I agree that within staking and other modules we can/should use sdk.Coin instead of sdk.Int, although it provides no functional difference. I would greatly appreciate to see this as a community contribution PR 👍
Summary
Allows different modules' connected REST APIs to output token values always as a list of
StdCoin
.Problem Definition
Currently when connecting to the LCD REST APIs of the
distribution
andstaking
module, we receive token values as two different types:distribution
module they are presented as a list ofStdCoin
.staking
module they are presented as strings.This results in having to perform strange assumptions if we want to create something that puts together those data in a chain that has multiple supported coins.
As an example, let's take Regen.network that supports both
seeds
andtrees
tokens.Now, let's take two API calls to two different endpoints.
1. Delegator rewards.
Link: https://xrn-us-east-1.regen.network/distribution/delegators/xrn:1dy39q7t3ja893qwnhr9hgllpd966npkeeyqzmt/rewards
Response
2. Delegator's delegations
Link: https://xrn-us-east-1.regen.network/staking/delegators/xrn:1dy39q7t3ja893qwnhr9hgllpd966npkeeyqzmt/delegations
Response
Now, what are those
shares
? And what tokens are thosebalance
? Are thoseseed
ortree
?Proposal
The actual proposal is quite simple: when outputting a value that represents a token, always make it as a list of
StdCoin
so that multiple coins chain can output the data correctly and wallets an/or explorers can show the data in a better and more significative way than the one that is currently possibile.For Admin Use
The text was updated successfully, but these errors were encountered: