Skip to content

Commit

Permalink
refactor(liquidvesting): remove trusted delegates (#215)
Browse files Browse the repository at this point in the history
## Description

Closes: #XXXX

This PR removes the `trusted_delegates` from the `x/liquidvesting`
module with the logic that restricts the insurance fund to accept
deposits only from those accounts.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is
not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR
Targeting](https://github.com/milkyway-labs/milkyway/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building
modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [ ] included the necessary unit and integration
[tests](https://github.com/milkyway-labs/milkyway/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go
code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable
and please add
your handle next to the items reviewed if you only reviewed selected
items.*

I have...

- [ ] confirmed the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit c0e4365)
  • Loading branch information
manu0466 authored and RiccardoM committed Dec 9, 2024
1 parent 750d138 commit 0fa5c55
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
4 changes: 0 additions & 4 deletions app/upgrades/v3/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ func CreateUpgradeHandler(
if err != nil {
return nil, err
}
liquidVestingParams.TrustedDelegates = []string{
"celestia1nyk8qsfkrplvzex5yc4l5kghdr60nj7mutnw6z", // goose self-delegation address
"celestia1vre9kvtw6w9lxkl3620zpzs5lpczhvjc0s6r2a", // bot address
}
err = keepers.LiquidVestingKeeper.SetParams(ctx, liquidVestingParams)
if err != nil {
return nil, err
Expand Down
6 changes: 1 addition & 5 deletions app/upgrades/v3/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,8 @@ func (suite *UpgradeTestSuite) TestUpgradeV3() {
sdk.NewInt64Coin("ibc/8D4FC51F696E03711B9B37A5787FB89BD2DDBAF788813478B002D552A12F9157", 1000000),
), rewardsParams.RewardsPlanCreationFee)

liquidVestingParams, err := suite.App.LiquidVestingKeeper.GetParams(suite.Ctx)
_, err = suite.App.LiquidVestingKeeper.GetParams(suite.Ctx)
suite.Require().NoError(err)
suite.Require().Equal([]string{
"celestia1nyk8qsfkrplvzex5yc4l5kghdr60nj7mutnw6z",
"celestia1vre9kvtw6w9lxkl3620zpzs5lpczhvjc0s6r2a",
}, liquidVestingParams.TrustedDelegates)

slashingParams, err := suite.App.SlashingKeeper.GetParams(suite.Ctx)
suite.Require().NoError(err)
Expand Down
2 changes: 1 addition & 1 deletion x/liquidvesting/types/params.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package types

import (
fmt "fmt"
"fmt"
"slices"

"cosmossdk.io/math"
Expand Down

0 comments on commit 0fa5c55

Please sign in to comment.