Skip to content

Commit

Permalink
Merge pull request #445 from kleros/feat/separate-convert-and-bridge-…
Browse files Browse the repository at this point in the history
…sections

feat: separate the "Convert PNK" and "Bridge to Mainnet" sections
  • Loading branch information
alcercu authored Nov 25, 2024
2 parents 98bc6eb + 6ff552a commit ba30d8d
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 779 deletions.
31 changes: 23 additions & 8 deletions src/components/side-chain/switch-court-chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import useAccount from "../../hooks/use-account";
import usePromise from "../../hooks/use-promise";
import useInterval from "../../hooks/use-interval";
import useForceUpdate from "../../hooks/use-force-update";
import { chainIdToNetworkName, chainIdToNetworkShortName } from "../../helpers/networks";
import { chainIdToNetworkName } from "../../helpers/networks";
import { useSetRequiredChainId } from "../required-chain-id-gateway";
import AnnouncementBanner from "./announcement-banner";
import MultiBalance from "../multi-balance";
Expand All @@ -36,8 +36,6 @@ export default function SwitchCourtChain() {
const account = useAccount();
const hasAccount = !!account;

const pnkTokenSymbol = useMemo(() => getTokenSymbol(chainId, "PNK"), [chainId]);

const destinationChainId = React.useMemo(() => {
try {
return getCounterPartyChainId(chainId);
Expand All @@ -64,11 +62,16 @@ export default function SwitchCourtChain() {
</StyledButtonWrapper>
) : isSupportedMainChain(destinationChainId) ? (
<StyledButtonWrapper>
<Link component={StyledButtonLink} to="/convert-pnk" icon="swap">
<span>
Send {pnkTokenSymbol} to {chainIdToNetworkShortName[destinationChainId]}
</span>
</Link>
<StyledLink component={StyledButtonLink} to="/convert-pnk" icon="swap">
<span>Convert stPNK to xPNK</span>
</StyledLink>
<StyledCustomButton
text="Bridge xPNK to Mainnet"
href="https://bridge.gnosischain.com/"
rel="noopener noreferrer"
target="_blank"
icon="arrow-right"
/>
<CustomButton
text={`Court on ${chainIdToNetworkName[destinationChainId]}`}
iconAfter={<Icon type="arrow-right" />}
Expand Down Expand Up @@ -482,3 +485,15 @@ const StyledResponsiveBannerButton = styled(Button).attrs((props) => ({
min-height: 48px;
}
`;

const StyledLink = styled(Link)`
display: flex;
text-decoration: none;
align-items: center;
`;

const StyledCustomButton = styled(CustomButton)`
display: flex;
text-decoration: none;
align-items: center;
`;
73 changes: 0 additions & 73 deletions src/containers/convert-pnk/claim-tokens-button.js

This file was deleted.

230 changes: 0 additions & 230 deletions src/containers/convert-pnk/convert-pnk-card.js

This file was deleted.

Loading

0 comments on commit ba30d8d

Please sign in to comment.