Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnukumavat committed Mar 19, 2024
1 parent 733a9a0 commit d74e93b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions x/gasless/keeper/fee_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ func (k Keeper) GetFeeSource(ctx sdk.Context, sdkTx sdk.Tx, originalFeePayer sdk
if !found {
usage.Contracts = append(usage.Contracts, &types.UsageDetails{
UsageIdentifier: contractAddress,
Details: []*types.UsageDetail{},
Details: []*types.UsageDetail{&usageDetail},
})
} else {
usage.Contracts[contractUsageIdentifierIndex].Details = append(usage.Contracts[contractUsageIdentifierIndex].Details, &usageDetail)
}
usage.Contracts[contractUsageIdentifierIndex].Details = append(usage.Contracts[contractUsageIdentifierIndex].Details, &usageDetail)
} else {
found := false
messageTypeURLUsageIdentifierIndex := 0
Expand All @@ -215,10 +216,11 @@ func (k Keeper) GetFeeSource(ctx sdk.Context, sdkTx sdk.Tx, originalFeePayer sdk
if !found {
usage.Txs = append(usage.Txs, &types.UsageDetails{
UsageIdentifier: msgTypeURL,
Details: []*types.UsageDetail{},
Details: []*types.UsageDetail{&usageDetail},
})
} else {
usage.Txs[messageTypeURLUsageIdentifierIndex].Details = append(usage.Txs[messageTypeURLUsageIdentifierIndex].Details, &usageDetail)
}
usage.Txs[messageTypeURLUsageIdentifierIndex].Details = append(usage.Txs[messageTypeURLUsageIdentifierIndex].Details, &usageDetail)
}
// assign the updated usage and set it to the store
gasConsumer.Consumption[consumptionIndex].Usage = usage
Expand Down

0 comments on commit d74e93b

Please sign in to comment.