Skip to content

Commit

Permalink
fix: export x/foundation pool (#772)
Browse files Browse the repository at this point in the history
* Export pool

* Update CHANGELOG.md
  • Loading branch information
0Tech authored Oct 31, 2022
1 parent 0137a62 commit 784e4e6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Improvements

### Bug Fixes
* (x/foundation) [\#772](https://github.com/line/lbm-sdk/pull/772) export x/foundation pool

### Breaking Changes

Expand Down
1 change: 1 addition & 0 deletions x/foundation/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *foundation.GenesisState {
Proposals: proposals,
Votes: votes,
Authorizations: k.GetGrants(ctx),
Pool: k.GetPool(ctx),
GovMintLeftCount: k.GetGovMintLeftCount(ctx),
}
}
Expand Down
17 changes: 17 additions & 0 deletions x/foundation/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,23 @@ func TestImportExportGenesis(t *testing.T) {
},
},
},
"pool": {
init: &foundation.GenesisState{
Params: foundation.DefaultParams(),
Foundation: foundation.DefaultFoundation(),
Pool: foundation.Pool{
Treasury: sdk.NewDecCoins(sdk.NewDecCoin(sdk.DefaultBondDenom, sdk.OneInt())),
},
},
valid: true,
export: &foundation.GenesisState{
Params: foundation.DefaultParams(),
Foundation: foundation.DefaultFoundation(),
Pool: foundation.Pool{
Treasury: sdk.NewDecCoins(sdk.NewDecCoin(sdk.DefaultBondDenom, sdk.OneInt())),
},
},
},
"member of long metadata": {
init: &foundation.GenesisState{
Params: foundation.DefaultParams(),
Expand Down

0 comments on commit 784e4e6

Please sign in to comment.