Skip to content

Commit

Permalink
fix: pass chainId to BscLink instances
Browse files Browse the repository at this point in the history
  • Loading branch information
therealemjy committed Sep 5, 2023
1 parent 261943e commit 4602d6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/BscLink/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Meta } from '@storybook/react';
import { ChainId } from 'packages/contracts';
import React from 'react';

import { withCenterStory, withThemeProvider } from 'stories/decorators';
Expand All @@ -12,5 +13,8 @@ export default {
} as Meta<typeof BscLink>;

export const Default = () => (
<BscLink hash="0x6b8a5663cd46f7b719391c518c60e2f45427b95a082e3e47739b011faccbfc96" />
<BscLink
hash="0x6b8a5663cd46f7b719391c518c60e2f45427b95a082e3e47739b011faccbfc96"
chainId={ChainId.BSC_TESTNET}
/>
);
5 changes: 4 additions & 1 deletion src/components/SuccessfulTransactionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import React from 'react';
import { Token } from 'types';
import { convertWeiToTokens } from 'utilities';

import { useAuth } from 'context/AuthContext';

import { BscLink } from '../BscLink';
import { Icon } from '../Icon';
import { Modal, ModalProps } from '../Modal';
Expand All @@ -31,6 +33,7 @@ export const SuccessfulTransactionModal: React.FC<SuccessfulTransactionModalProp
isOpen,
handleClose,
}) => {
const { chainId } = useAuth();
const styles = useStyles();

return (
Expand Down Expand Up @@ -61,7 +64,7 @@ export const SuccessfulTransactionModal: React.FC<SuccessfulTransactionModalProp
)}
</div>

<BscLink hash={transactionHash} urlType="tx" />
<BscLink hash={transactionHash} urlType="tx" chainId={chainId} />
</div>
</Modal>
);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Proposal/ProposalSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const ProposalSummaryUi: React.FC<
}) => {
const styles = useStyles();
const { t, Trans } = useTranslation();
const { chainId } = useAuth();
const handleTransactionMutation = useHandleTransactionMutation();

const {
Expand Down Expand Up @@ -239,6 +240,7 @@ export const ProposalSummaryUi: React.FC<
hash={transactionHash}
css={styles.transactionLink}
ellipseBreakpoint="xxl"
chainId={chainId}
/>
)}
</div>
Expand Down

0 comments on commit 4602d6e

Please sign in to comment.