Skip to content

Commit

Permalink
fix: precise uint64->big.Int conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Nov 15, 2024
1 parent 23c536a commit 89cc3d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/meterer/offchain_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (s *OffchainStore) GetLargestCumulativePayment(ctx context.Context, account
return nil, fmt.Errorf("failed to parse payment: %w", err)
}

return big.NewInt(int64(payment)), nil
return new(big.Int).SetUint64(payment), nil
}

func parseBinUsage(bin map[string]types.AttributeValue) (uint64, error) {
Expand Down

0 comments on commit 89cc3d0

Please sign in to comment.