diff --git a/.env b/.env index 4af97e49c..6c9cff76d 100644 --- a/.env +++ b/.env @@ -30,7 +30,7 @@ REACT_APP_NETWORK_URL_100=https://rpc.xdaichain.com # Wallets REACT_APP_PORTIS_ID="c0e2bf01-4b08-4fd5-ac7b-8e26b58cd236" -REACT_APP_FORTMATIC_KEY="pk_live_F937DF033A1666BF" +REACT_APP_FORTMATIC_KEY="pk_live_6AED76CA755EFDC7" REACT_APP_FORTMATIC_SITE_VERIFICATION="LzjrtdM7hqVJfvvA" # Domain regex (to detect environment) diff --git a/.env.production b/.env.production index 7227344cf..8405471e4 100644 --- a/.env.production +++ b/.env.production @@ -30,7 +30,9 @@ REACT_APP_NETWORK_URL_100=https://rpc.xdaichain.com # Wallets REACT_APP_PORTIS_ID="c0e2bf01-4b08-4fd5-ac7b-8e26b58cd236" -REACT_APP_FORTMATIC_KEY="pk_live_F937DF033A1666BF" +REACT_APP_FORTMATIC_KEY="pk_live_9E53F9A29112A9FC" +REACT_APP_FORTMATIC_KEY_BARN="pk_live_C0DA025E15EBF895" +REACT_APP_FORTMATIC_KEY_PROD="pk_live_7BD8004CBBF5CDD6" # Domain regex (to detect environment) REACT_APP_DOMAIN_REGEX_LOCAL="^(:?localhost:\d{2,5}|(?:127|192)(?:\.[0-9]{1,3}){3})" diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml new file mode 100644 index 000000000..1cef9f4a7 --- /dev/null +++ b/.github/workflows/cla.yml @@ -0,0 +1,26 @@ +name: 'CLA Assistant' +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened, closed, synchronize] + +jobs: + CLAssistant: + runs-on: ubuntu-latest + steps: + - name: 'CLA Assistant' + if: github.base_ref != 'main' && ((github.event.comment.body == 'recheckcla' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target') + # Alpha Release + uses: gnosis/github-action@master + # GitHub token, automatically provided to the action + # (No need to define this secret in the repo settings) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + path-to-signatures: 'signatures/version1/cla.json' + path-to-cla-document: 'https://github.com/gnosis/cowswap/blob/develop/docs/GNOSIS_CLA.md' + branch: 'cla-signatures' + allowlist: dependabot,mergify,alfetopito,anxolin,W3stside,nenadV91,biocom,annamsgeorge,avsavsavs,biocom,c3rnst,cmagan,josojo,davidalbela,fedgiac,fleupold,giacomolicari,GabrielCamba,nlordell,alongoni,elena-zh,henrypalacios,matextrem,ramirotw + empty-commit-flag: false + blockchain-storage-flag: false diff --git a/craco.config.js b/craco.config.js index 84996720b..527173df0 100644 --- a/craco.config.js +++ b/craco.config.js @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ const path = require('path') const SentryWebpackPlugin = require('@sentry/webpack-plugin') +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin const { version } = require('./package.json') // see https://github.com/gsoft-inc/craco/blob/master/packages/craco/README.md#configuration-overview @@ -8,6 +9,11 @@ const { version } = require('./package.json') const plugins = [] const SENTRY_AUTH_TOKEN = process.env.REACT_APP_SENTRY_AUTH_TOKEN const SENTRY_RELEASE_VERSION = 'CowSwap@v' + version +const ANALYZE_BUNDLE = process.env.REACT_APP_ANALYZE_BUNDLE + +if (ANALYZE_BUNDLE) { + plugins.push(new BundleAnalyzerPlugin()) +} if (SENTRY_AUTH_TOKEN) { plugins.push( @@ -42,6 +48,7 @@ module.exports = { plugins, alias: { '@src': path.resolve(__dirname, 'src'), + 'bn.js': path.resolve(__dirname, 'node_modules/bn.js/lib/bn.js'), }, // https://webpack.js.org/configuration configure: (webpackConfig) => ({ diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 5e8455c57..3957854dc 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -20,6 +20,8 @@ export const TEST_ADDRESS_NEVER_USE_SHORTENED = `${TEST_ADDRESS_NEVER_USE.substr 6 )}...${TEST_ADDRESS_NEVER_USE.substr(-4, 4)}` +// Redefined bridge to fix a supper annoying issue making some contract calls to fail +// See https://github.com/ethers-io/ethers.js/issues/1683 class CustomizedBridge extends Eip1193Bridge { chainId = 4 @@ -41,6 +43,7 @@ class CustomizedBridge extends Eip1193Bridge { method = args[0] params = args[1] } + // Mock out request accounts and chainId if (method === 'eth_requestAccounts' || method === 'eth_accounts') { if (isCallbackForm) { callback({ result: [TEST_ADDRESS_NEVER_USE] }) @@ -56,7 +59,33 @@ class CustomizedBridge extends Eip1193Bridge { } } try { - const result = await super.send(method, params) + // If from is present on eth_call it errors, removing it makes the library set + // from as the connected wallet which works fine + if (params && params.length && params[0].from && method === 'eth_call') delete params[0].from + let result + // For sending a transaction if we call send it will error + // as it wants gasLimit in sendTransaction but hexlify sets the property gas + // to gasLimit which makes sensd transaction error. + // This have taken the code from the super method for sendTransaction and altered + // it slightly to make it work with the gas limit issues. + if (params && params.length && params[0].from && method === 'eth_sendTransaction') { + // Hexlify will not take gas, must be gasLimit, set this property to be gasLimit + params[0].gasLimit = params[0].gas + delete params[0].gas + // If from is present on eth_sendTransaction it errors, removing it makes the library set + // from as the connected wallet which works fine + delete params[0].from + const req = ethers.providers.JsonRpcProvider.hexlifyTransaction(params[0]) + // Hexlify sets the gasLimit property to be gas again and send transaction requires gasLimit + req.gasLimit = req.gas + delete req.gas + // Send the transaction + const tx = await this.signer.sendTransaction(req) + result = tx.hash + } else { + // All other transactions the base class works for + result = await super.send(method, params) + } console.debug('result received', method, params, result) if (isCallbackForm) { callback(null, { result }) @@ -64,6 +93,7 @@ class CustomizedBridge extends Eip1193Bridge { return result } } catch (error) { + console.log(error) if (isCallbackForm) { callback(error, null) } else { diff --git a/docs/GNOSIS_CLA.md b/docs/GNOSIS_CLA.md new file mode 100644 index 000000000..723c27e68 --- /dev/null +++ b/docs/GNOSIS_CLA.md @@ -0,0 +1,23 @@ +### Gnosis Contributor License Agreement + +Thank you for your interest in contributing to open source software projects (“Projects”) made available by Gnosis Ltd or its affiliates (“Gnosis”). This Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Gnosis in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact legal@gnosis.io. + +You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions. + +**Copyright License.** You hereby grant, and agree to grant, to Gnosis a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-free, transferable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute your Contributions and such derivative works, with the right to sublicense the foregoing rights through multiple tiers of sublicensees. + +**Patent License.** You hereby grant, and agree to grant, to Gnosis a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-free, transferable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer your Contributions, where such license applies only to those patent claims licensable by you that are necessarily infringed by your Contributions alone or by combination of your Contributions with the Project to which such Contributions were submitted, with the right to sublicense the foregoing rights through multiple tiers of sublicensees. + +**Moral Rights.** To the fullest extent permitted under applicable law, you hereby waive, and agree not to assert, all of your “moral rights” in or relating to your Contributions for the benefit of Gnosis, its assigns, and their respective direct and indirect sublicensees. + +**Third Party Content/Rights.** If your Contribution includes or is based on any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that were not authored by you (“Third Party Content”) or if you are aware of any third party intellectual property or proprietary rights associated with your Contribution (“Third Party Rights”), then you agree to include with the submission of your Contribution full details respecting such Third Party Content and Third Party Rights. + +**Representations.** You represent that, other than the Third Party Content and Third Party Rights identified by you in accordance with this Agreement, you are the sole author of your Contributions and are legally entitled to grant the foregoing licenses and waivers in respect of your Contributions. If your Contributions were created in the course of your employment with your past or present employer(s), you represent that such employer(s) has authorized you to make your Contributions on behalf of such employer(s) or such employer(s) has waived all of their right, title or interest in or to your Contributions. + +**Disclaimer.** To the fullest extent permitted under applicable law, your Contributions are provided on an "as-is" basis, without any warranties or conditions, express or implied, including, without limitation, any implied warranties or conditions of non-infringement, merchantability or fitness for a particular purpose. You are not required to provide support for your Contributions, except to the extent you desire to provide support. + +**No Obligation.** You acknowledge that Gnosis is under no obligation to use or incorporate your Contributions into any of the Projects. The decision to use or incorporate your Contributions into any of the Projects will be made at the sole discretion of Gnosis or its authorized delegates. + +**Disputes.** This Agreement shall be governed by and construed in accordance with the laws of the State of New York, United States of America, without giving effect to its principles or rules regarding conflicts of laws, other than such principles directing application of New York law. The parties hereby submit to venue in, and jurisdiction of the courts located in New York, New York for purposes relating to this Agreement. In the event that any of the provisions of this Agreement shall be held by a court or other tribunal of competent jurisdiction to be unenforceable, the remaining portions hereof shall remain in full force and effect. + +**Assignment.** You agree that Gnosis may assign this Agreement, and all of its rights, obligations and licenses hereunder. diff --git a/package.json b/package.json index b531bfcb8..63ba81f08 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@web3-react/injected-connector": "^6.0.7", "@web3-react/portis-connector": "^6.1.9", "@web3-react/walletconnect-connector": "6.2.4", - "@web3-react/walletlink-connector": "^6.2.5", + "@web3-react/walletlink-connector": "^6.2.12", "ajv": "^6.12.3", "array.prototype.flat": "^1.2.4", "array.prototype.flatmap": "^1.2.4", @@ -150,6 +150,10 @@ "use-count-up": "^2.2.5", "wcag-contrast": "^3.0.0", "web-vitals": "^2.1.0", + "web3": "^1.7.0", + "web3-providers-http": "^1.7.0", + "web3-providers-ws": "^1.7.0", + "webpack-bundle-analyzer": "^4.5.0", "workbox-core": "^6.1.0", "workbox-precaching": "^6.1.0", "workbox-routing": "^6.1.0" @@ -164,6 +168,7 @@ "start:service-worker": "yarn build && yarn serve", "mock": "REACT_APP_MOCK=true yarn start", "build": "yarn i18n:compile && craco build && yarn writeVersion", + "build:analyze": "cross-env REACT_APP_ANALYZE_BUNDLE=true yarn craco build && yarn writeVersion", "ipfs:build": "cross-env PUBLIC_URL=\".\" yarn build", "ipfs:publish": "ipfs-deploy build -p infura -O", "test": "NODE_PATH=src/custom craco test --env=jsdom", @@ -215,7 +220,6 @@ "@gnosis.pm/dex-js": "^0.14.0", "@gnosis.pm/gp-v2-contracts": "^1.1.2", "@gnosis.pm/safe-service-client": "^0.1.1", - "@pinata/sdk": "^1.1.23", "@sentry/react": "^6.11.0", "@sentry/tracing": "^6.11.0", "@uniswap/default-token-list": "^2.0.0", @@ -223,8 +227,9 @@ "bnc-sdk": "^3.5.0", "fast-safe-stringify": "^2.0.8", "firebase": "^9.1.3", + "fortmatic": "^2.2.1", "ipfs-http-client": "^52.0.3", - "paraswap": "^5.0.1", + "paraswap": "npm:@nenad91/paraswap#5.1.0", "react-appzi": "^1.0.4", "react-inlinesvg": "^2.3.0", "react-router-hash-link": "^2.4.0", diff --git a/src/constants/wallet.ts b/src/constants/wallet.ts index f3f81286e..2728c0f25 100644 --- a/src/constants/wallet.ts +++ b/src/constants/wallet.ts @@ -53,15 +53,7 @@ export const SUPPORTED_WALLETS: { [key: string]: WalletInfo } = { description: 'Use Coinbase Wallet app on mobile device', href: null, color: '#315CF5', - }, - COINBASE_LINK: { - name: 'Open in Coinbase Wallet', - iconURL: COINBASE_ICON_URL, - description: 'Open in Coinbase Wallet app.', - href: 'https://go.cb-w.com/mtUDhEZPy1', - color: '#315CF5', mobile: true, - mobileOnly: true, }, FORTMATIC: { connector: fortmatic, diff --git a/src/custom/api/gnosisProtocol/api.ts b/src/custom/api/gnosisProtocol/api.ts index 8c15423c3..e8c0abbae 100644 --- a/src/custom/api/gnosisProtocol/api.ts +++ b/src/custom/api/gnosisProtocol/api.ts @@ -308,7 +308,7 @@ async function _handleQuoteResponse( } function _mapNewToLegacyParams(params: FeeQuoteParams): QuoteQuery { - const { amount, kind, userAddress, receiver, validTo, sellToken, buyToken, chainId } = params + const { amount, kind, userAddress, receiver, validTo, sellToken, buyToken, chainId, priceQuality } = params const fallbackAddress = userAddress || ZERO_ADDRESS const baseParams = { @@ -320,6 +320,7 @@ function _mapNewToLegacyParams(params: FeeQuoteParams): QuoteQuery { appData: getAppDataHash(), validTo, partiallyFillable: false, + priceQuality, } const finalParams: QuoteQuery = diff --git a/src/custom/api/gnosisProtocol/errors/OperatorError.ts b/src/custom/api/gnosisProtocol/errors/OperatorError.ts index 7e1249f87..a713633a3 100644 --- a/src/custom/api/gnosisProtocol/errors/OperatorError.ts +++ b/src/custom/api/gnosisProtocol/errors/OperatorError.ts @@ -7,9 +7,9 @@ export interface ApiErrorObject { } // Conforms to backend API -// https://github.com/gnosis/gp-v2-services/blob/d932e11c9a2125fdba239530be7684799f694909/crates/orderbook/openapi.yml#L801 +// https://github.com/gnosis/gp-v2-services/blob/main/crates/orderbook/openapi.yml#L801 // and -// https://github.com/gnosis/gp-v2-services/blob/d932e11c9a2125fdba239530be7684799f694909/crates/orderbook/openapi.yml#L740 +// https://github.com/gnosis/gp-v2-services/blob/main/crates/orderbook/openapi.yml#L740 export enum ApiErrorCodes { DuplicateOrder = 'DuplicateOrder', InvalidSignature = 'InvalidSignature', @@ -29,6 +29,12 @@ export enum ApiErrorCodes { AmountIsZero = 'AmountIsZero', SellAmountDoesNotCoverFee = 'SellAmountDoesNotCoverFee', TransferEthToContract = 'TransferEthToContract', + TransferSimulationFailed = 'TransferSimulationFailed', + SameBuyAndSellToken = 'SameBuyAndSellToken', + ZeroAmount = 'ZeroAmount', + UnsupportedBuyTokenDestination = 'UnsupportedBuyTokenDestination', + UnsupportedSellTokenSource = 'UnsupportedSellTokenSource', + UnsupportedOrderType = 'UnsupportedOrderType', UNHANDLED_GET_ERROR = 'UNHANDLED_GET_ERROR', UNHANDLED_CREATE_ERROR = 'UNHANDLED_CREATE_ERROR', UNHANDLED_DELETE_ERROR = 'UNHANDLED_DELETE_ERROR', @@ -38,24 +44,30 @@ export enum ApiErrorCodeDetails { DuplicateOrder = 'There was another identical order already submitted. Please try again.', InsufficientFee = "The signed fee is insufficient. It's possible that is higher now due to a change in the gas price, ether price, or the sell token price. Please try again to get an updated fee quote.", InvalidSignature = 'The order signature is invalid. Check whether your Wallet app supports off-chain signing.', - MissingOrderData = 'The order has missing information', + MissingOrderData = 'The order has missing information.', InsufficientValidTo = 'The order you are signing is already expired. This can happen if you set a short expiration in the settings and waited too long before signing the transaction. Please try again.', - InsufficientAllowance = "The account doesn't have enough funds", - InsufficientBalance = 'The account needs to approve the selling token in order to trade', + InsufficientAllowance = "The account doesn't have enough funds.", + InsufficientBalance = 'The account needs to approve the selling token in order to trade.', WrongOwner = "The signature is invalid.\n\nIt's likely that the signing method provided by your wallet doesn't comply with the standards required by CowSwap.\n\nCheck whether your Wallet app supports off-chain signing (EIP-712 or ETHSIGN).", - NotFound = 'Token pair selected has insufficient liquidity', - OrderNotFound = 'The order you are trying to cancel does not exist', - AlreadyCancelled = 'Order is already cancelled', - OrderFullyExecuted = 'Order is already filled', - OrderExpired = 'Order is expired', - NoLiquidity = 'Token pair selected has insufficient liquidity', + NotFound = 'Token pair selected has insufficient liquidity.', + OrderNotFound = 'The order you are trying to cancel does not exist.', + AlreadyCancelled = 'Order is already cancelled.', + OrderFullyExecuted = 'Order is already filled.', + OrderExpired = 'Order is expired.', + NoLiquidity = 'Token pair selected has insufficient liquidity.', UnsupportedToken = 'One of the tokens you are trading is unsupported. Please read the FAQ for more info.', - AmountIsZero = 'Amount is zero', - SellAmountDoesNotCoverFee = 'Sell amount does not sufficiently cover the current fee', - TransferEthToContract = 'Sending the native currency to smart contract wallets is not currently supported', + AmountIsZero = 'Amount is zero.', + SellAmountDoesNotCoverFee = 'Sell amount does not sufficiently cover the current fee.', + TransferEthToContract = 'Sending native currency to smart contract wallets is not currently supported.', + TransferSimulationFailed = 'Transfer simulation of native currency failed. This is likely due to the current unsupported state of smart contract wallets.', + SameBuyAndSellToken = 'Sell and buy token can not be the same.', + ZeroAmount = 'Order amount cannot be zero.', + UnsupportedBuyTokenDestination = 'Buy token destination is unsupported. Please try again with a different destination.', + UnsupportedSellTokenSource = 'Sell token source is unsupported. Please try again with a different source.', + UnsupportedOrderType = 'Order type unsupported. Please try again with a different order type.', UNHANDLED_GET_ERROR = 'Order fetch failed. This may be due to a server or network connectivity issue. Please try again later.', - UNHANDLED_CREATE_ERROR = 'The order was not accepted by the network', - UNHANDLED_DELETE_ERROR = 'The order cancellation was not accepted by the network', + UNHANDLED_CREATE_ERROR = 'The order was not accepted by the network.', + UNHANDLED_DELETE_ERROR = 'The order cancellation was not accepted by the network.', } function _mapActionToErrorDetail(action?: ApiActionType) { diff --git a/src/custom/api/gnosisProtocol/errors/QuoteError.ts b/src/custom/api/gnosisProtocol/errors/QuoteError.ts index 3a9c6eac9..1be40c066 100644 --- a/src/custom/api/gnosisProtocol/errors/QuoteError.ts +++ b/src/custom/api/gnosisProtocol/errors/QuoteError.ts @@ -7,20 +7,22 @@ export interface GpQuoteErrorObject { } // Conforms to backend API -// https://github.com/gnosis/gp-v2-services/blob/0bd5f7743bebaa5acd3be13e35ede2326a096f14/orderbook/openapi.yml#L562 +// https://github.com/gnosis/gp-v2-services/blob/main/crates/orderbook/openapi.yml export enum GpQuoteErrorCodes { UnsupportedToken = 'UnsupportedToken', InsufficientLiquidity = 'InsufficientLiquidity', FeeExceedsFrom = 'FeeExceedsFrom', ZeroPrice = 'ZeroPrice', + TransferEthToContract = 'TransferEthToContract', UNHANDLED_ERROR = 'UNHANDLED_ERROR', } export enum GpQuoteErrorDetails { UnsupportedToken = 'One of the tokens you are trading is unsupported. Please read the FAQ for more info.', - InsufficientLiquidity = 'Token pair selected has insufficient liquidity', - FeeExceedsFrom = 'Current fee exceeds entered "from" amount', + InsufficientLiquidity = 'Token pair selected has insufficient liquidity.', + FeeExceedsFrom = 'Current fee exceeds entered "from" amount.', ZeroPrice = 'Quoted price is zero. This is likely due to a significant price difference between the two tokens. Please try increasing amounts.', + TransferEthToContract = 'Buying native currencies using smart contract wallets is not currently supported.', UNHANDLED_ERROR = 'Quote fetch failed. This may be due to a server or network connectivity issue. Please try again later.', } @@ -50,6 +52,12 @@ export function mapOperatorErrorToQuoteError(error?: ApiErrorObject): GpQuoteErr errorType: GpQuoteErrorCodes.FeeExceedsFrom, description: error.description, } + + case ApiErrorCodes.TransferEthToContract: + return { + errorType: GpQuoteErrorCodes.TransferEthToContract, + description: error.description, + } default: return { errorType: GpQuoteErrorCodes.UNHANDLED_ERROR, description: GpQuoteErrorDetails.UNHANDLED_ERROR } } diff --git a/src/custom/api/ipfs/index.ts b/src/custom/api/ipfs/index.ts index 8ac83f651..0bf3f8f56 100644 --- a/src/custom/api/ipfs/index.ts +++ b/src/custom/api/ipfs/index.ts @@ -1,8 +1,37 @@ -import pinataSDK, { PinataPinResponse } from '@pinata/sdk' -import { PINATA_API_KEY, PINATA_SECRET_API_KEY } from 'constants/ipfs' +import { PINATA_API_KEY, PINATA_SECRET_API_KEY, PINATA_API_URL } from 'constants/ipfs' -const pinata = pinataSDK(PINATA_API_KEY, PINATA_SECRET_API_KEY) +type PinataPinResponse = { + IpfsHash: string + PinSize: number + Timestamp: string +} + +const pinataUrl = `${PINATA_API_URL}/pinning/pinJSONToIPFS` + +const headers = new Headers({ + 'Content-Type': 'application/json', + pinata_api_key: PINATA_API_KEY, + pinata_secret_api_key: PINATA_SECRET_API_KEY, +}) export async function pinJSONToIPFS(file: any): Promise { - return pinata.pinJSONToIPFS(file, { pinataMetadata: { name: 'appData-affiliate' } }) + const body = JSON.stringify({ + pinataContent: file, + pinataMetadata: { name: 'appData-affiliate' }, + }) + + const request = new Request(pinataUrl, { + method: 'POST', + headers, + body, + }) + + const response = await fetch(request) + const data = await response.json() + + if (response.status !== 200) { + throw new Error(data.error.details || data.error) + } + + return data } diff --git a/src/custom/components/AccountDetails/index.tsx b/src/custom/components/AccountDetails/index.tsx index 3bd185862..d6c89aa46 100644 --- a/src/custom/components/AccountDetails/index.tsx +++ b/src/custom/components/AccountDetails/index.tsx @@ -222,7 +222,7 @@ export default function AccountDetails({
Recent Activity {`(${activityTotalCount})`}
- {explorerOrdersLink && View all orders} + {explorerOrdersLink && View all orders ↗}
@@ -233,7 +233,7 @@ export default function AccountDetails({ {renderActivities(activities)} ))} - {explorerOrdersLink && View all orders} + {explorerOrdersLink && View all orders ↗}
) : ( diff --git a/src/custom/components/AffiliateStatusCheck/index.tsx b/src/custom/components/AffiliateStatusCheck/index.tsx index a9bd872bd..1e60187ea 100644 --- a/src/custom/components/AffiliateStatusCheck/index.tsx +++ b/src/custom/components/AffiliateStatusCheck/index.tsx @@ -13,16 +13,14 @@ import useParseReferralQueryParam from 'hooks/useParseReferralQueryParam' import useRecentActivity from 'hooks/useRecentActivity' import { OrderStatus } from 'state/orders/actions' -type AffiliateStatus = 'NOT_CONNECTED' | 'OWN_LINK' | 'ALREADY_TRADED' | 'ACTIVE' | 'UNSUPPORTED_NETWORK' +type AffiliateStatus = 'NOT_CONNECTED' | 'OWN_LINK' | 'ACTIVE' | 'UNSUPPORTED_NETWORK' const STATUS_TO_MESSAGE_MAPPING: Record = { NOT_CONNECTED: 'Affiliate program: Please connect your wallet to participate.', OWN_LINK: - 'Affiliate program: Your affiliate code works! Any new user following this link would credit you their trading volume.', - ALREADY_TRADED: - 'Invalid affiliate code: The currently connected wallet has traded before or is already part of the affiliate program.', - ACTIVE: 'Valid affiliate code: You can now do your first trade to join the program.', - UNSUPPORTED_NETWORK: 'Affiliate program: Only Mainnet is supported. Please change the network to participate.', + 'Affiliate program: Your affiliate code works! By sharing it, others would credit you their trading volume.', + ACTIVE: 'Valid affiliate code: Please do your first trade to join the program!', + UNSUPPORTED_NETWORK: 'Affiliate program works in Ethereum only. Please change the network to participate.', } const DEFAULT_RETRY_OPTIONS: RetryOptions = { n: 3, minWait: 1000, maxWait: 3000 } @@ -59,7 +57,7 @@ export default function AffiliateStatusCheck() { } if (!referralAddress.isValid) { - setError('The referral address is invalid.') + setError('Affiliate program: The referral address is invalid.') return } @@ -75,14 +73,14 @@ export default function AffiliateStatusCheck() { // we first validate that the user hasn't already traded const userHasTrades = await retry(() => hasTrades(chainId, account), DEFAULT_RETRY_OPTIONS).promise if (userHasTrades) { - setAffiliateState('ALREADY_TRADED') return } } catch (error) { console.error(error) - setError('There was an error validating existing trades. Please try again later.') + setError('Affiliate program: There was an error loading trades. Please try again later.') return } + setAffiliateState('ACTIVE') isFirstTrade.current = true }, [referralAddress, chainId, account, fulfilledActivity.length, history, resetReferralAddress]) @@ -95,7 +93,7 @@ export default function AffiliateStatusCheck() { appDispatch(updateAppDataHash(appDataHash)) } catch (e) { console.error(e) - setError('There was an error while uploading the referral document to IPFS. Please try again later.') + setError('Affiliate program: There was an error while uploading your referral data. Please try again later.') } } if (affiliateState === 'ACTIVE') handleReferralAddress(referralAddress) @@ -135,7 +133,7 @@ export default function AffiliateStatusCheck() { if (error) { return ( - Affiliate program error: {error} + {error} ) } diff --git a/src/custom/components/ArrowWrapperLoader/index.tsx b/src/custom/components/ArrowWrapperLoader/index.tsx index bc18da974..e81628ede 100644 --- a/src/custom/components/ArrowWrapperLoader/index.tsx +++ b/src/custom/components/ArrowWrapperLoader/index.tsx @@ -1,9 +1,10 @@ +import { useMemo } from 'react' import styled from 'styled-components/macro' import loadingCowGif from 'assets/cow-swap/cow-load.gif' import { ArrowDown } from 'react-feather' import useLoadingWithTimeout from 'hooks/useLoadingWithTimeout' -import { useIsQuoteRefreshing } from 'state/price/hooks' -import { LONG_LOAD_THRESHOLD } from 'constants/index' +import { useIsQuoteRefreshing, useIsBestQuoteLoading } from 'state/price/hooks' +import { LONG_LOAD_THRESHOLD, SHORT_LOAD_THRESHOLD } from 'constants/index' interface ShowLoaderProp { showloader: boolean @@ -120,12 +121,21 @@ export interface ArrowWrapperLoaderProps { export function ArrowWrapperLoader({ onSwitchTokens, setApprovalSubmitted }: ArrowWrapperLoaderProps) { const isRefreshingQuote = useIsQuoteRefreshing() - const showLoader = useLoadingWithTimeout(isRefreshingQuote, LONG_LOAD_THRESHOLD) + const isBestQuoteLoading = useIsBestQuoteLoading() + + const showCowLoader = useLoadingWithTimeout(isRefreshingQuote, LONG_LOAD_THRESHOLD) + const showQuoteLoader = useLoadingWithTimeout(isBestQuoteLoading, SHORT_LOAD_THRESHOLD) + const handleClick = () => { setApprovalSubmitted(false) // reset 2 step UI for approvals onSwitchTokens() } + const showLoader = useMemo( + () => Boolean(loadingCowGif) && (showCowLoader || showQuoteLoader), + [showCowLoader, showQuoteLoader] + ) + return ( diff --git a/src/custom/components/Menu/index.tsx b/src/custom/components/Menu/index.tsx index 96a638dc4..d0e9bf20e 100644 --- a/src/custom/components/Menu/index.tsx +++ b/src/custom/components/Menu/index.tsx @@ -214,12 +214,11 @@ const MenuFlyout = styled(MenuFlyoutUni)` height: 18px; object-fit: contain; margin: 0 8px 0 0; - - > path { - fill: ${({ theme }) => theme.text1}; - } } ` +export const StyledSVG = styled(SVG)` + fill: ${({ theme }) => theme.text1}; +` export const Separator = styled(SeparatorBase)` background-color: ${({ theme }) => theme.disabled}; @@ -333,19 +332,27 @@ export function Menu({ darkMode, toggleDarkMode, isClaimPage }: MenuProps) { Code + {showOrdersLink && ( + + + + )} @@ -364,14 +371,6 @@ export function Menu({ darkMode, toggleDarkMode, isClaimPage }: MenuProps) { {' '} Cow Runner - {showOrdersLink && ( - - - - )} toggleDarkMode()}> {darkMode ? ( <> diff --git a/src/custom/components/SearchModal/CommonBases/index.ts b/src/custom/components/SearchModal/CommonBases/index.ts index f76a053b3..13d339ae8 100644 --- a/src/custom/components/SearchModal/CommonBases/index.ts +++ b/src/custom/components/SearchModal/CommonBases/index.ts @@ -30,7 +30,7 @@ export const AutoColumn = styled(AutoColumnUni)` export const MobileWrapper = styled(AutoColumn)` ${({ theme }) => theme.mediaWidth.upToSmall` - isplay: none; + /* isplay: none; */ `}; ` @@ -45,6 +45,21 @@ export const CommonBasesRow = styled(AutoRow)` overflow-x: scroll; padding: 0 100px 0 0; position: relative; + scrollbar-color: ${({ theme }) => theme.scrollbarThumb} ${({ theme }) => theme.scrollbarBg}; + scroll-behavior: smooth; + + &::-webkit-scrollbar { + height: 10px; + background: ${({ theme }) => theme.scrollbarBg}; + border-radius: 10px; + } + + &::-webkit-scrollbar-thumb { + background: ${({ theme }) => theme.scrollbarThumb}; + border: 3px solid transparent; + border-radius: 10px; + background-clip: padding-box; + } `} ` diff --git a/src/custom/components/SearchModal/CurrencyList/CurrencyListMod.tsx b/src/custom/components/SearchModal/CurrencyList/CurrencyListMod.tsx index 0c8064863..b7a73d5e7 100644 --- a/src/custom/components/SearchModal/CurrencyList/CurrencyListMod.tsx +++ b/src/custom/components/SearchModal/CurrencyList/CurrencyListMod.tsx @@ -78,6 +78,24 @@ export const TokenListLogoWrapper = styled.img` height: 20px; ` +export const StyledScrollarea = styled.div` + div:first-of-type { + overflow-y: auto; + scrollbar-color: ${({ theme }) => `${theme.card.border} ${theme.card.background2}`}; + scroll-behavior: smooth; + + &::-webkit-scrollbar { + width: 10px; + background: ${({ theme }) => `${theme.card.background2}`} !important; + } + &::-webkit-scrollbar-thumb { + background: ${({ theme }) => `${theme.card.border}`} !important; + border: 3px solid transparent; + border-radius: 14px; + background-clip: padding-box; + } +` + function TokenTags({ currency }: { currency: Currency }) { if (!(currency instanceof WrappedTokenInfo)) { return @@ -299,16 +317,18 @@ export default function CurrencyList({ }, []) return ( - - {Row} - + + + {Row} + + ) } diff --git a/src/custom/components/SearchModal/ManageLists/ManageListsMod.tsx b/src/custom/components/SearchModal/ManageLists/ManageListsMod.tsx index c5c1028d8..5e43692d3 100644 --- a/src/custom/components/SearchModal/ManageLists/ManageListsMod.tsx +++ b/src/custom/components/SearchModal/ManageLists/ManageListsMod.tsx @@ -247,8 +247,21 @@ ListRowProps & { listUrl: string }) { export const ListContainer = styled.div` padding: 1rem; height: 100%; - overflow: auto; padding-bottom: 80px; + overflow-y: auto; + scrollbar-color: ${({ theme }) => `${theme.card.border} ${theme.card.background2}`}; + scroll-behavior: smooth; + + &::-webkit-scrollbar { + width: 10px; + background: ${({ theme }) => `${theme.card.background2}`} !important; + } + &::-webkit-scrollbar-thumb { + background: ${({ theme }) => `${theme.card.border}`} !important; + border: 3px solid transparent; + border-radius: 14px; + background-clip: padding-box; + } ` export function ManageLists({ diff --git a/src/custom/components/TransactionConfirmationModal/TransactionConfirmationModalMod.tsx b/src/custom/components/TransactionConfirmationModal/TransactionConfirmationModalMod.tsx index 49de5f5ee..b1833827d 100644 --- a/src/custom/components/TransactionConfirmationModal/TransactionConfirmationModalMod.tsx +++ b/src/custom/components/TransactionConfirmationModal/TransactionConfirmationModalMod.tsx @@ -47,6 +47,26 @@ const Wrapper = styled.div` display: flex; /* MOD */ flex-flow: column nowrap; /* MOD */ overflow-y: auto; /* MOD */ + scrollbar-color: ${({ theme }) => `${theme.card.border} ${theme.card.background2}`}; + scroll-behavior: smooth; + + &::-webkit-scrollbar { + width: 14px; + background: ${({ theme }) => `${theme.card.background2}`}; + } + + &::-webkit-scrollbar-thumb { + background: ${({ theme }) => `${theme.card.border}`}; + border: 3px solid transparent; + border-radius: 14px; + background-clip: padding-box; + } + + &::-webkit-resizer, + &::-webkit-scrollbar-button, + &::-webkit-scrollbar-corner { + height: 6px; + } ` const Section = styled(AutoColumn)<{ inline?: boolean }>` padding: ${({ inline }) => (inline ? '0' : '0')}; diff --git a/src/custom/components/WalletModal/WalletModalMod.tsx b/src/custom/components/WalletModal/WalletModalMod.tsx index 0f3d863c6..b4f2cc74c 100644 --- a/src/custom/components/WalletModal/WalletModalMod.tsx +++ b/src/custom/components/WalletModal/WalletModalMod.tsx @@ -10,8 +10,8 @@ import styled from 'styled-components/macro' import MetamaskIcon from 'assets/images/metamask.png' import { ReactComponent as Close } from 'assets/images/x.svg' -import { fortmatic, injected, portis } from 'connectors' -import { OVERLAY_READY } from 'connectors/Fortmatic' +import { injected, portis } from 'connectors' +// import { OVERLAY_READY } from 'connectors/Fortmatic' import { SUPPORTED_WALLETS } from 'constants/index' import usePrevious from 'hooks/usePrevious' import { useModalOpen, useWalletModalToggle } from 'state/application/hooks' @@ -229,11 +229,11 @@ export default function WalletModal({ } // close wallet modal if fortmatic modal is active - useEffect(() => { - fortmatic.on(OVERLAY_READY, () => { - toggleWalletModal() - }) - }, [toggleWalletModal]) + // useEffect(() => { + // fortmatic.on(OVERLAY_READY, () => { + // toggleWalletModal() + // }) + // }, [toggleWalletModal]) // get wallets user can switch too, depending on device/browser function getOptions() { diff --git a/src/custom/components/Web3Status/Web3StatusMod.tsx b/src/custom/components/Web3Status/Web3StatusMod.tsx index 476fb65ff..5a1ea3b62 100644 --- a/src/custom/components/Web3Status/Web3StatusMod.tsx +++ b/src/custom/components/Web3Status/Web3StatusMod.tsx @@ -88,19 +88,30 @@ const Web3StatusConnect = styled(Web3StatusGeneric)<{ faded?: boolean }>` `} ` -export const Web3StatusConnected = styled(Web3StatusGeneric)<{ pending?: boolean }>` +export const Web3StatusConnected = styled(Web3StatusGeneric)<{ pending?: boolean; clickDisabled?: boolean }>` background-color: ${({ pending, theme }) => (pending ? theme.primary1 : theme.bg2)}; border: 1px solid ${({ pending, theme }) => (pending ? theme.primary1 : theme.bg3)}; color: ${({ pending, theme }) => (pending ? theme.white : theme.text1)}; font-weight: 500; - :hover, - :focus { - background-color: ${({ pending, theme }) => (pending ? darken(0.05, theme.primary1) : lighten(0.05, theme.bg2))}; - :focus { - border: 1px solid ${({ pending, theme }) => (pending ? darken(0.1, theme.primary1) : darken(0.1, theme.bg3))}; - } - } + ${({ clickDisabled }) => + clickDisabled && + css` + cursor: not-allowed; + `} + + ${({ clickDisabled, pending }) => + !clickDisabled && + css` + :hover, + :focus { + background-color: ${({ theme }) => (pending ? darken(0.05, theme.primary1) : lighten(0.05, theme.bg2))}; + + :focus { + border: 1px solid ${({ theme }) => (pending ? darken(0.1, theme.primary1) : darken(0.1, theme.bg3))}; + } + } + `} ` export const Text = styled.p` @@ -172,10 +183,12 @@ export function Web3StatusInner({ pendingCount, StatusIconComponent, openOrdersPanel, // mod + thereWasAProvider, //mod }: { pendingCount?: number StatusIconComponent: (props: { connector: AbstractConnector }) => JSX.Element | null openOrdersPanel: () => void // mod + thereWasAProvider: boolean //mod }) { const { account, connector, error } = useWeb3React() @@ -230,6 +243,17 @@ export function Web3StatusInner({ {error instanceof UnsupportedChainIdError ? Wrong Network : Error} ) + } else if (thereWasAProvider) { + return ( + + + + Connecting... + {' '} + + + + ) } else { return ( diff --git a/src/custom/components/Web3Status/index.tsx b/src/custom/components/Web3Status/index.tsx index 3e4c0aa23..fdcef45c7 100644 --- a/src/custom/components/Web3Status/index.tsx +++ b/src/custom/components/Web3Status/index.tsx @@ -8,6 +8,7 @@ import useRecentActivity, { TransactionAndOrder } from 'hooks/useRecentActivity' import { useWalletInfo } from 'hooks/useWalletInfo' import { ButtonSecondary } from 'components/Button' import { OrderStatus } from '@src/custom/state/orders/actions' +import { STORAGE_KEY_LAST_PROVIDER } from 'constants/index' export const Wrapper = styled.div` color: ${({ theme }) => theme.wallet?.color}; @@ -72,7 +73,7 @@ interface Web3StatusProps { export default function Web3Status({ openOrdersPanel }: Web3StatusProps) { const walletInfo = useWalletInfo() - + const latestProvider = localStorage.getItem(STORAGE_KEY_LAST_PROVIDER) // Returns all RECENT (last day) transaction and orders in 2 arrays: pending and confirmed const allRecentActivity = useRecentActivity() @@ -88,7 +89,7 @@ export default function Web3Status({ openOrdersPanel }: Web3StatusProps) { }, [allRecentActivity]) const { active, activeNetwork, ensName } = walletInfo - if (!activeNetwork && !active) { + if (!activeNetwork && !active && !latestProvider) { return null } @@ -98,6 +99,7 @@ export default function Web3Status({ openOrdersPanel }: Web3StatusProps) { pendingCount={pendingActivity.length} StatusIconComponent={StatusIcon} openOrdersPanel={openOrdersPanel} + thereWasAProvider={!!latestProvider} /> diff --git a/src/custom/connectors/Fortmatic.ts b/src/custom/connectors/Fortmatic.ts new file mode 100644 index 000000000..cf75c87f9 --- /dev/null +++ b/src/custom/connectors/Fortmatic.ts @@ -0,0 +1,56 @@ +import { FortmaticConnector as FortmaticConnectorCore } from '@web3-react/fortmatic-connector' +import { isProd, isBarn } from 'utils/environments' +import { SupportedChainId } from 'constants/chains' + +export const OVERLAY_READY = 'OVERLAY_READY' + +type FormaticSupportedChains = SupportedChainId.MAINNET | SupportedChainId.RINKEBY + +const CHAIN_ID_NETWORK_ARGUMENT: Partial> = { + [SupportedChainId.MAINNET]: undefined, + [SupportedChainId.RINKEBY]: 'rinkeby', +} + +export class FortmaticConnector extends FortmaticConnectorCore { + async activate() { + if (!this.fortmatic) { + const { default: Fortmatic } = await import('fortmatic') + + const { apiKey, chainId } = this as any + if (chainId in CHAIN_ID_NETWORK_ARGUMENT) { + this.fortmatic = new Fortmatic(apiKey, CHAIN_ID_NETWORK_ARGUMENT[chainId as FormaticSupportedChains]) + } else { + throw new Error(`Unsupported network ID: ${chainId}`) + } + } + + const provider = this.fortmatic.getProvider() + + // It is no longer necessary + // const pollForOverlayReady = new Promise((resolve) => { + // const interval = setInterval(() => { + // if (provider.overlay.overlayReady) { + // clearInterval(interval) + // this.emit(OVERLAY_READY) + // resolve() + // } + // }, 200) + // }) + + const account = await provider.enable().then((accounts: string[]) => accounts[0]) + + return { provider: this.fortmatic.getProvider(), chainId: (this as any).chainId, account } + } +} + +// Allows to select fortmatic envvar according to prod, barn or test environment +export function getFortmaticApiKey(): string | undefined { + let apiKey = process.env.REACT_APP_FORTMATIC_KEY + if (isProd) { + apiKey = process.env.REACT_APP_FORTMATIC_KEY_PROD + } else if (isBarn) { + apiKey = process.env.REACT_APP_FORTMATIC_KEY_BARN + } + + return apiKey +} diff --git a/src/custom/connectors/index.ts b/src/custom/connectors/index.ts index c50025479..8911c9d1c 100644 --- a/src/custom/connectors/index.ts +++ b/src/custom/connectors/index.ts @@ -4,7 +4,7 @@ import { WalletConnectConnector } from '@web3-react/walletconnect-connector' import { WalletLinkConnector } from '@web3-react/walletlink-connector' import { PortisConnector } from '@web3-react/portis-connector' -import { FortmaticConnector } from 'connectors/Fortmatic' +import { FortmaticConnector, getFortmaticApiKey } from 'connectors/Fortmatic' import { NetworkConnector } from 'connectors/NetworkConnector' import { AbstractConnector } from '@web3-react/abstract-connector' @@ -91,7 +91,7 @@ export const walletconnect = new WalletConnectConnector({ // mainnet only export const fortmatic = new FortmaticConnector({ - apiKey: process.env.REACT_APP_FORTMATIC_KEY ?? '', + apiKey: getFortmaticApiKey() ?? '', chainId: NETWORK_CHAIN_ID, }) @@ -108,6 +108,7 @@ export const walletlink = new WalletLinkConnector({ url: rpcNetworks[NETWORK_CHAIN_ID], appName: 'CowSwap', appLogoUrl: 'https://raw.githubusercontent.com/gnosis/gp-swap-ui/develop/public/favicon.png', + supportedChainIds: getSupportedChainIds(), }) export enum WalletProvider { diff --git a/src/custom/constants/index.ts b/src/custom/constants/index.ts index 6eee8b028..257d0f20a 100644 --- a/src/custom/constants/index.ts +++ b/src/custom/constants/index.ts @@ -19,13 +19,14 @@ export const FULL_PRICE_PRECISION = 20 export const FIAT_PRECISION = 2 export const PERCENTAGE_PRECISION = 2 +export const SHORT_LOAD_THRESHOLD = 500 export const LONG_LOAD_THRESHOLD = 2000 export const APP_DATA_HASH = getAppDataHash() export const PRODUCTION_URL = 'cowswap.exchange' export const BARN_URL = `barn.${PRODUCTION_URL}` -const DISABLED_WALLETS = /^(?:WALLET_LINK|COINBASE_LINK|FORTMATIC|Portis)$/i +const DISABLED_WALLETS = /^(?:Portis)$/i // Re-export only the supported wallets export const SUPPORTED_WALLETS = Object.keys(SUPPORTED_WALLETS_UNISWAP).reduce((acc, key) => { diff --git a/src/custom/constants/ipfs.ts b/src/custom/constants/ipfs.ts index c6a3758d4..46d7e90d9 100644 --- a/src/custom/constants/ipfs.ts +++ b/src/custom/constants/ipfs.ts @@ -1,3 +1,4 @@ export const PINATA_API_KEY = process.env.REACT_APP_PINATA_API_KEY as string export const PINATA_SECRET_API_KEY = process.env.REACT_APP_PINATA_SECRET_API_KEY as string +export const PINATA_API_URL = process.env.REACT_APP_PINATA_API_URL || 'https://api.pinata.cloud' export const IPFS_URI = process.env.REACT_APP_IPFS_URI || 'https://ipfs.infura.io:5001/api/v0' diff --git a/src/custom/constants/lists.ts b/src/custom/constants/lists.ts index ef6df42df..db8ab4de1 100644 --- a/src/custom/constants/lists.ts +++ b/src/custom/constants/lists.ts @@ -13,7 +13,7 @@ const AAVE_LIST = 'tokenlist.aave.eth' const SYNTHETIX_LIST = 'synths.snx.eth' const WRAPPED_LIST = 'wrapped.tokensoft.eth' const SET_LIST = 'https://raw.githubusercontent.com/SetProtocol/uniswap-tokenlist/main/set.tokenlist.json' -const OPYN_LIST = 'https://raw.githubusercontent.com/opynfinance/opyn-tokenlist/master/opyn-v1.tokenlist.json' +const OPYN_LIST = 'https://raw.githubusercontent.com/opynfinance/opyn-tokenlist/master/opyn-squeeth-tokenlist.json' const ROLL_LIST = 'https://app.tryroll.com/tokens.json' // const COINGECKO_LIST = 'https://tokens.coingecko.com/uniswap/all.json' const CMC_ALL_LIST = 'defi.cmc.eth' diff --git a/src/custom/hooks/useRefetchPriceCallback.tsx b/src/custom/hooks/useRefetchPriceCallback.tsx index 1ed59b682..ef05c872d 100644 --- a/src/custom/hooks/useRefetchPriceCallback.tsx +++ b/src/custom/hooks/useRefetchPriceCallback.tsx @@ -1,6 +1,6 @@ import { useCallback } from 'react' -import { FeeQuoteParams, getBestQuote, QuoteParams, QuoteResult } from 'utils/price' +import { FeeQuoteParams, getBestQuote, getFastQuote, QuoteParams, QuoteResult } from 'utils/price' import { isValidOperatorError, ApiErrorCodes } from 'api/gnosisProtocol/errors/OperatorError' import GpQuoteError, { GpQuoteErrorCodes, @@ -19,7 +19,7 @@ import { QuoteInformationObject } from 'state/price/reducer' import { useQuoteDispatchers } from 'state/price/hooks' import { AddGpUnsupportedTokenParams } from 'state/lists/actions' import { QuoteError } from 'state/price/actions' -import { onlyResolvesLast } from 'utils/async' +import { CancelableResult, onlyResolvesLast } from 'utils/async' import useGetGpPriceStrategy from 'hooks/useGetGpPriceStrategy' import { calculateValidTo } from 'hooks/useSwapCallback' import { useUserTransactionTTL } from 'state/user/hooks' @@ -89,6 +89,10 @@ export function handleQuoteError({ quoteData, error, addUnsupportedToken }: Hand return 'unsupported-token' } + case GpQuoteErrorCodes.TransferEthToContract: { + return 'transfer-eth-to-smart-contract' + } + default: { // Some other operator error occurred, log it console.error('Error quoting price/fee. Unhandled operator error: ' + error.type, error) @@ -109,6 +113,7 @@ export function handleQuoteError({ quoteData, error, addUnsupportedToken }: Hand } const getBestQuoteResolveOnlyLastCall = onlyResolvesLast(getBestQuote) +const getFastQuoteResolveOnlyLastCall = onlyResolvesLast(getFastQuote) /** * @returns callback that fetches a new quote and update the state @@ -140,24 +145,10 @@ export function useRefetchQuoteCallback() { let quoteData: FeeQuoteParams | QuoteInformationObject = quoteParams - const { sellToken, buyToken, chainId } = quoteData - try { - // Start action: Either new quote or refreshing quote - if (isPriceRefresh) { - // Refresh the quote - refreshQuote({ sellToken, chainId }) - } else { - // Get new quote - getNewQuote(quoteParams) - } + // price can be null if fee > price + const handleResponse = (response: CancelableResult, isBestQuote: boolean) => { + const { cancelled, data } = response - registerOnWindow({ - getBestQuote: async () => getBestQuoteResolveOnlyLastCall({ ...params, strategy: priceStrategy }), - }) - - // Get the quote - // price can be null if fee > price - const { cancelled, data } = await getBestQuoteResolveOnlyLastCall({ ...params, strategy: priceStrategy }) if (cancelled) { // Cancellation can happen if a new request is made, then any ongoing query is canceled console.debug('[useRefetchPriceCallback] Canceled get quote price for', params) @@ -201,8 +192,10 @@ export function useRefetchQuoteCallback() { } // Update quote - updateQuote(quoteData) - } catch (error) { + updateQuote({ ...quoteData, isBestQuote }) + } + + const handleError = (error: Error) => { // handle any errors in quote fetch // we re-use the quoteData object in scope to save values into state const quoteError = handleQuoteError({ @@ -217,6 +210,38 @@ export function useRefetchQuoteCallback() { error: quoteError, }) } + + const { sellToken, buyToken, chainId } = quoteData + // Start action: Either new quote or refreshing quote + if (isPriceRefresh) { + // Refresh the quote + refreshQuote({ sellToken, chainId }) + } else { + // Get new quote + getNewQuote(quoteParams) + } + + // Init get quote methods params + const bestQuoteParams = { ...params, strategy: priceStrategy } + const fastQuoteParams = { quoteParams: { ...quoteParams, priceQuality: 'fast' } } + + // Register get best and fast quote methods on window + registerOnWindow({ + getBestQuote: async () => getBestQuoteResolveOnlyLastCall(bestQuoteParams), + getFastQuote: async () => getFastQuoteResolveOnlyLastCall(fastQuoteParams), + }) + + // Get the fast quote + if (!isPriceRefresh) { + getFastQuoteResolveOnlyLastCall(fastQuoteParams) + .then((res) => handleResponse(res, false)) + .catch(handleError) + } + + // Get the best quote + getBestQuoteResolveOnlyLastCall(bestQuoteParams) + .then((res) => handleResponse(res, true)) + .catch(handleError) }, [ deadline, diff --git a/src/custom/hooks/web3.ts b/src/custom/hooks/web3.ts index 300c0d000..2967f7c50 100644 --- a/src/custom/hooks/web3.ts +++ b/src/custom/hooks/web3.ts @@ -1,12 +1,18 @@ import { useWeb3React as useWeb3ReactCore } from '@web3-react/core' +import { AbstractConnector } from '@web3-react/abstract-connector' import { useEffect, useState, useCallback } from 'react' import { isMobile } from 'react-device-detect' -import { injected, walletconnect, getProviderType, WalletProvider } from 'connectors' +import { injected, walletconnect, getProviderType, WalletProvider, fortmatic, walletlink } from 'connectors' import { STORAGE_KEY_LAST_PROVIDER } from 'constants/index' // exports from the original file export { useActiveWeb3React, useInactiveListener } from '@src/hooks/web3' +enum DefaultProvidersInjected { + METAMASK = WalletProvider.INJECTED, + COINBASE_WALLET = WalletProvider.WALLET_LINK, +} + export function useEagerConnect() { const { activate, active, connector } = useWeb3ReactCore() const [tried, setTried] = useState(false) @@ -22,30 +28,38 @@ export function useEagerConnect() { } }, [connector, active]) - const connectInjected = useCallback(() => { - // check if the our application is authorized/connected with Metamask - injected.isAuthorized().then((isAuthorized) => { - if (isAuthorized) { - activate(injected, undefined, true).catch(() => { - setTried(true) - }) - } else { - if (isMobile && window.ethereum) { + const connectInjected = useCallback( + (providerName = DefaultProvidersInjected.METAMASK) => { + // check if the our application is authorized/connected with Metamask + injected.isAuthorized().then((isAuthorized) => { + if (isAuthorized) { + setDefaultInjected(providerName) activate(injected, undefined, true).catch(() => { setTried(true) }) } else { - setTried(true) + if (isMobile && window.ethereum) { + setDefaultInjected(providerName) + activate(injected, undefined, true).catch(() => { + setTried(true) + }) + } else { + setTried(true) + } } - } - }) - }, [activate, setTried]) + }) + }, + [activate, setTried] + ) - const connectWalletConnect = useCallback(() => { - activate(walletconnect, undefined, true).catch(() => { - setTried(true) - }) - }, [activate, setTried]) + const reconnectUninjectedProvider = useCallback( + (provider: AbstractConnector): void => { + activate(provider, undefined, true).catch(() => { + setTried(true) + }) + }, + [activate, setTried] + ) useEffect(() => { if (!active) { @@ -60,10 +74,14 @@ export function useEagerConnect() { connectInjected() } else if (latestProvider === WalletProvider.WALLET_CONNECT) { // WC is last provider - connectWalletConnect() + reconnectUninjectedProvider(walletconnect) + } else if (latestProvider === WalletProvider.WALLET_LINK) { + reconnectUninjectedProvider(walletlink) + } else if (latestProvider === WalletProvider.FORMATIC) { + reconnectUninjectedProvider(fortmatic) } } - }, [connectInjected, connectWalletConnect, active]) // intentionally only running on mount (make sure it's only mounted once :)) + }, [connectInjected, active, reconnectUninjectedProvider]) // intentionally only running on mount (make sure it's only mounted once :)) // if the connection worked, wait until we get confirmation of that to flip the flag useEffect(() => { @@ -84,3 +102,28 @@ export function useEagerConnect() { return tried } + +/** + * Allows to select the default injected ethereum provider. + * + * It is assumed that metamask is the default injected Provider, however coinbaseWallet overrides this. + */ +export function setDefaultInjected(providerName: DefaultProvidersInjected) { + const { ethereum } = window + + if (!ethereum?.providers) return + + let provider + switch (providerName) { + case DefaultProvidersInjected.COINBASE_WALLET: + provider = ethereum.providers.find(({ isCoinbaseWallet }) => isCoinbaseWallet) + break + case DefaultProvidersInjected.METAMASK: + provider = ethereum.providers.find(({ isMetaMask }) => isMetaMask) + break + } + + if (provider) { + ethereum.setSelectedProvider(provider) + } +} diff --git a/src/custom/pages/Claim/ClaimSummary.tsx b/src/custom/pages/Claim/ClaimSummary.tsx index 77ee8852d..04d381b13 100644 --- a/src/custom/pages/Claim/ClaimSummary.tsx +++ b/src/custom/pages/Claim/ClaimSummary.tsx @@ -1,5 +1,5 @@ import { Trans } from '@lingui/macro' -import { CurrencyAmount, Currency } from '@uniswap/sdk-core' +import { CurrencyAmount, Currency, Token } from '@uniswap/sdk-core' import CowProtocolLogo from 'components/CowProtocolLogo' import { formatMax, formatSmartLocaleAware } from 'utils/format' import { useClaimState } from 'state/claim/hooks' @@ -10,6 +10,7 @@ import { AMOUNT_PRECISION } from 'constants/index' import { useTokenBalance } from 'state/wallet/hooks' import { V_COW } from 'constants/tokens' import { useActiveWeb3React } from 'hooks' +import { JSBI } from '@uniswap/sdk' type ClaimSummaryProps = Pick & { unclaimedAmount: ClaimCommonTypes['tokenCurrencyAmount'] | undefined @@ -19,16 +20,25 @@ export function ClaimSummary({ hasClaims, isClaimed, unclaimedAmount }: ClaimSum const { chainId } = useActiveWeb3React() const { activeClaimAccount, claimStatus, isInvestFlowActive } = useClaimState() - const vCowBalance = useTokenBalance(activeClaimAccount || undefined, chainId ? V_COW[chainId] : undefined) + const vCow = chainId ? V_COW[chainId] : undefined + + const vCowBalance = useTokenBalance(activeClaimAccount || undefined, vCow) const hasClaimSummary = claimStatus === ClaimStatus.DEFAULT && !isInvestFlowActive - if (!hasClaimSummary) return null + if (!hasClaimSummary || !vCow) return null + + let totalAvailableAmount: CurrencyAmount | undefined = CurrencyAmount.fromRawAmount(vCow, JSBI.BigInt(0)) - const totalAvailableAmount = hasClaims && activeClaimAccount && unclaimedAmount ? unclaimedAmount : vCowBalance + if (hasClaims && activeClaimAccount && unclaimedAmount) { + totalAvailableAmount = unclaimedAmount + } else if (isClaimed) { + totalAvailableAmount = vCowBalance + } return ( totalAvailableText?: string + activeClaimAccount: string } -export function ClaimSummaryView({ showClaimText, totalAvailableText, totalAvailableAmount }: ClaimSummaryViewProps) { +export function ClaimSummaryView({ + showClaimText, + totalAvailableText, + totalAvailableAmount, + activeClaimAccount, +}: ClaimSummaryViewProps) { return ( @@ -53,7 +69,7 @@ export function ClaimSummaryView({ showClaimText, totalAvailableText, totalAvail )} - {totalAvailableAmount && ( + {totalAvailableAmount && activeClaimAccount && (
{totalAvailableText && {totalAvailableText}} diff --git a/src/custom/pages/Claim/FooterNavButtons.tsx b/src/custom/pages/Claim/FooterNavButtons.tsx index bf36a84bb..0807f940d 100644 --- a/src/custom/pages/Claim/FooterNavButtons.tsx +++ b/src/custom/pages/Claim/FooterNavButtons.tsx @@ -80,7 +80,7 @@ export default function FooterNavButtons({ ) } // Already claimed - else if (isClaimed) { + else if (isClaimed && claimStatus !== ClaimStatus.CONFIRMED) { buttonContent = ( Already claimed diff --git a/src/custom/pages/Claim/InvestmentFlow/index.tsx b/src/custom/pages/Claim/InvestmentFlow/index.tsx index 53adf7069..072fd9555 100644 --- a/src/custom/pages/Claim/InvestmentFlow/index.tsx +++ b/src/custom/pages/Claim/InvestmentFlow/index.tsx @@ -263,7 +263,11 @@ export default function InvestmentFlow({ claims, hasClaims, isAirdropOnly, modal {/* Invest flow: Step 2 > Review summary */} {investFlowStep === 2 ? ( - + diff --git a/src/custom/pages/Claim/index.tsx b/src/custom/pages/Claim/index.tsx index a6495a9c2..43b39760a 100644 --- a/src/custom/pages/Claim/index.tsx +++ b/src/custom/pages/Claim/index.tsx @@ -10,6 +10,7 @@ import { useWalletModalToggle } from 'state/application/hooks' import { getFreeClaims, hasPaidClaim, hasFreeClaim, prepareInvestClaims } from 'state/claim/hooks/utils' import { useClaimDispatchers, useClaimState } from 'state/claim/hooks' import { ClaimStatus } from 'state/claim/actions' +import ClaimsOnOtherChainsUpdater from 'state/claim/updater' import { OperationType } from 'components/TransactionConfirmationModal' import Confetti from 'components/Confetti' @@ -229,6 +230,8 @@ export default function Claim() { return ( + {/* State Updater */} + {/* Cross chain claim banner */} {/* Claiming content */} diff --git a/src/custom/pages/Swap/SwapMod.tsx b/src/custom/pages/Swap/SwapMod.tsx index 4011cff78..68d5995b3 100644 --- a/src/custom/pages/Swap/SwapMod.tsx +++ b/src/custom/pages/Swap/SwapMod.tsx @@ -90,6 +90,8 @@ import TransactionConfirmationModal, { OperationType } from 'components/Transact import AffiliateStatusCheck from 'components/AffiliateStatusCheck' import usePriceImpact from 'hooks/usePriceImpact' import { useErrorMessage } from 'hooks/useErrorMessageAndModal' +import { GpEther } from 'constants/tokens' +import { SupportedChainId } from 'constants/chains' // MOD - exported in ./styleds to avoid circ dep // export const StyledInfo = styled(Info)` @@ -830,6 +832,16 @@ export default function Swap({ {/* {singleHopOnly && Try enabling multi-hop trades.} */} + ) : quote?.error === 'transfer-eth-to-smart-contract' ? ( + + + + Buying {GpEther.onChain(chainId || SupportedChainId.MAINNET).symbol} with smart contract wallets is + not currently supported + + + {/* {singleHopOnly && Try enabling multi-hop trades.} */} + ) : quote?.error === 'fetch-quote-error' ? ( diff --git a/src/custom/pages/TermsAndConditions/TermsAndConditions.md b/src/custom/pages/TermsAndConditions/TermsAndConditions.md index 01c28b4da..269d3af5f 100644 --- a/src/custom/pages/TermsAndConditions/TermsAndConditions.md +++ b/src/custom/pages/TermsAndConditions/TermsAndConditions.md @@ -74,7 +74,7 @@ Please read these Terms carefully before using our Platform. By using our Platfo with any other wallet. 2. An ERC 20 token to trade 3. Depending on whether you interact with the Protocol on Ethereum - mainnet or an Ethereum Virtual Machine compatible validation + Mainnet or an Ethereum Virtual Machine compatible validation mechanism, sufficient ETH or the networks native crypto asset in your Wallet, respectively, to pay for transactions fees, which are incurred through the Protocol on Ethereum or the Ethereum Virtual @@ -225,7 +225,7 @@ professional advisors. mechanisms and intricacies associated with cryptographic assets, token storage facilities (including wallets), blockchain technology and blockchain-based software systems; - 6. you understand that transactions on the Ethereum mainnet and + 6. you understand that transactions on the Ethereum Mainnet and Ethereum Virtual Machine compatible validation mechanisms are irreversible and may not be erased and that your wallet address and any transaction is displayed permanently and publicly and that you @@ -303,7 +303,7 @@ professional advisors. arises out of or in connection with the present Terms between you and us (a “**Dispute**”), you agree to seek to resolve the matter with us amicably by - referring the matter to GnosisDAO subcategory of gnosis.forum.io + referring the matter to GnosisDAO subcategory of forum.gnosis.io with a detailed description, the date and time the issue arose, your handle to contact you on and the outcome you are seeking. 2. Your right to take legal action remains unaffected by the existence diff --git a/src/custom/state/claim/middleware.ts b/src/custom/state/claim/middleware.ts index 7a7747316..13193743d 100644 --- a/src/custom/state/claim/middleware.ts +++ b/src/custom/state/claim/middleware.ts @@ -31,7 +31,7 @@ export const claimMinedMiddleware: Middleware, AppState> transaction.hash, transaction.claim ) - if (status === 1) { + if (status === 1 && transaction.replacementType !== 'cancel') { // success store.dispatch(setClaimStatus(ClaimStatus.CONFIRMED)) cowSound = getCowSoundSuccessClaim() diff --git a/src/custom/state/enhancedTransactions/updater/FinalizeTxUpdater.tsx b/src/custom/state/enhancedTransactions/updater/FinalizeTxUpdater.tsx index 5cb4b4c44..168cd2f41 100644 --- a/src/custom/state/enhancedTransactions/updater/FinalizeTxUpdater.tsx +++ b/src/custom/state/enhancedTransactions/updater/FinalizeTxUpdater.tsx @@ -84,7 +84,7 @@ function finalizeEthereumTransaction( { txn: { hash: receipt.transactionHash, - success: receipt.status === 1, + success: receipt.status === 1 && transaction.replacementType !== 'cancel', summary: transaction.summary, }, }, diff --git a/src/custom/state/price/actions.ts b/src/custom/state/price/actions.ts index dd8ed22b2..475fb1ed1 100644 --- a/src/custom/state/price/actions.ts +++ b/src/custom/state/price/actions.ts @@ -20,6 +20,7 @@ export type QuoteError = | 'unsupported-token' | 'offline-browser' | 'zero-price' + | 'transfer-eth-to-smart-contract' export type SetQuoteErrorParams = UpdateQuoteParams & { error?: QuoteError } diff --git a/src/custom/state/price/hooks.ts b/src/custom/state/price/hooks.ts index a81e85980..899a5490c 100644 --- a/src/custom/state/price/hooks.ts +++ b/src/custom/state/price/hooks.ts @@ -52,6 +52,11 @@ export const useIsQuoteLoading = () => return state.price.loading }) +export const useIsBestQuoteLoading = () => + useSelector((state) => { + return state.price.loadingBestQuote + }) + interface UseGetQuoteAndStatus { quote?: QuoteInformationObject isGettingNewQuote: boolean diff --git a/src/custom/state/price/reducer.ts b/src/custom/state/price/reducer.ts index 6ab87869b..5f6ac9baf 100644 --- a/src/custom/state/price/reducer.ts +++ b/src/custom/state/price/reducer.ts @@ -1,4 +1,4 @@ -import { createReducer, PayloadAction } from '@reduxjs/toolkit' +import { createReducer, PayloadAction, current } from '@reduxjs/toolkit' import { SupportedChainId as ChainId } from 'constants/chains' import { OrderKind } from '@gnosis.pm/gp-v2-contracts' import { updateQuote, setQuoteError, getNewQuote, refreshQuote, QuoteError } from './actions' @@ -27,9 +27,9 @@ export type QuoteInformationState = { readonly [chainId in ChainId]?: Partial } -type InitialState = { loading: boolean; quotes: QuoteInformationState } +type InitialState = { loading: boolean; loadingBestQuote: boolean; quotes: QuoteInformationState } -const initialState: InitialState = { loading: false, quotes: {} } +const initialState: InitialState = { loadingBestQuote: false, loading: false, quotes: {} } // Makes sure there stat is initialized function initializeState( @@ -82,8 +82,9 @@ export default createReducer(initialState, (builder) => validTo, } - // Activate loader + // Activate loaders state.loading = true + state.loadingBestQuote = true }) /** @@ -115,17 +116,30 @@ export default createReducer(initialState, (builder) => .addCase(updateQuote, (state, action) => { const quotes = state.quotes const payload = action.payload - const { sellToken, chainId } = payload + const { sellToken, chainId, isBestQuote } = payload initializeState(quotes, action) // Updates the new price const quoteInformation = quotes[chainId][sellToken] - if (quoteInformation) { + const quote = current(state).quotes[chainId] + + // Flag to not update the quote when the there is already a quote price and the + // current quote in action is not the best quote, meaning the best quote for + // some reason was already loaded before fast quote and we want to keep best quote data + const hasPrice = !!quote && !!quote[sellToken]?.price?.amount + const shouldUpdate = !(!isBestQuote && hasPrice) + + if (quoteInformation && shouldUpdate) { quotes[chainId][sellToken] = { ...quoteInformation, ...payload } } // Stop the loader state.loading = false + + // Stop the quote loader when the "best" quote is fetched + if (isBestQuote) { + state.loadingBestQuote = false + } }) /** @@ -147,7 +161,8 @@ export default createReducer(initialState, (builder) => } } - // Stop the loader + // Stop the loaders state.loading = false + state.loadingBestQuote = false }) ) diff --git a/src/custom/theme/baseTheme.tsx b/src/custom/theme/baseTheme.tsx index 30c5f2252..51020e5ce 100644 --- a/src/custom/theme/baseTheme.tsx +++ b/src/custom/theme/baseTheme.tsx @@ -89,6 +89,8 @@ export function colors(darkMode: boolean): Colors { textLink: darkMode ? '#ffffff' : '#AE2C00', shimmer1: darkMode ? 'rgb(22 56 97 / 20%)' : 'rgb(175 203 218 / 20%)', shimmer2: darkMode ? 'rgb(22 56 97 / 50%)' : 'rgb(175 203 218 / 40%)', + scrollbarBg: darkMode ? '#01182a' : '#d5e8f0', + scrollbarThumb: darkMode ? '#152c3e' : '#adc2ce', // table styles tableHeadBG: darkMode ? '#021E34' : 'rgb(2 30 52 / 15%)', @@ -115,6 +117,7 @@ export function themeVariables(darkMode: boolean, colorsTheme: Colors) { : 'linear-gradient(180deg,rgba(164, 211, 227, 1) 5%, rgba(255, 255, 255, 1) 40%)'}; background-attachment: fixed; backdrop-filter: blur(40px); + scrollbar-color: ${colorsTheme.scrollbarThumb} ${colorsTheme.scrollbarBg}; `, }, logo: { @@ -335,6 +338,20 @@ export const UniThemedGlobalStyle = css` 1, theme.bg1 )} 100%)`}; + scrollbar-color: ${({ theme }) => `${theme.card.border} ${theme.card.background2}`}; + scroll-behavior: smooth; + + &::-webkit-scrollbar { + width: 14px; + background: ${({ theme }) => `${theme.card.background2}`}; + } + + &::-webkit-scrollbar-thumb { + background: ${({ theme }) => `${theme.card.border}`}; + border: 3px solid transparent; + border-radius: 14px; + background-clip: padding-box; + } } ` diff --git a/src/custom/theme/styled.d.ts b/src/custom/theme/styled.d.ts index b009bf7d7..bd9c99a9a 100644 --- a/src/custom/theme/styled.d.ts +++ b/src/custom/theme/styled.d.ts @@ -22,6 +22,8 @@ export interface Colors extends ColorsUniswap { disabled: Color shimmer1: Color shimmer2: color + scrollbarBg: Color + scrollbarThumb: Color tableHeadBG: Color tableRowBG: Color info: Color diff --git a/src/custom/utils/price.ts b/src/custom/utils/price.ts index d17b24338..d2a8c5392 100644 --- a/src/custom/utils/price.ts +++ b/src/custom/utils/price.ts @@ -77,6 +77,8 @@ export type FeeQuoteParams = Pick & { @@ -371,6 +373,12 @@ export async function getBestQuote({ } } +export async function getFastQuote({ quoteParams }: QuoteParams): Promise { + console.debug('[GP PRICE::API] getFastQuote - Attempting fast quote retrieval, hang tight.') + + return getFullQuote({ quoteParams }) +} + export function getValidParams(params: PriceQuoteParams) { const { baseToken: baseTokenAux, quoteToken: quoteTokenAux, chainId } = params const baseToken = toErc20Address(baseTokenAux, chainId) diff --git a/src/index.tsx b/src/index.tsx index 8d7003bbf..5e6091dac 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -28,7 +28,6 @@ import { PendingOrdersUpdater, UnfillableOrdersUpdater, } from 'state/orders/updaters' -import ClaimsOnOtherChainsUpdater from 'state/claim/updater' // import { EventUpdater } from 'state/orders/mocks' import ThemeProvider, { FixedGlobalStyle, ThemedGlobalStyle } from 'theme' import getLibrary from 'utils/getLibrary' @@ -63,7 +62,6 @@ function Updaters() { - ) } diff --git a/src/react-app-env.d.ts b/src/react-app-env.d.ts index e0eebe858..8aef04426 100644 --- a/src/react-app-env.d.ts +++ b/src/react-app-env.d.ts @@ -7,11 +7,14 @@ declare module '@metamask/jazzicon' { declare module 'fortmatic' interface Window { + walletLinkExtension?: any ethereum?: { isMetaMask?: true on?: (...args: any[]) => void removeListener?: (...args: any[]) => void autoRefreshOnNetworkChange?: boolean + setSelectedProvider: (any) => void + providers: [any] } web3?: Record } diff --git a/yarn.lock b/yarn.lock index 6ed1a7387..498891f89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1346,21 +1346,21 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@ethereumjs/common@^2.5.0", "@ethereumjs/common@^2.6.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.0.tgz#feb96fb154da41ee2cc2c5df667621a440f36348" - integrity sha512-Cq2qS0FTu6O2VU1sgg+WyU9Ps0M6j/BEMHN+hRaECXCV/r0aI78u4N6p52QW/BDVhwWZpCdrvG8X7NJdzlpNUA== +"@ethereumjs/common@^2.5.0", "@ethereumjs/common@^2.6.1": + version "2.6.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.2.tgz#eb006c9329c75c80f634f340dc1719a5258244df" + integrity sha512-vDwye5v0SVeuDky4MtKsu+ogkH2oFUV8pBKzH/eNBzT8oI91pKa8WyzDuYuxOQsgNgv5R34LfFDh2aaw3H4HbQ== dependencies: crc-32 "^1.2.0" - ethereumjs-util "^7.1.3" + ethereumjs-util "^7.1.4" "@ethereumjs/tx@^3.3.2": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.4.0.tgz#7eb1947eefa55eb9cf05b3ca116fb7a3dbd0bce7" - integrity sha512-WWUwg1PdjHKZZxPPo274ZuPsJCWV3SqATrEKQP1n2DrVYVP1aZIYpo/mFaA0BDoE0tIQmBeimRCEA0Lgil+yYw== + version "3.5.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.0.tgz#783b0aeb08518b9991b23f5155763bbaf930a037" + integrity sha512-/+ZNbnJhQhXC83Xuvy6I9k4jT5sXiV0tMR9C+AzSSpcCV64+NB8dTE1m3x98RYMqb8+TLYWA+HML4F5lfXTlJw== dependencies: - "@ethereumjs/common" "^2.6.0" - ethereumjs-util "^7.1.3" + "@ethereumjs/common" "^2.6.1" + ethereumjs-util "^7.1.4" "@ethersproject/abi@5.0.7": version "5.0.7" @@ -3209,17 +3209,6 @@ resolved "https://registry.yarnpkg.com/@pedrouid/environment/-/environment-1.0.1.tgz#858f0f8a057340e0b250398b75ead77d6f4342ec" integrity sha512-HaW78NszGzRZd9SeoI3JD11JqY+lubnaOx7Pewj5pfjqWXOEATpeKIFb9Z4t2WBUK2iryiXX3lzWwmYWgUL0Ug== -"@pinata/sdk@^1.1.23": - version "1.1.23" - resolved "https://registry.yarnpkg.com/@pinata/sdk/-/sdk-1.1.23.tgz#91d7e289a29f514ee35d8d2ad62f8ef891b57ea0" - integrity sha512-ZIQI6acEu2m3tuLW9UCUNVgqbHc5U+t657ukunamV0E8XcW639vgtGa5rd5C/9mVIxoWpp5CJ9q7FA1OT88huQ== - dependencies: - axios "^0.21.1" - base-path-converter "^1.0.2" - form-data "^2.3.3" - is-ipfs "^0.6.0" - recursive-fs "^1.1.2" - "@pmmmwh/react-refresh-webpack-plugin@0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.3.tgz#1eec460596d200c0236bf195b078a5d1df89b766" @@ -3232,6 +3221,11 @@ schema-utils "^2.6.5" source-map "^0.7.3" +"@polka/url@^1.0.0-next.20": + version "1.0.0-next.21" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" + integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== + "@popperjs/core@^2.4.4": version "2.11.0" resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.0.tgz#6734f8ebc106a0860dff7f92bf90df193f0935d7" @@ -4492,9 +4486,9 @@ integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== "@types/node@^12.12.6": - version "12.20.37" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.37.tgz#abb38afa9d6e8a2f627a8cb52290b3c80fbe61ed" - integrity sha512-i1KGxqcvJaLQali+WuypQnXwcplhtNtjs66eNsZpp2P2FL/trJJxx/VWsM0YCL2iMoIJrbXje48lvIQAQ4p2ZA== + version "12.20.46" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.46.tgz#7e49dee4c54fd19584e6a9e0da5f3dc2e9136bc7" + integrity sha512-cPjLXj8d6anFPzFvOPxS3fvly3Shm5nTfl6g8X5smexixbuGUf7hfr21J5tX9JW+UPStp/5P5R8qrKL5IyVJ+A== "@types/node@^13.13.5": version "13.13.52" @@ -5432,14 +5426,14 @@ "@web3-react/types" "^6.0.7" tiny-invariant "^1.0.6" -"@web3-react/walletlink-connector@^6.2.5": - version "6.2.8" - resolved "https://registry.yarnpkg.com/@web3-react/walletlink-connector/-/walletlink-connector-6.2.8.tgz#aaf7f413229f58d8087a15e0d049bbcbe5e0bd49" - integrity sha512-pSGufPz5JntSUvy88XcOrn5VN3qmX+ZVQ2lXAeWWb7YS2wTlAStPghZbln8t1li7jr1NUJ0w/gMDVpAwjwq4ZA== +"@web3-react/walletlink-connector@^6.2.12": + version "6.2.12" + resolved "https://registry.yarnpkg.com/@web3-react/walletlink-connector/-/walletlink-connector-6.2.12.tgz#dd68c4d880872f5906b78208ffbcaed4b63f7750" + integrity sha512-FNwSc/AlSvdUdI6bhiyBr21X6C7irJswO3m6rLTqlimm65L8NrZS+3FYE257tM4op94pSoHr1IHpUqA/ls/4VQ== dependencies: "@web3-react/abstract-connector" "^6.0.7" "@web3-react/types" "^6.0.7" - walletlink "^2.2.6" + walletlink "^2.4.7" "@webassemblyjs/ast@1.9.0": version "1.9.0" @@ -5635,6 +5629,14 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + acorn-globals@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" @@ -5653,6 +5655,11 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== +acorn-walk@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + acorn@^6.4.1: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" @@ -5663,6 +5670,11 @@ acorn@^7.1.0, acorn@^7.1.1, acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.0.4: + version "8.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" + integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== + acorn@^8.2.4: version "8.6.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.6.0.tgz#e3692ba0eb1a0c83eaa4f37f5fa7368dd7142895" @@ -6211,12 +6223,12 @@ axe-core@^4.3.5: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.3.5.tgz#78d6911ba317a8262bfee292aeafcc1e04b49cc5" integrity sha512-WKTW1+xAzhMS5dJsxWkliixlO/PqC4VhmO9T4juNYcaTg9jzWiJsou6m5pxWYGfigWbwzJWeFY6z47a+4neRXA== -axios@0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== +axios@0.21.2: + version "0.21.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.2.tgz#21297d5084b2aeeb422f5d38e7be4fbb82239017" + integrity sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg== dependencies: - follow-redirects "^1.10.0" + follow-redirects "^1.14.0" axios@^0.18.0: version "0.18.1" @@ -7052,11 +7064,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base-path-converter@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/base-path-converter/-/base-path-converter-1.0.2.tgz#e80b4b4f31c7b1561e632158e00774b6f2f27978" - integrity sha512-51R8JiuXadknn6ouVUteOhDpmI3G5u5GqjruL7bPJpfxUHVgosaO5uPAvRP4FeR4VyyH4sSvsN78Ci6ouoRYqQ== - base-x@^3.0.2, base-x@^3.0.8: version "3.0.9" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" @@ -7261,7 +7268,7 @@ bnc-sdk@^3.5.0: rxjs "^6.6.3" sturdy-websocket "^0.1.12" -body-parser@1.19.1, body-parser@^1.16.0: +body-parser@1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.1.tgz#1499abbaa9274af3ecc9f6f10396c995943e31d4" integrity sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA== @@ -7277,6 +7284,22 @@ body-parser@1.19.1, body-parser@^1.16.0: raw-body "2.4.2" type-is "~1.6.18" +body-parser@1.19.2, body-parser@^1.16.0: + version "1.19.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.2.tgz#4714ccd9c157d44797b8b5607d72c0b89952f26e" + integrity sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.8.1" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.9.7" + raw-body "2.4.3" + type-is "~1.6.18" + bonjour@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" @@ -7589,9 +7612,9 @@ buffer@^6.0.1, buffer@^6.0.3: ieee754 "^1.2.1" bufferutil@^4.0.1: - version "4.0.5" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.5.tgz#da9ea8166911cc276bf677b8aed2d02d31f59028" - integrity sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A== + version "4.0.6" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.6.tgz#ebd6c67c7922a0e902f053e5d8be5ec850e48433" + integrity sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw== dependencies: node-gyp-build "^4.3.0" @@ -7620,6 +7643,11 @@ bytes@3.1.1: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a" integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg== +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + cacache@^12.0.2: version "12.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" @@ -8050,7 +8078,7 @@ ci-info@^3.2.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== -cids@^0.7.1, cids@~0.7.0: +cids@^0.7.1: version "0.7.5" resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== @@ -8632,6 +8660,11 @@ cookie@0.4.1: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== +cookie@0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + cookiejar@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.3.tgz#fc7a6216e408e74414b90230050842dacda75acc" @@ -8763,12 +8796,12 @@ cosmiconfig@^7.0.0: yaml "^1.10.0" crc-32@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.0.tgz#cb2db6e29b88508e32d9dd0ec1693e7b41a18208" - integrity sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA== + version "1.2.1" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.1.tgz#436d2bcaad27bcb6bd073a2587139d3024a16460" + integrity sha512-Dn/xm/1vFFgs3nfrpEVScHoIslO9NZRITWGz/1E/St6u4xw99vfZzVkW0OSnzx2h9egej9xwMCEut6sqwokM/w== dependencies: exit-on-epipe "~1.0.1" - printj "~1.1.0" + printj "~1.3.1" create-ecdh@^4.0.0: version "4.0.4" @@ -11153,10 +11186,10 @@ ethereumjs-util@^6.0.0: ethjs-util "0.1.6" rlp "^2.2.3" -ethereumjs-util@^7.0.10, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz#b55d7b64dde3e3e45749e4c41288238edec32d23" - integrity sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw== +ethereumjs-util@^7.0.10, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.4: + version "7.1.4" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz#a6885bcdd92045b06f596c7626c3e89ab3312458" + integrity sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A== dependencies: "@types/bn.js" "^5.1.0" bn.js "^5.1.2" @@ -11427,7 +11460,43 @@ expect@^26.6.0, expect@^26.6.2: jest-message-util "^26.6.2" jest-regex-util "^26.0.0" -express@^4.14.0, express@^4.17.1: +express@^4.14.0: + version "4.17.3" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.3.tgz#f6c7302194a4fb54271b73a1fe7a06478c8f85a1" + integrity sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.19.2" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.4.2" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.9.7" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.17.2" + serve-static "1.14.2" + setprototypeof "1.2.0" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +express@^4.17.1: version "4.17.2" resolved "https://registry.yarnpkg.com/express/-/express-4.17.2.tgz#c18369f265297319beed4e5558753cc8c1364cb3" integrity sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg== @@ -11884,7 +11953,7 @@ follow-redirects@1.5.10: dependencies: debug "=3.1.0" -follow-redirects@^1.0.0, follow-redirects@^1.10.0, follow-redirects@^1.14.0: +follow-redirects@^1.0.0, follow-redirects@^1.14.0: version "1.14.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.6.tgz#8cfb281bbc035b3c067d6cd975b0f6ade6e855cd" integrity sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A== @@ -11938,15 +12007,6 @@ form-data@4.0.0, form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -form-data@^2.3.3: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - form-data@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" @@ -11987,6 +12047,11 @@ fortmatic@^1.0.0: dependencies: "@babel/runtime" "7.3.4" +fortmatic@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/fortmatic/-/fortmatic-2.2.1.tgz#91ce9159c1fe539bd87e483125fca5c27a410a86" + integrity sha512-PEfPoErJSErU2A8iYD2Mab2c8eJK5dCdCr1jR/8yc49aEAlyQ4UXnZXyeO6MU5zBGkDAZmg9brnRSPzc+8MKPQ== + forwarded@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" @@ -13936,18 +14001,6 @@ is-ip@^3.1.0: dependencies: ip-regex "^4.0.0" -is-ipfs@^0.6.0: - version "0.6.3" - resolved "https://registry.yarnpkg.com/is-ipfs/-/is-ipfs-0.6.3.tgz#82a5350e0a42d01441c40b369f8791e91404c497" - integrity sha512-HyRot1dvLcxImtDqPxAaY1miO6WsiP/z7Yxpg2qpaLWv5UdhAPtLvHJ4kMLM0w8GSl8AFsVF23PHe1LzuWrUlQ== - dependencies: - bs58 "^4.0.1" - cids "~0.7.0" - mafmt "^7.0.0" - multiaddr "^7.2.1" - multibase "~0.6.0" - multihashes "~0.4.13" - is-lower-case@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-2.0.2.tgz#1c0884d3012c841556243483aa5d522f47396d2a" @@ -15914,13 +15967,6 @@ lz-string@^1.4.4: resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY= -mafmt@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/mafmt/-/mafmt-7.1.0.tgz#4126f6d0eded070ace7dbbb6fb04977412d380b5" - integrity sha512-vpeo9S+hepT3k2h5iFxzEHvvR0GPBx9uKaErmnRzYNcaKb03DgOArjEMlgG4a9LcuZZ89a3I8xbeto487n26eA== - dependencies: - multiaddr "^7.3.0" - magic-string@^0.25.0, magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" @@ -16339,7 +16385,7 @@ mime-types@2.1.18: dependencies: mime-db "~1.33.0" -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@^2.1.27, mime-types@^2.1.30, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@^2.1.27, mime-types@^2.1.30, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.34" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== @@ -16566,6 +16612,11 @@ mri@^1.1.0: resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== +mrmime@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.0.tgz#14d387f0585a5233d291baba339b063752a2398b" + integrity sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ== + ms.macro@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms.macro/-/ms.macro-2.0.0.tgz#ff72d230cde33797d30b9b61eb57d4940dddd66f" @@ -16627,7 +16678,7 @@ multiaddr@^6.0.6: is-ip "^2.0.0" varint "^5.0.0" -multiaddr@^7.2.1, multiaddr@^7.3.0, multiaddr@^7.4.3, multiaddr@^7.5.0: +multiaddr@^7.2.1, multiaddr@^7.4.3, multiaddr@^7.5.0: version "7.5.0" resolved "https://registry.yarnpkg.com/multiaddr/-/multiaddr-7.5.0.tgz#976c88e256e512263445ab03b3b68c003d5f485e" integrity sha512-GvhHsIGDULh06jyb6ev+VfREH9evJCFIRnh3jUt9iEZ6XDbyoisZRFEI9bMvK/AiR6y66y6P+eoBw9mBYMhMvw== @@ -16711,7 +16762,7 @@ multiformats@^9.4.1, multiformats@^9.4.2, multiformats@^9.4.5, multiformats@^9.5 resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.5.4.tgz#bf60eee834f7bcbd3a61b1c61d7e8d6b158a0f63" integrity sha512-MFT8e8BOLX7OZKfSBGm13FwYvJVI6MEcZ7hujUCpyJwvYyrC1anul50A0Ee74GdeJ77aYTO6YU1vO+oF8NqSIw== -multihashes@^0.4.15, multihashes@~0.4.13, multihashes@~0.4.15: +multihashes@^0.4.15, multihashes@~0.4.15: version "0.4.21" resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== @@ -16839,6 +16890,11 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + neo-async@^2.5.0, neo-async@^2.6.1, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -17289,6 +17345,11 @@ open@^8.2.1: is-docker "^2.1.1" is-wsl "^2.2.0" +opener@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" + integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== + "openzeppelin-solidity-2.3.0@npm:openzeppelin-solidity@2.3.0": version "2.3.0" resolved "https://registry.yarnpkg.com/openzeppelin-solidity/-/openzeppelin-solidity-2.3.0.tgz#1ab7b4cc3782a5472ed61eb740c56a8bfdd74119" @@ -17567,19 +17628,18 @@ paraswap-core@1.0.2: resolved "https://registry.yarnpkg.com/paraswap-core/-/paraswap-core-1.0.2.tgz#9e2ae35bc393b6f3bb9407bd097f21d498abb5a7" integrity sha512-/PyonrjBsv9xOsFk4mVr0rh7BENrQtYYvvZMwu6QFN4qcca2VgmqOgpNWZPvfyBpKY+fUqmbBNlhqlaMQ3TMzQ== -paraswap@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/paraswap/-/paraswap-5.0.1.tgz#2649ae3ac4397f644eaa0f2a51531cbfaf412134" - integrity sha512-m4sBMuzEx2PJbcOMWm3/TpTKB42i/UIPI16PMkl4QV0hzk8K5eeRsdSfHrrvbYN4bBuzejOfvVO3CaS+qx5nPQ== +"paraswap@npm:@nenad91/paraswap#5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@nenad91/paraswap/-/paraswap-5.1.0.tgz#14af0ae49e1880eeadc6213299849fc176356bf9" + integrity sha512-3wuP8RdmGiFAW2J81omufcOvBXtsp9DAlmWFJx6wePdCavR7w4q1Vb0ImkHGXGaJcbG+un/Lm+TyG68NLjDxUw== dependencies: async "^3.1.0" - axios "0.21.1" + axios "0.21.2" bignumber.js "8.1.1" lodash "4.17.21" paraswap-core "1.0.2" qs "^6.9.1" ts-essentials "^7.0.0" - web3 "^1.5.0" parent-module@^1.0.0: version "1.0.1" @@ -19017,10 +19077,10 @@ pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.4.2: ansi-styles "^5.0.0" react-is "^17.0.1" -printj@~1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" - integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== +printj@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/printj/-/printj-1.3.1.tgz#9af6b1d55647a1587ac44f4c1654a4b95b8e12cb" + integrity sha512-GA3TdL8szPK4AQ2YnOe/b+Y1jUFwmmGMMK/qbY7VcE3Z7FU8JstbKiKRzO6CIiAKPhTO8m01NoQ0V5f3jc4OGg== private@^0.1.6, private@^0.1.8: version "0.1.8" @@ -19284,6 +19344,11 @@ qs@6.9.6: resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee" integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ== +qs@6.9.7: + version "6.9.7" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe" + integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw== + qs@^6.5.1, qs@^6.9.1, qs@^6.9.4: version "6.10.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.2.tgz#c1431bea37fc5b24c5bdbafa20f16bdf2a4b9ffe" @@ -19416,6 +19481,16 @@ raw-body@2.4.2: iconv-lite "0.4.24" unpipe "1.0.0" +raw-body@2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.3.tgz#8f80305d11c2a0a545c2d9d89d7a0286fcead43c" + integrity sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g== + dependencies: + bytes "3.1.2" + http-errors "1.8.1" + iconv-lite "0.4.24" + unpipe "1.0.0" + rc@^1.0.1, rc@^1.1.6, rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -19971,11 +20046,6 @@ receptacle@^1.3.2: dependencies: ms "^2.1.1" -recursive-fs@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/recursive-fs/-/recursive-fs-1.1.2.tgz#1d752e2f1a65d25fb6964109a9dbf83a335f90f0" - integrity sha512-QPFEt5EwzwlHoqYsZc+NkUSyDTQf1Hvq7c/kpQJHi77OSCAiDXI3wfB0J04ZG+ekGHmv37mdR8MDPEshD3/RlQ== - recursive-fs@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/recursive-fs/-/recursive-fs-2.1.0.tgz#1e20cf7836b292ed81208c4817550a58ad0e15ff" @@ -21138,9 +21208,9 @@ simple-concat@^1.0.0: integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== simple-get@^2.7.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" - integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== + version "2.8.2" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.2.tgz#5708fb0919d440657326cd5fe7d2599d07705019" + integrity sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw== dependencies: decompress-response "^3.3.0" once "^1.3.1" @@ -21158,6 +21228,15 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +sirv@^1.0.7: + version "1.0.19" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.19.tgz#1d73979b38c7fe91fcba49c85280daa9c2363b49" + integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ== + dependencies: + "@polka/url" "^1.0.0-next.20" + mrmime "^1.0.0" + totalist "^1.0.0" + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -22394,6 +22473,11 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== +totalist@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" + integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== + tough-cookie@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" @@ -22954,9 +23038,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.4.3, url-parse@^1.5.1, url-parse@^1.5.3: - version "1.5.3" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" - integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== + version "1.5.7" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.7.tgz#00780f60dbdae90181f51ed85fb24109422c932a" + integrity sha512-HxWkieX+STA38EDk7CE9MEryFeHCKzgagxlGvsdS7WBImq9Mk+PGwiT56w82WI3aicwJA8REp42Cxo98c8FZMA== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" @@ -23010,9 +23094,9 @@ use@^3.1.0: integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== utf-8-validate@^5.0.2: - version "5.0.7" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.7.tgz#c15a19a6af1f7ad9ec7ddc425747ca28c3644922" - integrity sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q== + version "5.0.8" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.8.tgz#4a735a61661dbb1c59a0868c397d2fe263f14e58" + integrity sha512-k4dW/Qja1BYDl2qD4tOMB9PFVha/UJtxTc1cXYOe3WwA/2m0Yn4qB7wLMpJyLJ/7DR0XnTut3HsCSzDT4ZvKgA== dependencies: node-gyp-build "^4.3.0" @@ -23244,10 +23328,10 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.12" -walletlink@^2.2.6: - version "2.3.0" - resolved "https://registry.yarnpkg.com/walletlink/-/walletlink-2.3.0.tgz#1b7ac5da78e5fa17f35dc880674cf7f6c493d2a5" - integrity sha512-CXPYFnWFN/2Xgf62LBhApAiqQIazH7MeRw+Y/TB6oKpdBLQSLzL6k4sqZ6VBKb7wU5HDk+ErXY0QZ9OIFB+Ifw== +walletlink@^2.4.7: + version "2.4.7" + resolved "https://registry.yarnpkg.com/walletlink/-/walletlink-2.4.7.tgz#3dd034f7cd6e9d9f4cc1d677bb951869dc743e20" + integrity sha512-jhLVOMly9oWiSE8mZ4/+uMyVsAKHw71kGbgC1xYp50SQpuLT2pfa6Hiw2VQ0omP/WHsDAPFuBo8hJGxggr768w== dependencies: "@metamask/safe-event-emitter" "2.0.0" bind-decorator "^1.0.11" @@ -23319,85 +23403,85 @@ web-vitals@^2.1.0: resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-2.1.2.tgz#3a6c8faebf9097a6ccd17f5f45c9485d8d62dab1" integrity sha512-nZnEH8dj+vJFqCRYdvYv0a59iLXsb8jJkt+xvXfwgnkyPdsSLtKNlYmtTDiHmTNGXeSXtpjTTUcNvFtrAk6VMQ== -web3-bzz@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.6.1.tgz#8430eb3cbb69baaee4981d190b840748c37a9ec2" - integrity sha512-JbnFNbRlwwHJZPtVuCxo7rC4U4OTg+mPsyhjgPQJJhS0a6Y54OgVWYk9UA/95HqbmTJwTtX329gJoSsseEfrng== +web3-bzz@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.7.0.tgz#0b754d787a1700f0580fa741fc707d19d1447ff4" + integrity sha512-XPhTWUnZa8gnARfiqaag3jJ9+6+a66Li8OikgBUJoMUqPuQTCJPncTbGYqOJIfRFGavEAdlMnfYXx9lvgv2ZPw== dependencies: "@types/node" "^12.12.6" got "9.6.0" swarm-js "^0.1.40" -web3-core-helpers@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.6.1.tgz#cb21047306871f4cf0fedfece7d47ea2aa96141b" - integrity sha512-om2PZvK1uoWcgMq6JfcSx3241LEIVF6qi2JuHz2SLKiKEW5UsBUaVx0mNCmcZaiuYQCyOsLS3r33q5AdM+v8ng== +web3-core-helpers@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.7.0.tgz#0eaef7bc55ff7ec5ba726181d0e8529be5d60903" + integrity sha512-kFiqsZFHJliKF8VKZNjt2JvKu3gu7h3N1/ke3EPhdp9Li/rLmiyzFVr6ApryZ1FSjbSx6vyOkibG3m6xQ5EHJA== dependencies: - web3-eth-iban "1.6.1" - web3-utils "1.6.1" + web3-eth-iban "1.7.0" + web3-utils "1.7.0" -web3-core-method@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.6.1.tgz#4ae91c639bf1da85ebfd8b99595da6a2235d7b98" - integrity sha512-szH5KyIWIaULQDBdDvevQUCHV9lsExJ/oV0ePqK+w015D2SdMPMuhii0WB+HCePaksWO+rr/GAypvV9g2T3N+w== +web3-core-method@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.7.0.tgz#5e98030ac9e0d96c6ff1ba93fde1292a332b1b81" + integrity sha512-43Om+kZX8wU5u1pJ28TltF9e9pSTRph6b8wrOb6wgXAfPHqMulq6UTBJWjXXIRVN46Eiqv0nflw35hp9bbgnbA== dependencies: "@ethersproject/transactions" "^5.0.0-beta.135" - web3-core-helpers "1.6.1" - web3-core-promievent "1.6.1" - web3-core-subscriptions "1.6.1" - web3-utils "1.6.1" + web3-core-helpers "1.7.0" + web3-core-promievent "1.7.0" + web3-core-subscriptions "1.7.0" + web3-utils "1.7.0" -web3-core-promievent@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.6.1.tgz#f650dea9361e2edf02691015b213fcc8ea499992" - integrity sha512-byJ5s2MQxrWdXd27pWFmujfzsTZK4ik8rDgIV1RFDFc+rHZ2nZhq+VWk7t/Nkrj7EaVXncEgTdPEHc18nx+ocQ== +web3-core-promievent@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.7.0.tgz#e2c6c38f29b912cc549a2a3f806636a3393983eb" + integrity sha512-xPH66XeC0K0k29GoRd0vyPQ07yxERPRd4yVPrbMzGAz/e9E4M3XN//XK6+PdfGvGw3fx8VojS+tNIMiw+PujbQ== dependencies: eventemitter3 "4.0.4" -web3-core-requestmanager@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.6.1.tgz#d9c08b0716c9cda546a0c02767b7e08deb04448a" - integrity sha512-4y7etYEUtkfflyYVBfN1oJtCbVFNhNX1omlEYzezhTnPj3/dT7n+dhUXcqvIhx9iKA13unGfpFge80XNFfcB8A== +web3-core-requestmanager@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.7.0.tgz#5b62b413471d6d2a789ee33d587d280178979c7e" + integrity sha512-rA3dBTBPrt+eIfTAQ2/oYNTN/2wbZaYNR3pFZGqG8+2oCK03+7oQyz4sWISKy/nYQhURh4GK01rs9sN4o/Tq9w== dependencies: util "^0.12.0" - web3-core-helpers "1.6.1" - web3-providers-http "1.6.1" - web3-providers-ipc "1.6.1" - web3-providers-ws "1.6.1" + web3-core-helpers "1.7.0" + web3-providers-http "1.7.0" + web3-providers-ipc "1.7.0" + web3-providers-ws "1.7.0" -web3-core-subscriptions@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.6.1.tgz#4dfc1f74137354d4ac9eaa628aa916c5e2cc8741" - integrity sha512-WZwxsYttIojyGQ5RqxuQcKg0IJdDCFpUe4EncS3QKZwxPqWzGmgyLwE0rm7tP+Ux1waJn5CUaaoSCBxWGSun1g== +web3-core-subscriptions@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.7.0.tgz#30475d8ed5f51a170e5df02085f721925622a795" + integrity sha512-6giF8pyJrPmWrRpc2WLoVCvQdMMADp20ZpAusEW72axauZCNlW1XfTjs0i4QHQBfdd2lFp65qad9IuATPhuzrQ== dependencies: eventemitter3 "4.0.4" - web3-core-helpers "1.6.1" + web3-core-helpers "1.7.0" -web3-core@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.6.1.tgz#b41f08fdc9ea1082d15384a3d6fa93a47c3fc1b4" - integrity sha512-m+b7UfYvU5cQUAh6NRfxRzH/5B3to1AdEQi1HIQt570cDWlObOOmoO9tY6iJnI5w4acxIO19LqjDMqEJGBYyRQ== +web3-core@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.7.0.tgz#67b7839130abd19476e7f614ea6ec4c64d08eb00" + integrity sha512-U/CRL53h3T5KHl8L3njzCBT7fCaHkbE6BGJe3McazvFldRbfTDEHXkUJCyM30ZD0RoLi3aDfTVeFIusmEyCctA== dependencies: "@types/bn.js" "^4.11.5" "@types/node" "^12.12.6" bignumber.js "^9.0.0" - web3-core-helpers "1.6.1" - web3-core-method "1.6.1" - web3-core-requestmanager "1.6.1" - web3-utils "1.6.1" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-core-requestmanager "1.7.0" + web3-utils "1.7.0" -web3-eth-abi@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.6.1.tgz#15b937e3188570754d50bbac51a4bb0578600d1d" - integrity sha512-svhYrAlXP9XQtV7poWKydwDJq2CaNLMtmKydNXoOBLcQec6yGMP+v20pgrxF2H6wyTK+Qy0E3/5ciPOqC/VuoQ== +web3-eth-abi@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.7.0.tgz#4fac9c7d9e5a62b57f8884b37371f515c766f3f4" + integrity sha512-heqR0bWxgCJwjWIhq2sGyNj9bwun5+Xox/LdZKe+WMyTSy0cXDXEAgv3XKNkXC4JqdDt/ZlbTEx4TWak4TRMSg== dependencies: "@ethersproject/abi" "5.0.7" - web3-utils "1.6.1" + web3-utils "1.7.0" -web3-eth-accounts@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.6.1.tgz#aeb0dfb52c4391773550569732975b471212583f" - integrity sha512-rGn3jwnuOKwaQRu4SiShz0YAQ87aVDBKs4HO43+XTCI1q1Y1jn3NOsG3BW9ZHaOckev4+zEyxze/Bsh2oEk24w== +web3-eth-accounts@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.7.0.tgz#d0a6f2cfbd61dd6014224056070b7f8d1d63c0ab" + integrity sha512-Zwm7TlQXdXGRuS6+ib1YsR5fQwpfnFyL6UAZg1zERdrUrs3IkCZSL3yCP/8ZYbAjdTEwWljoott2iSqXNH09ug== dependencies: "@ethereumjs/common" "^2.5.0" "@ethereumjs/tx" "^3.3.2" @@ -23406,85 +23490,85 @@ web3-eth-accounts@1.6.1: ethereumjs-util "^7.0.10" scrypt-js "^3.0.1" uuid "3.3.2" - web3-core "1.6.1" - web3-core-helpers "1.6.1" - web3-core-method "1.6.1" - web3-utils "1.6.1" + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-utils "1.7.0" -web3-eth-contract@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.6.1.tgz#4b0a2c0b37015d70146e54c7cb3f035a58fbeec0" - integrity sha512-GXqTe3mF6kpbOAakiNc7wtJ120/gpuKMTZjuGFKeeY8aobRLfbfgKzM9IpyqVZV2v5RLuGXDuurVN2KPgtu3hQ== +web3-eth-contract@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.7.0.tgz#3795767a65d7b87bd22baea3e18aafdd928d5313" + integrity sha512-2LY1Xwxu5rx468nqHuhvupQAIpytxIUj3mGL9uexszkhrQf05THVe3i4OnUCzkeN6B2cDztNOqLT3j9SSnVQDg== dependencies: "@types/bn.js" "^4.11.5" - web3-core "1.6.1" - web3-core-helpers "1.6.1" - web3-core-method "1.6.1" - web3-core-promievent "1.6.1" - web3-core-subscriptions "1.6.1" - web3-eth-abi "1.6.1" - web3-utils "1.6.1" - -web3-eth-ens@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.6.1.tgz#801bd5fb5237377ec2ed8517a9fe4634f2269c7a" - integrity sha512-ngprtbnoRgxg8s1wXt9nXpD3h1P+p7XnKXrp/8GdFI9uDmrbSQPRfzBw86jdZgOmy78hAnWmrHI6pBInmgi2qQ== + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-core-promievent "1.7.0" + web3-core-subscriptions "1.7.0" + web3-eth-abi "1.7.0" + web3-utils "1.7.0" + +web3-eth-ens@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.7.0.tgz#49c5300935b026578aaaf9664e5e5529d4c76a68" + integrity sha512-I1bikYJJWQ/FJZIAvwsGOvzAgcRIkosWG4s1L6veRoXaU8OEJFeh4s00KcfHDxg7GWZZGbUSbdbzKpwRbWnvkg== dependencies: content-hash "^2.5.2" eth-ens-namehash "2.0.8" - web3-core "1.6.1" - web3-core-helpers "1.6.1" - web3-core-promievent "1.6.1" - web3-eth-abi "1.6.1" - web3-eth-contract "1.6.1" - web3-utils "1.6.1" - -web3-eth-iban@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.6.1.tgz#20bbed75723e3e9ff98e624979629d26329462b6" - integrity sha512-91H0jXZnWlOoXmc13O9NuQzcjThnWyAHyDn5Yf7u6mmKOhpJSGF/OHlkbpXt1Y4v2eJdEPaVFa+6i8aRyagE7Q== + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-promievent "1.7.0" + web3-eth-abi "1.7.0" + web3-eth-contract "1.7.0" + web3-utils "1.7.0" + +web3-eth-iban@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.7.0.tgz#b56cd58587457d3339730e0cb42772a37141b434" + integrity sha512-1PFE/Og+sPZaug+M9TqVUtjOtq0HecE+SjDcsOOysXSzslNC2CItBGkcRwbvUcS+LbIkA7MFsuqYxOL0IV/gyA== dependencies: bn.js "^4.11.9" - web3-utils "1.6.1" + web3-utils "1.7.0" -web3-eth-personal@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.6.1.tgz#9b524fb9f92b51163f46920ee2663d34a4897c8d" - integrity sha512-ItsC89Ln02+irzJjK6ALcLrMZfbVUCqVbmb/ieDKJ+eLW3pNkBNwoUzaydh92d5NzxNZgNxuQWVdlFyYX2hkEw== +web3-eth-personal@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.7.0.tgz#260c9b6af6e0bea772c6a9a5d58c8d62c035ed99" + integrity sha512-Dr9RZTNOR80PhrPKGdktDUXpOgExEcCcosBj080lKCJFU1paSPj9Zfnth3u6BtIOXyKsVFTrpqekqUDyAwXnNw== dependencies: "@types/node" "^12.12.6" - web3-core "1.6.1" - web3-core-helpers "1.6.1" - web3-core-method "1.6.1" - web3-net "1.6.1" - web3-utils "1.6.1" + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-net "1.7.0" + web3-utils "1.7.0" -web3-eth@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.6.1.tgz#a25aba1ac213d872ecf3f81c7b4ab8072ecae224" - integrity sha512-kOV1ZgCKypSo5BQyltRArS7ZC3bRpIKAxSgzl7pUFinUb/MxfbM9KGeNxUXoCfTSErcCQJaDjcS6bSre5EMKuQ== - dependencies: - web3-core "1.6.1" - web3-core-helpers "1.6.1" - web3-core-method "1.6.1" - web3-core-subscriptions "1.6.1" - web3-eth-abi "1.6.1" - web3-eth-accounts "1.6.1" - web3-eth-contract "1.6.1" - web3-eth-ens "1.6.1" - web3-eth-iban "1.6.1" - web3-eth-personal "1.6.1" - web3-net "1.6.1" - web3-utils "1.6.1" - -web3-net@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.6.1.tgz#7a630a804ec9f81908ae52ccbb4ebbb9530b3906" - integrity sha512-gpnqKEIwfUHh5ik7wsQFlCje1DfcmGv+Sk7LCh1hCqn++HEDQxJ/mZCrMo11ZZpZHCH7c87imdxTg96GJnRxDw== +web3-eth@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.7.0.tgz#4adbed9b28ab7f81cb11e3586a12d01ab6e812aa" + integrity sha512-3uYwjMjn/MZjKIzXCt4YL9ja/k9X5shfa4lKparZhZE6uesmu+xmSmrEFXA/e9qcveF50jkV7frjkT8H+cLYtw== + dependencies: + web3-core "1.7.0" + web3-core-helpers "1.7.0" + web3-core-method "1.7.0" + web3-core-subscriptions "1.7.0" + web3-eth-abi "1.7.0" + web3-eth-accounts "1.7.0" + web3-eth-contract "1.7.0" + web3-eth-ens "1.7.0" + web3-eth-iban "1.7.0" + web3-eth-personal "1.7.0" + web3-net "1.7.0" + web3-utils "1.7.0" + +web3-net@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.7.0.tgz#694a0c7988f7efc336bab0ee413eb4522efee3b2" + integrity sha512-8pmfU1Se7DmG40Pu8nOCKlhuI12VsVzCtdFDnLAai0zGVAOUuuOCK71B2aKm6u9amWBJjtOlyrCwvsG+QEd6dw== dependencies: - web3-core "1.6.1" - web3-core-method "1.6.1" - web3-utils "1.6.1" + web3-core "1.7.0" + web3-core-method "1.7.0" + web3-utils "1.7.0" web3-provider-engine@16.0.1: version "16.0.1" @@ -23514,45 +23598,45 @@ web3-provider-engine@16.0.1: xhr "^2.2.0" xtend "^4.0.1" -web3-providers-http@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.6.1.tgz#b59b14eefef23b98c327806f5f566303a73bd435" - integrity sha512-xBoKOJxu10+kO3ikamXmBfrWZ/xpQOGy0ocdp7Y81B17En5TXELwlmMXt1UlIgWiyYDhjq4OwlH/VODYqHXy3A== +web3-providers-http@1.7.0, web3-providers-http@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.7.0.tgz#0661261eace122a0ed5853f8be5379d575a9130c" + integrity sha512-Y9reeEiApfvQKLUUtrU4Z0c+H6b7BMWcsxjgoXndI1C5NB297mIUfltXxfXsh5C/jk5qn4Q3sJp3SwQTyVjH7Q== dependencies: - web3-core-helpers "1.6.1" + web3-core-helpers "1.7.0" xhr2-cookies "1.1.0" -web3-providers-ipc@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.6.1.tgz#7ba460589d46896bb3d124288deed1b6a72d517e" - integrity sha512-anyoIZlpMzwEQI4lwylTzDrHsVp20v0QUtSTp2B5jInBinmQtyCE7vnbX20jEQ4j5uPwfJabKNtoJsk6a3O4WQ== +web3-providers-ipc@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.7.0.tgz#152dc1231eb4f17426498d4d5d973c865eab03d9" + integrity sha512-U5YLXgu6fvAK4nnMYqo9eoml3WywgTym0dgCdVX/n1UegLIQ4nctTubBAuWQEJzmAzwh+a6ValGcE7ZApTRI7Q== dependencies: oboe "2.1.5" - web3-core-helpers "1.6.1" + web3-core-helpers "1.7.0" -web3-providers-ws@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.6.1.tgz#f7ee71f158971102b865e99ea7911f483e0507e9" - integrity sha512-FWMEFYb4rYFYRgSFBf/O1Ex4p/YKSlN+JydCtdlJwRimd89qm95CTfs4xGjCskwvXMjV2sarH+f1NPwJXicYpg== +web3-providers-ws@1.7.0, web3-providers-ws@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.7.0.tgz#99c2de9f6b5ac56e926794ef9074c7442d937372" + integrity sha512-0a8+lVV3JBf+eYnGOsdzOpftK1kis5X7s35QAdoaG5SDapnEylXFlR4xDSSSU88ZwMwvse8hvng2xW6A7oeWxw== dependencies: eventemitter3 "4.0.4" - web3-core-helpers "1.6.1" + web3-core-helpers "1.7.0" websocket "^1.0.32" -web3-shh@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.6.1.tgz#eebaab2e5e6be80fe2585c6c094fa10a03349ca7" - integrity sha512-oP00HbAtybLCGlLOZUYXOdeB9xq88k2l0TtStvKBtmFqRt+zVk5TxEeuOnVPRxNhcA2Un8RUw6FtvgZlWStu9A== +web3-shh@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.7.0.tgz#ed9d085b670bb5a938f2847393478e33df3ec95c" + integrity sha512-RZhxcevALIPK178VZCpwMBvQeW+IoWtRJ4EMdegpbnETeZaC3aRUcs6vKnrf0jXJjm4J/E2Dt438Y1Ord/1IMw== dependencies: - web3-core "1.6.1" - web3-core-method "1.6.1" - web3-core-subscriptions "1.6.1" - web3-net "1.6.1" + web3-core "1.7.0" + web3-core-method "1.7.0" + web3-core-subscriptions "1.7.0" + web3-net "1.7.0" -web3-utils@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.6.1.tgz#befcb23922b00603ab56d8c5b4158468dc494aca" - integrity sha512-RidGKv5kOkcerI6jQqDFDoTllQQqV+rPhTzZHhmbqtFObbYpU93uc+yG1LHivRTQhA6llIx67iudc/vzisgO+w== +web3-utils@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.0.tgz#c59f0fd43b2449357296eb54541810b99b1c771c" + integrity sha512-O8Tl4Ky40Sp6pe89Olk2FsaUkgHyb5QAXuaKo38ms3CxZZ4d3rPGfjP9DNKGm5+IUgAZBNpF1VmlSmNCqfDI1w== dependencies: bn.js "^4.11.9" ethereum-bloom-filters "^1.0.6" @@ -23562,18 +23646,18 @@ web3-utils@1.6.1: randombytes "^2.1.0" utf8 "3.0.0" -web3@^1.5.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.6.1.tgz#c9e68fe7b3073adddf35393441f950ec69b92735" - integrity sha512-c299lLiyb2/WOcxh7TinwvbATaMmrgNIeAzbLbmOKHI0LcwyfsB1eu2ReOIrfrCYDYRW2KAjYr7J7gHawqDNPQ== +web3@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.7.0.tgz#5867cd10a2bebb5c33fc218368e3f6f826f6897e" + integrity sha512-n39O7QQNkpsjhiHMJ/6JY6TaLbdX+2FT5iGs8tb3HbIWOhPm4+a7UDbr5Lkm+gLa9aRKWesZs5D5hWyEvg4aJA== dependencies: - web3-bzz "1.6.1" - web3-core "1.6.1" - web3-eth "1.6.1" - web3-eth-personal "1.6.1" - web3-net "1.6.1" - web3-shh "1.6.1" - web3-utils "1.6.1" + web3-bzz "1.7.0" + web3-core "1.7.0" + web3-eth "1.7.0" + web3-eth-personal "1.7.0" + web3-net "1.7.0" + web3-shh "1.7.0" + web3-utils "1.7.0" webidl-conversions@^3.0.0: version "3.0.1" @@ -23590,6 +23674,21 @@ webidl-conversions@^6.1.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== +webpack-bundle-analyzer@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.5.0.tgz#1b0eea2947e73528754a6f9af3e91b2b6e0f79d5" + integrity sha512-GUMZlM3SKwS8Z+CKeIFx7CVoHn3dXFcUAjT/dcZQQmfSZGvitPfMob2ipjai7ovFFqPvTqkEZ/leL4O0YOdAYQ== + dependencies: + acorn "^8.0.4" + acorn-walk "^8.0.0" + chalk "^4.1.0" + commander "^7.2.0" + gzip-size "^6.0.0" + lodash "^4.17.20" + opener "^1.5.2" + sirv "^1.0.7" + ws "^7.3.1" + webpack-dev-middleware@^3.7.2: version "3.7.3" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz#0639372b143262e2b84ab95d3b91a7597061c2c5" @@ -24149,6 +24248,11 @@ ws@^6.2.1: dependencies: async-limiter "~1.0.0" +ws@^7.3.1: + version "7.5.7" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" + integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== + ws@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.3.0.tgz#7185e252c8973a60d57170175ff55fdbd116070d"