diff --git a/CHANGELOG.md b/CHANGELOG.md index d2d098d06c..d596e7f38f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ### Chain +- (impv) [\#1901](https://github.com/bandprotocol/bandchain/pull/1901) Added `moniker` field to `delegations_view` table. - (feat) [\#1879](https://github.com/bandprotocol/bandchain/pull/1879) Keep `Request` and `Report` around. We avoid premature optimization at the moment. - (feat) [\#1873](https://github.com/bandprotocol/bandchain/pull/1873) Add `in-before-resolve` field in `Report` data structure. - (feat) [\#1875](https://github.com/bandprotocol/bandchain/pull/1875) Add CLI and REST query interface for request. diff --git a/chain/db/db.go b/chain/db/db.go index 353e904730..b737eadadf 100644 --- a/chain/db/db.go +++ b/chain/db/db.go @@ -74,6 +74,7 @@ func NewDB(dialect, path string) (*BandDB, error) { CAST(shares AS DECIMAL) / CAST(delegator_shares AS DECIMAL) * 100 as share_percentage, CAST(shares AS DECIMAL) * CAST(current_reward AS DECIMAL) / CAST(delegator_shares AS DECIMAL) + (CAST(current_ratio AS DECIMAL) - CAST(last_ratio AS DECIMAL)) * CAST(shares AS DECIMAL) as reward, validator_address, + moniker, delegator_address FROM delegations JOIN validators ON validator_address = operator_address; `)