Skip to content

Commit 78edeb2

Browse files
authored
fix: Add ceiling on gas estimates (#1949)
1 parent 2347945 commit 78edeb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/namadillo/src/atoms/fees/atoms.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export const gasEstimateFamily = atomFamily(
4242
Math.min(1, gasEstimate.totalEstimates / 1000)
4343
);
4444
return {
45-
min: gasEstimate.min * 1.1 - precision * 0.1,
46-
avg: gasEstimate.avg * 1.25 - precision * 0.25,
47-
max: gasEstimate.max * 1.5 - precision * 0.5,
45+
min: Math.ceil(gasEstimate.min * 1.1 - precision * 0.1),
46+
avg: Math.ceil(gasEstimate.avg * 1.25 - precision * 0.25),
47+
max: Math.ceil(gasEstimate.max * 1.5 - precision * 0.5),
4848
totalEstimates: gasEstimate.totalEstimates,
4949
};
5050
},

0 commit comments

Comments
 (0)