Skip to content

Commit 18f706a

Browse files
committed
fix: ensure handling of BigInt for allowlist units
Updated the allowlist entry calculations to explicitly convert units to BigInt before processing. This change improves the accuracy of percentage calculations displayed in the minting form.
1 parent 5e73039 commit 18f706a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/hypercert/hypercert-minting-form/form-steps.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ const AdvancedAndSubmit = ({ form, isBlueprint }: FormStepsProps) => {
729729
initialValues={allowlistEntries?.map((entry) => ({
730730
address: entry.address,
731731
percentage: calculatePercentageBigInt(
732-
entry.units,
732+
BigInt(entry.units),
733733
).toString(),
734734
}))}
735735
/>
@@ -754,7 +754,7 @@ const AdvancedAndSubmit = ({ form, isBlueprint }: FormStepsProps) => {
754754
</TableCell>
755755
<TableCell>
756756
{formatNumber(
757-
calculatePercentageBigInt(entry.units),
757+
calculatePercentageBigInt(BigInt(entry.units)),
758758
)}
759759
%
760760
</TableCell>

0 commit comments

Comments
 (0)