Skip to content

Commit

Permalink
Merge pull request #146 from Cerebellum-Network/release/0.27.0
Browse files Browse the repository at this point in the history
Release 0.27.0
  • Loading branch information
shamilkhan authored Sep 14, 2023
2 parents e4d3985 + d8950aa commit a5fa671
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
## vNext
...

## v0.27.0
- Added the ability to select a HomeChain for EVM-based networks.

## v0.26.0
- Applied to Cere ss58 prefix for Polkadot-JS Extension accounts.

Expand Down
30 changes: 22 additions & 8 deletions src/Components/Pages/TransferPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect, useMemo, useState } from "react";
import { makeStyles, createStyles, ITheme } from "@chainsafe/common-theme";
import { useSetChain } from "@web3-onboard/react";
import AboutDrawer from "../../Modules/AboutDrawer";
import ChangeNetworkDrawer from "../../Modules/ChangeNetworkDrawer";
import PreflightModalTransfer from "../../Modules/PreflightModalTransfer";
Expand Down Expand Up @@ -392,6 +393,7 @@ type PreflightDetails = {
const TransferPage = () => {
const classes = useStyles();
const {
homeChains,
walletType,
setWalletType,
handleSetHomeChain,
Expand All @@ -416,6 +418,7 @@ const TransferPage = () => {
checkSupplies,
} = useChainbridge();

const [, setChain] = useSetChain();
const [shouldPasteDestinationAddressManually, setShouldPasteDestinationAddressManually] = useState(false);
const { accounts, selectAccount, disconnect } = useHomeBridge();
const [aboutOpen, setAboutOpen] = useState<boolean>(false);
Expand Down Expand Up @@ -631,14 +634,25 @@ const TransferPage = () => {
Change
</Typography>
</div>
<div className={classes.networkName}>
{walletType === "Ethereum" ? (
<ETHIcon className={classes.networkIcon} />
) : (
<CEREIcon className={classes.networkIcon} />
)}
{homeConfig?.name}
</div>
{walletType === "Substrate" ? (
<div className={classes.networkName}>
<CEREIcon className={classes.networkIcon}/>
{homeConfig?.name}
</div>
): (
<section>
<SelectInput
className={classes.generalInput}
disabled={!homeConfig}
options={homeChains.map((dc) => ({
label: dc.name,
value: Number(dc.networkId),
}))}
onChange={(chainId) => setChain({ chainId })}
value={homeConfig?.networkId}
/>
</section>
)}
</section>
<div>
{isReady &&
Expand Down

0 comments on commit a5fa671

Please sign in to comment.