Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit 5e628b0

Browse files
committed
Add null check for fromPool in change pool dialog
1 parent 907a7c1 commit 5e628b0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ts/components/staking/change_pool_dialog.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export const ChangePoolDialog: FC<ChangePoolDialogProps> = ({
8585
<>
8686
<StyledHeading as="h3">Move stake confirmation</StyledHeading>
8787
<StyledParagraph>
88-
You are moving {formattedAmount} ZRX from {stakingUtils.getPoolDisplayName(fromPool)} to{' '}
88+
You are moving {formattedAmount} ZRX{' '}
89+
{fromPool && `from ${stakingUtils.getPoolDisplayName(fromPool)}`} to{' '}
8990
{stakingUtils.getPoolDisplayName(toPool)}.
9091
</StyledParagraph>
9192
<StyledParagraph>
@@ -148,7 +149,7 @@ export const ChangePoolDialog: FC<ChangePoolDialogProps> = ({
148149
shouldAskForConfirmation
149150
? () => setIsConfirmScreen(true)
150151
: () => {
151-
onChangePool(fromPool.poolId, toPool.poolId, zrxAmount);
152+
onChangePool(fromPool && fromPool.poolId, toPool.poolId, zrxAmount);
152153
clearAndDismiss();
153154
}
154155
}

ts/pages/governance/vote_index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type ProposalWithOrder = Proposal & {
5555

5656
type TreasuryProposalWithOrder = TreasuryProposal & {
5757
order?: number;
58-
}
58+
};
5959

6060
const PROPOSALS = environments.isProduction() ? prodProposals : stagingProposals;
6161
const ZEIP_IDS = Object.keys(PROPOSALS).map((idString) => parseInt(idString, 10));

0 commit comments

Comments
 (0)