From b57c010a41de168dc1bdde31293197bd05ef5149 Mon Sep 17 00:00:00 2001 From: Ayushya Chitransh Date: Fri, 8 Apr 2022 13:28:25 +0530 Subject: [PATCH 1/9] Add .env to skip preflight test | add eslint in package --- .env | 1 + package.json | 1 + src/api/serverAPI.ts | 4 ++-- src/components/Menu/Swapper/Swapper.tsx | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..6f809cc --- /dev/null +++ b/.env @@ -0,0 +1 @@ +SKIP_PREFLIGHT_CHECK=true diff --git a/package.json b/package.json index b2ea2d2..1bb177d 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@types/uuid": "^8.3.4", "axios": "^0.26.0", "classnames": "^2.3.1", + "eslint": "^7.11.0", "identicon.js": "^2.3.3", "react": "^17.0.2", "react-dom": "^17.0.1", diff --git a/src/api/serverAPI.ts b/src/api/serverAPI.ts index 51e112a..ff991b1 100644 --- a/src/api/serverAPI.ts +++ b/src/api/serverAPI.ts @@ -3,8 +3,8 @@ import {ReceiptedType} from './localAPI' const instance = axios.create({ // baseURL: 'http://localhost:3000/api/1.0.0/', - baseURL: 'https://projecthydro.org/api/1.0.0/', - withCredentials: true, + baseURL: 'https://bridgev2.herokuapp.com/api/1.0.0/', + withCredentials: false, }) export const serverApi = { diff --git a/src/components/Menu/Swapper/Swapper.tsx b/src/components/Menu/Swapper/Swapper.tsx index 7721cad..3b0c515 100644 --- a/src/components/Menu/Swapper/Swapper.tsx +++ b/src/components/Menu/Swapper/Swapper.tsx @@ -24,7 +24,8 @@ export const Swapper = (props: PropsType) => { onClick={() => { if (!props.isDisable && !isSwapperDisabled ) props.onClick() }} - > + > + {/* */} ) } From c5da2d112750233619f81f2ff814178cec170dea Mon Sep 17 00:00:00 2001 From: Ayushya Chitransh Date: Fri, 8 Apr 2022 19:18:19 +0530 Subject: [PATCH 2/9] Add org in domain name --- src/api/serverAPI.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/serverAPI.ts b/src/api/serverAPI.ts index a6022e5..70534cb 100644 --- a/src/api/serverAPI.ts +++ b/src/api/serverAPI.ts @@ -3,7 +3,7 @@ import {ReceiptedType} from './localAPI' const instance = axios.create({ // baseURL: 'http://localhost:3000/api/1.0.0/', - baseURL: 'https://hydro-bridge/api/1.0.0/', + baseURL: 'https://hydro-bridge.org/api/1.0.0/', withCredentials: false, }) From a6a79a7452129a99a21cd97ad359ad15f7a02c78 Mon Sep 17 00:00:00 2001 From: Ayushya Chitransh Date: Tue, 28 Jun 2022 09:38:32 +0530 Subject: [PATCH 3/9] Add moonriver network --- src/api/localAPI.ts | 9 +++++-- src/api/serverAPI.ts | 6 +++-- src/assets/chains.ts | 14 ++++++++++ src/assets/images/chainSymbols/moonriver.svg | 26 +++++++++++++++++++ src/common/common.ts | 25 +++++++++++++++--- src/components/Menu/Menu.tsx | 8 ++++-- .../Menu/NetworkElement/NetworkElement.tsx | 2 ++ src/components/Navbar/Navbar.tsx | 4 +++ 8 files changed, 84 insertions(+), 10 deletions(-) create mode 100644 src/assets/images/chainSymbols/moonriver.svg diff --git a/src/api/localAPI.ts b/src/api/localAPI.ts index 019483e..d7554d1 100644 --- a/src/api/localAPI.ts +++ b/src/api/localAPI.ts @@ -76,8 +76,13 @@ export const localAPI = { hydroAddress = hydroAddresses.forBsc break } + case chainIDs.moonriverMainnet: { + hydroAddress = hydroAddresses.forMoonriver + break + } case chainIDs.mumbaiTest: case chainIDs.rinkebyTest: + case chainIDs.moonbeamAlphaTestnet: case chainIDs.coinExTest: { hydroAddress = hydroAddresses.forTestNets break @@ -154,14 +159,14 @@ type ErrorType = { code: number } -export type ConversionWayType = 'coinexSmartChainTestnet' | 'mumbaiTestnet' | 'rinkebyTestnet' | 'eth' | 'bsc' | 'polygon' +export type ConversionWayType = 'coinexSmartChainTestnet' | 'mumbaiTestnet' | 'rinkebyTestnet' | 'eth' | 'bsc' | 'polygon' | 'moonbeamAlphaTestnet' | 'moonriverMainnet' type connectToMetamaskReturnType = { status: boolean account: string chainID: number } -export type ChainIdType = chainIDs.eth | chainIDs.bsc | chainIDs.polygon | chainIDs.mumbaiTest | chainIDs.rinkebyTest | chainIDs.coinExTest +export type ChainIdType = chainIDs.eth | chainIDs.bsc | chainIDs.polygon | chainIDs.mumbaiTest | chainIDs.rinkebyTest | chainIDs.coinExTest | chainIDs.moonbeamAlphaTestnet | chainIDs.moonriverMainnet export type ReceiptedType = { transactionHash: string diff --git a/src/api/serverAPI.ts b/src/api/serverAPI.ts index 70534cb..1808be8 100644 --- a/src/api/serverAPI.ts +++ b/src/api/serverAPI.ts @@ -2,8 +2,8 @@ import axios from 'axios' import {ReceiptedType} from './localAPI' const instance = axios.create({ - // baseURL: 'http://localhost:3000/api/1.0.0/', - baseURL: 'https://hydro-bridge.org/api/1.0.0/', + baseURL: 'http://localhost:3000/api/1.0.0/', + // baseURL: 'https://hydro-bridge.org/api/1.0.0/', withCredentials: false, }) @@ -76,6 +76,8 @@ export type ChainType = | 'rinkebyTestnet' | 'coinexTestNetwork' | 'rinkeby' + | 'moonbeamAlphaTestnet' + | 'moonriverMainnet' type GetHydroBalanceResponseType = { data: { tokenBalance: string diff --git a/src/assets/chains.ts b/src/assets/chains.ts index d41278b..b5b272c 100644 --- a/src/assets/chains.ts +++ b/src/assets/chains.ts @@ -83,6 +83,20 @@ export const chains: any = { ], blockExplorerUrls: ["https://testnet.coinex.net"] }, + [chainIDs.moonriverMainnet]: { + chainId: `0x${Number(chainIDs.moonriverMainnet).toString(16)}`, + chainName: chainsNames.moonriverMainnet, + nativeCurrency: { + name: 'Moonriver Chain Native Token', + symbol: "MOVR", + decimals: 18 + }, + rpcUrls: [ + "https://moonriver.blastapi.io/16f8b680-4719-4e0f-aabd-5af382c399b1", + "wss://wss.api.moonbeam.network" + ], + blockExplorerUrls: ["https://moonbeam.moonscan.io"] + }, }; type chainsType = { diff --git a/src/assets/images/chainSymbols/moonriver.svg b/src/assets/images/chainSymbols/moonriver.svg new file mode 100644 index 0000000..2b68a98 --- /dev/null +++ b/src/assets/images/chainSymbols/moonriver.svg @@ -0,0 +1,26 @@ + + + + + moonriver-logo-movr_freelogovectors.net + + + + + + + + + + + + + diff --git a/src/common/common.ts b/src/common/common.ts index 55f9de2..52c7a07 100644 --- a/src/common/common.ts +++ b/src/common/common.ts @@ -2,10 +2,11 @@ import binanceBNB from '../assets/images/chainSymbols/binanceBNB.png' import coinexCETT from '../assets/images/chainSymbols/coinexCett.png' import ethereumETH from '../assets/images/chainSymbols/ethereumETH.png' import polygonMatic from '../assets/images/chainSymbols/polygonMatic.png' +import moonriverMVR from '../assets/images/chainSymbols/moonriver.svg' // === IMPORTANT: === // export const addressForWeb3 = 'https://hydroblockchain.github.io/hydro-bridge-ui' // for github.io -export const addressForWeb3 = 'http://127.0.0.1:3001' +export const addressForWeb3 = 'http://localhost:3000' // export const isTestChains = true // === === @@ -17,6 +18,8 @@ export enum chainIDs { mumbaiTest = 80001, rinkebyTest = 4, coinExTest = 53, + moonbeamAlphaTestnet = 1287, + moonriverMainnet = 1285, } export const chainsPictures = { @@ -26,7 +29,9 @@ export const chainsPictures = { [chainIDs.polygon]: polygonMatic, [chainIDs.mumbaiTest]: polygonMatic, [chainIDs.rinkebyTest]: ethereumETH, - [chainIDs.coinExTest]: coinexCETT + [chainIDs.coinExTest]: coinexCETT, + [chainIDs.moonbeamAlphaTestnet]: ethereumETH, + [chainIDs.moonriverMainnet]: moonriverMVR, } export const chainsNationalSymbols: ChainsNationalSymbolsType = { @@ -35,7 +40,9 @@ export const chainsNationalSymbols: ChainsNationalSymbolsType = { [chainIDs.polygon]: 'MATIC', [chainIDs.mumbaiTest]: 'MATIC', [chainIDs.rinkebyTest]: 'ETH', - [chainIDs.coinExTest]: 'CETT' + [chainIDs.coinExTest]: 'CETT', + [chainIDs.moonbeamAlphaTestnet]: 'DEV', + [chainIDs.moonriverMainnet]: 'MOVR' } export type RealizedChainsRightType = @@ -45,6 +52,8 @@ export type RealizedChainsRightType = | 80001 | 4 | 53 + | 1287 + | 1285 export const chainNamesForGetHydroBalance = { [chainIDs.eth]: 'ethereum', @@ -53,6 +62,8 @@ export const chainNamesForGetHydroBalance = { [chainIDs.mumbaiTest]: 'polygonTestnet', [chainIDs.rinkebyTest]: 'rinkebyTestnet', [chainIDs.coinExTest]: 'coinexTestNetwork', + [chainIDs.moonbeamAlphaTestnet]: 'moonbeamAlphaTestnet', + [chainIDs.moonriverMainnet]: 'moonriverMainnet', } @@ -65,12 +76,16 @@ export enum chainsNames { mumbaiTest = 'Mumbai Testnet', rinkebyTest = 'Rinkeby Test Network', coinExTest = 'CoinEx Smart Chain Testnet', + moonbeamAlphaTestnet = 'Moonbeam Alpha Testnet', + moonriverMainnet = 'Moonriver Network', } export const hydroAddresses = { forEth: '0x946112efaB61C3636CBD52DE2E1392D7A75A6f01', forBsc: '0xf3DBB49999B25c9D6641a9423C7ad84168D00071', - forPolygon: '0x946112efaB61C3636CBD52DE2E1392D7A75A6f01 ', + forPolygon: '0x946112efaB61C3636CBD52DE2E1392D7A75A6f01', + forMoonriver: '0x946112efaB61C3636CBD52DE2E1392D7A75A6f01', + forCoinex: '0x946112efaB61C3636CBD52DE2E1392D7A75A6f01', forTestNets: '0x9477B2d4442FCd35368c029a0016e6800437BAe2' } export const swapContractAddresses = { @@ -80,6 +95,8 @@ export const swapContractAddresses = { coinexSmartChainTestnet: '0x1500D17ECa72d87331db5f5dd634d755D73a0041', mumbaiTestnet: '0x1500D17ECa72d87331db5f5dd634d755D73a0041', rinkebyTestnet: '0xFBCf060541596047e47Db0ddcf37818D2B2eD4c0', + moonbeamAlphaTestnet: '0xC62cfE5c4780b9f9d24209036BA0764B43C0F279', + moonriverMainnet: '0xFBCf060541596047e47Db0ddcf37818D2B2eD4c0', } // for dark and light theme switch diff --git a/src/components/Menu/Menu.tsx b/src/components/Menu/Menu.tsx index 7c890f9..a48b7e9 100644 --- a/src/components/Menu/Menu.tsx +++ b/src/components/Menu/Menu.tsx @@ -54,8 +54,8 @@ export const Menu = () => { const checkIsChainIdSupported = (chainID: chainIDs) => { const chainIDsActive = isTestNets - ? [chainIDs.notSelected, chainIDs.mumbaiTest, chainIDs.rinkebyTest, chainIDs.coinExTest] - : [chainIDs.notSelected, chainIDs.eth, chainIDs.bsc, chainIDs.polygon] + ? [chainIDs.notSelected, chainIDs.mumbaiTest, chainIDs.rinkebyTest, chainIDs.coinExTest, chainIDs.moonbeamAlphaTestnet] + : [chainIDs.notSelected, chainIDs.eth, chainIDs.bsc, chainIDs.polygon, chainIDs.moonriverMainnet] return chainIDsActive.includes(chainID) } @@ -83,6 +83,10 @@ export const Menu = () => { setSwapWay('mumbaiTestnet') } else if (leftChainId === chainIDs.rinkebyTest) { setSwapWay('rinkebyTestnet') + } else if (leftChainId === chainIDs.moonbeamAlphaTestnet) { + setSwapWay('moonbeamAlphaTestnet') + } else if (leftChainId === chainIDs.moonriverMainnet) { + setSwapWay('moonriverMainnet') } else setSwapWay(undefined) if (leftChainId !== chainIDs.notSelected && diff --git a/src/components/Menu/NetworkElement/NetworkElement.tsx b/src/components/Menu/NetworkElement/NetworkElement.tsx index 4196f98..7477761 100644 --- a/src/components/Menu/NetworkElement/NetworkElement.tsx +++ b/src/components/Menu/NetworkElement/NetworkElement.tsx @@ -30,11 +30,13 @@ export const NetworkElement = (props: PropsType) => { {value: chainIDs.mumbaiTest, label: chainsNames.mumbaiTest}, {value: chainIDs.rinkebyTest, label: chainsNames.rinkebyTest}, {value: chainIDs.coinExTest, label: chainsNames.coinExTest}, + {value: chainIDs.moonbeamAlphaTestnet, label: chainsNames.moonbeamAlphaTestnet}, ] : [ {value: chainIDs.eth, label: chainsNames.eth}, {value: chainIDs.bsc, label: chainsNames.bsc}, {value: chainIDs.polygon, label: chainsNames.polygon}, + {value: chainIDs.moonriverMainnet, label: chainsNames.moonriverMainnet}, ] const selectByArrowColor = isLightTheme ? menuColorLight : menuColor diff --git a/src/components/Navbar/Navbar.tsx b/src/components/Navbar/Navbar.tsx index 9465cd5..8cbc59f 100644 --- a/src/components/Navbar/Navbar.tsx +++ b/src/components/Navbar/Navbar.tsx @@ -33,6 +33,10 @@ export const Navbar = () => { return chainsNames.rinkebyTest case chainIDs.coinExTest: return chainsNames.coinExTest + case chainIDs.moonriverMainnet: + return chainIDs.moonriverMainnet + case chainIDs.moonbeamAlphaTestnet: + return chainIDs.moonbeamAlphaTestnet default: return 'Metamask network is not supported yet.' } From 60b02b6c73a07c6824b859cd5cb5512f92a3f121 Mon Sep 17 00:00:00 2001 From: Ayushya Chitransh Date: Tue, 28 Jun 2022 17:03:12 +0530 Subject: [PATCH 4/9] Add coinex chain and add bridge cintract address --- src/api/localAPI.ts | 8 +++++-- src/api/serverAPI.ts | 2 ++ src/assets/chains.ts | 23 +++++++++++++++++++ src/common/common.ts | 11 +++++++-- src/components/Menu/Menu.tsx | 4 +++- .../Menu/NetworkElement/NetworkElement.tsx | 1 + src/components/Navbar/Navbar.tsx | 2 ++ 7 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/api/localAPI.ts b/src/api/localAPI.ts index d7554d1..70390e3 100644 --- a/src/api/localAPI.ts +++ b/src/api/localAPI.ts @@ -80,6 +80,10 @@ export const localAPI = { hydroAddress = hydroAddresses.forMoonriver break } + case chainIDs.coinex: { + hydroAddress = hydroAddresses.forCoinex + break + } case chainIDs.mumbaiTest: case chainIDs.rinkebyTest: case chainIDs.moonbeamAlphaTestnet: @@ -159,14 +163,14 @@ type ErrorType = { code: number } -export type ConversionWayType = 'coinexSmartChainTestnet' | 'mumbaiTestnet' | 'rinkebyTestnet' | 'eth' | 'bsc' | 'polygon' | 'moonbeamAlphaTestnet' | 'moonriverMainnet' +export type ConversionWayType = 'coinexSmartChainTestnet' | 'mumbaiTestnet' | 'rinkebyTestnet' | 'eth' | 'bsc' | 'polygon' | 'moonbeamAlphaTestnet' | 'moonriverMainnet' | 'coinex' type connectToMetamaskReturnType = { status: boolean account: string chainID: number } -export type ChainIdType = chainIDs.eth | chainIDs.bsc | chainIDs.polygon | chainIDs.mumbaiTest | chainIDs.rinkebyTest | chainIDs.coinExTest | chainIDs.moonbeamAlphaTestnet | chainIDs.moonriverMainnet +export type ChainIdType = chainIDs.eth | chainIDs.bsc | chainIDs.polygon | chainIDs.mumbaiTest | chainIDs.rinkebyTest | chainIDs.coinExTest | chainIDs.moonbeamAlphaTestnet | chainIDs.moonriverMainnet | chainIDs.coinex export type ReceiptedType = { transactionHash: string diff --git a/src/api/serverAPI.ts b/src/api/serverAPI.ts index 1808be8..5b11436 100644 --- a/src/api/serverAPI.ts +++ b/src/api/serverAPI.ts @@ -78,6 +78,8 @@ export type ChainType = | 'rinkeby' | 'moonbeamAlphaTestnet' | 'moonriverMainnet' + | 'coinex' + type GetHydroBalanceResponseType = { data: { tokenBalance: string diff --git a/src/assets/chains.ts b/src/assets/chains.ts index b5b272c..40ae240 100644 --- a/src/assets/chains.ts +++ b/src/assets/chains.ts @@ -97,6 +97,29 @@ export const chains: any = { ], blockExplorerUrls: ["https://moonbeam.moonscan.io"] }, + [chainIDs.coinex]: { + chainId: `0x${Number(chainIDs.coinex).toString(16)}`, + chainName: chainsNames.coinex, + rpcUrls: [ + "https://rpc.coinex.net" + ], + faucets: [], + nativeCurrency: { + name: "CoinEx Chain Native Token", + symbol: "CET", + decimals: 18 + }, + infoURL: "https://www.coinex.org/", + shortName: "CET", + networkId: 52, + explorers: [ + { + "name": "coinexscan", + "url": "https://www.coinex.net", + "standard": "none" + } + ] + }, }; type chainsType = { diff --git a/src/common/common.ts b/src/common/common.ts index 52c7a07..5b96de8 100644 --- a/src/common/common.ts +++ b/src/common/common.ts @@ -20,6 +20,7 @@ export enum chainIDs { coinExTest = 53, moonbeamAlphaTestnet = 1287, moonriverMainnet = 1285, + coinex = 52, } export const chainsPictures = { @@ -32,6 +33,7 @@ export const chainsPictures = { [chainIDs.coinExTest]: coinexCETT, [chainIDs.moonbeamAlphaTestnet]: ethereumETH, [chainIDs.moonriverMainnet]: moonriverMVR, + [chainIDs.coinex]: coinexCETT } export const chainsNationalSymbols: ChainsNationalSymbolsType = { @@ -42,7 +44,8 @@ export const chainsNationalSymbols: ChainsNationalSymbolsType = { [chainIDs.rinkebyTest]: 'ETH', [chainIDs.coinExTest]: 'CETT', [chainIDs.moonbeamAlphaTestnet]: 'DEV', - [chainIDs.moonriverMainnet]: 'MOVR' + [chainIDs.moonriverMainnet]: 'MOVR', + [chainIDs.coinex]: 'CET', } export type RealizedChainsRightType = @@ -54,6 +57,7 @@ export type RealizedChainsRightType = | 53 | 1287 | 1285 + | 52 export const chainNamesForGetHydroBalance = { [chainIDs.eth]: 'ethereum', @@ -64,6 +68,7 @@ export const chainNamesForGetHydroBalance = { [chainIDs.coinExTest]: 'coinexTestNetwork', [chainIDs.moonbeamAlphaTestnet]: 'moonbeamAlphaTestnet', [chainIDs.moonriverMainnet]: 'moonriverMainnet', + [chainIDs.coinex]: 'coinex', } @@ -78,6 +83,7 @@ export enum chainsNames { coinExTest = 'CoinEx Smart Chain Testnet', moonbeamAlphaTestnet = 'Moonbeam Alpha Testnet', moonriverMainnet = 'Moonriver Network', + coinex = 'Coinex Smart Chain', } export const hydroAddresses = { @@ -96,7 +102,8 @@ export const swapContractAddresses = { mumbaiTestnet: '0x1500D17ECa72d87331db5f5dd634d755D73a0041', rinkebyTestnet: '0xFBCf060541596047e47Db0ddcf37818D2B2eD4c0', moonbeamAlphaTestnet: '0xC62cfE5c4780b9f9d24209036BA0764B43C0F279', - moonriverMainnet: '0xFBCf060541596047e47Db0ddcf37818D2B2eD4c0', + moonriverMainnet: '0x7f45Fd12651F397Db4916d32762bc9ce01740e3C', + coinex: '0x7f45Fd12651F397Db4916d32762bc9ce01740e3C', } // for dark and light theme switch diff --git a/src/components/Menu/Menu.tsx b/src/components/Menu/Menu.tsx index a48b7e9..d9ea536 100644 --- a/src/components/Menu/Menu.tsx +++ b/src/components/Menu/Menu.tsx @@ -55,7 +55,7 @@ export const Menu = () => { const checkIsChainIdSupported = (chainID: chainIDs) => { const chainIDsActive = isTestNets ? [chainIDs.notSelected, chainIDs.mumbaiTest, chainIDs.rinkebyTest, chainIDs.coinExTest, chainIDs.moonbeamAlphaTestnet] - : [chainIDs.notSelected, chainIDs.eth, chainIDs.bsc, chainIDs.polygon, chainIDs.moonriverMainnet] + : [chainIDs.notSelected, chainIDs.eth, chainIDs.bsc, chainIDs.polygon, chainIDs.moonriverMainnet, chainIDs.coinex] return chainIDsActive.includes(chainID) } @@ -87,6 +87,8 @@ export const Menu = () => { setSwapWay('moonbeamAlphaTestnet') } else if (leftChainId === chainIDs.moonriverMainnet) { setSwapWay('moonriverMainnet') + } else if (leftChainId === chainIDs.coinex) { + setSwapWay('coinex') } else setSwapWay(undefined) if (leftChainId !== chainIDs.notSelected && diff --git a/src/components/Menu/NetworkElement/NetworkElement.tsx b/src/components/Menu/NetworkElement/NetworkElement.tsx index 7477761..30956a7 100644 --- a/src/components/Menu/NetworkElement/NetworkElement.tsx +++ b/src/components/Menu/NetworkElement/NetworkElement.tsx @@ -37,6 +37,7 @@ export const NetworkElement = (props: PropsType) => { {value: chainIDs.bsc, label: chainsNames.bsc}, {value: chainIDs.polygon, label: chainsNames.polygon}, {value: chainIDs.moonriverMainnet, label: chainsNames.moonriverMainnet}, + {value: chainIDs.coinex, label: chainsNames.coinex}, ] const selectByArrowColor = isLightTheme ? menuColorLight : menuColor diff --git a/src/components/Navbar/Navbar.tsx b/src/components/Navbar/Navbar.tsx index 8cbc59f..cd9bb15 100644 --- a/src/components/Navbar/Navbar.tsx +++ b/src/components/Navbar/Navbar.tsx @@ -37,6 +37,8 @@ export const Navbar = () => { return chainIDs.moonriverMainnet case chainIDs.moonbeamAlphaTestnet: return chainIDs.moonbeamAlphaTestnet + case chainIDs.coinex: + return chainIDs.coinex default: return 'Metamask network is not supported yet.' } From 4f2cc675fc5d345c020fb37c813eec37538c36f4 Mon Sep 17 00:00:00 2001 From: Ayushya Chitransh Date: Tue, 28 Jun 2022 17:25:39 +0530 Subject: [PATCH 5/9] Update chain names in navbar --- src/components/Navbar/Navbar.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Navbar/Navbar.tsx b/src/components/Navbar/Navbar.tsx index cd9bb15..b518090 100644 --- a/src/components/Navbar/Navbar.tsx +++ b/src/components/Navbar/Navbar.tsx @@ -34,11 +34,11 @@ export const Navbar = () => { case chainIDs.coinExTest: return chainsNames.coinExTest case chainIDs.moonriverMainnet: - return chainIDs.moonriverMainnet + return chainsNames.moonriverMainnet case chainIDs.moonbeamAlphaTestnet: - return chainIDs.moonbeamAlphaTestnet + return chainsNames.moonbeamAlphaTestnet case chainIDs.coinex: - return chainIDs.coinex + return chainsNames.coinex default: return 'Metamask network is not supported yet.' } From fc40c407f372c4154b578aa069f45c805fd26874 Mon Sep 17 00:00:00 2001 From: Ayushya Chitransh Date: Tue, 28 Jun 2022 19:29:02 +0530 Subject: [PATCH 6/9] Update baseURL for heroku --- src/api/serverAPI.ts | 2 +- src/common/common.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/serverAPI.ts b/src/api/serverAPI.ts index 5b11436..e9e811e 100644 --- a/src/api/serverAPI.ts +++ b/src/api/serverAPI.ts @@ -2,7 +2,7 @@ import axios from 'axios' import {ReceiptedType} from './localAPI' const instance = axios.create({ - baseURL: 'http://localhost:3000/api/1.0.0/', + baseURL: 'https://hydro-bridgev2.herokuapp.com/api/1.0.0/', // baseURL: 'https://hydro-bridge.org/api/1.0.0/', withCredentials: false, }) diff --git a/src/common/common.ts b/src/common/common.ts index 5b96de8..7be274b 100644 --- a/src/common/common.ts +++ b/src/common/common.ts @@ -6,7 +6,7 @@ import moonriverMVR from '../assets/images/chainSymbols/moonriver.svg' // === IMPORTANT: === // export const addressForWeb3 = 'https://hydroblockchain.github.io/hydro-bridge-ui' // for github.io -export const addressForWeb3 = 'http://localhost:3000' +export const addressForWeb3 = 'https://hydro-bridgev2.herokuapp.com/' // export const isTestChains = true // === === From 44498364fd5f30285c309cef40e83698e47acbca Mon Sep 17 00:00:00 2001 From: Ayushya Chitransh Date: Wed, 29 Jun 2022 08:49:06 +0530 Subject: [PATCH 7/9] Update coinex bridge contract address --- src/common/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/common.ts b/src/common/common.ts index 7be274b..9c6b036 100644 --- a/src/common/common.ts +++ b/src/common/common.ts @@ -98,7 +98,7 @@ export const swapContractAddresses = { eth: '0xfa41d158Ea48265443799CF720a120BFE77e41ca', bsc: '0x7f00F1B8825064B109Dcc85aAd1f074652D97AAd', polygon: '0xc8ea800fb6c6f8419758741b3ea1b85dddf2c5b8', - coinexSmartChainTestnet: '0x1500D17ECa72d87331db5f5dd634d755D73a0041', + coinexSmartChainTestnet: '0x0ca32D03C30F9911a93E6516272EB6635387261d', mumbaiTestnet: '0x1500D17ECa72d87331db5f5dd634d755D73a0041', rinkebyTestnet: '0xFBCf060541596047e47Db0ddcf37818D2B2eD4c0', moonbeamAlphaTestnet: '0xC62cfE5c4780b9f9d24209036BA0764B43C0F279', From 47a2a98ec39ddeb62438f7fc4af54424fda5ff11 Mon Sep 17 00:00:00 2001 From: Ayushya Chitransh Date: Thu, 30 Jun 2022 09:42:30 +0530 Subject: [PATCH 8/9] Update version for font-awesome icons to display swap icon --- package.json | 6 +++--- src/components/Menu/Swapper/Swapper.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 1bb177d..0e529e9 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "dependencies": { "@emotion/react": "^11.8.1", "@emotion/styled": "^11.8.1", - "@fortawesome/fontawesome-svg-core": "^1.3.0", - "@fortawesome/free-solid-svg-icons": "^6.0.0", - "@fortawesome/react-fontawesome": "^0.1.17", + "@fortawesome/fontawesome-svg-core": "^6.1.1", + "@fortawesome/free-solid-svg-icons": "^6.1.1", + "@fortawesome/react-fontawesome": "^0.1.18", "@metamask/legacy-web3": "^2.0.0", "@mui/material": "^5.4.4", "@testing-library/jest-dom": "^5.16.2", diff --git a/src/components/Menu/Swapper/Swapper.tsx b/src/components/Menu/Swapper/Swapper.tsx index 3b0c515..b10b9cf 100644 --- a/src/components/Menu/Swapper/Swapper.tsx +++ b/src/components/Menu/Swapper/Swapper.tsx @@ -25,7 +25,7 @@ export const Swapper = (props: PropsType) => { if (!props.isDisable && !isSwapperDisabled ) props.onClick() }} > - {/* */} + ) } From bc20d3b70ff3e0d0b65243a6c6202df58f352614 Mon Sep 17 00:00:00 2001 From: Ayushya Chitransh Date: Thu, 7 Jul 2022 21:55:15 +0530 Subject: [PATCH 9/9] Update base url --- src/api/serverAPI.ts | 4 ++-- src/common/common.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/serverAPI.ts b/src/api/serverAPI.ts index e9e811e..9ce3825 100644 --- a/src/api/serverAPI.ts +++ b/src/api/serverAPI.ts @@ -2,8 +2,8 @@ import axios from 'axios' import {ReceiptedType} from './localAPI' const instance = axios.create({ - baseURL: 'https://hydro-bridgev2.herokuapp.com/api/1.0.0/', - // baseURL: 'https://hydro-bridge.org/api/1.0.0/', + // baseURL: 'https://hydro-bridgev2.herokuapp.com/api/1.0.0/', + baseURL: 'https://hydro-bridge.org/api/1.0.0/', withCredentials: false, }) diff --git a/src/common/common.ts b/src/common/common.ts index 9c6b036..e0ca61d 100644 --- a/src/common/common.ts +++ b/src/common/common.ts @@ -6,7 +6,7 @@ import moonriverMVR from '../assets/images/chainSymbols/moonriver.svg' // === IMPORTANT: === // export const addressForWeb3 = 'https://hydroblockchain.github.io/hydro-bridge-ui' // for github.io -export const addressForWeb3 = 'https://hydro-bridgev2.herokuapp.com/' +export const addressForWeb3 = 'https://hydro-bridge.org/' // export const isTestChains = true // === ===