feat(x/protocolpool,x/distribution)!: remove dependency + fix continuous fund bug (backport #20790) (#21060)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2024-07-24 18:19:12 +02:00
committed by GitHub
co-authored by Facundo Medica
parent 8e44789135
commit 072a38d556
43 changed files with 1582 additions and 489 deletions
@@ -87,7 +87,6 @@ func TestWithdrawAnytime(t *testing.T) {
// TestExpireInTheMiddle tests if a continuous fund that expires without anyone
// calling the withdraw function, the funds are still distributed correctly.
func TestExpireInTheMiddle(t *testing.T) {
t.Skip("This is a bug @facu found, will fix in another PR")
var accountKeeper authkeeper.AccountKeeper
var protocolpoolKeeper protocolpoolkeeper.Keeper
var bankKeeper bankkeeper.Keeper
@@ -131,8 +130,8 @@ func TestExpireInTheMiddle(t *testing.T) {
_, err = msgServer.WithdrawContinuousFund(ctx, &protocolpooltypes.MsgWithdrawContinuousFund{
RecipientAddress: testAddr0Str,
})
require.Error(t, err)
require.NoError(t, err)
endBalance := bankKeeper.GetBalance(ctx, testAddrs[0], sdk.DefaultBondDenom)
require.Equal(t, "158441stake", endBalance.String())
require.Equal(t, "237661stake", endBalance.String())
}