Skip to content

Commit 095b7ee

Browse files
committed
chore: implement PR comments observations
1 parent f02ada2 commit 095b7ee

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

utils/transactions.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,9 @@ func FeeEstToResBoundsMap(
267267
feeEstimation rpc.FeeEstimation,
268268
multiplier float64,
269269
) *rpc.ResourceBoundsMapping {
270-
bounds := CustomFeeEstToResBoundsMap(feeEstimation, multiplier, starknetLimits)
270+
bounds := CustomFeeEstToResBoundsMap(feeEstimation, multiplier, &starknetLimits)
271271

272+
// TODO: return by value instead of pointer
272273
return &bounds
273274
}
274275

@@ -288,7 +289,7 @@ func FeeEstToResBoundsMap(
288289
func CustomFeeEstToResBoundsMap(
289290
feeEstimation rpc.FeeEstimation,
290291
multiplier float64,
291-
limits FeeLimits,
292+
limits *FeeLimits,
292293
) rpc.ResourceBoundsMapping {
293294
// Create L1 resources bounds
294295
l1Gas := toResourceBounds(

utils/transactions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ func TestFeeEstToResBoundsMap(t *testing.T) {
650650
t.Run("Test CustomFeeEstToResBoundsMap", func(t *testing.T) {
651651
for _, tt := range tests {
652652
t.Run(tt.name, func(t *testing.T) {
653-
got := CustomFeeEstToResBoundsMap(tt.feeEstimation, tt.multiplier, tt.feeLimit)
653+
got := CustomFeeEstToResBoundsMap(tt.feeEstimation, tt.multiplier, &tt.feeLimit)
654654

655655
// Compare each field individually for better error messages
656656
assert.Equal(t, tt.expected.L1Gas.MaxAmount, got.L1Gas.MaxAmount,

0 commit comments

Comments
 (0)