Skip to content

Commit

Permalink
Merge pull request #240 from scrtlabs/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
Cashmaney authored Mar 11, 2024
2 parents b5cc63f + e4286d9 commit c7ac682
Show file tree
Hide file tree
Showing 11 changed files with 1,505 additions and 478 deletions.
1,637 changes: 1,350 additions & 287 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"start": "cross-env NODE_ENV=development webpack-dev-server --config config/webpack.config.js",
"start": "webpack-dev-server --config config/webpack.config.js",
"dev": "cross-env NODE_ENV=development webpack-dev-server --config config/webpack.config.js --progress --colors --open",
"build": "node --trace-warnings --trace-deprecation scripts/build.js --stats && cp build/index.html build/404.html",
"webpack": "webpack --config config/webpack.config.js --display-modules",
Expand Down Expand Up @@ -107,13 +107,13 @@
"jest": "24.9.0",
"lint-staged": "^9.5.0",
"mini-css-extract-plugin": "^0.8.0",
"node-sass": "^4.13.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"prettier": "^1.19.1",
"raf": "^3.4.1",
"react-dev-utils": "^11.0.4",
"react-hot-loader": "^4.12.18",
"resolve": "1.13.1",
"node-sass": "^9.0.0",
"sass-loader": "^8.0.0",
"source-map-explorer": "^2.5.1",
"source-map-loader": "0.2.4",
Expand Down Expand Up @@ -210,4 +210,4 @@
"git add"
]
}
}
}
1 change: 0 additions & 1 deletion src/components/Base/components/Tooltip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'rc-tooltip/assets/bootstrap_white.css';
import * as React from 'react';
import styled, { withTheme } from 'styled-components';

import './styles.scss';

import { TooltipBody } from './Body';

Expand Down
21 changes: 0 additions & 21 deletions src/components/Base/components/Tooltip/styles.scss

This file was deleted.

102 changes: 45 additions & 57 deletions src/components/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { Box } from 'grommet';
import { Title } from './Base/components/Title';
import * as styles from './info-styles.styl';
import { Text } from './Base';

export const Info = ({ title }: { title: string }) => (
<Box className={styles.infoContainer} pad={{ horizontal: 'large', top: 'large' }}>
Expand All @@ -12,87 +13,74 @@ export const Info = ({ title }: { title: string }) => (
) : null}
<div>
<p>
<b>You can use this bridge to</b>
<b>The Secret Bridge has been officially deprecated. What does this mean?</b>
<ul>
<li>1. Swap ERC-20s, or Ethereum to Secret Tokens for transactional privacy.</li>
<li>2. Lock Secret Tokens to increase anonymity guarantees of the bridge and earn SCRT rewards.</li>
<li>
3. Redeem tokens back to an Ethereum address
<li>1. The contracts have been disabled, and the bridge is offline.</li>
<li>2. All funds are safe. Tokens that support migration can be redeemed at the new {' '}
<a href="https://tunnel.scrt.network" target="_blank" rel="noreferrer">Secret Tunnel</a>.
</li>
<ul>
These tokens are:
<br />
Ethereum: USDT, USDC, ETH, DAI, WBTC
<br />
Currently supported tokens: ETH, OCEAN, YFI, UNI, TUSD, SNX, MKR, DAI, BAND, LINK, AAVE, COMP, KNC, USDT,
WBTC and BAC.
BSC: BNB
</ul>
<li>
3. Tokens that are not supported in the Secret Tunnel are available via a manual claim process. Any unclaimed
funds are kept in cold storage and can be claimed at any time.
</li>
<li>
4. WSCRT migration to axlSCRT will be supported in the near future.
</li>
</ul>
</p>
<p>
Users need to connect their Ethereum wallet and Keplr Wallet (Secret Network) in order to use the bridge.
Download Keplr Wallet chrome extension{' '}
<a
href="https://chrome.google.com/webstore/detail/keplr/dmkamcknogkgcdfhhbddcghachkejeap?hl=en"
target="_blank"
rel="noreferrer"
>
using this link
</a>{' '}
.
</p>

<p>
<b>Fees</b>
<br />
The total cost of using the bridge (ETH→secretETH→ETH) is about 500K gas.{' '}
<b>There will also be an airdrop of SCRT to help users pay TX fees on Secret Network.</b>
<b>Help, my tokens aren't in the list!</b>
<ul>
<li>
● Locking assets on Ethereum <br />
Users will pay gas on ETH when assets are being locked on Ethereum to mint secretTokens. Because of
volatility of gas prices on Ethereum, the swap transaction fee will be shown before the transaction is
approved by the user.
If you have assets that do not support migration, please reach out to the Secret Bridge team. We will assist
in the manual claim process. Your funds will be kept in cold storage until you claim them. Contact us at [email protected] if you wish to migrate legacy tokens.
</li>
<li>
● Redeeming assets from Secret Network <br />
Users will pay SCRT gas, and a fee of about 500K gas, in the denomination that is being withdrawn to cover
the multisig transaction costs. As a result, users will redeem their tokens minus the multisig transaction
cost on their Ethereum address.
If you have any questions, please reach out to the Secret Network team
on the <a href="https://chat.scrt.network/" target="_blank" rel="noreferrer">Secret Network Discord server</a>.
</li>
</ul>
</p>

<p>
<b>Viewing keys</b>
<b>This site will still be available</b>
<br />
Viewing key is a new concept introduced by Secret Network given the encrypted nature of secret contracts. Secret
Tokens are privacy tokens and in order to view secret token balances users need to create viewing keys for each
asset. All Ethereum assets minted on Secret Network are privacy tokens and require viewing keys to view
balances. Bridge mining rewards are distributed in secretSCRT, which is the a privacy token for SCRT. Uses will
need to generate viewing keys for secretSCRT to view their reward balances in the Earn page.
</p>
While the bridge itself is deprecated, this page will remain available for those that may have funds remaining in
the earn pools. The bridge will not be available for new transactions, but you can still access the earn pools.

<b>DEPOSITING OR SENDING FUNDS TO BRIDGE CONTRACTS OR EARN POOLS MAY RESULT IN LOSS OF FUNDS AND SHOULD NOT BE DONE</b>
</p>
<p>
<b>Issues</b>
<b>Support</b>
<br />
Report any issues in the <strong>#🌉bridge-support</strong> channel on the{' '}
If you have any questions, reach out to our <strong>#open-a-ticket</strong> channel on the{' '}
<a href="https://chat.scrt.network/" target="_blank" rel="noreferrer">
Secret Network Discord server
</a>{' '}
with one or more of the following information:
<ul>
<li>
1. Transaction id, e.g., <span>7fa14f19-219f8220-1f209e61-8911e539</span>. Every bridge operation is
associated with a unique transaction id, which is available in your webpage URL. If you didn't store the
transaction id, it is okay, follow 2) or 3).
</li>
<li>2. Your transaction hashes on Ethereum or Secret Network.</li>
<li>
3. Your <span>ETH</span> or <span>Secret</span> account address.
</li>
</ul>
</p>
<p>
<b>Disclaimer</b>
<br />
Use at your own risk. We take no responsibilities or any liability for any claim, damages or other liabilities
that may arise from use of this software.
<b>DISCLAIMER</b>
<p>
<Text size={"xxsmall"}>
SCRT LABS IS NOT UNDER ANY LEGAL, CONTRACTUAL OR OTHER OBLIGATION TO
HOLD, TRANSFER, KEEP SAFE, REIMBURSE OR COMPENSATE FOR ANY DIGITAL ASSET
REMAINING ON THE BRIDGE. ANY DIGITAL ASSET OWNERS WHO HAVE NOT YET REMOVED THEIR ASSETS
FROM THE BRIDGE DESPITE THE REPEATED NOTIFICATIONS, ARE SOLELY LIABLE TO ANY DAMAGE OR
LOSS THAT MAY BE INCURRED. IN NO EVENT SHALL WE, OUR AFFILIATES, OR OUR RESPECTIVE DIRECTORS,
OFFICERS, EMPLOYEES, AGENTS, OR CONTRACTORS, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
CONSEQUENTIAL, SPECIAL, EXEMPLARY, OR PUNITIVE DAMAGES, INCLUDING, WITHOUT LIMITATION,
DAMAGES FOR LOSS OF PROFITS, LOSS OF TOKENS, OR INTERRUPTION OF SERVICE,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR INABILITY TO USE THE WEBSITE,
BRIDGE, OR ANY OTHER RELATED SERVICE.
</Text>
</p>
</p>
</div>
</Box>
Expand Down
34 changes: 15 additions & 19 deletions src/components/InfoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,22 @@ export const InfoModal = observer(() => {
const history = useHistory();

useEffect(() => {
if (history.location.pathname === '/swap') {
return;
if (!user.isInfoReading) {
actionModals.open(
() => <Info title="No more bridge for you" />,
{
title: '',
applyText: 'Got it',
closeText: '',
noValidation: true,
showOther: true,
onApply: () => {
user.setInfoReading();
return Promise.resolve();
},
},
);
}

// if (!user.isInfoReading) {
// actionModals.open(
// () => <Info title="Welcome to Ethereum <> 𝕊ecret Bridge" />,
// {
// title: '',
// applyText: 'Got it',
// closeText: '',
// noValidation: true,
// showOther: true,
// onApply: () => {
// user.setInfoReading();
// return Promise.resolve();
// },
// },
// );
// }
}, [user.isInfoReading]);

return <></>;
Expand Down
34 changes: 17 additions & 17 deletions src/components/InfoModalEarn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ export const InfoModalEarn = observer(() => {
const history = useHistory();

useEffect(() => {
if (history.location.pathname !== '/earn') {
return;
}

if (!user.isInfoEarnReading) {
actionModals.open(() => <InfoEarn title="Improve privacy guarantees and earn SCRT rewards" />, {
title: '',
applyText: 'Got it',
closeText: '',
noValidation: true,
showOther: true,
onApply: () => {
user.setInfoEarnReading();
return Promise.resolve();
},
});
}
// if (history.location.pathname !== '/earn') {
// return;
// }
//
// if (!user.isInfoEarnReading) {
// actionModals.open(() => <InfoEarn title="Improve privacy guarantees and earn SCRT rewards" />, {
// title: '',
// applyText: 'Got it',
// closeText: '',
// noValidation: true,
// showOther: true,
// onApply: () => {
// user.setInfoEarnReading();
// return Promise.resolve();
// },
// });
// }
}, [user.isInfoEarnReading]);

return <></>;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/EthBridge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ export const EthBridge = observer((props: any) => {
<Message negative>
<Message.Header>Deprecation Notice</Message.Header>
<Message.Content>
<p>The Ethereum bridge migration is currently underway. At this stage bridging new tokens to Secret is disabled, but exiting the bridge is still enabled.</p>
<p><strong>The Ethereum bridge HAS BEEN DEPRECATED.</strong></p>
<p>A new bridging service is available from the <a href="https://tunnel.scrt.network" target="_blank">Secret Tunnel</a>. </p>
<p>Migration for ETH, BNB, USDC, USDT, WBTC and DAI is available. </p>
<p></p>
</Message.Content>
</Message>
{/*<Message info>*/}
Expand Down
12 changes: 6 additions & 6 deletions src/pages/Exchange/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ export const Exchange = observer(() => {
return (
<Box fill direction="column" style={{ position: 'relative' }}>
<Base />
{exchange.step.id === EXCHANGE_STEPS.APPROVE_CONFIRMATION && <ERC20ApprovalModal />}
{exchange.step.id === EXCHANGE_STEPS.CONFIRMATION && <SwapConfirmation />}
{exchange.step.id === EXCHANGE_STEPS.CHECK_TRANSACTION && <CheckTransaction />}
<div style={{zIndex: 2}}>
<OperationsPanel />
</div>
{/*{exchange.step.id === EXCHANGE_STEPS.APPROVE_CONFIRMATION && <ERC20ApprovalModal />}*/}
{/*{exchange.step.id === EXCHANGE_STEPS.CONFIRMATION && <SwapConfirmation />}*/}
{/*{exchange.step.id === EXCHANGE_STEPS.CHECK_TRANSACTION && <CheckTransaction />}*/}
{/*<div style={{zIndex: 2}}>*/}
{/* <OperationsPanel />*/}
{/*</div>*/}
</Box>
);
});
Loading

0 comments on commit c7ac682

Please sign in to comment.