hdac-io / friday

Development repository for friday mainnet
Apache License 2.0
2 stars 2 forks source link

Duplicate result of balance & stake in REST #161

Closed psy2848048 closed 4 years ago

psy2848048 commented 4 years ago

staked should be zero for the address below but printed as same as the available asset in REST call. This issue is not occurred in clif.

http://3.34.5.208:1317/hdac/stake?address=friday193lmkelm57nvsrafm4fewjs3s8nq6eduukev7z4kz2ac3h64elqsn9llrc

I checked by clif hdac getstake and clif hdac getbalance and the REST result of hdac/stake prints of the value hdac/balance

psy2848048 commented 4 years ago

Try to fix by changing JSON descriptor

// QueryGetBalanceDetail payload for balance query
type QueryGetBalanceDetail struct {
    Address sdk.AccAddress `json:"address_holder"`
}

// QueryGetStakeDetail payload for stake query
type QueryGetStakeDetail struct {
    Address sdk.AccAddress `json:"address_staker"`
}