Skip to content

Commit

Permalink
fix: pooling card amount, closes #1150
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Apr 17, 2023
1 parent c75a36e commit 068c898
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/hooks/use-delegation-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { RootState } from '@store/index';
import { selectAddress } from '@store/keys';
import { selectPoxInfo } from '@store/stacking';
import BigNumber from 'bignumber.js';
import BN from 'bn.js';
import { useSelector } from 'react-redux';

interface DelegatedTrueStatus {
Expand Down Expand Up @@ -39,9 +38,9 @@ export function useDelegationStatus(): DelegatedStatus {
if (resp.type === ClarityType.OptionalSome && resp.value.type === ClarityType.Tuple) {
const data = resp.value.data;

const amountMicroStx = BN.isBN((data['amount-ustx'] as any).value)
? new BigNumber((data['amount-ustx'] as any).value.toString())
: new BigNumber(0);
const ustxAmount = (data['amount-ustx'] as any).value;

const amountMicroStx = ustxAmount ? new BigNumber(ustxAmount) : new BigNumber(0);

const untilBurnHeight =
data['until-burn-ht'].type === ClarityType.OptionalSome
Expand Down

0 comments on commit 068c898

Please sign in to comment.