From 89cc3d0a3c6c9105dcc59b477c3bbc8b6e83054b Mon Sep 17 00:00:00 2001 From: hopeyen Date: Fri, 15 Nov 2024 01:16:45 -0800 Subject: [PATCH] fix: precise uint64->big.Int conversion --- core/meterer/offchain_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/meterer/offchain_store.go b/core/meterer/offchain_store.go index 0a5f425d58..29686ebd2e 100644 --- a/core/meterer/offchain_store.go +++ b/core/meterer/offchain_store.go @@ -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) {