* clear unresolved claims for the initiators as well (#473)

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2024-11-15 12:15:23 +01:00 committed by GitHub
parent 61adbc0a5d
commit 702b9d6f7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -10,6 +10,13 @@ const (
rddlTokenAmount string = "998.85844748" 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) { func Test2FloatConvertion(t *testing.T) {
t.Parallel() t.Parallel()
var expectedValue uint64 = 99885844748 var expectedValue uint64 = 99885844748

View File

@ -67,6 +67,10 @@ func (k msgServer) clearUnresolvedClaims(ctx sdk.Context, start int64) (err erro
currentAmounts[address] += amount currentAmounts[address] += amount
} }
for address, amount := range claims.initiator {
currentAmounts[address] += amount
}
totalAmounts := make(map[string]uint64) totalAmounts := make(map[string]uint64)
for participantAddress := range currentAmounts { for participantAddress := range currentAmounts {
stagedBalance := k.bankKeeper.GetBalance(ctx, sdk.MustAccAddressFromBech32(participantAddress), k.GetParams(ctx).StagedDenom) stagedBalance := k.bankKeeper.GetBalance(ctx, sdk.MustAccAddressFromBech32(participantAddress), k.GetParams(ctx).StagedDenom)