diff --git a/util/rddl_token_test.go b/util/rddl_token_test.go index f4e7605..6838b45 100644 --- a/util/rddl_token_test.go +++ b/util/rddl_token_test.go @@ -10,6 +10,13 @@ const ( rddlTokenAmount string = "998.85844748" ) +func Test2FloatConvertion1RDDL(t *testing.T) { + t.Parallel() + var expectedValue uint64 = 100000000 + value := RDDLToken2Uint(1) + assert.Equal(t, expectedValue, value) +} + func Test2FloatConvertion(t *testing.T) { t.Parallel() var expectedValue uint64 = 99885844748 diff --git a/x/dao/keeper/msg_server_distribution_result.go b/x/dao/keeper/msg_server_distribution_result.go index 814a409..d82e2ef 100644 --- a/x/dao/keeper/msg_server_distribution_result.go +++ b/x/dao/keeper/msg_server_distribution_result.go @@ -67,6 +67,10 @@ func (k msgServer) clearUnresolvedClaims(ctx sdk.Context, start int64) (err erro currentAmounts[address] += amount } + for address, amount := range claims.initiator { + currentAmounts[address] += amount + } + totalAmounts := make(map[string]uint64) for participantAddress := range currentAmounts { stagedBalance := k.bankKeeper.GetBalance(ctx, sdk.MustAccAddressFromBech32(participantAddress), k.GetParams(ctx).StagedDenom)