Skip to content

Commit

Permalink
fix: default unit_redemption_value to 1 (#1011)
Browse files Browse the repository at this point in the history
for one of the staking units gateway is not returning this value causing UI to display `NaN`.  Almost certainly because the total supply is now zero after the unstake
  • Loading branch information
dawidsowardx authored Nov 25, 2024
1 parent dcc0220 commit c49d6b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui/src/api/utils/staking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const getStakedInfo =
stakeUnitToken.address
)!
const multiplier =
stakeUnitNativeResourceDetails.unit_redemption_value[0].amount
stakeUnitNativeResourceDetails.unit_redemption_value[0].amount || '1'

const xrdAmount = new BigNumber(stakeUnitToken.value)
.multipliedBy(new BigNumber(multiplier!))
Expand Down

0 comments on commit c49d6b5

Please sign in to comment.