Skip to content

Commit

Permalink
fix(staking): fee displayed in wrong format (#4270)
Browse files Browse the repository at this point in the history
the fee is returned by the API in decimal format, so we have to
multiply by 100 to get the percentage
  • Loading branch information
compojoom authored Sep 27, 2024
1 parent 74e2e42 commit ad1a9cd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const CURRENCY = 'USD'
const StakingConfirmationTxDeposit = ({ order }: StakingOrderConfirmationViewProps) => {
const isOrder = order.type === ConfirmationViewTypes.KILN_NATIVE_STAKING_DEPOSIT

// the fee is returned in decimal format, so we multiply by 100 to get the percentage
const fee = (order.fee * 100).toFixed(2)
return (
<Stack gap={isOrder ? 2 : 1}>
{isOrder && (
Expand Down Expand Up @@ -58,7 +60,7 @@ const StakingConfirmationTxDeposit = ({ order }: StakingOrderConfirmationViewPro
</>
}
>
{order.fee}%
{fee} %
</FieldsGrid>

<Stack
Expand Down

0 comments on commit ad1a9cd

Please sign in to comment.