diff --git a/package.json b/package.json index b88c1c35..528cc67a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bridge-v2", - "version": "3.0.0", + "version": "3.0.2", "private": true, "dependencies": { "@davatar/react": "^1.9.0", @@ -10,11 +10,13 @@ "@material-ui/icons": "^4.11.2", "@material-ui/lab": "^4.0.0-alpha.57", "@netlify/functions": "^1.0.0", + "@project-serum/associated-token": "^0.1.1", + "@project-serum/borsh": "^0.2.5", "@reduxjs/toolkit": "^1.4.0", - "@renproject/chains": "3.4.0", - "@renproject/chains-bitcoin": "3.3.0", - "@renproject/chains-ethereum": "3.4.0", - "@renproject/chains-solana": "3.3.0", + "@renproject/chains": "3.4.2", + "@renproject/chains-bitcoin": "3.4.2", + "@renproject/chains-ethereum": "3.4.2", + "@renproject/chains-solana": "3.4.2", "@renproject/fonts": "^2.0.0-alpha.2", "@renproject/icons": "0.3.5", "@renproject/interfaces": "2.5.9", @@ -28,7 +30,7 @@ "@renproject/utils": "3.3.0", "@sentry/react": "^6.5.1", "@slack/web-api": "^6.7.1", - "@solana/web3.js": "^1.36.0", + "@solana/web3.js": "^1.47.3", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", @@ -47,6 +49,7 @@ "buffer": "^6.0.3", "cancelable-promise": "^4.3.0", "classnames": "^2.2.6", + "cross-env": "^7.0.3", "crypto-browserify": "^3.12.0", "dotenv": "^10.0.0", "ethers": "^5.6.8", @@ -113,6 +116,7 @@ "@babel/helper-call-delegate": "^7.12.1", "@babel/plugin-transform-modules-commonjs": "^7.13.0", "@babel/preset-env": "^7.15.8", + "cross-env": "^7.0.3", "netlify-cli": "^10", "prettier": "^2.5.1", "react-app-rewired": "^2.2.1" diff --git a/src/components/formatting/NumberFormatText.tsx b/src/components/formatting/NumberFormatText.tsx index 8cd43504..5eae3370 100644 --- a/src/components/formatting/NumberFormatText.tsx +++ b/src/components/formatting/NumberFormatText.tsx @@ -1,22 +1,47 @@ +import { makeStyles } from "@material-ui/core/styles"; import React, { FunctionComponent } from "react"; import NumberFormat, { NumberFormatProps } from "react-number-format"; import { numberFormatOptions } from "../../utils/formatters"; +const useNumberFormatStyles = makeStyles({ + root: { + display: "flex", + }, + rootInline: { + display: "inline-flex", + }, + value: { + overflow: "hidden", + textOverflow: "ellipsis", + flexShrink: 1, + }, + // suffix: {} +}); + type NumberFormatTextProps = NumberFormatProps & { + flex?: boolean; spacedSuffix?: string; }; + export const NumberFormatText: FunctionComponent = ({ + flex, spacedSuffix, - suffix, + value, ...props }) => { - const resolvedSuffix = spacedSuffix ? ` ${spacedSuffix}` : suffix; + const styles = useNumberFormatStyles(); + // const resolvedSuffix = spacedSuffix ? ` ${spacedSuffix}` : suffix; return ( - + + + {Boolean(spacedSuffix) &&  {spacedSuffix}} + ); }; diff --git a/src/components/typography/TypographyHelpers.tsx b/src/components/typography/TypographyHelpers.tsx index fbdde0f5..3e05f19e 100644 --- a/src/components/typography/TypographyHelpers.tsx +++ b/src/components/typography/TypographyHelpers.tsx @@ -60,15 +60,17 @@ const useLabelWithValueStyles = makeStyles< verticalAlign: "middle", }, valueWrapper: { - flexGrow: 1, + display: "flex", overflow: "hidden", textAlign: "right", color: (props) => getElementColor(props, black, grey), }, value: { whiteSpace: "nowrap", + overflow: "hidden", }, valueEquivalent: { + whiteSpace: "nowrap", marginLeft: 4, color: (props) => getElementColor(props, grey), }, diff --git a/src/constants/environmentVariables.ts b/src/constants/environmentVariables.ts index a78a9976..2f512b00 100644 --- a/src/constants/environmentVariables.ts +++ b/src/constants/environmentVariables.ts @@ -20,15 +20,10 @@ const BSC_MM_ENABLED = Boolean(process.env.REACT_APP_BSC_MM_ENABLED); const ENABLED_EXTRA_WALLETS = process.env.REACT_APP_ENABLED_EXTRA_WALLETS?.split(",") || ["*"]; -const ENABLED_ASSETS = process.env.REACT_APP_ENABLED_ASSETS?.split(",") || [ - "*", -]; - export const env = { DEV, NETWORK, INFURA_ID, - ENABLED_ASSETS, ENABLED_EXTRA_WALLETS, BSC_MM_ENABLED, MEWCONNECT_ENABLED, diff --git a/src/constants/featureFlags.ts b/src/constants/featureFlags.ts index c226b7c5..5c464c5f 100644 --- a/src/constants/featureFlags.ts +++ b/src/constants/featureFlags.ts @@ -15,6 +15,7 @@ export const featureFlags = { godMode: Boolean(queryString.parse(window.location.search).godMode) || Boolean(localStorage.getItem("godMode")), + customRecipient: false }; console.info(featureFlags); diff --git a/src/features/chain/chainUtils.ts b/src/features/chain/chainUtils.ts index b950a70d..e753c7bd 100644 --- a/src/features/chain/chainUtils.ts +++ b/src/features/chain/chainUtils.ts @@ -132,7 +132,7 @@ export const getSolanaChain = ( network, provider, signer, - }), + }) as any, connectionRequired: true, accounts: [], }; @@ -155,7 +155,7 @@ const getBitcoinBaseChain = (ChainClass: BTC) => { }; }; -const getDepositBaseChain = (ChainClass: DBC) => { +const getDepositBaseChain = >(ChainClass: DBC) => { return { chain: ChainClass, }; @@ -217,7 +217,7 @@ export const alterContractChainProviderSigner = ( console.info("Solana", provider); (window as any).solanaProvider = provider; alterSolanaChainProviderSigner( - chains[alteredChain] as ChainInstance, + chains[alteredChain] as any as ChainInstance, provider as SolanaConnector, false ); diff --git a/src/features/gateway/components/GatewayFees.tsx b/src/features/gateway/components/GatewayFees.tsx index b06fb7a4..5b900b93 100644 --- a/src/features/gateway/components/GatewayFees.tsx +++ b/src/features/gateway/components/GatewayFees.tsx @@ -75,6 +75,7 @@ export const GatewayFees: FunctionComponent = ({ value={ renVMFeeAmount ? ( = ({ value={ fromChainFeeAmount !== null && fromChainFeeAsset !== null ? ( @@ -138,6 +140,7 @@ export const GatewayFees: FunctionComponent = ({ value={ toChainFeeAmount !== null && toChainFeeAsset !== null ? ( diff --git a/src/features/gateway/gatewayTransactionHooks.ts b/src/features/gateway/gatewayTransactionHooks.ts index 55fac963..d7d84560 100644 --- a/src/features/gateway/gatewayTransactionHooks.ts +++ b/src/features/gateway/gatewayTransactionHooks.ts @@ -42,7 +42,7 @@ export const useRenVMChainTransactionStatusUpdater = ({ const [status, setStatus] = useState(null); const [target, setTarget] = useState(null); const [txId, setTxId] = useState(null); - const [txIdFormatted, setTxIdFormatted] = useState(null); + const [txHash, setTxHash] = useState(null); const [txIndex, setTxIndex] = useState(null); const [amount, setAmount] = useState(null); @@ -60,7 +60,7 @@ export const useRenVMChainTransactionStatusUpdater = ({ if (isDefined(progress.transaction)) { setTxId(progress.transaction.txid); - setTxIdFormatted(progress.transaction.txidFormatted); + setTxHash(progress.transaction.txHash); setTxIndex(progress.transaction.txindex); if (isDefined((progress.transaction as InputChainTransaction).amount)) { setAmount((progress.transaction as InputChainTransaction).amount); @@ -101,7 +101,7 @@ export const useRenVMChainTransactionStatusUpdater = ({ status, target, txId, - txIdFormatted, + txHash, txIndex, amount, }; @@ -127,7 +127,7 @@ export const useChainTransactionStatusUpdater = ({ const [target, setTarget] = useState(null); const [status, setStatus] = useState(null); const [txId, setTxId] = useState(null); - const [txIdFormatted, setTxIdFormatted] = useState(null); + const [txHash, setTxHash] = useState(null); const [txIndex, setTxIndex] = useState(null); const [amount, setAmount] = useState(null); const [txUrl, setTxUrl] = useState(null); @@ -148,7 +148,7 @@ export const useChainTransactionStatusUpdater = ({ } if (isDefined(progress.transaction)) { setTxId(progress.transaction.txid); - setTxIdFormatted(progress.transaction.txidFormatted); + setTxHash(progress.transaction.txHash); setTxIndex(progress.transaction.txindex); if (isDefined((progress.transaction as InputChainTransaction).amount)) { setAmount((progress.transaction as InputChainTransaction).amount); @@ -193,7 +193,7 @@ export const useChainTransactionStatusUpdater = ({ target, confirmations, txId, - txIdFormatted, + txHash, txIndex, txUrl, amount, diff --git a/src/features/gateway/gatewayUtils.ts b/src/features/gateway/gatewayUtils.ts index 5f52761c..89fe0c75 100644 --- a/src/features/gateway/gatewayUtils.ts +++ b/src/features/gateway/gatewayUtils.ts @@ -79,7 +79,7 @@ export const createGateway = async ( }); } } else if (isSolanaBaseChain(gatewayParams.from)) { - const solana = fromChainInstance.chain as Solana; + const solana = fromChainInstance.chain as unknown as Solana; if (partialTx) { fromChain = solana.Transaction(partialTx); } else if (gatewayParams.fromAddress) { @@ -114,7 +114,7 @@ export const createGateway = async ( toChain = ethereumChain.Account({ convertUnit, anyoneCanSubmit }); } } else if (isSolanaBaseChain(gatewayParams.to)) { - const solana = toChainInstance.chain as Solana; + const solana = toChainInstance.chain as unknown as Solana; if (gatewayParams.toAddress) { toChain = solana.Address(gatewayParams.toAddress); } else { diff --git a/src/features/gateway/renJSHooks.ts b/src/features/gateway/renJSHooks.ts index bba89940..25474a9f 100644 --- a/src/features/gateway/renJSHooks.ts +++ b/src/features/gateway/renJSHooks.ts @@ -85,6 +85,7 @@ export const useWhitelist = () => { lockAndMint: {}, }; for (let selector of whitelist) { + // console.log(selector); const { asset, from, to, ioType } = decomposeSelector(selector); if (!supportedAssets.includes(asset) || ioType === null) { continue; diff --git a/src/features/gateway/steps/GatewayFeesStep.tsx b/src/features/gateway/steps/GatewayFeesStep.tsx index dbebf45b..c751128d 100644 --- a/src/features/gateway/steps/GatewayFeesStep.tsx +++ b/src/features/gateway/steps/GatewayFeesStep.tsx @@ -66,6 +66,7 @@ import { } from "../gatewayHooks"; import { useRedirectToGatewayFlow } from "../gatewayRoutingUtils"; import { $gateway, setAmount } from "../gatewaySlice"; +import { WalletConnectionActionButtonGuard } from "./shared/WalletSwitchHelpers"; import { GatewayStepProps } from "./stepUtils"; export const GatewayFeesStep: FunctionComponent = ({ @@ -190,7 +191,10 @@ export const GatewayFeesStep: FunctionComponent = ({ <> {Header} - Please connect a wallet to proceed + + Please connect a wallet to proceed + + ); @@ -231,7 +235,7 @@ export const GatewayFeesStep: FunctionComponent = ({ ) : ( diff --git a/src/features/gateway/steps/flows/MintStandard.tsx b/src/features/gateway/steps/flows/MintStandard.tsx index 402d2bf9..01a2e941 100644 --- a/src/features/gateway/steps/flows/MintStandard.tsx +++ b/src/features/gateway/steps/flows/MintStandard.tsx @@ -286,7 +286,7 @@ export const GatewayDepositProcessor: FunctionComponent< confirmations: lockConfirmations, target: lockTargetConfirmations, // txId: lockTxId, - txIdFormatted: lockTxIdFormatted, + txHash: lockTxHash, // txIndex: lockTxIndex, txUrl: lockTxUrl, amount: lockAmount, @@ -363,7 +363,7 @@ export const GatewayDepositProcessor: FunctionComponent< confirmations: mintConfirmations, target: mintTargetConfirmations, // txId: mintTxId, - txIdFormatted: mintTxIdFormatted, + txHash: mintTxHash, // txIndex: mintTxIndex, txUrl: mintTxUrl, } = outTxMeta; @@ -411,7 +411,7 @@ export const GatewayDepositProcessor: FunctionComponent< lockStatus={lockStatus} lockAssetDecimals={lockAssetDecimals} lockAmount={lockAmount} - lockTxId={lockTxIdFormatted} + lockTxId={lockTxHash} lockTxUrl={lockTxUrl} /> ); @@ -435,7 +435,7 @@ export const GatewayDepositProcessor: FunctionComponent< lockTargetConfirmations={lockTargetConfirmations} lockAssetDecimals={lockAssetDecimals} lockAmount={lockAmount} - lockTxId={lockTxIdFormatted} + lockTxId={lockTxHash} lockTxUrl={lockTxUrl} onSubmit={handleSubmit} onReset={handleReset} @@ -470,12 +470,12 @@ export const GatewayDepositProcessor: FunctionComponent< diff --git a/src/features/gateway/steps/shared/WalletSwitchHelpers.tsx b/src/features/gateway/steps/shared/WalletSwitchHelpers.tsx index b489f81b..239ce5e1 100644 --- a/src/features/gateway/steps/shared/WalletSwitchHelpers.tsx +++ b/src/features/gateway/steps/shared/WalletSwitchHelpers.tsx @@ -30,6 +30,7 @@ import { DeleteIcon, WalletIcon, } from "../../../../components/icons/RenIcons"; +import { OutlinedTextField } from "../../../../components/inputs/OutlinedTextField"; import { BigTopWrapper } from "../../../../components/layout/LayoutHelpers"; import { PaperContent, @@ -39,6 +40,7 @@ import { Link } from "../../../../components/links/Links"; import { BridgeModal } from "../../../../components/modals/BridgeModal"; import { InlineSkeleton } from "../../../../components/progress/ProgressHelpers"; import { Debug } from "../../../../components/utils/Debug"; +import { featureFlags } from "../../../../constants/featureFlags"; import { getAssetConfig } from "../../../../utils/assetsConfig"; import { getChainConfig, @@ -54,7 +56,10 @@ import { useWallet } from "../../../wallet/walletHooks"; import { setChain, setPickerOpened } from "../../../wallet/walletSlice"; import { FeesToggler } from "../../components/FeeHelpers"; import { GatewayFees } from "../../components/GatewayFees"; -import { useGatewayFeesWithoutGateway } from "../../gatewayHooks"; +import { + useAddressValidator, + useGatewayFeesWithoutGateway, +} from "../../gatewayHooks"; import { GatewayPaperHeader } from "./GatewayNavigationHelpers"; type WalletConnectionActionButtonGuardProps = { @@ -305,6 +310,14 @@ export const SendingReceivingWrapper: FunctionComponent< ); }; +type ManualAddressInputProps = {}; + +export const ManualAddressInput: FunctionComponent< + ManualAddressInputProps +> = () => { + return null; +}; + export const H2HAccountsResolver: FunctionComponent< H2HAccountsResolverProps > = ({ transactionType, from, to, disabled, onResolved }) => { @@ -348,6 +361,11 @@ export const H2HAccountsResolver: FunctionComponent< const [differentAccounts, setDifferentAccounts] = useState( isCrossContractBaseChain ); + const [customAccountMode, setCustomAccountMode] = useState(false); + const handleCustomAccountModeChange = useCallback((event) => { + setCustomAccountMode(event.target.checked); + }, []); + // const [customAccount, setCustomAccount] = useState(""); const handleAccountsModeChange = useCallback((event) => { setDifferentAccounts(event.target.checked); @@ -377,6 +395,15 @@ export const H2HAccountsResolver: FunctionComponent< const [cachedFromAccount, setCachedFromAccount] = useState(fromAccount); const [cachedToAccount, setCachedToAccount] = useState(toAccount); + const handleCustomAccountChange = useCallback((event) => { + setCachedToAccount(event.target.value); + // setCustomAccount(event.target.value); + }, []); + const { validateAddress } = useAddressValidator(to); + const isAddressValid = validateAddress(cachedToAccount); + const hasAddressError = !isAddressValid; + const showAddressError = Boolean(cachedToAccount) && hasAddressError; + useEffect(() => { setCachedFromAccount(fromAccount); }, [fromAccount]); @@ -384,7 +411,7 @@ export const H2HAccountsResolver: FunctionComponent< useEffect(() => { const newToAccount = differentAccounts ? toAccount : fromAccount; setCachedToAccount(newToAccount); - }, [toAccount, fromAccount, differentAccounts]); + }, [toAccount, fromAccount, differentAccounts, customAccountMode]); const [toPickerOpened, setToPickerOpened] = useState(false); const handleToPickerOpened = useCallback(() => { @@ -409,23 +436,6 @@ export const H2HAccountsResolver: FunctionComponent< <> - {/* - - - - - - - - - Choose accounts used for this transaction. - - */} - {/* - */} + /> {cachedFromAccount ? ( <> {trimAddress(cachedFromAccount, 5)} - - {differentAccounts && cachedToAccount && ( - - - - )} - {trimAddress(cachedToAccount, 5)} - {differentAccounts && !cachedToAccount && ( - + {differentAccounts && cachedToAccount && ( + + + + )} + {trimAddress(cachedToAccount, 5)} + {differentAccounts && !cachedToAccount && ( + + Choose account + + )} + + )} + {customAccountMode && ( + + )} + {featureFlags.customRecipient && differentAccounts && ( + <> + - Choose account - - )} - + + } + label={ + + I will enter recipient address manually + + } + /> + + + )} {showDifferentAccountSwitcher && ( )} - {cachedFromAccount ? "Accept Accounts" : "Connect a Wallet"} diff --git a/src/features/transactions/components/TransactionMenu.tsx b/src/features/transactions/components/TransactionMenu.tsx index 060156da..e278be84 100644 --- a/src/features/transactions/components/TransactionMenu.tsx +++ b/src/features/transactions/components/TransactionMenu.tsx @@ -212,7 +212,7 @@ export interface ChainTransaction { txid: UrlBase64String; txindex: NumericString; - txidFormatted: string; + txHash: string; } export interface InputChainTransaction extends ChainTransaction { @@ -340,8 +340,8 @@ export const UpdateTransactionForm: FunctionComponent< }); } else { txPayload = (instance as BitcoinBaseChain).Transaction({ - txindex: txIndex, txHash: txHash, + txindex: txIndex, }); } if (!txPayload) { @@ -351,7 +351,7 @@ export const UpdateTransactionForm: FunctionComponent< .tx as ChainTransaction; // const finalTx: InputChainTransaction = { // txid: txId || payloadTxData.txid, - // txidFormatted: txIdFormatted || payloadTxData.txidFormatted, + // txHash: txHash || payloadTxData.txHash, // txindex: txIndex || payloadTxData.txindex, // chain: payloadTxData.chain, // asset: asset as string, diff --git a/src/index.tsx b/src/index.tsx index 44bfad39..28dc4de6 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -11,6 +11,9 @@ import store from "./store/store"; import { lightTheme } from "./theme/theme"; import "./i18n/i18n"; import * as Sentry from "@sentry/react"; +// overwrite default BigNumber toString() digits policy +import BigNumber from "bignumber.js"; +BigNumber.set({ EXPONENTIAL_AT: 30 }); // clean history state after page reaload window.history.replaceState({}, document.title); diff --git a/src/services/wallets/bsc.ts b/src/services/wallets/bsc.ts deleted file mode 100644 index b7649e15..00000000 --- a/src/services/wallets/bsc.ts +++ /dev/null @@ -1,31 +0,0 @@ -const connectBinanceChain = () => { - if (getBinanceChain() !== "undefined") { - getBinanceChain().enable().catch(console.error); - } -}; - -const getBinanceChain = () => { - return (window as any).BinanceChain; -}; - -export const signWithBinanceChain: (msg: string) => Promise = ( - msg: string -) => - new Promise((resolve, reject) => { - if (!getBinanceChain()) { - reject("no binance chain"); - } - getBinanceChain() - .request({ method: "eth_requestAccounts" }) - .then((addresses: Array) => { - const from = addresses[0]; - if (!from) return connectBinanceChain(); - getBinanceChain() - .request({ - method: "eth_sign", - params: [from, msg], - }) - .then(resolve) - .catch(reject); - }); - }); diff --git a/src/utils/assetsConfig.ts b/src/utils/assetsConfig.ts index 5bf493b6..792aef70 100644 --- a/src/utils/assetsConfig.ts +++ b/src/utils/assetsConfig.ts @@ -1,9 +1,9 @@ -import { Badge } from "@material-ui/core"; import { Asset, Chain } from "@renproject/chains"; import { assetsColors, // assetsColors, Avax, + Badger, Bch, Bnb, Btc, @@ -72,7 +72,6 @@ import { EmptyCircleIcon, } from "../components/icons/RenIcons"; -import { env } from "../constants/environmentVariables"; import { getAssetChainsConfig } from "./chainsConfig"; export type AssetIconsConfig = { @@ -123,7 +122,7 @@ const assetsBaseConfig: Record = { rateSymbol: "weth", // simple hack for duplicated ethereum entry }, BADGER: { - Icon: nativeTokenIcon(Badge), + Icon: nativeTokenIcon(Badger), RenIcon: wrappedTokenIcon(RenBadger), shortName: "BADGER", fullName: "Badger DAO", @@ -448,47 +447,38 @@ export const getUIAsset = (asset: Asset, chain: Chain) => { return { shortName, fullName, Icon }; }; -export const supportedAssets = - env.ENABLED_ASSETS[0] === "*" - ? [ - Asset.BTC, - Asset.BCH, - Asset.DGB, - Asset.DOGE, - Asset.FIL, - Asset.LUNA, - Asset.ZEC, - Asset.ETH, - Asset.BNB, - Asset.AVAX, - Asset.FTM, - Asset.ArbETH, - Asset.MATIC, - Asset.GLMR, - Asset.KAVA, - // Asset.SOL, // not sure about that - Asset.REN, - Asset.DAI, - Asset.USDC, - Asset.USDT, - Asset.EURT, - Asset.BUSD, - Asset.MIM, - Asset.CRV, - Asset.LINK, - Asset.UNI, - Asset.SUSHI, - Asset.FTT, - Asset.ROOK, - Asset.BADGER, - Asset.KNC, - ] - : env.ENABLED_ASSETS.filter((x) => { - const included = Object.keys(assetsConfig).includes(x); - if (!included) { - console.error("Unknown asset:", x); - } - return included; - }).map((x) => x as Asset); +export const supportedAssets = [ + Asset.BTC, + Asset.BCH, + Asset.DGB, + Asset.DOGE, + Asset.FIL, + Asset.LUNA, + Asset.ZEC, + Asset.ETH, + Asset.BNB, + Asset.AVAX, + Asset.FTM, + Asset.ArbETH, + Asset.MATIC, + Asset.GLMR, + Asset.KAVA, + // Asset.SOL, // not sure about that + Asset.REN, + Asset.DAI, + Asset.USDC, + Asset.USDT, + Asset.EURT, + Asset.BUSD, + Asset.MIM, + Asset.CRV, + Asset.LINK, + Asset.UNI, + Asset.SUSHI, + Asset.FTT, + Asset.ROOK, + Asset.BADGER, + Asset.KNC, +]; console.log("supportedAssets", supportedAssets); diff --git a/src/utils/chainsConfig.ts b/src/utils/chainsConfig.ts index 0d47fa32..a49b6185 100644 --- a/src/utils/chainsConfig.ts +++ b/src/utils/chainsConfig.ts @@ -235,8 +235,8 @@ export const supportedEthereumChains: Array = [ Chain.Polygon, Chain.Avalanche, Chain.Arbitrum, - Chain.Kava, - Chain.Moonbeam, + // Chain.Kava, + // Chain.Moonbeam, Chain.Optimism, ]; diff --git a/yarn.lock b/yarn.lock index 4ebd1f8d..c207c740 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1103,6 +1103,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.17.2": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" + integrity sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.16.7", "@babel/template@^7.3.3": version "7.16.7" resolved "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz" @@ -3375,7 +3382,7 @@ "@project-serum/associated-token@^0.1.1": version "0.1.1" - resolved "https://registry.npmjs.org/@project-serum/associated-token/-/associated-token-0.1.1.tgz" + resolved "https://registry.yarnpkg.com/@project-serum/associated-token/-/associated-token-0.1.1.tgz#9acf745e84dad21e2ea26e06694704b9d698e532" integrity sha512-Zc1wdqragbDiyBVagzIbIsMe37P7fgkArWZPIj+jJjDIoznlmYMK6ASU5mtdDZrPJ7sNABF/lzZ3+jvCCcU+oA== "@project-serum/borsh@^0.2.5": @@ -3457,33 +3464,13 @@ redux-thunk "^2.4.1" reselect "^4.1.5" -"@renproject/chains-bitcoin@3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@renproject/chains-bitcoin/-/chains-bitcoin-3.3.0.tgz#c2c24449b2405f68b062dd94f6f7d4dc1cdd6c12" - integrity sha512-UjykkpSEud92lJ1Hi/Ex7i38PX+MVCPBI2swDF5jCV9YmNtSlkXD18xzlPdXPhKElrg7K8GP57l0UcliIf8ncQ== - dependencies: - "@noble/hashes" "1.1.1" - "@renproject/utils" "^3.3.0" - "@types/bchaddrjs" "^0.4.0" - "@types/bs58" "^4.0.1" - "@types/bs58check" "2.1.0" - "@types/cashaddrjs" "^0.3.0" - bchaddrjs "^0.5.2" - bech32 "^2.0.0" - bignumber.js "^9.0.2" - bs58 "^5.0.0" - bs58check "^2.1.2" - cashaddrjs "^0.4.4" - qs "^6.10.5" - wallet-address-validator "^0.2.4" - -"@renproject/chains-bitcoin@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@renproject/chains-bitcoin/-/chains-bitcoin-3.3.1.tgz#bbabeddd263ce4f7c0b8fe843ac8f100c8e885e8" - integrity sha512-QDjm6Ws/f3u4txJqjtGWbDUIVlRPlgwXC/0xRWAItziWd2PZlKUroRoXGuDUnPI8m65zKdkkfNsfeIrc0uyDQw== +"@renproject/chains-bitcoin@3.4.2", "@renproject/chains-bitcoin@^3.4.2": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@renproject/chains-bitcoin/-/chains-bitcoin-3.4.2.tgz#972823ae8d66ad21d952516c2249c690aa4e27fb" + integrity sha512-Kd/muBp52Wsp8lgFK6l9nRsqiff/aUYLd4RqjFQ1zbabZ+emDs7DMp1BIgbDNS3krS2d4/UzYprXC01vQA56yg== dependencies: "@noble/hashes" "1.1.1" - "@renproject/utils" "^3.3.1" + "@renproject/utils" "^3.4.2" "@types/bchaddrjs" "^0.4.0" "@types/bs58" "^4.0.1" "@types/bs58check" "2.1.0" @@ -3497,15 +3484,15 @@ qs "^6.10.5" wallet-address-validator "^0.2.4" -"@renproject/chains-ethereum@3.4.0", "@renproject/chains-ethereum@^3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@renproject/chains-ethereum/-/chains-ethereum-3.4.0.tgz#ef7c6d89c2f0525bb0b6db5a1b91fb984dd8b2cd" - integrity sha512-daNhi1vzoYGPV9wd8/7z/OXQkOuCfrCog/0lqzeBHpJh+aKL3VX62+U+2nfL1JOFxHPD8vEv8aFIaAeczVlKgQ== +"@renproject/chains-ethereum@3.4.2", "@renproject/chains-ethereum@^3.4.2": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@renproject/chains-ethereum/-/chains-ethereum-3.4.2.tgz#15dade862e68f74ce5fa882ea5e288b938a46c84" + integrity sha512-Q6v2nUY+72FW2w0YHeqXE8LO2rwknfEwo+Gr6DleNHR/ghRrcWISyBndyKcRsNvR5vhYPtEkiNoPMuZq+v+CHQ== dependencies: "@ethersproject/abi" "^5.6.3" "@ethersproject/bytes" "^5.6.1" "@ethersproject/providers" "^5.6.8" - "@renproject/utils" "^3.3.1" + "@renproject/utils" "^3.4.2" "@types/elliptic" "^6.4.14" bignumber.js "^9.0.2" elliptic "^6.5.4" @@ -3525,50 +3512,29 @@ bn.js "^5.2.0" ethers "^5.4.5" -"@renproject/chains-filecoin@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@renproject/chains-filecoin/-/chains-filecoin-3.3.1.tgz#93bdd6f0b32b78561616f1fc37bd640ed543b03c" - integrity sha512-Y1F22RHxTxcFmt18sZDUzWcPsJED1ZaUlZb36R86d9ybpaRQUP0Ls/0PQWh+E+3mCXfIGPGOCSXZTMyzimG05g== +"@renproject/chains-filecoin@^3.4.2": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@renproject/chains-filecoin/-/chains-filecoin-3.4.2.tgz#3eba8a4d749f927fc6eb02d9bf430f23a1279bed" + integrity sha512-pQ9Gv3nA4kJw/axwqBGO7n1nw0iqCMx6WqMKPVco9vEapScUSg1OcMFLjcXbwLNKoMYlLUYMM83ndVqZ2A0F6w== dependencies: "@glif/filecoin-address" "^1.1.0" "@glif/filecoin-rpc-client" "^1.1.0" - "@renproject/utils" "^3.3.1" + "@renproject/utils" "^3.4.2" "@types/elliptic" "^6.4.14" bignumber.js "^9.0.2" blakejs "^1.2.1" elliptic "^6.5.4" multiformats "^9.6.5" -"@renproject/chains-solana@3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@renproject/chains-solana/-/chains-solana-3.3.0.tgz#5e126b3a0e16a8a28f8d8680b2a4eba822cd91db" - integrity sha512-tFL5F9cTjtnTeaFGh6y8F0m5QXDmG4wrjfHOn8l4pLHwmMyMCKj6lTRhgJhKFUXq1tm5xIEYJL9s6nEsh6glKQ== - dependencies: - "@project-serum/associated-token" "^0.1.1" - "@project-serum/borsh" "^0.2.5" - "@project-serum/sol-wallet-adapter" "^0.2.6" - "@renproject/utils" "^3.3.0" - "@solana/buffer-layout" "^4.0.0" - "@solana/spl-token" "0.2.0" - "@solana/web3.js" "1.44.0" - "@types/bs58" "^4.0.1" - "@types/node-fetch" "^2.6.2" - bignumber.js "^9.0.2" - bip39 "^3.0.4" - bs58 "^5.0.0" - crypto-hash "^2.0.1" - ed25519-hd-key "^1.2.0" - tweetnacl "^1.0.3" - -"@renproject/chains-solana@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@renproject/chains-solana/-/chains-solana-3.3.1.tgz#1d22812325fa0fa5bca1b982a9fee94ea566b47a" - integrity sha512-wsCPPxKkhAB+MLhlZZgK4lpH/SAfgBG1wo1mPPhbmGUJw43egOcVrlEau4Vq2p9N8BjGqPJv9FqMDD1AxipoIQ== +"@renproject/chains-solana@3.4.2", "@renproject/chains-solana@^3.4.2": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@renproject/chains-solana/-/chains-solana-3.4.2.tgz#2f99a49e3304c46d9eab485baab6d34456cd0e8a" + integrity sha512-HA7H16Ccx3jLtU14jJpVx61d9+bVm4Pu8jyRd/Jgkx0U7XJ6ax51Wy+tBLOYe+RiwPrWrCxT2aqoLMpx6+ICZA== dependencies: "@project-serum/associated-token" "^0.1.1" "@project-serum/borsh" "^0.2.5" "@project-serum/sol-wallet-adapter" "^0.2.6" - "@renproject/utils" "^3.3.1" + "@renproject/utils" "^3.4.2" "@solana/buffer-layout" "^4.0.0" "@solana/spl-token" "0.2.0" "@solana/web3.js" "1.44.0" @@ -3581,29 +3547,29 @@ ed25519-hd-key "^1.2.0" tweetnacl "^1.0.3" -"@renproject/chains-terra@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@renproject/chains-terra/-/chains-terra-3.3.1.tgz#64946c3f6a65eeeac0c75f2fc4925bd58943c2b4" - integrity sha512-Cm4qJDZFr7YsykRmxpijNeziXfXBq4NQ5FjzDGQqk8nWu1vCqM4jV6AXSvaP+Qx5bYcmXY3uNmfwgf//CWpbrQ== +"@renproject/chains-terra@^3.4.2": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@renproject/chains-terra/-/chains-terra-3.4.2.tgz#b30bbe18797593497db596dfe5c9221059c96144" + integrity sha512-CENpXgPBcssh6SJH6WOKHCEX8ONWTiLkjSVBl6+52iMsZyx3kfdNmS3hAVlfgHQOxMmzF8x0LMxwLPgvCilkqg== dependencies: - "@renproject/utils" "^3.3.1" + "@renproject/utils" "^3.4.2" "@terra-money/terra.js" "3.1.3" "@types/elliptic" "^6.4.14" bech32 "^2.0.0" bignumber.js "^9.0.2" elliptic "^6.5.4" -"@renproject/chains@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@renproject/chains/-/chains-3.4.0.tgz#658b53e11e90381f6596db1c014a27aaa0d3a9a6" - integrity sha512-Ozk7JKd9wfUPKOY2cscXKl1wQV/o0KC6B92gwjP4wAioQMxPOu/CvIgrc/PySoEvw7VDJHSsybV3jsmHjqeQUg== +"@renproject/chains@3.4.2": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@renproject/chains/-/chains-3.4.2.tgz#76ba4922ab2c4ba5bfc4f4946fa539eefd192dcf" + integrity sha512-w2MYsiQM4c/yO9AtEp+zADw6FtHJP8k4tbimU9xwFI/pMjzPuUU0LrkojflLJc7I5gi9d3Jv+pROyRIta/VsXw== dependencies: - "@renproject/chains-bitcoin" "^3.3.1" - "@renproject/chains-ethereum" "^3.4.0" - "@renproject/chains-filecoin" "^3.3.1" - "@renproject/chains-solana" "^3.3.1" - "@renproject/chains-terra" "^3.3.1" - "@renproject/utils" "^3.3.1" + "@renproject/chains-bitcoin" "^3.4.2" + "@renproject/chains-ethereum" "^3.4.2" + "@renproject/chains-filecoin" "^3.4.2" + "@renproject/chains-solana" "^3.4.2" + "@renproject/chains-terra" "^3.4.2" + "@renproject/utils" "^3.4.2" "@renproject/fonts@^2.0.0-alpha.2": version "2.0.0-alpha.2" @@ -3781,10 +3747,10 @@ immutable "^4.0.0-rc.14" keccak "^3.0.1" -"@renproject/utils@^3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@renproject/utils/-/utils-3.3.1.tgz#0af14765981a6618007fefeab3857aef3b3c7e28" - integrity sha512-rx5wG5EzDuldG5GIMKifn2D5J83ftzmR16S1BNPvF7boTabcfCBrE98G49V0bkcSrMp11K3fRbC6a6640fYj2w== +"@renproject/utils@^3.4.2": + version "3.4.2" + resolved "https://registry.yarnpkg.com/@renproject/utils/-/utils-3.4.2.tgz#b23e414e06c4226333ed31e24a740c28e5404e83" + integrity sha512-D4/zITmiR6dgkEUEyl4NcR3ACK99kHpGwflivvHSncA5h9NZb8pEgHPGfIRMT9gjIjBp5KnBE2hKL2AfL1AF8w== dependencies: "@noble/hashes" "1.1.1" "@types/events" "3.0.0" @@ -4095,7 +4061,7 @@ superstruct "^0.14.2" tweetnacl "^1.0.0" -"@solana/web3.js@^1.32.0", "@solana/web3.js@^1.36.0": +"@solana/web3.js@^1.32.0": version "1.36.0" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.36.0.tgz#79d7d5217b49b80139f4de68953adc5b9a9a264f" integrity sha512-RNT1451iRR7TyW7EJKMCrH/0OXawIe4zVm0DWQASwXlR/u1jmW6FrmH0lujIh7cGTlfOVbH+2ZU9AVUPLBFzwA== @@ -4115,6 +4081,28 @@ superstruct "^0.14.2" tweetnacl "^1.0.0" +"@solana/web3.js@^1.47.3": + version "1.47.3" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.47.3.tgz#ec13f2cf4f9f54cc4fbd26d20be1e026c6e2279c" + integrity sha512-TQJulaN/+b0xXq5EhQAYFwVyOORxSyVJn1EiXupClZm8DY7f9EeUG6vl0FzSAgwEAwXKsgK3sVs/3px2e7H7dQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@ethersproject/sha2" "^5.5.0" + "@solana/buffer-layout" "^4.0.0" + bigint-buffer "^1.1.5" + bn.js "^5.0.0" + borsh "^0.7.0" + bs58 "^4.0.1" + buffer "6.0.1" + fast-stable-stringify "^1.0.0" + jayson "^3.4.4" + js-sha3 "^0.8.0" + node-fetch "2" + rpc-websockets "^7.5.0" + secp256k1 "^4.0.2" + superstruct "^0.14.2" + tweetnacl "^1.0.0" + "@surma/rollup-plugin-off-main-thread@^2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz#ee34985952ca21558ab0d952f00298ad2190c053" @@ -7927,6 +7915,13 @@ cron-parser@^4.1.0, cron-parser@^4.2.1: dependencies: luxon "^1.28.0" +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + cross-fetch@3.1.5, cross-fetch@^3.1.4: version "3.1.5" resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz" @@ -7942,7 +7937,7 @@ cross-fetch@^2.1.0: node-fetch "2.6.1" whatwg-fetch "2.0.4" -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -17598,6 +17593,19 @@ rpc-websockets@^7.4.2: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +rpc-websockets@^7.5.0: + version "7.5.0" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-7.5.0.tgz#bbeb87572e66703ff151e50af1658f98098e2748" + integrity sha512-9tIRi1uZGy7YmDjErf1Ax3wtqdSSLIlnmL5OtOzgd5eqPKbsPpwDP5whUDO2LQay3Xp0CcHlcNSGzacNRluBaQ== + dependencies: + "@babel/runtime" "^7.17.2" + eventemitter3 "^4.0.7" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + rtcpeerconnection-shim@^1.2.14: version "1.2.15" resolved "https://registry.npmjs.org/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz" @@ -20803,6 +20811,11 @@ ws@^8.4.2: resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== +ws@^8.5.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769" + integrity sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ== + xdg-basedir@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz"