Skip to content

Commit

Permalink
Merge pull request #23 from CudoVentures/cudos-dev
Browse files Browse the repository at this point in the history
Merge cudos-dev
  • Loading branch information
mlukanova authored Jun 16, 2022
2 parents 2bab99b + 7553047 commit 2eb61ab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
NODE_ENV=production|dev
NETWORK_TYPE=mainnet/testnet
BACKEND_PORT= (port on which server will be accessed from browser)
FRONTEND_PORT=
URL=http://ip/localhost/domain
Expand Down
4 changes: 4 additions & 0 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const envVariables = [
'STAKING',
'PARAMS_ENDPOINT',
'BLOCK_EXPLORER',
'NETWORK_TYPE'
];

if (process.env.NODE_ENV === 'production') {
Expand Down Expand Up @@ -201,6 +202,7 @@ const Config = {
API: `${URL_ROOT}/api`,
},
CUDOS_NETWORK: {
NETWORK_TYPE: process.env.NETWORK_TYPE,
CHAIN_NAME: process.env.CHAIN_NAME,
CHAIN_ID: process.env.CHAIN_ID,
GRAVITY_MODULE_ADDRESS: process.env.GRAVITY_MODULE_ADDRESS,
Expand All @@ -221,6 +223,8 @@ const Config = {
ETHEREUM: {
ETHEREUM_GAS: process.env.ETHEREUM_GAS,
ETHEREUM_RPC: process.env.ETHEREUM_RPC,
ETHERSCAN_RINKEBY: 'https://rinkeby.etherscan.io/tx',
ETHERSCAN_MAINNET: 'https://etherscan.io/tx'
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ const SummaryModal = ({
const fromNetwork = selectedFromNetwork ? 'CUDOS' : 'Ethereum';
const ToNetwork = selectedToNetwork ? 'CUDOS' : 'Ethereum';

const ETHERSCAN_RINKEBY = 'https://rinkeby.etherscan.io/tx';
const ETHERSCAN_MAINNET = 'https://etherscan.io/tx';
const ETHERSCAN_EXPLORER =
Config.CUDOS_NETWORK.NETWORK_TYPE === "mainnet"?
Config.ETHEREUM.ETHERSCAN_MAINNET:
Config.ETHEREUM.ETHERSCAN_RINKEBY
const CUDOS_EXPLORER = Config.CUDOS_NETWORK.BLOCK_EXPLORER;

const onCloseModal = async () => {
Expand Down Expand Up @@ -102,7 +104,7 @@ const SummaryModal = ({
<div>Transaction</div>
</div>
<div className={'Row Spacing LinkWrapper'}>
<div className={'LinkContent'}><a href= {`${selectedFromNetwork ? CUDOS_EXPLORER : ETHERSCAN_RINKEBY}/${txHash}`} rel='noreferrer' target='_blank'>
<div className={'LinkContent'}><a href= {`${selectedFromNetwork ? CUDOS_EXPLORER : ETHERSCAN_EXPLORER}/${txHash}`} rel='noreferrer' target='_blank'>
Bridge transaction link</a>
<div className={'LinkIcon'} style={ProjectUtils.makeBgImgStyle(linkIcon)} />
</div>
Expand Down

0 comments on commit 2eb61ab

Please sign in to comment.