Skip to content

Commit

Permalink
Merge pull request #124 from Cerebellum-Network/release/0.21.0
Browse files Browse the repository at this point in the history
Release v0.21.0
  • Loading branch information
DmitriyMolch authored Jan 26, 2023
2 parents ba406b7 + c83faf8 commit 73df2c6
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ REACT_APP_SUPPORT_URL="https://t.me/ceretroubleshooting"
## These are only required if using Sentry for error logging
REACT_APP_SENTRY_DSN_URL="https://[email protected]/5987177"
SENTRY_AUTH_TOKEN="db67ae12222811ecabd2564b6436d30d"
REACT_APP_SENTRY_RELEASE="0.20.0"
REACT_APP_SENTRY_RELEASE="0.21.0"

REACT_APP_MAINTENANCE=false
REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED=true
Expand Down
2 changes: 1 addition & 1 deletion .env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ REACT_APP_SUPPORT_URL="https://t.me/ceretroubleshooting"
## These are only required if using Sentry for error logging
REACT_APP_SENTRY_DSN_URL="https://[email protected]/5987177"
SENTRY_AUTH_TOKEN="db67ae12222811ecabd2564b6436d30d"
REACT_APP_SENTRY_RELEASE="0.20.0"
REACT_APP_SENTRY_RELEASE="0.21.0"

REACT_APP_MAINTENANCE=false
REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED=true
Expand Down
2 changes: 1 addition & 1 deletion .env.stage
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ REACT_APP_SUPPORT_URL="https://t.me/ceretroubleshooting"
## These are only required if using Sentry for error logging
REACT_APP_SENTRY_DSN_URL="https://[email protected]/5987177"
SENTRY_AUTH_TOKEN="db67ae12222811ecabd2564b6436d30d"
REACT_APP_SENTRY_RELEASE="0.20.0"
REACT_APP_SENTRY_RELEASE="0.21.0"

REACT_APP_MAINTENANCE=false
REACT_APP_CONNECT_WITH_SUBSTRATE_WALLET_ENABLED=true
Expand Down
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
## vNext
...

## v0.21.0
- Fixed preflight check misaligned issue
- Fixed WalletConnect login issue after auth popup was closed
- Fixed app transfer page reset after mobile restart
- Fixed transfer page reset after provider disconnection
- Fixed Cere stuck connection after transfer from Polygon to Cere

## v0.20.0

- Added support of the Cere node v2.32.0

## v0.19.0

- WalletConnect integration
- Fix fallback mechanism launch after transaction was finished
- Fixed fallback mechanism launch after transaction was finished

## v0.18.0

Expand All @@ -27,7 +34,7 @@

## v0.16.0

- Rename ERC20 to ERC-20
- Renamed ERC20 to ERC-20
- Migrated to GitHub actions

## v0.15.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@Cerebellum-Network/chainbridge-ui",
"version": "0.20.0",
"version": "0.21.0",
"private": true,
"dependencies": {
"@celo-tools/celo-ethers-wrapper": "0.0.5",
Expand Down
11 changes: 7 additions & 4 deletions src/Components/Pages/TransferPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const useStyles = makeStyles(({ constants, palette }: ITheme) =>
position: "relative",
backgroundColor: "white",
minWidth: 400,
maxWidth: 430,
"@media only screen and (max-width: 360px)": {
minWidth: 320,
},
Expand Down Expand Up @@ -114,7 +115,7 @@ const useStyles = makeStyles(({ constants, palette }: ITheme) =>
marginTop: constants.generalUnit * 3,
},
title: {
fontSize: 24,
fontSize: 23,
fontWeight: "bold",
color: "black",
textAlign: "center",
Expand Down Expand Up @@ -528,12 +529,14 @@ const TransferPage = () => {
.required("Please add a receiving address"),
});

const initialising = !isReady && !transactionStatus;

return (
<article className={classes.root}>
<div className={classes.wrapper}>
<div className={classes.header}>
{process.env.REACT_APP_MAINTENANCE === "false" &&
(!isReady ? (
(initialising ? (
<>
<ArrowIcon className={classes.logo} />
<div className={classes.headerText}>
Expand All @@ -550,12 +553,12 @@ const TransferPage = () => {
</span>
))}
</div>
{!isReady && process.env.REACT_APP_MAINTENANCE === "false" ? (
{initialising && process.env.REACT_APP_MAINTENANCE === "false" ? (
<hr className={classes.horizontalLine} />
) : (
<></>
)}
{!isReady ? (
{initialising ? (
<div className={classes.selectArea}>
<HomeIcon className={classes.walletLogo} />

Expand Down
21 changes: 13 additions & 8 deletions src/Contexts/Adaptors/EVMAdaptors/EVMHomeAdaptorProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const EVMHomeAdaptorProvider = ({

useEffect(() => {
if (initialising || homeBridge || !onboard) return;
console.log("starting init");
console.log("Starting init");
setInitialising(true);

wallet?.provider?.on("error", (err: any) => {
Expand All @@ -151,7 +151,7 @@ export const EVMHomeAdaptorProvider = ({

// On the first connect to a blockchain this event doesn't happen
wallet?.provider?.on("chainChanged", (newNetworkId: number) => {
console.log('chainChanged: ', { networkId, newNetworkId });
console.log("Chain changed:", { networkId, newNetworkId });
if (newNetworkId === networkId) return;
setNetworkId(
newNetworkId.toString().substring(0, 2) === '0x'
Expand All @@ -162,9 +162,10 @@ export const EVMHomeAdaptorProvider = ({
});

wallet?.provider?.on("accountsChanged", (accounts: string[])=> {
console.log('accountsChanged: ', { account, accounts });
if (walletSelected) setWalletType("unset");
setAccount(accounts[0])
console.log("Accounts changed:", { walletSelected, account, accounts });
const walletChanged = walletSelected && account && account !== accounts[0];
if (walletChanged) setWalletType("unset");
setAccount(accounts[0].toLowerCase())
});

const selectedWallet = localStorage.getItem(ONBOARD_SELECTED_WALLET) as string;
Expand All @@ -174,11 +175,11 @@ export const EVMHomeAdaptorProvider = ({
onboard
.walletSelect(selectedWallet)
.then(async (success) => {
console.log('walletSelect:', { success });
console.log("Wallet select:", { success });
setWalletSelected(success);
if (success) {
connected = await checkWallet() as boolean;
console.log('walletCheck:', { connected });
console.log("Wallet check:", { connected });
}
})
.catch((error) => {
Expand All @@ -187,7 +188,11 @@ export const EVMHomeAdaptorProvider = ({
connected = false;
})
.finally(() => {
if (!connected) setWalletType("unset");
if (!connected) {
resetOnboard();
setWalletType("unset");
}
console.log("Wallet connection finished:", { connected });
})
}
}, [
Expand Down
3 changes: 2 additions & 1 deletion src/Contexts/ChainbridgeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const ChainbridgeProvider = ({
setTransferTxHash,
setHomeTransferTxHash,
setAddress,
setWalletType
} = useNetworkManager();

const {
Expand All @@ -110,7 +111,6 @@ const ChainbridgeProvider = ({
} = useHomeBridge();

const resetDeposit = () => {
chainbridgeConfig.chains.length > 2 && setDestinationChain(undefined);
setTransactionStatus(undefined);
setDepositNonce(undefined);
setDepositVotes(0);
Expand All @@ -122,6 +122,7 @@ const ChainbridgeProvider = ({
setAddress(undefined);
setTransferTxHash(undefined);
setHomeTransferTxHash(undefined);
if (!isReady) setWalletType('unset');
};

const handleDeposit = useCallback(
Expand Down

0 comments on commit 73df2c6

Please sign in to comment.