Skip to content

Commit

Permalink
feat: hide stacking row when no stx are stacked
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Oct 26, 2020
1 parent ab551c1 commit 8bc463c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/components/home/balance-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface BalanceCardProps {
onSelectSend(): void;
onSelectReceive(): void;
onSelectStacking(): void;
onRequestTestnetStx(): Promise<any>;
onRequestTestnetStx(): Promise<void>;
}

export const BalanceCard: FC<BalanceCardProps> = props => {
Expand Down Expand Up @@ -45,7 +45,7 @@ export const BalanceCard: FC<BalanceCardProps> = props => {
{balance === null ? '–' : toHumanReadableStx(balance)}
</Text>

{features.stacking && (
{features.stacking && lockedBN.toNumber() !== 0 && (
<Flex alignItems="center" mt="tight" color="ink.600" fontSize={['14px', '16px']}>
<EncryptionIcon size="16px" color="#409EF3" display={['none', 'block']} mr="tight" />
<Text onClick={onSelectStacking} cursor="pointer" borderBottom="1px dotted #677282">
Expand Down
8 changes: 4 additions & 4 deletions app/modals/stacking/stacking-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ export const StackingModal: FC<StackingModalProps> = ({ onClose, numCycles, poxA
throw new Error('Ledger responded with errors');
}

const signedTx = unsignedTx.createTxWithSignature(resp.signatureVRS);

return signedTx;
return unsignedTx.createTxWithSignature(resp.signatureVRS);
},
[blockstackApp, poxInfo, numCycles, poxAddress, node.url, balance]
);
Expand Down Expand Up @@ -280,7 +278,9 @@ export const StackingModal: FC<StackingModalProps> = ({ onClose, numCycles, poxA
body: <StackingSuccess cycles={numCycles} />,
footer: (
<StackingModalFooter>
<StackingModalButton onClick={closeModal}>Close</StackingModalButton>
<StackingModalButton onClick={() => (closeModal(), history.push(routes.HOME))}>
Close
</StackingModalButton>
</StackingModalFooter>
),
}),
Expand Down

0 comments on commit 8bc463c

Please sign in to comment.