From a89ab1dfe17ad20adaebcc5f1ef6e9d4d55ae3c8 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 12:57:52 -0300 Subject: [PATCH 01/36] chore: Install @dcl/eslint-config package --- webapp/package-lock.json | 1918 +++++++++++++++++++++++++++++++++++--- webapp/package.json | 1 + 2 files changed, 1786 insertions(+), 133 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index ec4ed1ea19..0a44d51494 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0-development", "dependencies": { "@dcl/crypto": "^3.0.0", + "@dcl/eslint-config": "^1.1.10", "@dcl/schemas": "^9.2.0", "@dcl/single-sign-on-client": "^0.0.12", "@dcl/ui-env": "^1.2.0", @@ -191,6 +192,14 @@ "@ethersproject/properties": "^5.0.7" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@adobe/css-tools": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.1.0.tgz", @@ -2436,6 +2445,492 @@ "@scure/bip39": "1.0.0" } }, + "node_modules/@dcl/eslint-config": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@dcl/eslint-config/-/eslint-config-1.1.10.tgz", + "integrity": "sha512-6cIgvYKExnhn6DD6C/p3eQo+jlqFH5cMIbI8leaxAL6mym6jlLzKEqvksHW0S120Zgh5QqQ2B3MZGUgj8CBStQ==", + "dependencies": { + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", + "eslint": "^8.44.0", + "eslint-config-prettier": "^8.8.0", + "eslint-import-resolver-babel-module": "^5.3.2", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-autofix": "^1.1.0", + "eslint-plugin-css-import-order": "^1.1.0", + "eslint-plugin-import": "npm:eslint-plugin-i@^2.27.5-3", + "eslint-plugin-prettier": "^4.2.1", + "prettier": "^2.8.8" + } + }, + "node_modules/@dcl/eslint-config/node_modules/@eslint/eslintrc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@dcl/eslint-config/node_modules/@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "dependencies": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@dcl/eslint-config/node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/@dcl/eslint-config/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/@dcl/eslint-config/node_modules/eslint": { + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@dcl/eslint-config/node_modules/eslint-plugin-import": { + "name": "eslint-plugin-i", + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.28.0.tgz", + "integrity": "sha512-dFK+YXLVmMfWZoQI7+qty+vCESIH91BT9p8ctvQXegwcq8TzGAf80JzPmwRdirfczcQOs51ikrJwAEmNqttC0g==", + "dependencies": { + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "get-tsconfig": "^4.6.2", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "resolve": "^1.22.3", + "semver": "^7.5.3" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://opencollective.com/unts" + }, + "peerDependencies": { + "eslint": "^7.2.0 || ^8" + } + }, + "node_modules/@dcl/eslint-config/node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@dcl/eslint-config/node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@dcl/eslint-config/node_modules/eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/@dcl/eslint-config/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@dcl/eslint-config/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@dcl/eslint-config/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@dcl/eslint-config/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@dcl/eslint-config/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@dcl/eslint-config/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@dcl/eslint-config/node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@dcl/eslint-config/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@dcl/eslint-config/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@dcl/eslint-config/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@dcl/eslint-config/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@dcl/eslint-config/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@dcl/eslint-config/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@dcl/eslint-config/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/@dcl/hashing": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-2.0.0.tgz", @@ -2578,6 +3073,39 @@ "resolved": "https://registry.npmjs.org/@dcl/ui-env/-/ui-env-1.2.0.tgz", "integrity": "sha512-PZNzzs7Zin+n5AIsobnSTHVYxhscULUfexnExTiaD4jQoft5RoBbtnPHhnocRA/WC/Wz9+eNMC10ENnUIi2dBQ==" }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "0.4.3", "license": "MIT", @@ -2603,6 +3131,14 @@ "node": ">= 4" } }, + "node_modules/@eslint/js": { + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@ethersproject/abi": { "version": "5.0.13", "funding": [ @@ -3725,6 +4261,18 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "license": "BSD-3-Clause" @@ -6082,6 +6630,11 @@ "@types/node": "*" } }, + "node_modules/@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==" + }, "node_modules/@types/sinon": { "version": "7.5.2", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", @@ -6277,6 +6830,97 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "dependencies": { + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@typescript-eslint/types": { "version": "4.29.1", "license": "MIT", @@ -6313,6 +6957,112 @@ } } }, + "node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@typescript-eslint/visitor-keys": { "version": "4.29.1", "license": "MIT", @@ -8212,6 +8962,62 @@ "npm": ">=6" } }, + "node_modules/babel-plugin-module-resolver": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", + "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", + "peer": true, + "dependencies": { + "find-babel-config": "^2.0.0", + "glob": "^8.0.3", + "pkg-up": "^3.1.0", + "reselect": "^4.1.7", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/babel-plugin-named-asset-import": { "version": "0.3.8", "license": "MIT", @@ -10766,6 +11572,20 @@ "typescript": "^2.2.0 || ^3.0.0" } }, + "node_modules/dcl-tslint-config-standard/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/debug": { "version": "4.3.4", "license": "MIT", @@ -10781,20 +11601,6 @@ } } }, - "node_modules/dcl-tslint-config-standard/node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/debug/node_modules/ms": { "version": "2.1.2", "license": "MIT" @@ -12159,6 +12965,17 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-config-prettier": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, "node_modules/eslint-config-react-app": { "version": "6.0.0", "license": "MIT", @@ -12190,12 +13007,30 @@ } } }, + "node_modules/eslint-import-resolver-babel-module": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-5.3.2.tgz", + "integrity": "sha512-K7D8n0O6p/JJncPote8yiuB7chJfu26Yn/Q3gzT53cNzJNS0NUCkI0iuimj4/vWVRHVQvPnYWeq07V8RvKjz/A==", + "dependencies": { + "pkg-up": "^3.1.0", + "resolve": "^1.20.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0", + "babel-plugin-module-resolver": "^3.0.0 || ^4.0.0 || ^5.0.0" + } + }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.6", - "license": "MIT", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dependencies": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { @@ -12205,15 +13040,64 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz", + "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==", + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" + } + }, + "node_modules/eslint-import-resolver-typescript/node_modules/enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint-import-resolver-typescript/node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "engines": { + "node": ">=6" + } + }, "node_modules/eslint-module-utils": { - "version": "2.7.3", - "license": "MIT", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", "dependencies": { - "debug": "^3.2.7", - "find-up": "^2.1.0" + "debug": "^3.2.7" }, "engines": { "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, "node_modules/eslint-module-utils/node_modules/debug": { @@ -12223,52 +13107,68 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-module-utils/node_modules/find-up": { - "version": "2.1.0", - "license": "MIT", + "node_modules/eslint-plugin-autofix": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-autofix/-/eslint-plugin-autofix-1.1.0.tgz", + "integrity": "sha512-aKQ7s6CTeJRJgnhSlsGI7kQhnNCa1q3UYBM+9PTEgvdC5b+GjV/SZA233VNqkoBldb7/BkeWBRjorUjxeUfrxA==", "dependencies": { - "locate-path": "^2.0.0" + "eslint-rule-composer": "^0.3.0", + "espree": "^9.0.0", + "esutils": "^2.0.2", + "lodash": "^4.17.20", + "string-similarity": "^4.0.3" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "peerDependencies": { + "eslint": ">= 5.12.1" } }, - "node_modules/eslint-module-utils/node_modules/locate-path": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "node_modules/eslint-plugin-autofix/node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=4" + "node": ">=0.4.0" } }, - "node_modules/eslint-module-utils/node_modules/p-limit": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "p-try": "^1.0.0" - }, + "node_modules/eslint-plugin-autofix/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-module-utils/node_modules/p-locate": { - "version": "2.0.0", - "license": "MIT", + "node_modules/eslint-plugin-autofix/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dependencies": { - "p-limit": "^1.1.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-module-utils/node_modules/p-try": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=4" + "node_modules/eslint-plugin-css-import-order": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-css-import-order/-/eslint-plugin-css-import-order-1.1.0.tgz", + "integrity": "sha512-43ODxP1sXpmgI4c+NCtXqmhkLsYGe8El1ewOlvsXKchLjWLxJw5zfp4eEg31Eni+is3jGkBL2TrNyUOOnbOMDg==", + "peerDependencies": { + "eslint": ">= 6.0.0 < 9.0.0" } }, "node_modules/eslint-plugin-flowtype": { @@ -12565,6 +13465,14 @@ "node": ">=4" } }, + "node_modules/eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "license": "BSD-2-Clause", @@ -12738,8 +13646,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "license": "BSD-3-Clause", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dependencies": { "estraverse": "^5.1.0" }, @@ -14476,7 +15385,6 @@ }, "node_modules/fast-diff": { "version": "1.2.0", - "dev": true, "license": "Apache-2.0" }, "node_modules/fast-equals": { @@ -14485,8 +15393,9 @@ "integrity": "sha512-caj/ZmjHljPrZtbzJ3kfH5ia/k4mTJe/qSiXAGzxZWRZgsgDV0cvNaQULqUX8t0/JVlzzEdYOwCN5DmzTxoD4w==" }, "node_modules/fast-glob": { - "version": "3.2.11", - "license": "MIT", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -14660,6 +15569,28 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/find-babel-config": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", + "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", + "peer": true, + "dependencies": { + "json5": "^2.1.1", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/find-babel-config/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/find-cache-dir": { "version": "2.1.0", "license": "MIT", @@ -15232,6 +16163,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", + "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/get-value": { "version": "2.0.6", "license": "MIT", @@ -15320,8 +16262,9 @@ } }, "node_modules/globals": { - "version": "13.13.0", - "license": "MIT", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dependencies": { "type-fest": "^0.20.2" }, @@ -15424,6 +16367,11 @@ "version": "4.2.9", "license": "ISC" }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + }, "node_modules/graphql": { "version": "14.7.0", "license": "MIT", @@ -16679,8 +17627,9 @@ } }, "node_modules/is-core-module": { - "version": "2.8.1", - "license": "MIT", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dependencies": { "has": "^1.0.3" }, @@ -19799,6 +20748,11 @@ "version": "1.4.0", "license": "MIT" }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==" + }, "node_modules/negotiator": { "version": "0.6.3", "license": "MIT", @@ -20327,15 +21281,16 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "license": "MIT", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -21936,6 +22891,17 @@ "node": ">=4" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "license": "MIT", @@ -23775,14 +24741,16 @@ "license": "MIT" }, "node_modules/reselect": { - "version": "4.0.0", - "license": "MIT" + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==" }, "node_modules/resolve": { - "version": "1.22.0", - "license": "MIT", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "dependencies": { - "is-core-module": "^2.8.1", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -23826,6 +24794,14 @@ "version": "3.0.0", "license": "MIT" }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/resolve-url": { "version": "0.2.1", "license": "MIT" @@ -24585,6 +25561,9 @@ } }, "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", @@ -25440,6 +26419,12 @@ "version": "3.0.1", "license": "MIT" }, + "node_modules/string-similarity": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/string-similarity/-/string-similarity-4.0.4.tgz", + "integrity": "sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info." + }, "node_modules/string-width": { "version": "4.2.3", "license": "MIT", @@ -26775,7 +27760,6 @@ "version": "4.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", - "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -29285,6 +30269,11 @@ } } }, + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==" + }, "@adobe/css-tools": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.1.0.tgz", @@ -30741,7 +31730,8 @@ "ajv-errors": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==" + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "requires": {} }, "ajv-keywords": { "version": "5.1.0", @@ -30762,6 +31752,314 @@ } } }, + "@dcl/eslint-config": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@dcl/eslint-config/-/eslint-config-1.1.10.tgz", + "integrity": "sha512-6cIgvYKExnhn6DD6C/p3eQo+jlqFH5cMIbI8leaxAL6mym6jlLzKEqvksHW0S120Zgh5QqQ2B3MZGUgj8CBStQ==", + "requires": { + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", + "eslint": "^8.44.0", + "eslint-config-prettier": "^8.8.0", + "eslint-import-resolver-babel-module": "^5.3.2", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-autofix": "^1.1.0", + "eslint-plugin-css-import-order": "^1.1.0", + "eslint-plugin-import": "npm:eslint-plugin-i@^2.27.5-3", + "eslint-plugin-prettier": "^4.2.1", + "prettier": "^2.8.8" + }, + "dependencies": { + "@eslint/eslintrc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "requires": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "requires": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + } + }, + "@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==" + }, + "@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==" + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "eslint": { + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + } + }, + "eslint-plugin-import": { + "version": "npm:eslint-plugin-i@2.28.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.28.0.tgz", + "integrity": "sha512-dFK+YXLVmMfWZoQI7+qty+vCESIH91BT9p8ctvQXegwcq8TzGAf80JzPmwRdirfczcQOs51ikrJwAEmNqttC0g==", + "requires": { + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "get-tsconfig": "^4.6.2", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "resolve": "^1.22.3", + "semver": "^7.5.3" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "requires": { + "esutils": "^2.0.2" + } + } + } + }, + "eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + }, + "espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "requires": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "requires": { + "is-glob": "^4.0.3" + } + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==" + } + } + }, "@dcl/hashing": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-2.0.0.tgz", @@ -30843,7 +32141,8 @@ "ajv-errors": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==" + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "requires": {} }, "ajv-keywords": { "version": "5.1.0", @@ -30868,6 +32167,26 @@ "resolved": "https://registry.npmjs.org/@dcl/ui-env/-/ui-env-1.2.0.tgz", "integrity": "sha512-PZNzzs7Zin+n5AIsobnSTHVYxhscULUfexnExTiaD4jQoft5RoBbtnPHhnocRA/WC/Wz9+eNMC10ENnUIi2dBQ==" }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "requires": { + "eslint-visitor-keys": "^3.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + } + } + }, + "@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==" + }, "@eslint/eslintrc": { "version": "0.4.3", "requires": { @@ -30887,6 +32206,11 @@ } } }, + "@eslint/js": { + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==" + }, "@ethersproject/abi": { "version": "5.0.13", "requires": { @@ -31556,6 +32880,11 @@ "minimatch": "^3.0.4" } }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" + }, "@humanwhocodes/object-schema": { "version": "1.2.1" }, @@ -32812,7 +34141,8 @@ "version": "14.4.3", "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.4.3.tgz", "integrity": "sha512-kCUc5MEwaEMakkO5x7aoD+DLi02ehmEM2QCGWvNqAS1dV/fAvORWEjnjsEIvml59M7Y5kCkWN6fCCyPOe8OL6Q==", - "dev": true + "dev": true, + "requires": {} }, "@tootallnate/once": { "version": "1.1.2" @@ -33351,6 +34681,11 @@ "@types/node": "*" } }, + "@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==" + }, "@types/sinon": { "version": "7.5.2", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", @@ -33480,6 +34815,52 @@ "@typescript-eslint/visitor-keys": "4.29.1" } }, + "@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "requires": { + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "dependencies": { + "@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==" + }, + "@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + } + } + }, "@typescript-eslint/types": { "version": "4.29.1" }, @@ -33495,6 +34876,65 @@ "tsutils": "^3.21.0" } }, + "@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + } + }, + "@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==" + }, + "@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + } + } + }, "@typescript-eslint/visitor-keys": { "version": "4.29.1", "requires": { @@ -33870,7 +35310,8 @@ "ws": { "version": "7.5.9", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==" + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "requires": {} } } }, @@ -34571,7 +36012,8 @@ } }, "acorn-jsx": { - "version": "5.3.2" + "version": "5.3.2", + "requires": {} }, "acorn-walk": { "version": "7.2.0" @@ -34625,10 +36067,12 @@ } }, "ajv-errors": { - "version": "1.0.1" + "version": "1.0.1", + "requires": {} }, "ajv-keywords": { - "version": "3.5.2" + "version": "3.5.2", + "requires": {} }, "alphanum-sort": { "version": "1.0.2" @@ -34997,8 +36441,55 @@ "resolve": "^1.19.0" } }, + "babel-plugin-module-resolver": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", + "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", + "peer": true, + "requires": { + "find-babel-config": "^2.0.0", + "glob": "^8.0.3", + "pkg-up": "^3.1.0", + "reselect": "^4.1.7", + "resolve": "^1.22.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "peer": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "peer": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "peer": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "babel-plugin-named-asset-import": { - "version": "0.3.8" + "version": "0.3.8", + "requires": {} }, "babel-plugin-polyfill-corejs2": { "version": "0.3.1", @@ -36678,7 +38169,8 @@ "ajv-errors": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==" + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "requires": {} }, "ajv-keywords": { "version": "5.1.0", @@ -36731,7 +38223,8 @@ "ajv-errors": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==" + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "requires": {} }, "ajv-keywords": { "version": "5.1.0", @@ -36801,6 +38294,13 @@ "tslib": "1.9.0", "tsutils": "^3.0.0" } + }, + "typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true, + "peer": true } } }, @@ -36865,7 +38365,8 @@ "ajv-errors": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==" + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "requires": {} }, "ajv-keywords": { "version": "5.1.0", @@ -37826,17 +39327,35 @@ } } }, + "eslint-config-prettier": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "requires": {} + }, "eslint-config-react-app": { "version": "6.0.0", "requires": { "confusing-browser-globals": "^1.0.10" } }, + "eslint-import-resolver-babel-module": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-5.3.2.tgz", + "integrity": "sha512-K7D8n0O6p/JJncPote8yiuB7chJfu26Yn/Q3gzT53cNzJNS0NUCkI0iuimj4/vWVRHVQvPnYWeq07V8RvKjz/A==", + "requires": { + "pkg-up": "^3.1.0", + "resolve": "^1.20.0" + } + }, "eslint-import-resolver-node": { - "version": "0.3.6", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "requires": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" }, "dependencies": { "debug": { @@ -37847,11 +39366,42 @@ } } }, + "eslint-import-resolver-typescript": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz", + "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==", + "requires": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + }, + "dependencies": { + "enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" + } + } + }, "eslint-module-utils": { - "version": "2.7.3", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", "requires": { - "debug": "^3.2.7", - "find-up": "^2.1.0" + "debug": "^3.2.7" }, "dependencies": { "debug": { @@ -37859,37 +39409,49 @@ "requires": { "ms": "^2.1.1" } + } + } + }, + "eslint-plugin-autofix": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-autofix/-/eslint-plugin-autofix-1.1.0.tgz", + "integrity": "sha512-aKQ7s6CTeJRJgnhSlsGI7kQhnNCa1q3UYBM+9PTEgvdC5b+GjV/SZA233VNqkoBldb7/BkeWBRjorUjxeUfrxA==", + "requires": { + "eslint-rule-composer": "^0.3.0", + "espree": "^9.0.0", + "esutils": "^2.0.2", + "lodash": "^4.17.20", + "string-similarity": "^4.0.3" + }, + "dependencies": { + "acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==" }, - "find-up": { - "version": "2.1.0", - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "requires": { - "p-try": "^1.0.0" - } + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" }, - "p-locate": { - "version": "2.0.0", + "espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "requires": { - "p-limit": "^1.1.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" } - }, - "p-try": { - "version": "1.0.0" } } }, + "eslint-plugin-css-import-order": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-css-import-order/-/eslint-plugin-css-import-order-1.1.0.tgz", + "integrity": "sha512-43ODxP1sXpmgI4c+NCtXqmhkLsYGe8El1ewOlvsXKchLjWLxJw5zfp4eEg31Eni+is3jGkBL2TrNyUOOnbOMDg==", + "requires": {} + }, "eslint-plugin-flowtype": { "version": "5.10.0", "requires": { @@ -38007,7 +39569,8 @@ } }, "eslint-plugin-react-hooks": { - "version": "4.3.0" + "version": "4.3.0", + "requires": {} }, "eslint-plugin-testing-library": { "version": "3.10.2", @@ -38058,6 +39621,11 @@ } } }, + "eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==" + }, "eslint-scope": { "version": "5.1.1", "requires": { @@ -38132,7 +39700,9 @@ "version": "4.0.1" }, "esquery": { - "version": "1.4.0", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "requires": { "estraverse": "^5.1.0" }, @@ -38558,7 +40128,8 @@ "ws": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", - "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==" + "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==", + "requires": {} } } }, @@ -39375,8 +40946,7 @@ "version": "3.1.3" }, "fast-diff": { - "version": "1.2.0", - "dev": true + "version": "1.2.0" }, "fast-equals": { "version": "2.0.4", @@ -39384,7 +40954,9 @@ "integrity": "sha512-caj/ZmjHljPrZtbzJ3kfH5ia/k4mTJe/qSiXAGzxZWRZgsgDV0cvNaQULqUX8t0/JVlzzEdYOwCN5DmzTxoD4w==" }, "fast-glob": { - "version": "3.2.11", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -39506,6 +41078,24 @@ } } }, + "find-babel-config": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", + "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", + "peer": true, + "requires": { + "json5": "^2.1.1", + "path-exists": "^4.0.0" + }, + "dependencies": { + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "peer": true + } + } + }, "find-cache-dir": { "version": "2.1.0", "requires": { @@ -39919,6 +41509,14 @@ "get-intrinsic": "^1.1.1" } }, + "get-tsconfig": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", + "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "requires": { + "resolve-pkg-maps": "^1.0.0" + } + }, "get-value": { "version": "2.0.6" }, @@ -39980,7 +41578,9 @@ } }, "globals": { - "version": "13.13.0", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "requires": { "type-fest": "^0.20.2" }, @@ -40045,6 +41645,11 @@ "graceful-fs": { "version": "4.2.9" }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + }, "graphql": { "version": "14.7.0", "requires": { @@ -40910,7 +42515,9 @@ } }, "is-core-module": { - "version": "2.8.1", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "requires": { "has": "^1.0.3" } @@ -41164,7 +42771,8 @@ "isomorphic-ws": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", - "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==" + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "requires": {} }, "isstream": { "version": "0.1.2" @@ -41627,7 +43235,8 @@ } }, "jest-pnp-resolver": { - "version": "1.2.2" + "version": "1.2.2", + "requires": {} }, "jest-regex-util": { "version": "26.0.0" @@ -42029,7 +43638,8 @@ } }, "ws": { - "version": "7.5.7" + "version": "7.5.7", + "requires": {} } } }, @@ -43151,6 +44761,11 @@ "natural-compare": { "version": "1.4.0" }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==" + }, "negotiator": { "version": "0.6.3" }, @@ -43506,14 +45121,16 @@ } }, "optionator": { - "version": "0.9.1", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "requires": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" } }, "original": { @@ -44623,6 +46240,14 @@ "version": "1.19.1", "dev": true }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "requires": { + "fast-diff": "^1.1.2" + } + }, "pretty-bytes": { "version": "5.6.0" }, @@ -45208,7 +46833,8 @@ "react-intersection-observer": { "version": "9.4.3", "resolved": "https://registry.npmjs.org/react-intersection-observer/-/react-intersection-observer-9.4.3.tgz", - "integrity": "sha512-WNRqMQvKpupr6MzecAQI0Pj0+JQong307knLP4g/nBex7kYfIaZsPpXaIhKHR+oV8z+goUbH9e10j6lGRnTzlQ==" + "integrity": "sha512-WNRqMQvKpupr6MzecAQI0Pj0+JQong307knLP4g/nBex7kYfIaZsPpXaIhKHR+oV8z+goUbH9e10j6lGRnTzlQ==", + "requires": {} }, "react-is": { "version": "16.13.1" @@ -45457,7 +47083,8 @@ "react-virtualized-auto-sizer": { "version": "1.0.15", "resolved": "https://registry.npmjs.org/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.15.tgz", - "integrity": "sha512-01yhkssgHShMiu5W8k+86kgl8lutpl+Uef9KP4wrozXnzZjxWIgj+cH8Qi064oQpKD8myn/JNMzp4tcZNQ3Avg==" + "integrity": "sha512-01yhkssgHShMiu5W8k+86kgl8lutpl+Uef9KP4wrozXnzZjxWIgj+cH8Qi064oQpKD8myn/JNMzp4tcZNQ3Avg==", + "requires": {} }, "react-window": { "version": "1.8.8", @@ -45471,7 +47098,8 @@ "react-window-infinite-loader": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/react-window-infinite-loader/-/react-window-infinite-loader-1.0.8.tgz", - "integrity": "sha512-907ZLAiZZfBHuZyiY0V7uiSL4P/rI6UQyCF9wES1cDWTeyNLgGLaxu+BZkcUW3R5tSCQcbCcWBl0jVIpYzrKGQ==" + "integrity": "sha512-907ZLAiZZfBHuZyiY0V7uiSL4P/rI6UQyCF9wES1cDWTeyNLgGLaxu+BZkcUW3R5tSCQcbCcWBl0jVIpYzrKGQ==", + "requires": {} }, "read-pkg": { "version": "5.2.0", @@ -45922,12 +47550,16 @@ "version": "1.0.0" }, "reselect": { - "version": "4.0.0" + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==" }, "resolve": { - "version": "1.22.0", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "requires": { - "is-core-module": "^2.8.1", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -45954,6 +47586,11 @@ "resolve-pathname": { "version": "3.0.0" }, + "resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==" + }, "resolve-url": { "version": "0.2.1" }, @@ -47081,6 +48718,11 @@ "string-natural-compare": { "version": "3.0.1" }, + "string-similarity": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/string-similarity/-/string-similarity-4.0.4.tgz", + "integrity": "sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==" + }, "string-width": { "version": "4.2.3", "requires": { @@ -47751,7 +49393,8 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", - "dev": true + "dev": true, + "requires": {} }, "ts-pnp": { "version": "1.2.0" @@ -47996,8 +49639,7 @@ "typescript": { "version": "4.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", - "dev": true + "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==" }, "typescript-compare": { "version": "0.0.2", @@ -48229,6 +49871,15 @@ "node-gyp-build": "^4.3.0" } }, + "utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "optional": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, "utf8": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", @@ -49660,7 +51311,8 @@ } }, "ws": { - "version": "7.4.6" + "version": "7.4.6", + "requires": {} }, "xhr": { "version": "2.6.0", diff --git a/webapp/package.json b/webapp/package.json index 240178f0d0..8ae732e723 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -3,6 +3,7 @@ "version": "0.0.0-development", "dependencies": { "@dcl/crypto": "^3.0.0", + "@dcl/eslint-config": "^1.1.10", "@dcl/schemas": "^9.2.0", "@dcl/single-sign-on-client": "^0.0.12", "@dcl/ui-env": "^1.2.0", From 60514bd80c76fd3b43cfab86b401dec2c64af39e Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 13:01:10 -0300 Subject: [PATCH 02/36] chore: Add eslint and prettier configs --- webapp/.eslintrc.js | 6 ++++++ webapp/.prettierrc.json | 8 ++++++++ webapp/package.json | 15 +++++---------- 3 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 webapp/.eslintrc.js create mode 100644 webapp/.prettierrc.json diff --git a/webapp/.eslintrc.js b/webapp/.eslintrc.js new file mode 100644 index 0000000000..6df5b06e3a --- /dev/null +++ b/webapp/.eslintrc.js @@ -0,0 +1,6 @@ +module.exports = { + extends: ['@dcl/eslint-config/dapps'], + parserOptions: { + project: ['tsconfig.json'] + } +} diff --git a/webapp/.prettierrc.json b/webapp/.prettierrc.json new file mode 100644 index 0000000000..56f7d091e6 --- /dev/null +++ b/webapp/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "semi": false, + "singleQuote": true, + "printWidth": 140, + "tabWidth": 2, + "trailingComma": "none", + "arrowParens": "avoid" +} diff --git a/webapp/package.json b/webapp/package.json index 8ae732e723..10ffa72748 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -85,18 +85,13 @@ "test": "react-app-rewired test", "test:coverage": "npm run test -- --coverage", "eject": "react-app-rewired eject", - "lint": "tslint -p tsconfig.json", - "lint:fix": "tslint -p tsconfig.json --fix", + "lint": "eslint -c .eslintrc.js --ext .ts src", + "check:code": "eslint -c .eslintrc.js src", + "fix:code": "npm run check:code -- --fix", + "pre-commit:fix:code": "eslint -c .eslintrc.js --fix", + "pre-commit:fix:prettier": "prettier --config .prettierrc.json --write", "generate-contracts": "typechain --target ethers-v5 --out-dir src/contracts src/contracts/*.json" }, - "eslintConfig": { - "extends": "react-app" - }, - "prettier": { - "printWidth": 80, - "singleQuote": true, - "semi": false - }, "engines": { "node": "16.13.0" }, From c482c7fd67a3ae40aa8b060a0b72c3938daf4cda Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 13:01:56 -0300 Subject: [PATCH 03/36] chore: Install husky package --- webapp/package-lock.json | 22 ++++++++++++++++++++++ webapp/package.json | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 0a44d51494..f918a3cf45 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -74,6 +74,7 @@ "css-mediaquery": "^0.1.2", "customize-cra": "^1.0.0", "dcl-tslint-config-standard": "^3.0.0", + "husky": "^8.0.3", "prettier": "^1.19.1", "react-app-rewired": "^2.2.1", "react-error-overlay": "^6.0.9", @@ -17109,6 +17110,21 @@ "ms": "^2.0.0" } }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/hyphenate-style-name": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", @@ -42179,6 +42195,12 @@ "ms": "^2.0.0" } }, + "husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true + }, "hyphenate-style-name": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", diff --git a/webapp/package.json b/webapp/package.json index 10ffa72748..355d39aae5 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -68,6 +68,7 @@ "css-mediaquery": "^0.1.2", "customize-cra": "^1.0.0", "dcl-tslint-config-standard": "^3.0.0", + "husky": "^8.0.3", "prettier": "^1.19.1", "react-app-rewired": "^2.2.1", "react-error-overlay": "^6.0.9", @@ -90,7 +91,8 @@ "fix:code": "npm run check:code -- --fix", "pre-commit:fix:code": "eslint -c .eslintrc.js --fix", "pre-commit:fix:prettier": "prettier --config .prettierrc.json --write", - "generate-contracts": "typechain --target ethers-v5 --out-dir src/contracts src/contracts/*.json" + "generate-contracts": "typechain --target ethers-v5 --out-dir src/contracts src/contracts/*.json", + "prepare": "husky install" }, "engines": { "node": "16.13.0" From 1963b7cde1ac25d93ddc4a8056e022b47ab99733 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 13:03:20 -0300 Subject: [PATCH 04/36] fix: Move @dcl/eslint-config to devDependencies --- webapp/package-lock.json | 206 +++++++++++++++++++++++++++++++++------ webapp/package.json | 2 +- 2 files changed, 175 insertions(+), 33 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index f918a3cf45..c70b1516ac 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -9,7 +9,6 @@ "version": "0.0.0-development", "dependencies": { "@dcl/crypto": "^3.0.0", - "@dcl/eslint-config": "^1.1.10", "@dcl/schemas": "^9.2.0", "@dcl/single-sign-on-client": "^0.0.12", "@dcl/ui-env": "^1.2.0", @@ -49,6 +48,7 @@ "typesafe-actions": "^5.1.0" }, "devDependencies": { + "@dcl/eslint-config": "^1.1.10", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.4", "@testing-library/react-hooks": "^8.0.1", @@ -2450,6 +2450,7 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/@dcl/eslint-config/-/eslint-config-1.1.10.tgz", "integrity": "sha512-6cIgvYKExnhn6DD6C/p3eQo+jlqFH5cMIbI8leaxAL6mym6jlLzKEqvksHW0S120Zgh5QqQ2B3MZGUgj8CBStQ==", + "dev": true, "dependencies": { "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", @@ -2468,6 +2469,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -2490,6 +2492,7 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -2503,6 +2506,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", "@typescript-eslint/scope-manager": "5.62.0", @@ -2536,6 +2540,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "dev": true, "dependencies": { "@typescript-eslint/scope-manager": "5.62.0", "@typescript-eslint/types": "5.62.0", @@ -2562,6 +2567,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0" @@ -2578,6 +2584,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -2590,6 +2597,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0", @@ -2616,6 +2624,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" @@ -2632,6 +2641,7 @@ "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -2642,12 +2652,14 @@ "node_modules/@dcl/eslint-config/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/@dcl/eslint-config/node_modules/eslint": { "version": "8.47.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", + "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -2702,6 +2714,7 @@ "version": "2.28.0", "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.28.0.tgz", "integrity": "sha512-dFK+YXLVmMfWZoQI7+qty+vCESIH91BT9p8ctvQXegwcq8TzGAf80JzPmwRdirfczcQOs51ikrJwAEmNqttC0g==", + "dev": true, "dependencies": { "debug": "^3.2.7", "doctrine": "^2.1.0", @@ -2727,6 +2740,7 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, "dependencies": { "ms": "^2.1.1" } @@ -2735,6 +2749,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, "dependencies": { "esutils": "^2.0.2" }, @@ -2746,6 +2761,7 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0" }, @@ -2766,6 +2782,7 @@ "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -2781,6 +2798,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -2792,6 +2810,7 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -2808,6 +2827,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "engines": { "node": ">=4.0" } @@ -2816,6 +2836,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -2831,6 +2852,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -2842,6 +2864,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, "engines": { "node": ">=8" } @@ -2850,6 +2873,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -2861,6 +2885,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -2875,6 +2900,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2886,6 +2912,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -2900,6 +2927,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -2914,6 +2942,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "engines": { "node": ">=8" } @@ -2922,6 +2951,7 @@ "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, "bin": { "prettier": "bin-prettier.js" }, @@ -3078,6 +3108,7 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -3092,6 +3123,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -3103,6 +3135,7 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -3136,6 +3169,7 @@ "version": "8.47.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -4266,6 +4300,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, "engines": { "node": ">=12.22" }, @@ -6634,7 +6669,8 @@ "node_modules/@types/semver": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==" + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true }, "node_modules/@types/sinon": { "version": "7.5.2", @@ -6835,6 +6871,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "dev": true, "dependencies": { "@typescript-eslint/typescript-estree": "5.62.0", "@typescript-eslint/utils": "5.62.0", @@ -6861,6 +6898,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -6873,6 +6911,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0", @@ -6899,6 +6938,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" @@ -6915,6 +6955,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -6962,6 +7003,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", @@ -6987,6 +7029,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0" @@ -7003,6 +7046,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -7015,6 +7059,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0", @@ -7041,6 +7086,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" @@ -7057,6 +7103,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -8967,6 +9014,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", + "dev": true, "peer": true, "dependencies": { "find-babel-config": "^2.0.0", @@ -8983,6 +9031,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, "peer": true, "dependencies": { "balanced-match": "^1.0.0" @@ -8992,6 +9041,7 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, "peer": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -9011,6 +9061,7 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, "peer": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -12970,6 +13021,7 @@ "version": "8.10.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -13012,6 +13064,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-5.3.2.tgz", "integrity": "sha512-K7D8n0O6p/JJncPote8yiuB7chJfu26Yn/Q3gzT53cNzJNS0NUCkI0iuimj4/vWVRHVQvPnYWeq07V8RvKjz/A==", + "dev": true, "dependencies": { "pkg-up": "^3.1.0", "resolve": "^1.20.0" @@ -13045,6 +13098,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz", "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==", + "dev": true, "dependencies": { "debug": "^4.3.4", "enhanced-resolve": "^5.12.0", @@ -13069,6 +13123,7 @@ "version": "5.15.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -13081,6 +13136,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, "engines": { "node": ">=6" } @@ -13112,6 +13168,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-autofix/-/eslint-plugin-autofix-1.1.0.tgz", "integrity": "sha512-aKQ7s6CTeJRJgnhSlsGI7kQhnNCa1q3UYBM+9PTEgvdC5b+GjV/SZA233VNqkoBldb7/BkeWBRjorUjxeUfrxA==", + "dev": true, "dependencies": { "eslint-rule-composer": "^0.3.0", "espree": "^9.0.0", @@ -13130,6 +13187,7 @@ "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -13141,6 +13199,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -13152,6 +13211,7 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -13168,6 +13228,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-css-import-order/-/eslint-plugin-css-import-order-1.1.0.tgz", "integrity": "sha512-43ODxP1sXpmgI4c+NCtXqmhkLsYGe8El1ewOlvsXKchLjWLxJw5zfp4eEg31Eni+is3jGkBL2TrNyUOOnbOMDg==", + "dev": true, "peerDependencies": { "eslint": ">= 6.0.0 < 9.0.0" } @@ -13470,6 +13531,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "dev": true, "engines": { "node": ">=4.0.0" } @@ -15386,6 +15448,7 @@ }, "node_modules/fast-diff": { "version": "1.2.0", + "dev": true, "license": "Apache-2.0" }, "node_modules/fast-equals": { @@ -15574,6 +15637,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", + "dev": true, "peer": true, "dependencies": { "json5": "^2.1.1", @@ -15587,6 +15651,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "peer": true, "engines": { "node": ">=8" @@ -16168,6 +16233,7 @@ "version": "4.7.0", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -16371,7 +16437,8 @@ "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true }, "node_modules/graphql": { "version": "14.7.0", @@ -20767,7 +20834,8 @@ "node_modules/natural-compare-lite": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==" + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true }, "node_modules/negotiator": { "version": "0.6.3", @@ -22911,6 +22979,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, "dependencies": { "fast-diff": "^1.1.2" }, @@ -24814,6 +24883,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } @@ -26439,7 +26509,8 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/string-similarity/-/string-similarity-4.0.4.tgz", "integrity": "sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info." + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true }, "node_modules/string-width": { "version": "4.2.3", @@ -31772,6 +31843,7 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/@dcl/eslint-config/-/eslint-config-1.1.10.tgz", "integrity": "sha512-6cIgvYKExnhn6DD6C/p3eQo+jlqFH5cMIbI8leaxAL6mym6jlLzKEqvksHW0S120Zgh5QqQ2B3MZGUgj8CBStQ==", + "dev": true, "requires": { "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", @@ -31790,6 +31862,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -31806,6 +31879,7 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -31816,6 +31890,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "dev": true, "requires": { "@eslint-community/regexpp": "^4.4.0", "@typescript-eslint/scope-manager": "5.62.0", @@ -31833,6 +31908,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "dev": true, "requires": { "@typescript-eslint/scope-manager": "5.62.0", "@typescript-eslint/types": "5.62.0", @@ -31844,6 +31920,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, "requires": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0" @@ -31852,12 +31929,14 @@ "@typescript-eslint/types": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==" + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true }, "@typescript-eslint/typescript-estree": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, "requires": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0", @@ -31872,6 +31951,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, "requires": { "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" @@ -31880,17 +31960,20 @@ "acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==" + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "eslint": { "version": "8.47.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", + "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -31935,6 +32018,7 @@ "version": "npm:eslint-plugin-i@2.28.0", "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.28.0.tgz", "integrity": "sha512-dFK+YXLVmMfWZoQI7+qty+vCESIH91BT9p8ctvQXegwcq8TzGAf80JzPmwRdirfczcQOs51ikrJwAEmNqttC0g==", + "dev": true, "requires": { "debug": "^3.2.7", "doctrine": "^2.1.0", @@ -31951,6 +32035,7 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, "requires": { "ms": "^2.1.1" } @@ -31959,6 +32044,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, "requires": { "esutils": "^2.0.2" } @@ -31969,6 +32055,7 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" } @@ -31977,6 +32064,7 @@ "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -31985,12 +32073,14 @@ "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true }, "espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, "requires": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -32000,12 +32090,14 @@ "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "requires": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -32015,6 +32107,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, "requires": { "is-glob": "^4.0.3" } @@ -32022,12 +32115,14 @@ "is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "requires": { "argparse": "^2.0.1" } @@ -32036,6 +32131,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "requires": { "p-locate": "^5.0.0" } @@ -32044,6 +32140,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -32052,6 +32149,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "requires": { "yocto-queue": "^0.1.0" } @@ -32060,6 +32158,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "requires": { "p-limit": "^3.0.2" } @@ -32067,12 +32166,14 @@ "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true }, "prettier": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==" + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true } } }, @@ -32187,6 +32288,7 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, "requires": { "eslint-visitor-keys": "^3.3.0" }, @@ -32194,14 +32296,16 @@ "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true } } }, "@eslint-community/regexpp": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==" + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true }, "@eslint/eslintrc": { "version": "0.4.3", @@ -32225,7 +32329,8 @@ "@eslint/js": { "version": "8.47.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", - "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==" + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", + "dev": true }, "@ethersproject/abi": { "version": "5.0.13", @@ -32899,7 +33004,8 @@ "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true }, "@humanwhocodes/object-schema": { "version": "1.2.1" @@ -34700,7 +34806,8 @@ "@types/semver": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==" + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true }, "@types/sinon": { "version": "7.5.2", @@ -34835,6 +34942,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "dev": true, "requires": { "@typescript-eslint/typescript-estree": "5.62.0", "@typescript-eslint/utils": "5.62.0", @@ -34845,12 +34953,14 @@ "@typescript-eslint/types": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==" + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true }, "@typescript-eslint/typescript-estree": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, "requires": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0", @@ -34865,6 +34975,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, "requires": { "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" @@ -34873,7 +34984,8 @@ "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true } } }, @@ -34896,6 +35008,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", @@ -34911,6 +35024,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, "requires": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0" @@ -34919,12 +35033,14 @@ "@typescript-eslint/types": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==" + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true }, "@typescript-eslint/typescript-estree": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, "requires": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0", @@ -34939,6 +35055,7 @@ "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, "requires": { "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" @@ -34947,7 +35064,8 @@ "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true } } }, @@ -36461,6 +36579,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", + "dev": true, "peer": true, "requires": { "find-babel-config": "^2.0.0", @@ -36474,6 +36593,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, "peer": true, "requires": { "balanced-match": "^1.0.0" @@ -36483,6 +36603,7 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, "peer": true, "requires": { "fs.realpath": "^1.0.0", @@ -36496,6 +36617,7 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, "peer": true, "requires": { "brace-expansion": "^2.0.1" @@ -39347,6 +39469,7 @@ "version": "8.10.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "dev": true, "requires": {} }, "eslint-config-react-app": { @@ -39359,6 +39482,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-5.3.2.tgz", "integrity": "sha512-K7D8n0O6p/JJncPote8yiuB7chJfu26Yn/Q3gzT53cNzJNS0NUCkI0iuimj4/vWVRHVQvPnYWeq07V8RvKjz/A==", + "dev": true, "requires": { "pkg-up": "^3.1.0", "resolve": "^1.20.0" @@ -39386,6 +39510,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz", "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==", + "dev": true, "requires": { "debug": "^4.3.4", "enhanced-resolve": "^5.12.0", @@ -39400,6 +39525,7 @@ "version": "5.15.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -39408,7 +39534,8 @@ "tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true } } }, @@ -39432,6 +39559,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-autofix/-/eslint-plugin-autofix-1.1.0.tgz", "integrity": "sha512-aKQ7s6CTeJRJgnhSlsGI7kQhnNCa1q3UYBM+9PTEgvdC5b+GjV/SZA233VNqkoBldb7/BkeWBRjorUjxeUfrxA==", + "dev": true, "requires": { "eslint-rule-composer": "^0.3.0", "espree": "^9.0.0", @@ -39443,17 +39571,20 @@ "acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==" + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true }, "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true }, "espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, "requires": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -39466,6 +39597,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-css-import-order/-/eslint-plugin-css-import-order-1.1.0.tgz", "integrity": "sha512-43ODxP1sXpmgI4c+NCtXqmhkLsYGe8El1ewOlvsXKchLjWLxJw5zfp4eEg31Eni+is3jGkBL2TrNyUOOnbOMDg==", + "dev": true, "requires": {} }, "eslint-plugin-flowtype": { @@ -39640,7 +39772,8 @@ "eslint-rule-composer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", - "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==" + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "dev": true }, "eslint-scope": { "version": "5.1.1", @@ -40962,7 +41095,8 @@ "version": "3.1.3" }, "fast-diff": { - "version": "1.2.0" + "version": "1.2.0", + "dev": true }, "fast-equals": { "version": "2.0.4", @@ -41098,6 +41232,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", + "dev": true, "peer": true, "requires": { "json5": "^2.1.1", @@ -41108,6 +41243,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "peer": true } } @@ -41529,6 +41665,7 @@ "version": "4.7.0", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "dev": true, "requires": { "resolve-pkg-maps": "^1.0.0" } @@ -41664,7 +41801,8 @@ "graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true }, "graphql": { "version": "14.7.0", @@ -44786,7 +44924,8 @@ "natural-compare-lite": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==" + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true }, "negotiator": { "version": "0.6.3" @@ -46266,6 +46405,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, "requires": { "fast-diff": "^1.1.2" } @@ -47611,7 +47751,8 @@ "resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==" + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true }, "resolve-url": { "version": "0.2.1" @@ -48743,7 +48884,8 @@ "string-similarity": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/string-similarity/-/string-similarity-4.0.4.tgz", - "integrity": "sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==" + "integrity": "sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==", + "dev": true }, "string-width": { "version": "4.2.3", diff --git a/webapp/package.json b/webapp/package.json index 355d39aae5..915b878af7 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -3,7 +3,6 @@ "version": "0.0.0-development", "dependencies": { "@dcl/crypto": "^3.0.0", - "@dcl/eslint-config": "^1.1.10", "@dcl/schemas": "^9.2.0", "@dcl/single-sign-on-client": "^0.0.12", "@dcl/ui-env": "^1.2.0", @@ -43,6 +42,7 @@ "typesafe-actions": "^5.1.0" }, "devDependencies": { + "@dcl/eslint-config": "^1.1.10", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.4", "@testing-library/react-hooks": "^8.0.1", From 81847fd746990d58829e231033ee3bfa95262bb6 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 13:47:46 -0300 Subject: [PATCH 05/36] chore: Remove tslint --- webapp/package-lock.json | 82 ---------------------------------------- webapp/package.json | 3 -- webapp/tsconfig.json | 21 +++++----- webapp/tslint.json | 23 ----------- 4 files changed, 11 insertions(+), 118 deletions(-) delete mode 100644 webapp/tslint.json diff --git a/webapp/package-lock.json b/webapp/package-lock.json index c70b1516ac..102988719a 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -79,9 +79,6 @@ "react-app-rewired": "^2.2.1", "react-error-overlay": "^6.0.9", "redux-saga-test-plan": "^4.0.3", - "tslint": "^5.20.1", - "tslint-plugin-prettier": "^2.0.1", - "tslint-react": "^4.1.0", "typechain": "^8.0.0", "typescript": "^4.9.3" }, @@ -27604,55 +27601,6 @@ "node": ">=4.2.0" } }, - "node_modules/tslint-plugin-prettier": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-plugin-prettier": "^2.2.0", - "lines-and-columns": "^1.1.6", - "tslib": "^1.7.1" - }, - "engines": { - "node": ">= 4" - }, - "peerDependencies": { - "prettier": "^1.9.0 || ^2.0.0", - "tslint": "^5.0.0 || ^6.0.0" - } - }, - "node_modules/tslint-plugin-prettier/node_modules/eslint-plugin-prettier": { - "version": "2.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" - }, - "engines": { - "node": ">=4.0.0" - }, - "peerDependencies": { - "prettier": ">= 0.11.0" - } - }, - "node_modules/tslint-plugin-prettier/node_modules/jest-docblock": { - "version": "21.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/tslint-react": { - "version": "4.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tsutils": "^3.9.1" - }, - "peerDependencies": { - "tslint": "^5.1.0", - "typescript": ">=2.8.0" - } - }, "node_modules/tslint/node_modules/chalk": { "version": "2.4.2", "dev": true, @@ -49679,36 +49627,6 @@ } } }, - "tslint-plugin-prettier": { - "version": "2.3.0", - "dev": true, - "requires": { - "eslint-plugin-prettier": "^2.2.0", - "lines-and-columns": "^1.1.6", - "tslib": "^1.7.1" - }, - "dependencies": { - "eslint-plugin-prettier": { - "version": "2.7.0", - "dev": true, - "requires": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" - } - }, - "jest-docblock": { - "version": "21.2.0", - "dev": true - } - } - }, - "tslint-react": { - "version": "4.1.0", - "dev": true, - "requires": { - "tsutils": "^3.9.1" - } - }, "tsutils": { "version": "3.21.0", "requires": { diff --git a/webapp/package.json b/webapp/package.json index 915b878af7..61b85a340d 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -73,9 +73,6 @@ "react-app-rewired": "^2.2.1", "react-error-overlay": "^6.0.9", "redux-saga-test-plan": "^4.0.3", - "tslint": "^5.20.1", - "tslint-plugin-prettier": "^2.0.1", - "tslint-react": "^4.1.0", "typechain": "^8.0.0", "typescript": "^4.9.3" }, diff --git a/webapp/tsconfig.json b/webapp/tsconfig.json index df18d5f57b..5ad2f9c682 100644 --- a/webapp/tsconfig.json +++ b/webapp/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es6", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, @@ -21,11 +17,16 @@ "noFallthroughCasesInSwitch": true, "noEmit": true, "jsx": "react-jsx", - "types": [ - "jest" + "types": ["jest"], + "plugins": [ + { + "name": "tslint-language-service" + }, + { + "name": "dcl-tslint-config-standard" + } ] }, - "include": [ - "src" - ] + "include": ["src"], + "exclude": ["src/contracts/*.ts"] } diff --git a/webapp/tslint.json b/webapp/tslint.json deleted file mode 100644 index 1734f1a9e7..0000000000 --- a/webapp/tslint.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends": [ - "tslint-react", - "dcl-tslint-config-standard", - "tslint-plugin-prettier" - ], - "rules": { - "ter-indent": false, - "no-commented-out-code": false, - "jsx-no-multiline-js": false, - "jsx-wrap-multiline": false, - "jsx-no-lambda": false, - "ban-types": [true, "Number", "Boolean", "String", "Object"], - "prettier": [ - true, - { "printWidth": 80, "singleQuote": true, "semi": false } - ], - "quotemark": [true, "single", "jsx-double"] - }, - "linterOptions": { - "exclude": ["src/contracts/*.ts", "node_modules/**/*.ts", "./**/*.js"] - } -} From c10bdecac95e600db9fcd61a629f6c77bb4275db Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 13:47:56 -0300 Subject: [PATCH 06/36] fix: Prettier config --- webapp/.prettierrc.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webapp/.prettierrc.json b/webapp/.prettierrc.json index 56f7d091e6..a403a2ed71 100644 --- a/webapp/.prettierrc.json +++ b/webapp/.prettierrc.json @@ -1,8 +1,5 @@ { - "semi": false, + "printWidth": 80, "singleQuote": true, - "printWidth": 140, - "tabWidth": 2, - "trailingComma": "none", - "arrowParens": "avoid" + "semi": false } From 58fe0049ebab7e3f0cd628fdb79ed3d58e8e2426 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 14:06:04 -0300 Subject: [PATCH 07/36] fix: Husky install --- webapp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/package.json b/webapp/package.json index 61b85a340d..761cfbce9c 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -89,7 +89,7 @@ "pre-commit:fix:code": "eslint -c .eslintrc.js --fix", "pre-commit:fix:prettier": "prettier --config .prettierrc.json --write", "generate-contracts": "typechain --target ethers-v5 --out-dir src/contracts src/contracts/*.json", - "prepare": "husky install" + "prepare": "cd .. && husky install webapp/.husky" }, "engines": { "node": "16.13.0" From 71c9c1b8f4534ffa5c387badb751e0670f2d13b2 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 15:43:55 -0300 Subject: [PATCH 08/36] fix: Update eslint plugins packages --- webapp/package-lock.json | 2617 ++++++++++++++++++++++++-------------- webapp/package.json | 7 +- 2 files changed, 1695 insertions(+), 929 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 102988719a..29c4c844d7 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -69,13 +69,14 @@ "@types/react-window-infinite-loader": "^1.0.6", "@types/redux": "^3.6.0", "@types/redux-logger": "^3.0.9", - "@typescript-eslint/eslint-plugin": "^4.13.0", - "@typescript-eslint/parser": "^4.13.0", + "@typescript-eslint/eslint-plugin": "^5.61.0", + "@typescript-eslint/parser": "^5.61.0", "css-mediaquery": "^0.1.2", "customize-cra": "^1.0.0", "dcl-tslint-config-standard": "^3.0.0", + "eslint-plugin-import": "npm:eslint-plugin-i@^2.28.0", + "eslint-plugin-prettier": "^4.2.1", "husky": "^8.0.3", - "prettier": "^1.19.1", "react-app-rewired": "^2.2.1", "react-error-overlay": "^6.0.9", "redux-saga-test-plan": "^4.0.3", @@ -2462,43 +2463,6 @@ "prettier": "^2.8.8" } }, - "node_modules/@dcl/eslint-config/node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@dcl/eslint-config/node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/eslint-plugin": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", @@ -2634,18 +2598,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@dcl/eslint-config/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/@dcl/eslint-config/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -2706,75 +2658,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@dcl/eslint-config/node_modules/eslint-plugin-import": { - "name": "eslint-plugin-i", - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.28.0.tgz", - "integrity": "sha512-dFK+YXLVmMfWZoQI7+qty+vCESIH91BT9p8ctvQXegwcq8TzGAf80JzPmwRdirfczcQOs51ikrJwAEmNqttC0g==", - "dev": true, - "dependencies": { - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-module-utils": "^2.8.0", - "get-tsconfig": "^4.6.2", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "resolve": "^1.22.3", - "semver": "^7.5.3" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://opencollective.com/unts" - }, - "peerDependencies": { - "eslint": "^7.2.0 || ^8" - } - }, - "node_modules/@dcl/eslint-config/node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/@dcl/eslint-config/node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@dcl/eslint-config/node_modules/eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } - } - }, "node_modules/@dcl/eslint-config/node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -2803,23 +2686,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@dcl/eslint-config/node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/@dcl/eslint-config/node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -2944,21 +2810,6 @@ "node": ">=8" } }, - "node_modules/@dcl/eslint-config/node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/@dcl/hashing": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-2.0.0.tgz", @@ -3105,7 +2956,6 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -3120,7 +2970,6 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -3132,34 +2981,57 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", - "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "license": "MIT", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "4.0.6", - "license": "MIT", + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">= 4" + "node": "*" } }, "node_modules/@eslint/js": { @@ -4282,22 +4154,33 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "license": "Apache-2.0", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, "engines": { "node": ">=12.22" }, @@ -6430,10 +6313,6 @@ "version": "7.0.10", "license": "MIT" }, - "node_modules/@types/json5": { - "version": "0.0.29", - "license": "MIT" - }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -6667,7 +6546,7 @@ "version": "7.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true + "devOptional": true }, "node_modules/@types/sinon": { "version": "7.5.2", @@ -6774,27 +6653,59 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.29.1", - "license": "MIT", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.61.0.tgz", + "integrity": "sha512-A5l/eUAug103qtkwccSCxn8ZRwT+7RXWkFECdA4Cvl1dOlDUgTpAOfSEElZn2uSUxhdDpnCdetrf0jvU4qrL+g==", + "devOptional": true, "dependencies": { - "@typescript-eslint/experimental-utils": "4.29.1", - "@typescript-eslint/scope-manager": "4.29.1", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.1.0", - "semver": "^7.3.5", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/type-utils": "5.61.0", + "@typescript-eslint/utils": "5.61.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^4.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.61.0.tgz", + "integrity": "sha512-kk8u//r+oVK2Aj3ph/26XdH0pbAkC2RiSjUYhKD+PExemG4XSjpGFeyZ/QM8lBOa7O8aGOU+/yEbMJgQv/DnCg==", + "devOptional": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "5.61.0", + "@typescript-eslint/utils": "5.61.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" }, "peerDependenciesMeta": { "typescript": { @@ -6802,14 +6713,41 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.61.0.tgz", + "integrity": "sha512-mV6O+6VgQmVE6+xzlA91xifndPW9ElFW8vbSF0xCT/czPXVhwDewKila1jOyRwa9AE19zKnrr7Cg5S3pJVrTWQ==", + "devOptional": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/typescript-estree": "5.61.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.29.1", - "license": "MIT", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", "dependencies": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.29.1", - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/typescript-estree": "4.29.1", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -6824,14 +6762,46 @@ "eslint": "*" } }, - "node_modules/@typescript-eslint/parser": { - "version": "4.29.1", - "license": "BSD-2-Clause", + "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/scope-manager": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", "dependencies": { - "@typescript-eslint/scope-manager": "4.29.1", - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/typescript-estree": "4.29.1", - "debug": "^4.3.1" + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/types": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "engines": { "node": "^10.12.0 || >=12.0.0" @@ -6840,8 +6810,48 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.61.0.tgz", + "integrity": "sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==", + "devOptional": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/typescript-estree": "5.61.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -6850,14 +6860,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "4.29.1", - "license": "MIT", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz", + "integrity": "sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==", + "devOptional": true, "dependencies": { - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/visitor-keys": "4.29.1" + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/visitor-keys": "5.61.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -6961,10 +6973,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "4.29.1", - "license": "MIT", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz", + "integrity": "sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==", + "devOptional": true, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -6972,19 +6986,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.29.1", - "license": "BSD-2-Clause", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz", + "integrity": "sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==", + "devOptional": true, "dependencies": { - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/visitor-keys": "4.29.1", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/visitor-keys": "5.61.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -7109,20 +7125,34 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.29.1", - "license": "MIT", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz", + "integrity": "sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==", + "devOptional": true, "dependencies": { - "@typescript-eslint/types": "4.29.1", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "5.61.0", + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "devOptional": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@walletconnect/browser-utils": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/@walletconnect/browser-utils/-/browser-utils-1.8.0.tgz", @@ -8439,8 +8469,9 @@ "license": "MIT" }, "node_modules/ansi-colors": { - "version": "4.1.1", - "license": "MIT", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "engines": { "node": ">=6" } @@ -8617,21 +8648,6 @@ "node": ">=0.10.0" } }, - "node_modules/array.prototype.flat": { - "version": "1.2.5", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array.prototype.flatmap": { "version": "1.2.5", "license": "MIT", @@ -8718,7 +8734,8 @@ }, "node_modules/astral-regex": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "engines": { "node": ">=8" } @@ -10561,7 +10578,8 @@ }, "node_modules/confusing-browser-globals": { "version": "1.0.11", - "license": "MIT" + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==" }, "node_modules/connect-history-api-fallback": { "version": "1.6.0", @@ -12696,10 +12714,12 @@ } }, "node_modules/enquirer": { - "version": "2.3.6", - "license": "MIT", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dependencies": { - "ansi-colors": "^4.1.1" + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8.6" @@ -12960,55 +12980,56 @@ } }, "node_modules/eslint": { - "version": "7.32.0", - "license": "MIT", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz", + "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", + "peer": true, "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.1.0", + "@eslint/js": "8.44.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.6.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -13026,37 +13047,6 @@ "eslint": ">=7.0.0" } }, - "node_modules/eslint-config-react-app": { - "version": "6.0.0", - "license": "MIT", - "dependencies": { - "confusing-browser-globals": "^1.0.10" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^4.0.0", - "@typescript-eslint/parser": "^4.0.0", - "babel-eslint": "^10.0.0", - "eslint": "^7.5.0", - "eslint-plugin-flowtype": "^5.2.0", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-jest": "^24.0.0", - "eslint-plugin-jsx-a11y": "^6.3.1", - "eslint-plugin-react": "^7.20.3", - "eslint-plugin-react-hooks": "^4.0.8", - "eslint-plugin-testing-library": "^3.9.0" - }, - "peerDependenciesMeta": { - "eslint-plugin-jest": { - "optional": true - }, - "eslint-plugin-testing-library": { - "optional": true - } - } - }, "node_modules/eslint-import-resolver-babel-module": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-5.3.2.tgz", @@ -13180,47 +13170,6 @@ "eslint": ">= 5.12.1" } }, - "node_modules/eslint-plugin-autofix/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/eslint-plugin-autofix/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-autofix/node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/eslint-plugin-css-import-order": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-css-import-order/-/eslint-plugin-css-import-order-1.1.0.tgz", @@ -13230,50 +13179,38 @@ "eslint": ">= 6.0.0 < 9.0.0" } }, - "node_modules/eslint-plugin-flowtype": { - "version": "5.10.0", - "license": "BSD-3-Clause", - "dependencies": { - "lodash": "^4.17.15", - "string-natural-compare": "^3.0.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "peerDependencies": { - "eslint": "^7.1.0" - } - }, "node_modules/eslint-plugin-import": { - "version": "2.25.4", - "license": "MIT", + "name": "eslint-plugin-i", + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.28.0.tgz", + "integrity": "sha512-dFK+YXLVmMfWZoQI7+qty+vCESIH91BT9p8ctvQXegwcq8TzGAf80JzPmwRdirfczcQOs51ikrJwAEmNqttC0g==", "dependencies": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.2", - "has": "^1.0.3", - "is-core-module": "^2.8.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "get-tsconfig": "^4.6.2", "is-glob": "^4.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.5", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.12.0" + "minimatch": "^3.1.2", + "resolve": "^1.22.3", + "semver": "^7.5.3" }, "engines": { - "node": ">=4" + "node": ">=12" + }, + "funding": { + "url": "https://opencollective.com/unts" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + "eslint": "^7.2.0 || ^8" } }, "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "node_modules/eslint-plugin-import/node_modules/doctrine": { @@ -13286,9 +13223,16 @@ "node": ">=0.10.0" } }, - "node_modules/eslint-plugin-import/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } }, "node_modules/eslint-plugin-jest": { "version": "24.7.0", @@ -13337,6 +13281,27 @@ "version": "9.2.2", "license": "MIT" }, + "node_modules/eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, "node_modules/eslint-plugin-react": { "version": "7.29.4", "license": "MIT", @@ -13418,112 +13383,6 @@ "semver": "bin/semver.js" } }, - "node_modules/eslint-plugin-testing-library": { - "version": "3.10.2", - "license": "MIT", - "dependencies": { - "@typescript-eslint/experimental-utils": "^3.10.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0", - "npm": ">=6" - }, - "peerDependencies": { - "eslint": "^5 || ^6 || ^7" - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/experimental-utils": { - "version": "3.10.1", - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/types": { - "version": "3.10.1", - "license": "MIT", - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/visitor-keys": { - "version": "3.10.1", - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/eslint-utils": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-plugin-testing-library/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "license": "Apache-2.0", - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-rule-composer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", @@ -13638,48 +13497,193 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/eslint/node_modules/eslint-utils": { - "version": "2.1.0", - "license": "MIT", + "node_modules/eslint/node_modules/@eslint/js": { + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", + "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "peer": true + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "peer": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "license": "Apache-2.0", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "peer": true, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/ignore": { - "version": "4.0.6", - "license": "MIT", + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "peer": true, "engines": { - "node": ">= 4" + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "peer": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "peer": true, + "engines": { + "node": ">=8" } }, "node_modules/espree": { - "version": "7.3.1", - "license": "BSD-2-Clause", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/espree/node_modules/acorn": { - "version": "7.4.1", - "license": "MIT", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "bin": { "acorn": "bin/acorn" }, @@ -13688,10 +13692,14 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "license": "Apache-2.0", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -16230,7 +16238,6 @@ "version": "4.7.0", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", - "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -16434,8 +16441,7 @@ "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" }, "node_modules/graphql": { "version": "14.7.0", @@ -19902,7 +19908,8 @@ }, "node_modules/lodash.truncate": { "version": "4.4.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" }, "node_modules/lodash.uniq": { "version": "4.5.0", @@ -20832,7 +20839,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true + "devOptional": true }, "node_modules/negotiator": { "version": "0.6.3", @@ -22962,14 +22969,18 @@ } }, "node_modules/prettier": { - "version": "1.19.1", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, - "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, "engines": { - "node": ">=4" + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prettier-linter-helpers": { @@ -23064,7 +23075,8 @@ }, "node_modules/progress": { "version": "2.0.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "engines": { "node": ">=0.4.0" } @@ -24060,6 +24072,212 @@ "semver": "bin/semver" } }, + "node_modules/react-scripts/node_modules/@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/react-scripts/node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/react-scripts/node_modules/@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/react-scripts/node_modules/@typescript-eslint/eslint-plugin": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", + "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "dependencies": { + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/react-scripts/node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/react-scripts/node_modules/@typescript-eslint/parser": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", + "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "dependencies": { + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "debug": "^4.3.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/react-scripts/node_modules/@typescript-eslint/scope-manager": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/react-scripts/node_modules/@typescript-eslint/types": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/react-scripts/node_modules/@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/react-scripts/node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/react-scripts/node_modules/@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "dependencies": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/react-scripts/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/react-scripts/node_modules/camelcase": { "version": "6.3.0", "license": "MIT", @@ -24077,6 +24295,259 @@ "node": ">=8" } }, + "node_modules/react-scripts/node_modules/eslint": { + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/react-scripts/node_modules/eslint-config-react-app": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-6.0.0.tgz", + "integrity": "sha512-bpoAAC+YRfzq0dsTk+6v9aHm/uqnDwayNAXleMypGl6CpxI9oXXscVHo4fk3eJPIn+rsbtNetB4r/ZIidFIE8A==", + "dependencies": { + "confusing-browser-globals": "^1.0.10" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^4.0.0", + "@typescript-eslint/parser": "^4.0.0", + "babel-eslint": "^10.0.0", + "eslint": "^7.5.0", + "eslint-plugin-flowtype": "^5.2.0", + "eslint-plugin-import": "^2.22.0", + "eslint-plugin-jest": "^24.0.0", + "eslint-plugin-jsx-a11y": "^6.3.1", + "eslint-plugin-react": "^7.20.3", + "eslint-plugin-react-hooks": "^4.0.8", + "eslint-plugin-testing-library": "^3.9.0" + }, + "peerDependenciesMeta": { + "eslint-plugin-jest": { + "optional": true + }, + "eslint-plugin-testing-library": { + "optional": true + } + } + }, + "node_modules/react-scripts/node_modules/eslint-plugin-flowtype": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.10.0.tgz", + "integrity": "sha512-vcz32f+7TP+kvTUyMXZmCnNujBQZDNmcqPImw8b9PZ+16w1Qdm6ryRuYZYVaG9xRqqmAPr2Cs9FAX5gN+x/bjw==", + "dependencies": { + "lodash": "^4.17.15", + "string-natural-compare": "^3.0.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.1.0" + } + }, + "node_modules/react-scripts/node_modules/eslint-plugin-testing-library": { + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-3.10.2.tgz", + "integrity": "sha512-WAmOCt7EbF1XM8XfbCKAEzAPnShkNSwcIsAD2jHdsMUT9mZJPjLCG7pMzbcC8kK366NOuGip8HKLDC+Xk4yIdA==", + "dependencies": { + "@typescript-eslint/experimental-utils": "^3.10.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0", + "npm": ">=6" + }, + "peerDependencies": { + "eslint": "^5 || ^6 || ^7" + } + }, + "node_modules/react-scripts/node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/experimental-utils": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", + "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", + "dependencies": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/types": "3.10.1", + "@typescript-eslint/typescript-estree": "3.10.1", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/react-scripts/node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/types": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", + "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/react-scripts/node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/typescript-estree": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", + "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", + "dependencies": { + "@typescript-eslint/types": "3.10.1", + "@typescript-eslint/visitor-keys": "3.10.1", + "debug": "^4.1.1", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/react-scripts/node_modules/eslint-plugin-testing-library/node_modules/@typescript-eslint/visitor-keys": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", + "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/react-scripts/node_modules/eslint-plugin-testing-library/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/react-scripts/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/react-scripts/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/react-scripts/node_modules/eslint/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/react-scripts/node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/react-scripts/node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, "node_modules/react-scripts/node_modules/fs-extra": { "version": "9.1.0", "license": "MIT", @@ -24880,7 +25351,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } @@ -25940,7 +26410,8 @@ }, "node_modules/slice-ansi": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -25955,7 +26426,8 @@ }, "node_modules/slice-ansi/node_modules/ansi-styles": { "version": "4.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dependencies": { "color-convert": "^2.0.1" }, @@ -25968,7 +26440,8 @@ }, "node_modules/slice-ansi/node_modules/color-convert": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dependencies": { "color-name": "~1.1.4" }, @@ -25978,7 +26451,8 @@ }, "node_modules/slice-ansi/node_modules/color-name": { "version": "1.1.4", - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/snapdragon": { "version": "0.8.2", @@ -26500,7 +26974,8 @@ }, "node_modules/string-natural-compare": { "version": "3.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", + "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==" }, "node_modules/string-similarity": { "version": "4.0.4", @@ -26593,13 +27068,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/strip-comments": { "version": "1.0.2", "license": "MIT", @@ -26866,8 +27334,9 @@ "license": "MIT" }, "node_modules/table": { - "version": "6.8.0", - "license": "BSD-3-Clause", + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -26913,8 +27382,9 @@ } }, "node_modules/table/node_modules/ajv": { - "version": "8.10.0", - "license": "MIT", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -27494,27 +27964,6 @@ } } }, - "node_modules/tsconfig-paths": { - "version": "3.14.0", - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/tslib": { "version": "1.14.1", "license": "0BSD" @@ -27753,21 +28202,6 @@ "node": ">=6 <7 || >=8" } }, - "node_modules/typechain/node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/typed-url-params": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/typed-url-params/-/typed-url-params-1.0.1.tgz", @@ -28208,8 +28642,9 @@ } }, "node_modules/v8-compile-cache": { - "version": "2.3.0", - "license": "MIT" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", + "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==" }, "node_modules/v8-to-istanbul": { "version": "7.1.2", @@ -31806,34 +32241,6 @@ "prettier": "^2.8.8" }, "dependencies": { - "@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - } - }, "@typescript-eslint/eslint-plugin": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", @@ -31905,12 +32312,6 @@ "eslint-visitor-keys": "^3.3.0" } }, - "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -31962,52 +32363,6 @@ "text-table": "^0.2.0" } }, - "eslint-plugin-import": { - "version": "npm:eslint-plugin-i@2.28.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.28.0.tgz", - "integrity": "sha512-dFK+YXLVmMfWZoQI7+qty+vCESIH91BT9p8ctvQXegwcq8TzGAf80JzPmwRdirfczcQOs51ikrJwAEmNqttC0g==", - "dev": true, - "requires": { - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", - "eslint-module-utils": "^2.8.0", - "get-tsconfig": "^4.6.2", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "resolve": "^1.22.3", - "semver": "^7.5.3" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - } - } - }, - "eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, "eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -32024,17 +32379,6 @@ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, - "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "requires": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - } - }, "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -32116,12 +32460,6 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true - }, - "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true } } }, @@ -32236,7 +32574,6 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, "requires": { "eslint-visitor-keys": "^3.3.0" }, @@ -32244,33 +32581,51 @@ "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" } } }, "@eslint-community/regexpp": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", - "dev": true + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==" }, "@eslint/eslintrc": { - "version": "0.4.3", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "dependencies": { - "ignore": { - "version": "4.0.6" + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } } } }, @@ -32942,18 +33297,29 @@ } }, "@humanwhocodes/config-array": { - "version": "0.5.0", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "requires": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" }, "@humanwhocodes/object-schema": { "version": "1.2.1" @@ -34538,9 +34904,6 @@ "@types/json-schema": { "version": "7.0.10" }, - "@types/json5": { - "version": "0.0.29" - }, "@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -34755,7 +35118,7 @@ "version": "7.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true + "devOptional": true }, "@types/sinon": { "version": "7.5.2", @@ -34848,42 +35211,125 @@ "version": "20.2.1" }, "@typescript-eslint/eslint-plugin": { - "version": "4.29.1", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.61.0.tgz", + "integrity": "sha512-A5l/eUAug103qtkwccSCxn8ZRwT+7RXWkFECdA4Cvl1dOlDUgTpAOfSEElZn2uSUxhdDpnCdetrf0jvU4qrL+g==", + "devOptional": true, "requires": { - "@typescript-eslint/experimental-utils": "4.29.1", - "@typescript-eslint/scope-manager": "4.29.1", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.1.0", - "semver": "^7.3.5", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/type-utils": "5.61.0", + "@typescript-eslint/utils": "5.61.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", "tsutils": "^3.21.0" + }, + "dependencies": { + "@typescript-eslint/type-utils": { + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.61.0.tgz", + "integrity": "sha512-kk8u//r+oVK2Aj3ph/26XdH0pbAkC2RiSjUYhKD+PExemG4XSjpGFeyZ/QM8lBOa7O8aGOU+/yEbMJgQv/DnCg==", + "devOptional": true, + "requires": { + "@typescript-eslint/typescript-estree": "5.61.0", + "@typescript-eslint/utils": "5.61.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.61.0.tgz", + "integrity": "sha512-mV6O+6VgQmVE6+xzlA91xifndPW9ElFW8vbSF0xCT/czPXVhwDewKila1jOyRwa9AE19zKnrr7Cg5S3pJVrTWQ==", + "devOptional": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/typescript-estree": "5.61.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + } + } } }, "@typescript-eslint/experimental-utils": { - "version": "4.29.1", + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", + "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", "requires": { "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.29.1", - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/typescript-estree": "4.29.1", + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + } + }, + "@typescript-eslint/types": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==" + }, + "@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "requires": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + } + } } }, "@typescript-eslint/parser": { - "version": "4.29.1", - "requires": { - "@typescript-eslint/scope-manager": "4.29.1", - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/typescript-estree": "4.29.1", - "debug": "^4.3.1" + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.61.0.tgz", + "integrity": "sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==", + "devOptional": true, + "requires": { + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/typescript-estree": "5.61.0", + "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "4.29.1", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz", + "integrity": "sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==", + "devOptional": true, "requires": { - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/visitor-keys": "4.29.1" + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/visitor-keys": "5.61.0" } }, "@typescript-eslint/type-utils": { @@ -34938,17 +35384,23 @@ } }, "@typescript-eslint/types": { - "version": "4.29.1" + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz", + "integrity": "sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==", + "devOptional": true }, "@typescript-eslint/typescript-estree": { - "version": "4.29.1", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz", + "integrity": "sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==", + "devOptional": true, "requires": { - "@typescript-eslint/types": "4.29.1", - "@typescript-eslint/visitor-keys": "4.29.1", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/visitor-keys": "5.61.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", "tsutils": "^3.21.0" } }, @@ -35018,10 +35470,21 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.29.1", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz", + "integrity": "sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==", + "devOptional": true, "requires": { - "@typescript-eslint/types": "4.29.1", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "5.61.0", + "eslint-visitor-keys": "^3.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "devOptional": true + } } }, "@walletconnect/browser-utils": { @@ -36160,7 +36623,9 @@ "version": "1.0.2" }, "ansi-colors": { - "version": "4.1.1" + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==" }, "ansi-escapes": { "version": "4.3.2", @@ -36259,14 +36724,6 @@ "array-unique": { "version": "0.3.2" }, - "array.prototype.flat": { - "version": "1.2.5", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" - } - }, "array.prototype.flatmap": { "version": "1.2.5", "requires": { @@ -36329,7 +36786,9 @@ "version": "0.0.7" }, "astral-regex": { - "version": "2.0.0" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" }, "async": { "version": "2.6.4", @@ -37626,7 +38085,9 @@ } }, "confusing-browser-globals": { - "version": "1.0.11" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==" }, "connect-history-api-fallback": { "version": "1.6.0" @@ -39171,9 +39632,12 @@ } }, "enquirer": { - "version": "2.3.6", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "requires": { - "ansi-colors": "^4.1.1" + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" } }, "entities": { @@ -39353,63 +39817,161 @@ } }, "eslint": { - "version": "7.32.0", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz", + "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", + "peer": true, "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.1.0", + "@eslint/js": "8.44.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.6.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "dependencies": { - "eslint-utils": { - "version": "2.1.0", + "@eslint/js": { + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", + "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "peer": true + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "peer": true + }, + "eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "peer": true, "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0" - } + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "peer": true + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "peer": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "peer": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" } }, - "ignore": { - "version": "4.0.6" + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "peer": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "peer": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "peer": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "peer": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "peer": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "peer": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "peer": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "peer": true } } }, @@ -39420,12 +39982,6 @@ "dev": true, "requires": {} }, - "eslint-config-react-app": { - "version": "6.0.0", - "requires": { - "confusing-browser-globals": "^1.0.10" - } - }, "eslint-import-resolver-babel-module": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-5.3.2.tgz", @@ -39514,31 +40070,6 @@ "esutils": "^2.0.2", "lodash": "^4.17.20", "string-similarity": "^4.0.3" - }, - "dependencies": { - "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true - }, - "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "requires": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - } - } } }, "eslint-plugin-css-import-order": { @@ -39548,35 +40079,28 @@ "dev": true, "requires": {} }, - "eslint-plugin-flowtype": { - "version": "5.10.0", - "requires": { - "lodash": "^4.17.15", - "string-natural-compare": "^3.0.1" - } - }, "eslint-plugin-import": { - "version": "2.25.4", + "version": "npm:eslint-plugin-i@2.28.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.28.0.tgz", + "integrity": "sha512-dFK+YXLVmMfWZoQI7+qty+vCESIH91BT9p8ctvQXegwcq8TzGAf80JzPmwRdirfczcQOs51ikrJwAEmNqttC0g==", "requires": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.2", - "has": "^1.0.3", - "is-core-module": "^2.8.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "get-tsconfig": "^4.6.2", "is-glob": "^4.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.5", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.12.0" + "minimatch": "^3.1.2", + "resolve": "^1.22.3", + "semver": "^7.5.3" }, "dependencies": { "debug": { - "version": "2.6.9", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "doctrine": { @@ -39585,8 +40109,13 @@ "esutils": "^2.0.2" } }, - "ms": { - "version": "2.0.0" + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } } } }, @@ -39618,6 +40147,15 @@ } } }, + "eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, "eslint-plugin-react": { "version": "7.29.4", "requires": { @@ -39668,55 +40206,6 @@ "version": "4.3.0", "requires": {} }, - "eslint-plugin-testing-library": { - "version": "3.10.2", - "requires": { - "@typescript-eslint/experimental-utils": "^3.10.1" - }, - "dependencies": { - "@typescript-eslint/experimental-utils": { - "version": "3.10.1", - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - } - }, - "@typescript-eslint/types": { - "version": "3.10.1" - }, - "@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "requires": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "3.10.1", - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-utils": { - "version": "2.1.0", - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0" - } - } - }, "eslint-rule-composer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", @@ -39778,18 +40267,24 @@ } }, "espree": { - "version": "7.3.1", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "dependencies": { "acorn": { - "version": "7.4.1" + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==" }, "eslint-visitor-keys": { - "version": "1.3.0" + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" } } }, @@ -41613,7 +42108,6 @@ "version": "4.7.0", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", - "dev": true, "requires": { "resolve-pkg-maps": "^1.0.0" } @@ -41749,8 +42243,7 @@ "graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" }, "graphql": { "version": "14.7.0", @@ -44154,7 +44647,9 @@ "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==" }, "lodash.truncate": { - "version": "4.4.2" + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==" }, "lodash.uniq": { "version": "4.5.0" @@ -44873,7 +45368,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true + "devOptional": true }, "negotiator": { "version": "0.6.3" @@ -46346,7 +46841,9 @@ "version": "1.0.4" }, "prettier": { - "version": "1.19.1", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true }, "prettier-linter-helpers": { @@ -46409,7 +46906,9 @@ "integrity": "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==" }, "progress": { - "version": "2.0.3" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "promise": { "version": "8.1.0", @@ -47128,12 +47627,291 @@ } } }, + "@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", + "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", + "requires": { + "@typescript-eslint/experimental-utils": "4.33.0", + "@typescript-eslint/scope-manager": "4.33.0", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "ignore": "^5.1.8", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/parser": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", + "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", + "requires": { + "@typescript-eslint/scope-manager": "4.33.0", + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/typescript-estree": "4.33.0", + "debug": "^4.3.1" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", + "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0" + } + }, + "@typescript-eslint/types": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", + "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==" + }, + "@typescript-eslint/typescript-estree": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", + "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", + "requires": { + "@typescript-eslint/types": "4.33.0", + "@typescript-eslint/visitor-keys": "4.33.0", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.33.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", + "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", + "requires": { + "@typescript-eslint/types": "4.33.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + }, "camelcase": { "version": "6.3.0" }, "dotenv": { "version": "8.2.0" }, + "eslint": { + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + } + } + }, + "eslint-config-react-app": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-6.0.0.tgz", + "integrity": "sha512-bpoAAC+YRfzq0dsTk+6v9aHm/uqnDwayNAXleMypGl6CpxI9oXXscVHo4fk3eJPIn+rsbtNetB4r/ZIidFIE8A==", + "requires": { + "confusing-browser-globals": "^1.0.10" + } + }, + "eslint-plugin-flowtype": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-5.10.0.tgz", + "integrity": "sha512-vcz32f+7TP+kvTUyMXZmCnNujBQZDNmcqPImw8b9PZ+16w1Qdm6ryRuYZYVaG9xRqqmAPr2Cs9FAX5gN+x/bjw==", + "requires": { + "lodash": "^4.17.15", + "string-natural-compare": "^3.0.1" + } + }, + "eslint-plugin-testing-library": { + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-3.10.2.tgz", + "integrity": "sha512-WAmOCt7EbF1XM8XfbCKAEzAPnShkNSwcIsAD2jHdsMUT9mZJPjLCG7pMzbcC8kK366NOuGip8HKLDC+Xk4yIdA==", + "requires": { + "@typescript-eslint/experimental-utils": "^3.10.1" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", + "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/types": "3.10.1", + "@typescript-eslint/typescript-estree": "3.10.1", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/types": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", + "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==" + }, + "@typescript-eslint/typescript-estree": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", + "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", + "requires": { + "@typescript-eslint/types": "3.10.1", + "@typescript-eslint/visitor-keys": "3.10.1", + "debug": "^4.1.1", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", + "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } + } + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } + } + }, "fs-extra": { "version": "9.1.0", "requires": { @@ -47699,8 +48477,7 @@ "resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==" }, "resolve-url": { "version": "0.2.1" @@ -48421,6 +49198,8 @@ }, "slice-ansi": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "requires": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -48429,18 +49208,24 @@ "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { "color-convert": "^2.0.1" } }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.4" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" } } }, @@ -48827,7 +49612,9 @@ } }, "string-natural-compare": { - "version": "3.0.1" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", + "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==" }, "string-similarity": { "version": "4.0.4", @@ -48895,9 +49682,6 @@ "ansi-regex": "^5.0.1" } }, - "strip-bom": { - "version": "3.0.0" - }, "strip-comments": { "version": "1.0.2", "requires": { @@ -49081,7 +49865,9 @@ "version": "3.2.4" }, "table": { - "version": "6.8.0", + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", "requires": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", @@ -49091,7 +49877,9 @@ }, "dependencies": { "ajv": { - "version": "8.10.0", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -49511,25 +50299,6 @@ "ts-pnp": { "version": "1.2.0" }, - "tsconfig-paths": { - "version": "3.14.0", - "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "requires": { - "minimist": "^1.2.0" - } - } - } - }, "tslib": { "version": "1.14.1" }, @@ -49692,12 +50461,6 @@ "jsonfile": "^4.0.0", "universalify": "^0.1.0" } - }, - "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true } } }, @@ -50000,7 +50763,9 @@ "version": "3.4.0" }, "v8-compile-cache": { - "version": "2.3.0" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", + "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==" }, "v8-to-istanbul": { "version": "7.1.2", diff --git a/webapp/package.json b/webapp/package.json index 761cfbce9c..332462786e 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -63,13 +63,14 @@ "@types/react-window-infinite-loader": "^1.0.6", "@types/redux": "^3.6.0", "@types/redux-logger": "^3.0.9", - "@typescript-eslint/eslint-plugin": "^4.13.0", - "@typescript-eslint/parser": "^4.13.0", + "@typescript-eslint/eslint-plugin": "^5.61.0", + "@typescript-eslint/parser": "^5.61.0", "css-mediaquery": "^0.1.2", "customize-cra": "^1.0.0", "dcl-tslint-config-standard": "^3.0.0", + "eslint-plugin-import": "npm:eslint-plugin-i@^2.28.0", + "eslint-plugin-prettier": "^4.2.1", "husky": "^8.0.3", - "prettier": "^1.19.1", "react-app-rewired": "^2.2.1", "react-error-overlay": "^6.0.9", "redux-saga-test-plan": "^4.0.3", From f0001d1aeee4833d5c219da623b23ed429919167 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 18:20:58 -0300 Subject: [PATCH 09/36] fix: packages --- webapp/.prettierrc.json | 3 +- webapp/package-lock.json | 772 +++++++++++++++++++++++++-------------- webapp/package.json | 4 +- 3 files changed, 512 insertions(+), 267 deletions(-) diff --git a/webapp/.prettierrc.json b/webapp/.prettierrc.json index a403a2ed71..c57823fe7b 100644 --- a/webapp/.prettierrc.json +++ b/webapp/.prettierrc.json @@ -1,5 +1,6 @@ { "printWidth": 80, "singleQuote": true, - "semi": false + "semi": false, + "trailingComma": "none" } diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 29c4c844d7..ebf6bc65f3 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -74,9 +74,11 @@ "css-mediaquery": "^0.1.2", "customize-cra": "^1.0.0", "dcl-tslint-config-standard": "^3.0.0", + "eslint": "^7.11.0", "eslint-plugin-import": "npm:eslint-plugin-i@^2.28.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^3.1.4", "husky": "^8.0.3", + "prettier": "^2.8.8", "react-app-rewired": "^2.2.1", "react-error-overlay": "^6.0.9", "redux-saga-test-plan": "^4.0.3", @@ -2658,6 +2660,27 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@dcl/eslint-config/node_modules/eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, "node_modules/@dcl/eslint-config/node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -2956,6 +2979,7 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "devOptional": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -2970,6 +2994,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "devOptional": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -2981,6 +3006,7 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "devOptional": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -2989,6 +3015,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -3010,12 +3037,14 @@ "node_modules/@eslint/eslintrc/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -3027,6 +3056,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4157,6 +4187,7 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -4170,6 +4201,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4181,6 +4213,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, "engines": { "node": ">=12.22" }, @@ -12980,56 +13013,53 @@ } }, "node_modules/eslint": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz", - "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", - "peer": true, + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", + "integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.1.0", - "@eslint/js": "8.44.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", + "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.1.3", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.3.2", + "debug": "^4.0.1", "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.6.0", - "esquery": "^1.4.2", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.0", + "esquery": "^1.2.0", "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^10.12.0 || >=12.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -13282,24 +13312,19 @@ "license": "MIT" }, "node_modules/eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz", + "integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=6.0.0" }, "peerDependencies": { - "eslint": ">=7.28.0", - "prettier": ">=2.0.0" - }, - "peerDependenciesMeta": { - "eslint-config-prettier": { - "optional": true - } + "eslint": ">=5.0.0", + "prettier": ">=1.13.0" } }, "node_modules/eslint-plugin-react": { @@ -13497,127 +13522,164 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/eslint/node_modules/@eslint/js": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", - "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", - "peer": true, + "node_modules/eslint/node_modules/@eslint/eslintrc": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", + "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "peer": true - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "node_modules/eslint/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=0.4.0" } }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "peer": true, + "node_modules/eslint/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=6" } }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "peer": true, + "node_modules/eslint/node_modules/astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "engines": { - "node": ">=4.0" + "node": ">=4" } }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "peer": true, + "node_modules/eslint/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "node_modules/eslint/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "eslint-visitor-keys": "^1.1.0" }, "engines": { - "node": ">=10" + "node": ">=6" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "peer": true, + "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dependencies": { - "is-glob": "^4.0.3" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" }, "engines": { - "node": ">=10.13.0" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/eslint/node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "peer": true, + "node_modules/eslint/node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "peer": true, + "node_modules/eslint/node_modules/file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "dependencies": { - "argparse": "^2.0.1" + "flat-cache": "^2.0.1" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=4" } }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "peer": true, + "node_modules/eslint/node_modules/flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", "dependencies": { - "p-locate": "^5.0.0" + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" }, "engines": { - "node": ">=10" + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" + }, + "node_modules/eslint/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "engines": { + "node": ">=4" + } + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "peer": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -13625,41 +13687,72 @@ "node": "*" } }, - "node_modules/eslint/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "peer": true, + "node_modules/eslint/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dependencies": { - "yocto-queue": "^0.1.0" + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/eslint/node_modules/slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dependencies": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=6" + } + }, + "node_modules/eslint/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=6" } }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "peer": true, + "node_modules/eslint/node_modules/string-width/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dependencies": { - "p-limit": "^3.0.2" + "ansi-regex": "^4.1.0" }, "engines": { - "node": ">=10" + "node": ">=6" + } + }, + "node_modules/eslint/node_modules/table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dependencies": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=6.0.0" } }, - "node_modules/eslint/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "peer": true, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "engines": { "node": ">=8" } @@ -13668,6 +13761,7 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -13684,6 +13778,7 @@ "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -13695,6 +13790,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -16441,7 +16537,8 @@ "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "devOptional": true }, "node_modules/graphql": { "version": "14.7.0", @@ -24736,7 +24833,8 @@ }, "node_modules/read-pkg-up/node_modules/type-fest": { "version": "0.8.1", - "license": "(MIT OR CC0-1.0)", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "engines": { "node": ">=8" } @@ -28153,6 +28251,19 @@ "node": ">=4" } }, + "node_modules/type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "optional": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/type-is": { "version": "1.6.18", "license": "MIT", @@ -30468,6 +30579,17 @@ "version": "1.0.2", "license": "ISC" }, + "node_modules/write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dependencies": { + "mkdirp": "^0.5.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/write-file-atomic": { "version": "3.0.3", "license": "ISC", @@ -30478,6 +30600,17 @@ "typedarray-to-buffer": "^3.1.5" } }, + "node_modules/write/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, "node_modules/ws": { "version": "7.4.6", "license": "MIT", @@ -32363,6 +32496,15 @@ "text-table": "^0.2.0" } }, + "eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, "eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -32574,6 +32716,7 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "devOptional": true, "requires": { "eslint-visitor-keys": "^3.3.0" }, @@ -32581,19 +32724,22 @@ "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "devOptional": true } } }, "@eslint-community/regexpp": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==" + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "devOptional": true }, "@eslint/eslintrc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -32609,12 +32755,14 @@ "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "requires": { "argparse": "^2.0.1" } @@ -32623,6 +32771,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -33300,6 +33449,7 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -33310,6 +33460,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -33319,7 +33470,8 @@ "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true }, "@humanwhocodes/object-schema": { "version": "1.2.1" @@ -39817,161 +39969,220 @@ } }, "eslint": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz", - "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", - "peer": true, + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", + "integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.1.0", - "@eslint/js": "8.44.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", + "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.1.3", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.3.2", + "debug": "^4.0.1", "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.6.0", - "esquery": "^1.4.2", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.0", + "esquery": "^1.2.0", "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" }, "dependencies": { - "@eslint/js": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", - "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", - "peer": true - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "peer": true - }, - "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "peer": true, + "@eslint/eslintrc": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", + "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" } }, - "eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "peer": true + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "peer": true + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==" }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "peer": true, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } } }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "peer": true, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "requires": { - "is-glob": "^4.0.3" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } } }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "peer": true + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "requires": { + "flat-cache": "^2.0.1" + } }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "peer": true, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", "requires": { - "argparse": "^2.0.1" + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" } }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "peer": true, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", "requires": { - "p-locate": "^5.0.0" + "type-fest": "^0.8.1" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==" + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "peer": true, "requires": { "brace-expansion": "^1.1.7" } }, - "p-limit": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "string-width": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "peer": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { - "yocto-queue": "^0.1.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "peer": true, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", "requires": { - "p-limit": "^3.0.2" + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" } }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "peer": true + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -40148,9 +40359,9 @@ } }, "eslint-plugin-prettier": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", - "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz", + "integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" @@ -40270,6 +40481,7 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, "requires": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -40279,12 +40491,14 @@ "acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==" + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true }, "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true } } }, @@ -42243,7 +42457,8 @@ "graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "devOptional": true }, "graphql": { "version": "14.7.0", @@ -48034,7 +48249,9 @@ "version": "4.0.0" }, "type-fest": { - "version": "0.8.1" + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" } } }, @@ -50426,6 +50643,13 @@ "type-detect": { "version": "4.0.8" }, + "type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "optional": true, + "peer": true + }, "type-is": { "version": "1.6.18", "requires": { @@ -52148,6 +52372,24 @@ "wrappy": { "version": "1.0.2" }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "requires": { + "mkdirp": "^0.5.1" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "requires": { + "minimist": "^1.2.6" + } + } + } + }, "write-file-atomic": { "version": "3.0.3", "requires": { diff --git a/webapp/package.json b/webapp/package.json index 332462786e..e454881089 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -68,9 +68,11 @@ "css-mediaquery": "^0.1.2", "customize-cra": "^1.0.0", "dcl-tslint-config-standard": "^3.0.0", + "eslint": "^7.11.0", "eslint-plugin-import": "npm:eslint-plugin-i@^2.28.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^3.1.4", "husky": "^8.0.3", + "prettier": "^2.8.8", "react-app-rewired": "^2.2.1", "react-error-overlay": "^6.0.9", "redux-saga-test-plan": "^4.0.3", From 49c036a553b45f954c4a2b0a610750e326fde914 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 18:21:14 -0300 Subject: [PATCH 10/36] chore: override prettier rules to match marketplace prettier --- webapp/.eslintrc.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/webapp/.eslintrc.js b/webapp/.eslintrc.js index 6df5b06e3a..d259262ba2 100644 --- a/webapp/.eslintrc.js +++ b/webapp/.eslintrc.js @@ -1,6 +1,23 @@ +/* eslint-env node */ module.exports = { extends: ['@dcl/eslint-config/dapps'], parserOptions: { project: ['tsconfig.json'] - } + }, + overrides: [ + { + files: ['*.js', '*.ts', '*.tsx'], + rules: { + ['prettier/prettier']: [ + 'error', + { + printWidth: 80, + singleQuote: true, + semi: false, + trailingComma: 'none' + } + ] + } + } + ] } From 16b30f4a62cd50ba9a29b21dba7dec734dd990ef Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Thu, 17 Aug 2023 18:21:28 -0300 Subject: [PATCH 11/36] chore: Add eslint config file to tsconfig --- webapp/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/tsconfig.json b/webapp/tsconfig.json index 5ad2f9c682..a4a255abf1 100644 --- a/webapp/tsconfig.json +++ b/webapp/tsconfig.json @@ -27,6 +27,6 @@ } ] }, - "include": ["src"], + "include": ["src", ".eslintrc.js"], "exclude": ["src/contracts/*.ts"] } From faec85020dc54e0214b55ea31f9170693b9f6593 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio Date: Thu, 7 Mar 2024 17:45:59 -0300 Subject: [PATCH 12/36] fix: Update package --- webapp/{.eslintrc.js => .eslintrc.cjs} | 0 webapp/package-lock.json | 67 ++++---------------------- webapp/package.json | 9 ++-- 3 files changed, 13 insertions(+), 63 deletions(-) rename webapp/{.eslintrc.js => .eslintrc.cjs} (100%) diff --git a/webapp/.eslintrc.js b/webapp/.eslintrc.cjs similarity index 100% rename from webapp/.eslintrc.js rename to webapp/.eslintrc.cjs diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 2f3618ccee..9dc952561d 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -94,12 +94,11 @@ "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "node-fetch": "^2.7.0", - "prettier": "^1.19.1", + "prettier": "^3.2.5", "redux-saga-test-plan": "^4.0.3", "rollup-plugin-polyfill-node": "^0.13.0", "ts-node": "^10.9.2", "tslint": "^5.20.1", - "tslint-plugin-prettier": "^2.0.1", "tslint-react": "^4.1.0", "typechain": "^8.0.0", "typescript": "^5.3.3", @@ -1999,21 +1998,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@dcl/eslint-config/node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/@dcl/hashing": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-2.0.0.tgz", @@ -18729,14 +18713,18 @@ } }, "node_modules/prettier": { - "version": "1.19.1", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, - "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=4" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prettier-linter-helpers": { @@ -21267,43 +21255,6 @@ "node": ">=4.2.0" } }, - "node_modules/tslint-plugin-prettier": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-plugin-prettier": "^2.2.0", - "lines-and-columns": "^1.1.6", - "tslib": "^1.7.1" - }, - "engines": { - "node": ">= 4" - }, - "peerDependencies": { - "prettier": "^1.9.0 || ^2.0.0", - "tslint": "^5.0.0 || ^6.0.0" - } - }, - "node_modules/tslint-plugin-prettier/node_modules/eslint-plugin-prettier": { - "version": "2.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" - }, - "engines": { - "node": ">=4.0.0" - }, - "peerDependencies": { - "prettier": ">= 0.11.0" - } - }, - "node_modules/tslint-plugin-prettier/node_modules/jest-docblock": { - "version": "21.2.0", - "dev": true, - "license": "MIT" - }, "node_modules/tslint-react": { "version": "4.1.0", "dev": true, diff --git a/webapp/package.json b/webapp/package.json index ee69b814f4..8a78eacc03 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -89,12 +89,11 @@ "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "node-fetch": "^2.7.0", - "prettier": "^1.19.1", + "prettier": "^3.2.5", "redux-saga-test-plan": "^4.0.3", "rollup-plugin-polyfill-node": "^0.13.0", "ts-node": "^10.9.2", "tslint": "^5.20.1", - "tslint-plugin-prettier": "^2.0.1", "tslint-react": "^4.1.0", "typechain": "^8.0.0", "typescript": "^5.3.3", @@ -107,10 +106,10 @@ "build": "tsc && node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build", "test": "jest", "test:coverage": "npm run test -- --coverage", - "lint": "eslint -c .eslintrc.js --ext .ts src", - "check:code": "eslint -c .eslintrc.js src", + "lint": "eslint -c .eslintrc.cjs --ext .ts src", + "check:code": "eslint -c .eslintrc.cjs src", "fix:code": "npm run check:code -- --fix", - "pre-commit:fix:code": "eslint -c .eslintrc.js --fix", + "pre-commit:fix:code": "eslint -c .eslintrc.cjs --fix", "pre-commit:fix:prettier": "prettier --config .prettierrc.json --write", "generate-contracts": "typechain --target ethers-v5 --out-dir src/contracts src/contracts/*.json" }, From e32283cc5948fd0f20a06e0fb8a01ed0aff31bf6 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio Date: Thu, 7 Mar 2024 17:53:38 -0300 Subject: [PATCH 13/36] fix: Remove prettier config --- webapp/package.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/webapp/package.json b/webapp/package.json index 8a78eacc03..52080450f6 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -113,11 +113,6 @@ "pre-commit:fix:prettier": "prettier --config .prettierrc.json --write", "generate-contracts": "typechain --target ethers-v5 --out-dir src/contracts src/contracts/*.json" }, - "prettier": { - "printWidth": 80, - "singleQuote": true, - "semi": false - }, "engines": { "node": "18" }, From a12943d75364ecbb86613e781299907a7cfb2bec Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio Date: Thu, 7 Mar 2024 18:09:32 -0300 Subject: [PATCH 14/36] fix: Prettierrc --- webapp/.prettierrc.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/webapp/.prettierrc.json b/webapp/.prettierrc.json index c57823fe7b..70deb97713 100644 --- a/webapp/.prettierrc.json +++ b/webapp/.prettierrc.json @@ -1,6 +1,8 @@ { - "printWidth": 80, - "singleQuote": true, - "semi": false, - "trailingComma": "none" + "semi": false, + "singleQuote": true, + "printWidth": 140, + "tabWidth": 2, + "trailingComma": "none", + "arrowParens": "avoid" } From ed5a48c465c7b311c19d9171ceead89a2c8c72dc Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio Date: Fri, 8 Mar 2024 10:07:23 -0300 Subject: [PATCH 15/36] fix: Update files --- webapp/.eslintrc.cjs | 11 +- webapp/package-lock.json | 1850 +++++--------------------------------- webapp/package.json | 2 +- webapp/tsconfig.json | 5 +- 4 files changed, 227 insertions(+), 1641 deletions(-) diff --git a/webapp/.eslintrc.cjs b/webapp/.eslintrc.cjs index d259262ba2..f899f13725 100644 --- a/webapp/.eslintrc.cjs +++ b/webapp/.eslintrc.cjs @@ -2,7 +2,8 @@ module.exports = { extends: ['@dcl/eslint-config/dapps'], parserOptions: { - project: ['tsconfig.json'] + project: ['tsconfig.json'], + tsconfigRootDir: __dirname }, overrides: [ { @@ -11,10 +12,12 @@ module.exports = { ['prettier/prettier']: [ 'error', { - printWidth: 80, - singleQuote: true, semi: false, - trailingComma: 'none' + singleQuote: true, + printWidth: 140, + tabWidth: 2, + trailingComma: 'none', + arrowParens: 'avoid' } ] } diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 9dc952561d..e2b1827338 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -67,7 +67,7 @@ "@typechain/ethers-v5": "^10.0.0", "@types/css-mediaquery": "^0.1.1", "@types/history": "^4.7.3", - "@types/jest": "^24.9.1", + "@types/jest": "^29.5.12", "@types/node": "^18.19.8", "@types/react": "^17.0.17", "@types/react-dom": "^17.0.9", @@ -502,11 +502,39 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.12.11", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/highlight": "^7.10.4" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" } }, "node_modules/@babel/compat-data": { @@ -547,17 +575,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.16.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.0", "dev": true, @@ -997,42 +1014,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.22.10", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/template/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/@babel/traverse": { "version": "7.17.12", "dev": true, @@ -1053,17 +1034,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.16.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/traverse/node_modules/globals": { "version": "11.12.0", "dev": true, @@ -3568,33 +3538,6 @@ } } }, - "node_modules/@jest/core/node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@jest/core/node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@jest/core/node_modules/@jest/console": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", @@ -3729,23 +3672,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/core/node_modules/@sinonjs/commons": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", @@ -3764,15 +3690,6 @@ "@sinonjs/commons": "^3.0.0" } }, - "node_modules/@jest/core/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/@jest/core/node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -3837,21 +3754,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@jest/core/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/core/node_modules/cjs-module-lexer": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", @@ -3878,15 +3780,6 @@ } } }, - "node_modules/@jest/core/node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/core/node_modules/emittery": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", @@ -3899,31 +3792,6 @@ "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, - "node_modules/@jest/core/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@jest/core/node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/core/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4009,21 +3877,6 @@ } } }, - "node_modules/@jest/core/node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/core/node_modules/jest-docblock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", @@ -4069,15 +3922,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/core/node_modules/jest-haste-map": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", @@ -4116,41 +3960,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core/node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/core/node_modules/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", @@ -4290,23 +4099,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/core/node_modules/jest-validate": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", @@ -4388,42 +4180,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@jest/core/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/@jest/core/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/@jest/core/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "engines": { "node": ">=0.10.0" @@ -4473,32 +4233,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/create-cache-key-function/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/create-cache-key-function/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/@jest/expect": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", @@ -4524,42 +4258,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/expect-utils/node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect/node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@jest/expect/node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@jest/expect/node_modules/@jest/transform": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", @@ -4586,87 +4284,12 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/expect/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/expect/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/expect/node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/@jest/expect/node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@jest/expect/node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/expect/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4676,30 +4299,6 @@ "node": ">=8" } }, - "node_modules/@jest/expect/node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/expect/node_modules/jest-haste-map": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", @@ -4725,41 +4324,6 @@ "fsevents": "^2.3.2" } }, - "node_modules/@jest/expect/node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect/node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/expect/node_modules/jest-regex-util": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", @@ -4800,23 +4364,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/expect/node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/expect/node_modules/jest-worker": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", @@ -4847,38 +4394,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/@jest/expect/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/expect/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/@jest/expect/node_modules/write-file-atomic": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", @@ -4935,33 +4450,6 @@ } } }, - "node_modules/@jest/reporters/node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@jest/reporters/node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@jest/reporters/node_modules/@jest/console": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", @@ -5020,62 +4508,12 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@jest/reporters/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/reporters/node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/@jest/reporters/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/@jest/reporters/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -5126,26 +4564,6 @@ "fsevents": "^2.3.2" } }, - "node_modules/@jest/reporters/node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/reporters/node_modules/jest-regex-util": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", @@ -5155,85 +4573,36 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/@jest/reporters/node_modules/jest-worker": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/@jest/reporters/node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/@jest/reporters/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/@jest/reporters/node_modules/write-file-atomic": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", @@ -5259,6 +4628,23 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.1", "dev": true, @@ -6837,115 +6223,13 @@ } }, "node_modules/@types/jest": { - "version": "24.9.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.9.1.tgz", - "integrity": "sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q==", - "dev": true, - "dependencies": { - "jest-diff": "^24.3.0" - } - }, - "node_modules/@types/jest/node_modules/@jest/types": { - "version": "24.9.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/jest/node_modules/@types/istanbul-reports": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*", - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest/node_modules/@types/yargs": { - "version": "13.0.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/jest/node_modules/ansi-regex": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/@types/jest/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@types/jest/node_modules/diff-sequences": { - "version": "24.9.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/jest/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@types/jest/node_modules/jest-diff": { - "version": "24.9.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^2.0.1", - "diff-sequences": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/jest/node_modules/jest-get-type": { - "version": "24.9.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/jest/node_modules/pretty-format": { - "version": "24.9.0", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - }, - "engines": { - "node": ">= 6" + "expect": "^29.0.0", + "pretty-format": "^29.0.0" } }, "node_modules/@types/jsdom": { @@ -7207,10 +6491,20 @@ "@types/node": "*" } }, - "node_modules/@types/yargs-parser": { - "version": "20.2.1", + "node_modules/@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, - "license": "MIT" + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "7.1.1", @@ -8766,6 +8060,21 @@ "version": "1.1.4", "license": "ISC" }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, "node_modules/cids": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", @@ -9164,33 +8473,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/create-jest/node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/create-jest/node_modules/@jest/console": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", @@ -9325,23 +8607,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/create-jest/node_modules/@sinonjs/commons": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", @@ -9360,15 +8625,6 @@ "@sinonjs/commons": "^3.0.0" } }, - "node_modules/create-jest/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/create-jest/node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -9433,21 +8689,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/create-jest/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/create-jest/node_modules/cjs-module-lexer": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", @@ -9474,15 +8715,6 @@ } } }, - "node_modules/create-jest/node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/create-jest/node_modules/emittery": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", @@ -9495,31 +8727,6 @@ "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, - "node_modules/create-jest/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/create-jest/node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/create-jest/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -9605,21 +8812,6 @@ } } }, - "node_modules/create-jest/node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/create-jest/node_modules/jest-docblock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", @@ -9665,15 +8857,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/create-jest/node_modules/jest-haste-map": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", @@ -9712,41 +8895,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-jest/node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/create-jest/node_modules/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", @@ -9886,23 +9034,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/create-jest/node_modules/jest-validate": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", @@ -9984,38 +9115,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/create-jest/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-jest/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/create-jest/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/create-jest/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -11033,6 +10132,15 @@ "node": ">=0.3.1" } }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/dijkstrajs": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", @@ -13108,6 +12216,22 @@ "node": ">= 0.8.0" } }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/express": { "version": "4.17.3", "license": "MIT", @@ -15214,47 +14338,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-changed-files/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-changed-files/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-changed-files/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/jest-changed-files/node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -15302,23 +14385,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-changed-files/node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-changed-files/node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -15379,33 +14445,6 @@ } } }, - "node_modules/jest-cli/node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/jest-cli/node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/jest-cli/node_modules/@jest/console": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", @@ -15540,23 +14579,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-cli/node_modules/@sinonjs/commons": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", @@ -15575,15 +14597,6 @@ "@sinonjs/commons": "^3.0.0" } }, - "node_modules/jest-cli/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jest-cli/node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -15648,21 +14661,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-cli/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/jest-cli/node_modules/cjs-module-lexer": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", @@ -15721,50 +14719,16 @@ } } }, - "node_modules/jest-cli/node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-cli/node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/jest-cli/node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, "node_modules/jest-cli/node_modules/has-flag": { @@ -15852,21 +14816,6 @@ } } }, - "node_modules/jest-cli/node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-cli/node_modules/jest-docblock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", @@ -15912,15 +14861,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-cli/node_modules/jest-haste-map": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", @@ -15959,41 +14899,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-cli/node_modules/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", @@ -16133,23 +15038,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-cli/node_modules/jest-validate": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", @@ -16231,38 +15119,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-cli/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-cli/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -16372,6 +15228,21 @@ "node": ">=12" } }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/jest-environment-jsdom": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", @@ -16399,33 +15270,6 @@ } } }, - "node_modules/jest-environment-jsdom/node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/jest-environment-jsdom/node_modules/@jest/environment": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", @@ -16458,23 +15302,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-environment-jsdom/node_modules/@sinonjs/commons": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", @@ -16493,59 +15320,6 @@ "@sinonjs/commons": "^3.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-environment-jsdom/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-environment-jsdom/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/jest-environment-jsdom/node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-environment-jsdom/node_modules/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", @@ -16560,55 +15334,50 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/pretty-format": { + "node_modules/jest-matcher-utils": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, - "engines": { - "node": ">=10" + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-pnp-resolver": { "version": "1.2.2", "dev": true, @@ -16638,33 +15407,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve-dependencies/node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/jest-resolve-dependencies/node_modules/@jest/transform": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", @@ -16691,87 +15433,12 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve-dependencies/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, "node_modules/jest-resolve-dependencies/node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/jest-resolve-dependencies/node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-resolve-dependencies/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -16781,30 +15448,6 @@ "node": ">=8" } }, - "node_modules/jest-resolve-dependencies/node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-resolve-dependencies/node_modules/jest-haste-map": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", @@ -16830,41 +15473,6 @@ "fsevents": "^2.3.2" } }, - "node_modules/jest-resolve-dependencies/node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-resolve-dependencies/node_modules/jest-regex-util": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", @@ -16905,23 +15513,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve-dependencies/node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-resolve-dependencies/node_modules/jest-worker": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", @@ -16952,38 +15543,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jest-resolve-dependencies/node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, "node_modules/jest-resolve-dependencies/node_modules/write-file-atomic": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", @@ -16997,32 +15556,23 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/jest/node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest/node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/jiti": { "version": "1.21.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", @@ -18739,6 +17289,38 @@ "node": ">=6.0.0" } }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/pretty-format/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, "node_modules/process": { "version": "0.11.10", "license": "MIT", diff --git a/webapp/package.json b/webapp/package.json index 52080450f6..44cc162ea2 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -62,7 +62,7 @@ "@typechain/ethers-v5": "^10.0.0", "@types/css-mediaquery": "^0.1.1", "@types/history": "^4.7.3", - "@types/jest": "^24.9.1", + "@types/jest": "^29.5.12", "@types/node": "^18.19.8", "@types/react": "^17.0.17", "@types/react-dom": "^17.0.9", diff --git a/webapp/tsconfig.json b/webapp/tsconfig.json index 3e5f131581..31032ef6dd 100644 --- a/webapp/tsconfig.json +++ b/webapp/tsconfig.json @@ -20,8 +20,9 @@ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "types": ["vite/client", "jest", "node"], }, - "include": ["src", ".eslintrc.js", "vite.config.ts", "jest.config.ts"], + "include": ["src", ".eslintrc.js", "vite.config.ts", "jest.config.ts", ".eslintrc.cjs"], "references": [{ "path": "./tsconfig.node.json" }] } From ab6ae1bc2f2f97b0d3cb265f45cf3a118d95c4b8 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio Date: Fri, 8 Mar 2024 15:25:50 -0300 Subject: [PATCH 16/36] fix: Basic linting proccesses --- .github/workflows/lint.yaml | 22 ++++++++ .husky/pre-commit | 15 ++++++ webapp/.eslintrc.cjs | 50 +++++++++++++++++++ .../components/BrowsePage/BrowsePage.types.ts | 9 +--- 4 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/lint.yaml create mode 100755 .husky/pre-commit diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000000..76b4de38ce --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,22 @@ +name: Lint + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./webapp + steps: + - uses: actions/checkout@master + - name: Use Node.js 18.x + uses: actions/setup-node@v4.0.1 + with: + node-version: 18.x + cache: "npm" + cache-dependency-path: webapp/package-lock.json + - name: Install + run: npm install --legacy-peer-deps + - name: Lint + run: npm run check:code diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000000..8c178e97b4 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,15 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx|json|yml|md|html|css)$' || true; }) + +if [ -z "$FILES" ]; then + exit 0 +fi + +TS_FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx)$' || true; }) + +if [[ ! -z "$TS_FILES" ]];then + echo "Running lints" + npm run pre-commit:fix:code -- $TS_FILES +fi diff --git a/webapp/.eslintrc.cjs b/webapp/.eslintrc.cjs index f899f13725..152ea390d8 100644 --- a/webapp/.eslintrc.cjs +++ b/webapp/.eslintrc.cjs @@ -21,6 +21,56 @@ module.exports = { } ] } + }, + { + files: ['*.ts', '*.tsx', '*.cjs'], + extends: ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'prettier'], + rules: { + '@typescript-eslint/no-unsafe-declaration-merging': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-declaration-merging + '@typescript-eslint/no-redundant-type-constituents': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-redundant-type-constituents + '@typescript-eslint/require-await': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/require-await + '@typescript-eslint/no-floating-promises': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-floating-promises + '@typescript-eslint/no-unsafe-return': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-return + '@typescript-eslint/naming-convention': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/naming-convention/ + '@typescript-eslint/no-unused-vars': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unused-vars + '@typescript-eslint/no-unnecessary-type-assertion': 'error', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unnecessary-type-assertion + '@typescript-eslint/explicit-module-boundary-types': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/explicit-module-boundary-types + '@typescript-eslint/restrict-template-expressions': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/restrict-template-expressions + '@typescript-eslint/no-base-to-string': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-base-to-string + '@typescript-eslint/ban-types': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/ban-types + '@typescript-eslint/unbound-method': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/unbound-method + '@typescript-eslint/ban-ts-comment': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/ban-ts-comment + 'no-prototype-builtins': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/no-prototype-builtins + 'no-case-declarations': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/no-case-declarations + '@typescript-eslint/no-unsafe-assignment': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-assignment/ + '@typescript-eslint/no-unsafe-call': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-call/ + '@typescript-eslint/no-unsafe-member-access': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-member-access/ + '@typescript-eslint/no-unsafe-argument': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unsafe-argument/ + '@typescript-eslint/no-explicit-any': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-explicit-any + '@typescript-eslint/no-non-null-assertion': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-non-null-assertion + 'no-async-promise-executor': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/no-async-promise-executor + '@typescript-eslint/await-thenable': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/await-thenable + '@typescript-eslint/no-unnecessary-type-constraint': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-unnecessary-type-constraint + '@typescript-eslint/no-misused-promises': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-misused-promises + 'require-yield': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/require-yield + 'import/order': 'off', // TODO: migrate code progressively to remove this line. + '@typescript-eslint/no-unsafe-enum-comparison': 'off' + }, + parserOptions: { + project: ['./tsconfig.json'] + } + }, + { + files: ['*.spec.ts'], + rules: { + '@typescript-eslint/unbound-method': 'off' + } + }, + { + files: ['*.js'], + rules: { + '@typescript-eslint/no-var-requires': 'off' + } } ] } diff --git a/webapp/src/components/BrowsePage/BrowsePage.types.ts b/webapp/src/components/BrowsePage/BrowsePage.types.ts index e3b15ad8fb..e6dd222f85 100644 --- a/webapp/src/components/BrowsePage/BrowsePage.types.ts +++ b/webapp/src/components/BrowsePage/BrowsePage.types.ts @@ -13,12 +13,5 @@ export type Props = { export type MapStateProps = Pick< Props, - | 'vendor' - | 'isFullscreen' - | 'assetType' - | 'section' - | 'isCampaignCollectiblesBannerEnabled' - | 'contracts' + 'vendor' | 'isFullscreen' | 'assetType' | 'section' | 'isCampaignCollectiblesBannerEnabled' | 'contracts' > -export type MapDispatchProps = {} -export type MapDispatch = {} From d687187351f983bbd86a891ff0438362cde1bd65 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio Date: Fri, 8 Mar 2024 15:33:29 -0300 Subject: [PATCH 17/36] fix: More fixes to files --- .github/workflows/lint.yaml | 2 +- webapp/.eslintrc.cjs | 3 +++ webapp/package.json | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 76b4de38ce..6f339ad644 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -19,4 +19,4 @@ jobs: - name: Install run: npm install --legacy-peer-deps - name: Lint - run: npm run check:code + run: npm run lint diff --git a/webapp/.eslintrc.cjs b/webapp/.eslintrc.cjs index 152ea390d8..cd87ec3421 100644 --- a/webapp/.eslintrc.cjs +++ b/webapp/.eslintrc.cjs @@ -5,6 +5,7 @@ module.exports = { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, + plugins: ['react-hooks'], overrides: [ { files: ['*.js', '*.ts', '*.tsx'], @@ -54,6 +55,8 @@ module.exports = { '@typescript-eslint/no-misused-promises': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-misused-promises 'require-yield': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/require-yield 'import/order': 'off', // TODO: migrate code progressively to remove this line. + 'no-empty': 'off', // TODO: migrate code progressively to remove this line. https://eslint.org/docs/rules/no-empty + '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', // TODO: migrate code progressively to remove this line. https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain '@typescript-eslint/no-unsafe-enum-comparison': 'off' }, parserOptions: { diff --git a/webapp/package.json b/webapp/package.json index 44cc162ea2..e5ef01fa34 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -111,7 +111,8 @@ "fix:code": "npm run check:code -- --fix", "pre-commit:fix:code": "eslint -c .eslintrc.cjs --fix", "pre-commit:fix:prettier": "prettier --config .prettierrc.json --write", - "generate-contracts": "typechain --target ethers-v5 --out-dir src/contracts src/contracts/*.json" + "generate-contracts": "typechain --target ethers-v5 --out-dir src/contracts src/contracts/*.json", + "prepare": "husky || true" }, "engines": { "node": "18" From f0f3fdf29d89ef7c8d2d432f2ba40c6f2d6cb639 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio Date: Fri, 8 Mar 2024 15:38:28 -0300 Subject: [PATCH 18/36] fix: Husky prepare --- webapp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/package.json b/webapp/package.json index e5ef01fa34..f4bd0f031f 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -112,7 +112,7 @@ "pre-commit:fix:code": "eslint -c .eslintrc.cjs --fix", "pre-commit:fix:prettier": "prettier --config .prettierrc.json --write", "generate-contracts": "typechain --target ethers-v5 --out-dir src/contracts src/contracts/*.json", - "prepare": "husky || true" + "prepare": "cd .. && husky webapp/.husky" }, "engines": { "node": "18" From e3c7ba606a2fb5175e94c039a05edcc2b83163f7 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio Date: Fri, 8 Mar 2024 15:41:40 -0300 Subject: [PATCH 19/36] fix: Auto-fixes --- .../AccountBanner/AccountBanner.container.tsx | 15 +- .../AccountBanner/AccountBanner.tsx | 54 +- .../AccountPage/AccountPage.container.ts | 13 +- .../components/AccountPage/AccountPage.tsx | 23 +- .../AccountPage/AccountPage.types.ts | 10 +- .../AccountSidebar.container.ts | 6 +- .../AccountSidebar/AccountSidebar.tsx | 7 +- .../CurrentAccountSidebar.tsx | 52 +- .../OtherAccountSidebar.container.ts | 3 +- .../OtherAccountSidebar.tsx | 39 +- .../ActivityPage/ActivityPage.container.ts | 6 +- .../components/ActivityPage/ActivityPage.tsx | 22 +- .../ActivityPage/ActivityPage.types.ts | 5 +- .../ActivityPage/Transaction/Transaction.tsx | 185 +----- .../TransactionDetail/TransactionDetail.tsx | 39 +- .../AnalyticsVolumeDayData.container.ts | 19 +- .../AnalyticsVolumeDayData.tsx | 62 +- .../AnalyticsVolumeDayData.types.ts | 5 +- .../AssetBrowse/AssetBrowse.container.ts | 14 +- .../components/AssetBrowse/AssetBrowse.tsx | 78 +-- .../AssetBrowse/AssetBrowse.types.ts | 38 +- webapp/src/components/AssetBrowse/Box/Box.tsx | 4 +- .../MapBrowse/MapBrowse.container.ts | 5 +- .../AssetBrowse/MapBrowse/MapBrowse.tsx | 14 +- .../AssetBrowse/MapBrowse/MapBrowse.types.ts | 5 +- .../components/AssetBrowse/MapBrowse/utils.ts | 8 +- .../MapTopbar/MapTopbar.container.ts | 5 +- .../AssetBrowse/MapTopbar/MapTopbar.tsx | 42 +- .../AssetBrowse/ToggleBox/ToggleBox.tsx | 12 +- .../AssetCard/AssetCard.container.ts | 19 +- .../components/AssetCard/AssetCard.spec.tsx | 9 +- webapp/src/components/AssetCard/AssetCard.tsx | 110 +--- .../components/AssetCard/AssetCard.types.ts | 8 +- .../AssetCard/EmoteTags/EmoteTags.tsx | 15 +- .../ProximityTags/ProximityTags.container.ts | 6 +- .../AssetCard/ProximityTags/ProximityTags.tsx | 21 +- .../AssetCard/WearableTags/WearableTags.tsx | 29 +- .../src/components/AssetCard/utils.spec.tsx | 51 +- webapp/src/components/AssetCard/utils.tsx | 65 +- .../AssetFilters/AssetFilters.container.ts | 76 +-- .../AssetFilters/AssetFilters.spec.tsx | 25 +- .../components/AssetFilters/AssetFilters.tsx | 106 +-- .../AssetFilters/AssetFilters.types.ts | 9 +- .../BodyShapeFilter/BodyShapeFilter.tsx | 23 +- .../CollectionFilter/CollectionFilter.tsx | 27 +- .../CreatorsFilter.container.ts | 14 +- .../CreatorsFilter/CreatorsFilter.tsx | 63 +- .../CreatorsFilter/CreatorsFilter.types.ts | 5 +- .../EmoteAttributesFilter.spec.tsx | 16 +- .../EmoteAttributesFilter.tsx | 29 +- .../EmoteAttributesFilter.types.ts | 6 +- .../EstateSizeFilter/EstateSizeFilter.tsx | 17 +- .../LandStatusFilter/LandStatusFilter.tsx | 10 +- .../LocationFilter/LocationFilter.spec.tsx | 29 +- .../LocationFilter/LocationFilter.tsx | 34 +- .../MoreFilters/MoreFilters.spec.tsx | 12 +- .../AssetFilters/MoreFilters/MoreFilters.tsx | 35 +- .../NetworkFilter/NetworkFilter.tsx | 31 +- .../PriceFilter/PriceFilter.container.tsx | 50 +- .../AssetFilters/PriceFilter/PriceFilter.tsx | 50 +- .../PriceFilter/PriceFilter.types.ts | 8 +- .../AssetFilters/PriceFilter/utils.ts | 39 +- .../RentalPeriodFilter.spec.tsx | 26 +- .../RentalPeriodFilter/RentalPeriodFilter.tsx | 21 +- .../StatusFilter/StatusFilter.tsx | 20 +- webapp/src/components/AssetFilters/index.ts | 4 +- .../AssetImage/AssetImage.container.ts | 46 +- .../src/components/AssetImage/AssetImage.tsx | 272 ++------ .../components/AssetImage/AssetImage.types.ts | 19 +- .../AssetImage/AvailableForMintPopup.tsx | 42 +- .../AssetImage/EnsImage/EnsImage.tsx | 31 +- .../components/AssetImage/EnsImage/utils.ts | 29 +- webapp/src/components/AssetImage/utils.tsx | 2 +- .../AssetList/AssetList.container.ts | 3 +- webapp/src/components/AssetList/AssetList.tsx | 42 +- .../components/AssetList/AssetList.types.ts | 18 +- webapp/src/components/AssetList/utils.spec.ts | 29 +- webapp/src/components/AssetList/utils.ts | 9 +- .../components/AssetPage/Actions/Actions.tsx | 51 +- .../AssetPage/Actions/Actions.types.ts | 5 +- webapp/src/components/AssetPage/AssetPage.tsx | 23 +- .../AssetPage/BaseDetail/BaseDetail.tsx | 17 +- .../BestBuyingOption.spec.tsx | 41 +- .../BestBuyingOption/BestBuyingOption.tsx | 123 +--- .../components/AssetPage/BidList/BidList.tsx | 7 +- .../AssetPage/BidList/BidList.types.ts | 5 +- .../BidsTable/BidsTable.container.ts | 5 +- .../AssetPage/BidsTable/BidsTable.tsx | 20 +- .../components/AssetPage/BidsTable/utils.tsx | 22 +- .../AssetPage/BuyNFTBox/BuyNFTBox.tsx | 159 +---- .../AssetPage/CategoryBadge/CategoryBadge.tsx | 16 +- .../AssetPage/Collection/Collection.tsx | 4 +- .../AssetPage/Description/Description.tsx | 15 +- .../AssetPage/EmoteDetail/EmoteDetail.tsx | 22 +- .../AssetPage/EstateDetail/EstateDetail.tsx | 11 +- .../ParcelCoordinates/ParcelCoordinates.tsx | 11 +- .../AssetPage/Expiration/Expiration.tsx | 9 +- .../AssetPage/Expiration/Expiration.types.ts | 2 +- .../AssetPage/Highlight/Highlight.tsx | 4 +- .../AssetPage/IconBadge/IconBadge.tsx | 21 +- .../AssetPage/ItemDetail/ItemDetail.tsx | 48 +- .../components/AssetPage/JumpIn/JumpIn.tsx | 6 +- .../ListingsTable/ListingsTable.spec.tsx | 24 +- .../AssetPage/ListingsTable/ListingsTable.tsx | 6 +- .../AssetPage/ListingsTable/utils.tsx | 42 +- .../ListingsTableContainer.tsx | 171 +++-- .../AssetPage/OnBack/OnBack.spec.tsx | 43 +- .../OwnersTable/OwnersTable.spec.tsx | 12 +- .../AssetPage/OwnersTable/OwnersTable.tsx | 8 +- .../AssetPage/OwnersTable/utils.tsx | 16 +- .../AssetPage/ParcelDetail/ParcelDetail.tsx | 15 +- .../ProximityHighlights.container.ts | 6 +- .../ProximityHighlights.tsx | 17 +- .../AssetPage/RentalHistory/RentalHistory.tsx | 4 +- .../AssetPage/RentalHistory/utils.tsx | 4 +- .../RequiredPermissions.container.ts | 16 +- .../RequiredPermissions.spec.tsx | 8 +- .../RequiredPermissions.tsx | 23 +- .../RequiredPermissions.types.ts | 9 +- .../BuyNFTButtons/BuyNFTButtons.container.tsx | 16 +- .../BuyNFTButtons/BuyNFTButtons.tsx | 31 +- .../BuyNFTButtons/BuyNFTButtons.types.ts | 33 +- .../BuyWithCardButton/BuyWithCardButton.tsx | 6 +- .../BuyWithCardButton.types.ts | 4 +- .../BuyWithCryptoButton.types.ts | 2 +- .../ItemSaleActions.container.ts | 8 +- .../ItemSaleActions/ItemSaleActions.tsx | 33 +- .../PeriodsDropdown/PeriodsDropdown.tsx | 27 +- .../SaleRentActionBox.container.ts | 19 +- .../SaleRentActionBox/SaleRentActionBox.tsx | 137 +--- .../SaleRentActionBox.types.ts | 7 +- .../AssetPage/SmartBadge/SmartBadge.tsx | 6 +- .../components/AssetPage/Title/Title.spec.tsx | 4 +- .../src/components/AssetPage/Title/Title.tsx | 9 +- .../TransactionHistory/TransactionHistory.tsx | 14 +- .../AssetPage/TransactionHistory/utils.tsx | 13 +- .../WearableDetail/WearableDetail.tsx | 21 +- .../YourOffer/YourOffer.container.ts | 3 +- .../AssetPage/YourOffer/YourOffer.tsx | 57 +- .../AssetPage/YourOffer/YourOffer.types.ts | 4 +- .../AssetProvider/AssetProvider.container.ts | 58 +- .../AssetProvider/AssetProvider.tsx | 20 +- .../AssetProvider/AssetProvider.types.ts | 36 +- .../AssetProviderPage.container.ts | 6 +- .../AssetProviderPage/AssetProviderPage.tsx | 5 +- .../AssetProviderPage.types.ts | 11 +- .../AssetTopbar/AssetTopbar.container.ts | 3 +- .../components/AssetTopbar/AssetTopbar.tsx | 95 +-- .../AssetTopbar/AssetTopbar.types.ts | 5 +- .../AssetTypeFilter/AssetTypeFilter.tsx | 13 +- .../CollectibleResultItemRow.tsx | 5 +- .../CollectionResultRow.spec.tsx | 16 +- .../CollectionResultRow.tsx | 12 +- .../CreatorResultRow.spec.tsx | 12 +- .../SearchBarDropdown.container.tsx | 19 +- .../SearchBarDropdown.spec.tsx | 77 +-- .../SearchBarDropdown/SearchBarDropdown.tsx | 193 +----- .../SearchBarDropdown.types.ts | 18 +- .../SearchBarDropdownOptionSkeleton.tsx | 17 +- .../SearchBarDropdown/constants.ts | 2 +- .../AssetTopbar/SearchBarDropdown/index.ts | 2 - .../AssetTopbar/SelectedFilters/Pill/Pill.tsx | 18 +- .../SelectedFilters.container.ts | 5 +- .../SelectedFilters/SelectedFilters.spec.tsx | 47 +- .../SelectedFilters/SelectedFilters.tsx | 131 +--- .../SelectedFilters/SelectedFilters.types.ts | 5 +- .../AssetTopbar/SelectedFilters/utils.ts | 1 - webapp/src/components/AssetTopbar/utils.ts | 29 +- webapp/src/components/Atlas/Atlas.tsx | 112 +--- webapp/src/components/Atlas/Atlas.types.ts | 5 +- webapp/src/components/Atlas/Popup/Popup.tsx | 14 +- .../Bid/AcceptButton/AcceptButton.tsx | 28 +- webapp/src/components/Bid/Bid.container.ts | 11 +- webapp/src/components/Bid/Bid.tsx | 67 +- webapp/src/components/Bid/Bid.types.ts | 16 +- .../Bid/WarningMessage/WarningMessage.tsx | 21 +- .../components/BidPage/BidModal/BidModal.tsx | 58 +- .../components/BidPage/BidPage.container.ts | 3 +- webapp/src/components/BidPage/BidPage.tsx | 8 +- .../src/components/BidPage/BidPage.types.ts | 16 +- webapp/src/components/Bids/Bids.container.ts | 11 +- webapp/src/components/Bids/Bids.tsx | 40 +- webapp/src/components/Bids/Bids.types.ts | 19 +- .../BrowsePage/BrowsePage.container.ts | 12 +- .../src/components/BrowsePage/BrowsePage.tsx | 6 +- .../BuyNFTModal/BuyNFTModal.containter.ts | 26 +- .../BuyPage/BuyNFTModal/BuyNFTModal.tsx | 79 +-- .../BuyPage/BuyNFTModal/BuyNFTModal.types.ts | 14 +- webapp/src/components/BuyPage/BuyPage.tsx | 29 +- .../CardPaymentsExplanation.tsx | 19 +- .../MintItemModal/MintItemModal.containter.ts | 27 +- .../BuyPage/MintItemModal/MintItemModal.tsx | 55 +- .../MintItemModal/MintItemModal.types.ts | 9 +- .../BuyPage/NotEnoughMana/NotEnoughMana.tsx | 15 +- .../NotEnoughMana/NotEnoughMana.types.ts | 14 +- .../PartiallySupportedNetworkCard.tsx | 4 +- .../PriceTooLow/PriceTooLow.container.ts | 6 +- .../BuyPage/PriceTooLow/PriceTooLow.tsx | 14 +- .../BuyPage/PriceTooLow/PriceTooLow.types.ts | 5 +- .../StatusPage/StatusPage.container.ts | 5 +- .../BuyPage/StatusPage/StatusPage.tsx | 26 +- .../Campaign/CampaignBadge/CampaignBadge.tsx | 4 +- .../CampaignBanner/CampaignBanner.tsx | 4 +- .../CampaignBrowserPage.container.ts | 7 +- .../CampaignBrowserPage.tsx | 8 +- .../CampaignBrowserPage.types.ts | 15 +- .../CampaignBrowserBanner.tsx | 12 +- .../CampaignHomepageBanner.tsx | 10 +- .../CancelSalePage.container.ts | 11 +- .../CancelSalePage/CancelSalePage.tsx | 24 +- .../CancelSalePage/CancelSalePage.types.ts | 14 +- webapp/src/components/Chip/Chip.tsx | 28 +- .../components/Collapsible/Collapsible.tsx | 15 +- .../CollectionImage/CollectionImage.tsx | 11 +- .../CollectionList.container.ts | 17 +- .../CollectionList/CollectionList.tsx | 45 +- .../CollectionList/CollectionList.types.ts | 5 +- .../CollectionPage/CollectionPage.tsx | 71 +- .../src/components/CollectionPage/utils.tsx | 34 +- .../CollectionProvider.container.ts | 33 +- .../CollectionProvider/CollectionProvider.tsx | 7 +- .../CollectionProvider.types.tsx | 18 +- .../ConfirmInputValueModal.tsx | 8 +- .../src/components/DetailsBox/DetailsBox.tsx | 7 +- .../DetailsRow/Availability/Availability.tsx | 4 +- .../DetailsRow/Expiration/Expiration.tsx | 15 +- .../DetailsRow/Expiration/ExpirationInfo.tsx | 16 +- .../DetailsBox/DetailsRow/Type/Type.tsx | 20 +- .../src/components/DetailsBox/Info/Info.tsx | 8 +- .../components/ErrorBanner/ErrorBanner.tsx | 4 +- .../ErrorBanner/ErrorBanner.types.ts | 4 +- webapp/src/components/ErrorBanner/index.ts | 2 +- .../ExternalLinkModal/ExternalLinkModal.tsx | 9 +- .../FavoritesCounter.container.ts | 21 +- .../FavoritesCounter.spec.tsx | 28 +- .../FavoritesCounter/FavoritesCounter.tsx | 35 +- .../FavoritesCounter.types.ts | 15 +- webapp/src/components/Footer/Footer.tsx | 4 +- .../components/GenderBadge/GenderBadge.tsx | 12 +- .../components/HomePage/HomePage.container.ts | 5 +- webapp/src/components/HomePage/HomePage.tsx | 63 +- .../src/components/HomePage/HomePage.types.ts | 24 +- .../HomePage/Slideshow/ItemsSection.tsx | 31 +- .../HomePage/Slideshow/Slideshow.tsx | 99 +-- .../InfiniteScroll/InfiniteScroll.spec.tsx | 20 +- .../InfiniteScroll/InfiniteScroll.tsx | 20 +- .../InfiniteScroll/InfiniteScroll.types.ts | 12 +- .../components/InfoTooltip/InfoTooltip.tsx | 10 +- webapp/src/components/LandsPage/LandsPage.tsx | 6 +- .../LinkedProfile/LinkedProfile.tsx | 4 +- .../components/ListPage/ListPage.container.ts | 19 +- .../src/components/ListPage/ListPage.spec.tsx | 114 +--- webapp/src/components/ListPage/ListPage.tsx | 97 +-- .../src/components/ListPage/ListPage.types.ts | 30 +- .../components/ListedBadge/ListedBadge.tsx | 5 +- .../ListsPage/ListCard/ListCard.container.ts | 15 +- .../ListsPage/ListCard/ListCard.spec.tsx | 73 +-- .../ListsPage/ListCard/ListCard.tsx | 34 +- .../components/ListsPage/ListsPage.spec.tsx | 16 +- webapp/src/components/ListsPage/ListsPage.tsx | 48 +- .../components/ListsPage/ListsPage.types.ts | 10 +- webapp/src/components/Mana/Mana.tsx | 8 +- .../src/components/ManaToFiat/ManaToFiat.tsx | 17 +- .../ManageAssetPage/Highlights/Highlights.tsx | 14 +- .../ManageAssetPage/IconButton/IconButton.tsx | 6 +- .../ManageAssetPage/ManageAssetPage.tsx | 168 +---- .../ManageAssetPage/Rent/Rent.container.ts | 20 +- .../components/ManageAssetPage/Rent/Rent.tsx | 125 +--- .../ManageAssetPage/Rent/Rent.types.ts | 12 +- .../ManageAssetPage/Sell/Sell.container.ts | 5 +- .../components/ManageAssetPage/Sell/Sell.tsx | 53 +- .../Menu/DropdownMenu/DropdownMenu.tsx | 25 +- .../src/components/Menu/MenuItem/MenuItem.tsx | 18 +- .../AssetFiltersModal.container.ts | 14 +- .../AssetFiltersModal/AssetFiltersModal.tsx | 25 +- .../AssetFiltersModal.types.ts | 13 +- .../AssetTypeFilter/AssetTypeFilter.tsx | 23 +- .../CategoryFilter.container.ts | 12 +- .../CategoryFilter/CategoryFilter.tsx | 13 +- .../AssetFiltersModal/CategoryFilter/utils.ts | 8 +- .../BuyWithCardExplanationModal.container.ts | 5 +- .../BuyWithCardExplanationModal.tsx | 24 +- .../BuyWithCardExplanationModal.types.ts | 5 +- .../BuyNftWithCryptoModal.container.ts | 23 +- .../BuyNftWithCryptoModal.tsx | 24 +- .../BuyNftWithCryptoModal.types.ts | 36 +- .../BuyWithCryptoModal.spec.tsx | 502 ++++---------- .../BuyWithCryptoModal/BuyWithCryptoModal.tsx | 300 ++------- .../BuyWithCryptoModal.types.ts | 30 +- .../ChainAndTokenSelector.tsx | 83 +-- .../MintNameWithCryptoModal.container.ts | 22 +- .../MintNameWithCryptoModal.tsx | 27 +- .../MintNameWithCryptoModal.types.ts | 26 +- .../MintNftWithCryptoModal.container.ts | 24 +- .../MintNftWithCryptoModal.tsx | 21 +- .../MintNftWithCryptoModal.types.ts | 29 +- .../PaymentSelector/PaymentSelector.tsx | 117 +--- .../PurchaseTotal/PurchaseTotal.tsx | 70 +- .../TokenIcon/TokenIcon.tsx | 4 +- .../Modals/BuyWithCryptoModal/hooks.spec.ts | 181 ++--- .../Modals/BuyWithCryptoModal/hooks.ts | 226 ++----- .../Modals/BuyWithCryptoModal/utils.ts | 72 +- .../ClaimLandModal.container.ts | 22 +- .../Modals/ClaimLandModal/ClaimLandModal.tsx | 4 +- .../ClaimLandModal/ClaimLandModal.types.ts | 5 +- .../ClaimNameFatFingerModal.container.ts | 29 +- .../ClaimNameFatFingerModal.spec.tsx | 25 +- .../ClaimNameFatFingerModal.tsx | 56 +- .../ClaimNameFatFingerModal.types.ts | 26 +- .../ConfirmDeleteListModal.container.ts | 11 +- .../ConfirmDeleteListModal.spec.tsx | 5 +- .../ConfirmDeleteListModal.tsx | 19 +- .../ConfirmRentModal.container.ts | 24 +- .../ConfirmRentModal/ConfirmRentModal.tsx | 87 +-- .../ConfirmRentModal.types.ts | 9 +- .../CreateOrEditList.spec.tsx | 169 ++--- .../CreateOrEditListModal.container.ts | 31 +- .../CreateOrEditListModal.tsx | 111 +--- .../CreateOrEditListModal.types.ts | 9 +- .../ExpiredListingsModal.tsx | 22 +- .../SmartWearablesLaunchModal.tsx | 32 +- .../SmartWearablesLaunchModal.types.ts | 5 +- .../FavoritesModal/FavoritesModal.spec.tsx | 54 +- .../Modals/FavoritesModal/FavoritesModal.tsx | 70 +- .../LeavingSiteModal/LeavingSiteModal.tsx | 9 +- .../LeavingSiteModal.types.ts | 5 +- .../ListsLaunchModal.container.ts | 10 +- .../ListsLaunchModal/ListsLaunchModal.tsx | 36 +- .../ListsLaunchModal.types.ts | 5 +- .../RemoveRentalModal.container.ts | 20 +- .../RemoveRentalModal.types.ts | 5 +- .../Modals/RentConfirmedModal/CTA/CTA.tsx | 11 +- .../RentConfirmedModal/RentConfirmedModal.tsx | 35 +- .../AuthorizationStep.container.ts | 23 +- .../AuthorizationStep/AuthorizationStep.tsx | 70 +- .../AuthorizationStep.types.ts | 18 +- .../AuthorizationStep/index.ts | 2 +- .../ConfirmationStep.container.ts | 27 +- .../ConfirmationStep/ConfirmationStep.tsx | 59 +- .../ConfirmationStep.types.ts | 4 +- .../CreateOrEditListingStep.tsx | 192 ++---- .../EditConfirmationStep.container.ts | 35 +- .../EditConfirmationStep.tsx | 62 +- .../EditConfirmationStep.types.ts | 12 +- .../InformationStep/InformationStep.tsx | 5 +- .../RentalListingModal.container.ts | 9 +- .../RentalListingModal/RentalListingModal.tsx | 64 +- .../SaveToListModal.container.ts | 20 +- .../SaveToListModal/SaveToListModal.spec.tsx | 8 +- .../SaveToListModal/SaveToListModal.tsx | 92 +-- .../SaveToListModal/SaveToListModal.types.ts | 5 +- .../Modals/SellModal/SellModal.container.ts | 28 +- .../components/Modals/SellModal/SellModal.tsx | 122 +--- .../Modals/SellModal/SellModal.types.ts | 38 +- .../SetNameAsAliasModal.container.ts | 26 +- .../SetNameAsAliasModal.spec.tsx | 29 +- .../SetNameAsAliasModal.tsx | 55 +- .../ShareListModal/ShareListModal.spec.tsx | 9 +- .../Modals/ShareListModal/ShareListModal.tsx | 13 +- .../SmartWearableVideoShowcaseModal.spec.tsx | 11 +- .../SmartWearableVideoShowcaseModal.tsx | 5 +- .../SubmitTransactionModal.tsx | 28 +- webapp/src/components/Modals/index.ts | 6 +- .../ClaimNamePage/ClaimNamePage.container.tsx | 12 +- .../ClaimNamePage/ClaimNamePage.spec.tsx | 34 +- .../NamesPage/ClaimNamePage/ClaimNamePage.tsx | 159 +---- .../ClaimNamePage/ClaimNamePage.types.ts | 10 +- webapp/src/components/NamesPage/NamesPage.tsx | 7 +- .../src/components/Navbar/Navbar.container.ts | 4 +- webapp/src/components/Navbar/Navbar.tsx | 14 +- webapp/src/components/Navbar/Navbar.types.ts | 5 +- .../Navigation/Navigation.container.tsx | 6 +- .../src/components/Navigation/Navigation.tsx | 47 +- .../components/Navigation/Navigation.types.ts | 23 +- webapp/src/components/Network/Network.tsx | 6 +- .../OnSaleOrRentList/AssetCell/AssetCell.tsx | 4 +- .../OnRentListElement/OnRentListElement.tsx | 26 +- .../OnSaleListElement/OnSaleListElement.tsx | 55 +- .../OnSaleOrRentList.container.ts | 36 +- .../OnSaleOrRentList/OnSaleOrRentList.tsx | 89 +-- .../OnSaleOrRentList.types.ts | 13 +- .../components/OnSaleOrRentList/utils.spec.ts | 10 +- .../src/components/OnSaleOrRentList/utils.ts | 25 +- .../PartnersSidebar/PartnersSidebar.tsx | 7 +- .../src/components/Price/Price.container.ts | 2 +- .../src/components/PrivateTag/PrivateTag.tsx | 5 +- .../TimeframeSelector/TimeframeSelector.tsx | 18 +- .../RankingCollectorRow.tsx | 29 +- .../RankingCreatorRow/RankingCreatorRow.tsx | 13 +- .../RankingItemRow/RankingItemRow.tsx | 69 +- .../RankingsTable/RankingsTable.container.ts | 14 +- .../RankingsTable/RankingsTable.tsx | 246 ++----- .../RankingsTable/RankingsTable.types.ts | 9 +- webapp/src/components/RankingsTable/utils.ts | 6 +- .../RarityBadge/RarityBadge.container.ts | 5 +- .../components/RarityBadge/RarityBadge.tsx | 10 +- .../RecentlySoldTable.container.ts | 14 +- .../RecentlySoldTable/RecentlySoldTable.tsx | 260 ++------ .../RecentlySoldTable.types.ts | 5 +- webapp/src/components/Routes/Routes.tsx | 76 +-- .../Sales/Activity/Activity.container.ts | 47 +- .../components/Sales/Activity/Activity.tsx | 18 +- .../Sales/Activity/Activity.types.ts | 5 +- .../components/Sales/Stats/Stats.container.ts | 13 +- webapp/src/components/Sales/Stats/Stats.tsx | 49 +- .../src/components/Sales/Stats/Stats.types.ts | 8 +- .../SellPage/SellModal/SellModal.tsx | 73 +-- .../components/SellPage/SellPage.container.ts | 20 +- webapp/src/components/SellPage/SellPage.tsx | 9 +- .../src/components/SellPage/SellPage.types.ts | 21 +- .../Authorization/Authorization.container.ts | 34 +- .../Authorization/Authorization.tsx | 30 +- .../Authorization/Authorization.types.ts | 9 +- .../SettingsPage/SettingsPage.container.ts | 38 +- .../components/SettingsPage/SettingsPage.tsx | 74 +-- .../SettingsPage/SettingsPage.types.ts | 17 +- .../SignInPage/SignInPage.container.ts | 5 +- .../src/components/SignInPage/SignInPage.tsx | 10 +- .../StoreSettings/CoverPicker/CoverPicker.tsx | 11 +- .../StoreSettings/StoreSettings.container.ts | 9 +- .../StoreSettings/StoreSettings.tsx | 61 +- .../StoreSettings/StoreSettings.types.ts | 10 +- .../StoreSettings/TextInput/TextInput.tsx | 8 +- .../SuccessPage/SuccessPage.container.ts | 26 +- .../SuccessPage/SuccessPage.spec.tsx | 66 +- .../components/SuccessPage/SuccessPage.tsx | 113 +--- .../Table/TableContainer/TableContainer.tsx | 10 +- .../Table/TableContent/TableContent.spec.tsx | 61 +- .../Table/TableContent/TableContent.tsx | 31 +- .../TransferPage/TransferPage.container.ts | 11 +- .../components/TransferPage/TransferPage.tsx | 46 +- .../TransferPage/TransferPage.types.ts | 9 +- .../NFTFilters/SelectFilter/SelectFilter.tsx | 35 +- .../NFTFilters/TextFilter/TextFilter.tsx | 7 +- .../Vendor/NFTSidebar/NFTSidebar.container.ts | 13 +- .../Vendor/NFTSidebar/NFTSidebar.tsx | 13 +- .../PriceChangeNotice/PriceChangeNotice.tsx | 5 +- .../Vendor/VendorMenu/VendorMenu.tsx | 36 +- .../NFTFilters/NFTFilters.container.ts | 20 +- .../decentraland/NFTFilters/NFTFilters.tsx | 183 ++---- .../NFTFilters/NFTFilters.types.ts | 6 +- .../NFTSectionsMenuItems.tsx | 78 +-- .../decentraland/NFTSidebar/NFTSidebar.tsx | 6 +- .../components/Vendor/decentraland/utils.ts | 5 +- .../components/WarningBadge/WarningBadge.tsx | 5 +- webapp/src/config/index.ts | 3 +- webapp/src/contracts/Converter.ts | 1 - webapp/src/contracts/DCLController.ts | 1 - webapp/src/contracts/DCLRegistrar.ts | 1 - webapp/src/contracts/ERC721.ts | 1 - webapp/src/contracts/EstateRegistry.ts | 1 - webapp/src/contracts/MarketplaceAdapter.ts | 1 - webapp/src/contracts/common.ts | 1 - .../contracts/factories/Converter__factory.ts | 1 - .../factories/DCLController__factory.ts | 1 - .../factories/DCLRegistrar__factory.ts | 1 - .../contracts/factories/ERC721__factory.ts | 1 - .../factories/EstateRegistry__factory.ts | 1 - .../factories/MarketplaceAdapter__factory.ts | 1 - webapp/src/contracts/factories/index.ts | 1 - webapp/src/contracts/index.ts | 1 - webapp/src/lib/asset.spec.ts | 26 +- webapp/src/lib/asset.ts | 24 +- webapp/src/lib/authorization.ts | 31 +- webapp/src/lib/date.ts | 18 +- webapp/src/lib/enum.spec.ts | 12 +- webapp/src/lib/enum.ts | 12 +- webapp/src/lib/environment.ts | 8 +- webapp/src/lib/error.ts | 11 +- webapp/src/lib/input.ts | 13 +- webapp/src/lib/mana.ts | 14 +- webapp/src/lib/pagination.spec.ts | 38 +- webapp/src/lib/pagination.ts | 32 +- webapp/src/lib/profiles.spec.ts | 22 +- webapp/src/lib/profiles.ts | 6 +- webapp/src/lib/timer.spec.ts | 4 +- webapp/src/lib/utils.ts | 26 +- webapp/src/modules/account/actions.ts | 60 +- webapp/src/modules/account/reducer.spec.ts | 12 +- webapp/src/modules/account/reducer.ts | 21 +- webapp/src/modules/account/sagas.spec.ts | 94 +-- webapp/src/modules/account/sagas.ts | 69 +- webapp/src/modules/account/selectors.spec.ts | 23 +- webapp/src/modules/account/selectors.ts | 85 +-- webapp/src/modules/account/utils.spec.ts | 14 +- webapp/src/modules/account/utils.ts | 24 +- webapp/src/modules/analytics/actions.ts | 47 +- webapp/src/modules/analytics/reducer.spec.ts | 8 +- webapp/src/modules/analytics/reducer.ts | 10 +- webapp/src/modules/analytics/sagas.spec.ts | 20 +- webapp/src/modules/analytics/sagas.ts | 33 +- webapp/src/modules/analytics/sentry.ts | 4 +- webapp/src/modules/analytics/track.ts | 443 +++++-------- webapp/src/modules/analytics/types.ts | 8 +- webapp/src/modules/asset/actions.spec.ts | 8 +- webapp/src/modules/asset/actions.ts | 67 +- webapp/src/modules/asset/reducer.spec.ts | 34 +- webapp/src/modules/asset/reducer.ts | 10 +- webapp/src/modules/asset/sagas.spec.ts | 153 ++--- webapp/src/modules/asset/sagas.ts | 88 +-- webapp/src/modules/asset/selectors.spec.ts | 17 +- webapp/src/modules/asset/selectors.ts | 27 +- webapp/src/modules/asset/types.ts | 6 +- webapp/src/modules/asset/utils.spec.ts | 61 +- webapp/src/modules/asset/utils.ts | 53 +- webapp/src/modules/bid/actions.ts | 81 +-- webapp/src/modules/bid/reducer.spec.ts | 8 +- webapp/src/modules/bid/reducer.ts | 5 +- webapp/src/modules/bid/sagas.spec.ts | 48 +- webapp/src/modules/bid/sagas.ts | 95 +-- webapp/src/modules/bid/selectors.ts | 2 +- webapp/src/modules/bid/utils.ts | 21 +- webapp/src/modules/collection/actions.ts | 52 +- webapp/src/modules/collection/reducer.spec.ts | 10 +- webapp/src/modules/collection/reducer.ts | 21 +- webapp/src/modules/collection/sagas.spec.ts | 20 +- webapp/src/modules/collection/sagas.ts | 51 +- .../src/modules/collection/selectors.spec.ts | 9 +- webapp/src/modules/collection/selectors.ts | 55 +- webapp/src/modules/contract/actions.ts | 20 +- webapp/src/modules/contract/reducer.spec.ts | 3 +- webapp/src/modules/contract/reducer.ts | 10 +- webapp/src/modules/contract/sagas.spec.ts | 20 +- webapp/src/modules/contract/sagas.ts | 84 +-- webapp/src/modules/contract/types.ts | 2 +- webapp/src/modules/contract/utils.spec.ts | 34 +- webapp/src/modules/contract/utils.ts | 29 +- webapp/src/modules/ens/actions.spec.ts | 14 +- webapp/src/modules/ens/actions.ts | 51 +- webapp/src/modules/ens/reducer.spec.ts | 109 ++- webapp/src/modules/ens/reducer.ts | 14 +- webapp/src/modules/ens/sagas.spec.ts | 155 +---- webapp/src/modules/ens/sagas.ts | 97 +-- webapp/src/modules/ens/selectors.spec.ts | 4 +- webapp/src/modules/ens/selectors.ts | 13 +- webapp/src/modules/ens/utils.spec.ts | 12 +- webapp/src/modules/ens/utils.ts | 9 +- webapp/src/modules/event/actions.ts | 6 +- webapp/src/modules/event/reducer.spec.ts | 6 +- webapp/src/modules/event/reducer.ts | 15 +- webapp/src/modules/event/sagas.spec.ts | 20 +- webapp/src/modules/event/sagas.ts | 18 +- webapp/src/modules/favorites/actions.spec.ts | 41 +- webapp/src/modules/favorites/actions.ts | 115 +--- webapp/src/modules/favorites/reducer.spec.ts | 155 +---- webapp/src/modules/favorites/reducer.ts | 50 +- webapp/src/modules/favorites/sagas.spec.ts | 270 ++------ webapp/src/modules/favorites/sagas.ts | 203 ++---- .../src/modules/favorites/selectors.spec.ts | 68 +- webapp/src/modules/favorites/selectors.ts | 63 +- webapp/src/modules/favorites/utils.spec.ts | 27 +- webapp/src/modules/favorites/utils.ts | 4 +- webapp/src/modules/features/selectors.spec.ts | 102 +-- webapp/src/modules/features/selectors.ts | 58 +- webapp/src/modules/features/utils.spec.ts | 5 +- webapp/src/modules/features/utils.ts | 5 +- webapp/src/modules/identity/actions.ts | 23 +- webapp/src/modules/identity/reducer.ts | 15 +- webapp/src/modules/identity/sagas.spec.ts | 22 +- webapp/src/modules/identity/sagas.ts | 37 +- webapp/src/modules/identity/selectors.ts | 24 +- webapp/src/modules/identity/utils.ts | 11 +- webapp/src/modules/item/actions.spec.ts | 14 +- webapp/src/modules/item/actions.ts | 143 ++-- webapp/src/modules/item/reducer.spec.ts | 48 +- webapp/src/modules/item/reducer.ts | 25 +- webapp/src/modules/item/sagas.spec.ts | 244 ++----- webapp/src/modules/item/sagas.ts | 226 ++----- webapp/src/modules/item/selectors.spec.ts | 21 +- webapp/src/modules/item/selectors.ts | 63 +- webapp/src/modules/item/utils.ts | 13 +- webapp/src/modules/login/sagas.ts | 13 +- webapp/src/modules/modal/sagas.spec.ts | 16 +- webapp/src/modules/modal/sagas.ts | 15 +- webapp/src/modules/nft/actions.ts | 48 +- webapp/src/modules/nft/estate/utils.ts | 33 +- webapp/src/modules/nft/hooks.spec.tsx | 4 +- webapp/src/modules/nft/hooks.ts | 43 +- webapp/src/modules/nft/reducer.ts | 26 +- webapp/src/modules/nft/sagas.spec.ts | 125 +--- webapp/src/modules/nft/sagas.ts | 83 +-- webapp/src/modules/nft/selectors.ts | 38 +- webapp/src/modules/nft/types.ts | 11 +- webapp/src/modules/nft/utils.spec.ts | 37 +- webapp/src/modules/nft/utils.ts | 17 +- webapp/src/modules/order/actions.spec.ts | 50 +- webapp/src/modules/order/actions.ts | 131 +--- webapp/src/modules/order/reducer.spec.ts | 38 +- webapp/src/modules/order/reducer.ts | 43 +- webapp/src/modules/order/sagas.spec.ts | 108 +-- webapp/src/modules/order/sagas.ts | 134 +--- webapp/src/modules/order/selectors.spec.ts | 14 +- webapp/src/modules/order/selectors.ts | 7 +- webapp/src/modules/order/utils.spec.ts | 4 +- webapp/src/modules/order/utils.ts | 9 +- webapp/src/modules/proximity/actions.ts | 18 +- webapp/src/modules/proximity/hooks.ts | 9 +- webapp/src/modules/proximity/reducer.ts | 15 +- webapp/src/modules/proximity/sagas.ts | 6 +- webapp/src/modules/proximity/utils.ts | 30 +- webapp/src/modules/rental/actions.spec.ts | 18 +- webapp/src/modules/rental/actions.ts | 88 +-- webapp/src/modules/rental/contract.spec.ts | 16 +- webapp/src/modules/rental/contract.ts | 6 +- webapp/src/modules/rental/reducer.spec.ts | 161 +---- webapp/src/modules/rental/reducer.ts | 21 +- webapp/src/modules/rental/sagas.spec.ts | 505 ++------------ webapp/src/modules/rental/sagas.ts | 164 +---- webapp/src/modules/rental/selector.spec.ts | 20 +- webapp/src/modules/rental/selectors.ts | 23 +- webapp/src/modules/rental/utils.spec.ts | 89 +-- webapp/src/modules/rental/utils.ts | 114 +--- webapp/src/modules/routing/actions.ts | 6 +- webapp/src/modules/routing/locations.ts | 81 +-- webapp/src/modules/routing/reducer.ts | 16 +- webapp/src/modules/routing/sagas.spec.ts | 206 ++---- webapp/src/modules/routing/sagas.ts | 285 ++------ webapp/src/modules/routing/search.ts | 74 +-- webapp/src/modules/routing/selectors.spec.ts | 157 ++--- webapp/src/modules/routing/selectors.ts | 620 +++++++----------- webapp/src/modules/routing/types.ts | 10 +- webapp/src/modules/routing/utils.spec.ts | 11 +- webapp/src/modules/routing/utils.ts | 42 +- webapp/src/modules/sagas.ts | 3 +- webapp/src/modules/sale/actions.ts | 9 +- webapp/src/modules/sale/reducer.ts | 26 +- webapp/src/modules/sale/sagas.ts | 18 +- webapp/src/modules/sale/selectors.ts | 6 +- webapp/src/modules/store.ts | 24 +- webapp/src/modules/store/actions.ts | 24 +- webapp/src/modules/store/reducer.spec.ts | 8 +- webapp/src/modules/store/reducer.ts | 10 +- webapp/src/modules/store/sagas.spec.ts | 22 +- webapp/src/modules/store/sagas.ts | 42 +- webapp/src/modules/store/selectors.spec.ts | 8 +- webapp/src/modules/store/selectors.ts | 18 +- webapp/src/modules/store/utils.spec.ts | 12 +- webapp/src/modules/store/utils.ts | 32 +- webapp/src/modules/tile/actions.ts | 3 +- webapp/src/modules/tile/reducer.ts | 10 +- webapp/src/modules/tile/sagas.ts | 24 +- webapp/src/modules/tile/selectors.ts | 6 +- webapp/src/modules/toast/sagas.spec.ts | 78 +-- webapp/src/modules/toast/sagas.ts | 66 +- webapp/src/modules/toast/toasts.tsx | 112 +--- webapp/src/modules/transaction/selectors.ts | 45 +- webapp/src/modules/transaction/utils.ts | 27 +- webapp/src/modules/transak/sagas.ts | 10 +- .../src/modules/ui/asset/homepage/reducer.ts | 15 +- .../modules/ui/asset/homepage/selectors.ts | 53 +- webapp/src/modules/ui/asset/reducer.ts | 5 +- webapp/src/modules/ui/browse/reducer.spec.ts | 465 ++++--------- webapp/src/modules/ui/browse/reducer.ts | 50 +- webapp/src/modules/ui/browse/sagas.spec.ts | 18 +- webapp/src/modules/ui/browse/sagas.ts | 11 +- webapp/src/modules/ui/browse/selector.spec.ts | 69 +- webapp/src/modules/ui/browse/selectors.ts | 194 ++---- webapp/src/modules/ui/browse/utils.spec.ts | 7 +- webapp/src/modules/ui/browse/utils.ts | 16 +- webapp/src/modules/ui/nft/bid/reducer.ts | 11 +- webapp/src/modules/ui/nft/bid/selectors.ts | 27 +- webapp/src/modules/ui/preview/actions.ts | 15 +- webapp/src/modules/ui/preview/reducer.spec.ts | 4 +- webapp/src/modules/ui/preview/reducer.ts | 10 +- webapp/src/modules/ui/preview/selectors.ts | 6 +- webapp/src/modules/ui/sagas.ts | 35 +- webapp/src/modules/ui/types.ts | 2 +- webapp/src/modules/ui/utils.ts | 17 +- webapp/src/modules/vendor/MarketplacePrice.ts | 16 +- webapp/src/modules/vendor/TokenConverter.ts | 65 +- webapp/src/modules/vendor/VendorFactory.ts | 13 +- .../vendor/decentraland/AnalyticsService.ts | 12 +- .../vendor/decentraland/BidService.spec.ts | 67 +- .../modules/vendor/decentraland/BidService.ts | 44 +- .../vendor/decentraland/NFTService.spec.ts | 110 +--- .../modules/vendor/decentraland/NFTService.ts | 44 +- .../vendor/decentraland/OrderService.spec.ts | 122 +--- .../vendor/decentraland/OrderService.ts | 59 +- .../vendor/decentraland/SubgraphService.ts | 2 +- .../vendor/decentraland/account/api.ts | 10 +- .../vendor/decentraland/analytics/api.ts | 9 +- .../vendor/decentraland/bid/api.spec.ts | 15 +- .../modules/vendor/decentraland/bid/api.ts | 11 +- .../vendor/decentraland/builder/api.spec.ts | 4 +- .../vendor/decentraland/builder/api.ts | 16 +- .../vendor/decentraland/catalog/api.ts | 8 +- .../vendor/decentraland/collection/api.ts | 14 +- .../modules/vendor/decentraland/contracts.ts | 18 +- .../vendor/decentraland/favorites/api.spec.ts | 82 +-- .../vendor/decentraland/favorites/api.ts | 49 +- .../vendor/decentraland/favorites/types.ts | 5 +- .../modules/vendor/decentraland/item/api.ts | 15 +- .../modules/vendor/decentraland/item/types.ts | 7 +- .../modules/vendor/decentraland/land/api.ts | 2 +- .../modules/vendor/decentraland/lists/api.ts | 5 +- .../vendor/decentraland/marketplace/api.ts | 17 +- .../modules/vendor/decentraland/nft/api.ts | 67 +- .../vendor/decentraland/nft/authApi.ts | 55 +- .../modules/vendor/decentraland/order/api.ts | 19 +- .../vendor/decentraland/rankings/api.ts | 22 +- .../vendor/decentraland/rentals/api.spec.ts | 66 +- .../vendor/decentraland/rentals/api.ts | 60 +- .../vendor/decentraland/rentals/utils.spec.ts | 22 +- .../vendor/decentraland/rentals/utils.ts | 4 +- .../modules/vendor/decentraland/sale/api.ts | 2 +- .../src/modules/vendor/decentraland/utils.ts | 16 +- webapp/src/modules/vendor/nft/types.ts | 8 +- webapp/src/modules/vendor/services.ts | 53 +- webapp/src/modules/vendor/utils.ts | 36 +- webapp/src/modules/wallet/sagas.spec.ts | 5 +- webapp/src/modules/wallet/sagas.ts | 7 +- webapp/src/modules/wallet/selectors.ts | 17 +- webapp/src/modules/wallet/utils.ts | 20 +- webapp/src/tests/beforeSetupTests.ts | 24 +- webapp/src/utils/category.ts | 2 +- webapp/src/utils/events.ts | 9 +- webapp/src/utils/filters.tsx | 26 +- webapp/src/utils/test.tsx | 16 +- webapp/src/utils/tests.tsx | 24 +- 719 files changed, 5850 insertions(+), 20429 deletions(-) diff --git a/webapp/src/components/AccountPage/AccountBanner/AccountBanner.container.tsx b/webapp/src/components/AccountPage/AccountBanner/AccountBanner.container.tsx index 6897e2c76e..70481bc3b1 100644 --- a/webapp/src/components/AccountPage/AccountBanner/AccountBanner.container.tsx +++ b/webapp/src/components/AccountPage/AccountBanner/AccountBanner.container.tsx @@ -5,15 +5,8 @@ import { getAddress as getAddressFromUrl } from '../../../modules/account/select import { RootState } from '../../../modules/reducer' import { goBack } from '../../../modules/routing/actions' import { getViewAsGuest } from '../../../modules/routing/selectors' -import { - fetchStoreRequest, - FETCH_STORE_REQUEST -} from '../../../modules/store/actions' -import { - getStoresByOwner, - getLocalStore, - getLoading as getStoreLoading -} from '../../../modules/store/selectors' +import { fetchStoreRequest, FETCH_STORE_REQUEST } from '../../../modules/store/actions' +import { getStoresByOwner, getLocalStore, getLoading as getStoreLoading } from '../../../modules/store/selectors' import { Store } from '../../../modules/store/types' import { getAddress as getAddressFromWallet } from '../../../modules/wallet/selectors' import AccountBanner from './AccountBanner' @@ -24,9 +17,7 @@ const mapState = (state: RootState): MapStateProps => { const address = getAddressFromUrl(state) || getAddressFromWallet(state) const isLoading = isLoadingType(getStoreLoading(state), FETCH_STORE_REQUEST) - let store: Store | undefined = address - ? getStoresByOwner(state)[address] - : undefined + let store: Store | undefined = address ? getStoresByOwner(state)[address] : undefined if (viewAsGuest) { store = getLocalStore(state) || store diff --git a/webapp/src/components/AccountPage/AccountBanner/AccountBanner.tsx b/webapp/src/components/AccountPage/AccountBanner/AccountBanner.tsx index a0c85a20a3..c090badb74 100644 --- a/webapp/src/components/AccountPage/AccountBanner/AccountBanner.tsx +++ b/webapp/src/components/AccountPage/AccountBanner/AccountBanner.tsx @@ -18,13 +18,7 @@ import copyText from '../../../lib/copyText' import './AccountBanner.css' -const AccountBanner = ({ - address, - store, - isLoading, - onBack, - onFetchStore -}: Props) => { +const AccountBanner = ({ address, store, isLoading, onBack, onFetchStore }: Props) => { const [hasCopiedAddress, setHasCopied] = useTimer(1200) const [openExternalLinkModal, setOpenExternalLinkModal] = useState() @@ -35,12 +29,7 @@ const AccountBanner = ({ const renderLink = (type: LinkType) => store?.[type] && - getIsValidLink(type, store[type]) && ( -
setOpenExternalLinkModal(store[type])} - /> - ) + getIsValidLink(type, store[type]) &&
setOpenExternalLinkModal(store[type])} /> return ( <> @@ -49,9 +38,7 @@ const AccountBanner = ({ ) : ( <> - {store?.cover && ( - cover - )} + {store?.cover && cover}
@@ -69,9 +56,7 @@ const AccountBanner = ({
-
- {shortenAddress(address)} -
+
{shortenAddress(address)}
{!isMobile() && (
- {hasCopiedAddress && ( - - {t('account_page.copied')} - - )} + {hasCopiedAddress && {t('account_page.copied')}}
)}
{isMobile() && (
-
copyText(address, setHasCopied)} - > +
copyText(address, setHasCopied)}> {hasCopiedAddress ? ( - - {t('account_page.copied_capitalized')} - + {t('account_page.copied_capitalized')} ) : ( - - {t('account_page.copy_address')} - + {t('account_page.copy_address')} )}
)} - {store?.description && ( -
{store.description}
- )} + {store?.description &&
{store.description}
} )} - {openExternalLinkModal && ( - setOpenExternalLinkModal(undefined)} - /> - )} + {openExternalLinkModal && setOpenExternalLinkModal(undefined)} />} ) } diff --git a/webapp/src/components/AccountPage/AccountPage.container.ts b/webapp/src/components/AccountPage/AccountPage.container.ts index 109073d739..c3d76ff556 100644 --- a/webapp/src/components/AccountPage/AccountPage.container.ts +++ b/webapp/src/components/AccountPage/AccountPage.container.ts @@ -3,18 +3,9 @@ import { replace } from 'connected-react-router' import { isConnecting } from 'decentraland-dapps/dist/modules/wallet/selectors' import { RootState } from '../../modules/reducer' -import { - getIsFullscreen, - getVendor, - getViewAsGuest -} from '../../modules/routing/selectors' +import { getIsFullscreen, getVendor, getViewAsGuest } from '../../modules/routing/selectors' import { getWallet } from '../../modules/wallet/selectors' -import { - MapStateProps, - MapDispatch, - MapDispatchProps, - OwnProps -} from './AccountPage.types' +import { MapStateProps, MapDispatch, MapDispatchProps, OwnProps } from './AccountPage.types' import AccountPage from './AccountPage' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { diff --git a/webapp/src/components/AccountPage/AccountPage.tsx b/webapp/src/components/AccountPage/AccountPage.tsx index b8ab53f0fb..dd1ce20352 100644 --- a/webapp/src/components/AccountPage/AccountPage.tsx +++ b/webapp/src/components/AccountPage/AccountPage.tsx @@ -14,17 +14,8 @@ import { Props } from './AccountPage.types' import AccountBanner from './AccountBanner' import './AccountPage.css' -const AccountPage = ({ - addressInUrl, - vendor, - wallet, - isConnecting, - isFullscreen, - viewAsGuest, - onRedirect -}: Props) => { - const isCurrentAccount = - (!addressInUrl || wallet?.address === addressInUrl) && !viewAsGuest +const AccountPage = ({ addressInUrl, vendor, wallet, isConnecting, isFullscreen, viewAsGuest, onRedirect }: Props) => { + const isCurrentAccount = (!addressInUrl || wallet?.address === addressInUrl) && !viewAsGuest const { pathname, search } = useLocation() // Redirect to signIn if trying to access current account without a wallet @@ -38,9 +29,7 @@ const AccountPage = ({ return (
- + {({ address, isLoading, error }) => ( <> @@ -57,11 +46,7 @@ const AccountPage = ({ ) : address ? ( <> {!isCurrentAccount ? : null} - + ) : null} diff --git a/webapp/src/components/AccountPage/AccountPage.types.ts b/webapp/src/components/AccountPage/AccountPage.types.ts index 67a22fdb91..ba10237f0a 100644 --- a/webapp/src/components/AccountPage/AccountPage.types.ts +++ b/webapp/src/components/AccountPage/AccountPage.types.ts @@ -16,15 +16,7 @@ export type Props = { onRedirect: (path: string) => void } & RouteComponentProps -export type MapStateProps = Pick< - Props, - | 'addressInUrl' - | 'vendor' - | 'wallet' - | 'isConnecting' - | 'isFullscreen' - | 'viewAsGuest' -> +export type MapStateProps = Pick export type MapDispatchProps = Pick export type MapDispatch = Dispatch export type OwnProps = RouteComponentProps diff --git a/webapp/src/components/AccountSidebar/AccountSidebar.container.ts b/webapp/src/components/AccountSidebar/AccountSidebar.container.ts index 80b9923211..f7062576d9 100644 --- a/webapp/src/components/AccountSidebar/AccountSidebar.container.ts +++ b/webapp/src/components/AccountSidebar/AccountSidebar.container.ts @@ -3,11 +3,7 @@ import { connect } from 'react-redux' import { RootState } from '../../modules/reducer' import { browse } from '../../modules/routing/actions' import { getSection } from '../../modules/routing/selectors' -import { - MapDispatch, - MapDispatchProps, - MapStateProps -} from './AccountSidebar.types' +import { MapDispatch, MapDispatchProps, MapStateProps } from './AccountSidebar.types' import AccountSidebar from './AccountSidebar' const mapState = (state: RootState): MapStateProps => ({ diff --git a/webapp/src/components/AccountSidebar/AccountSidebar.tsx b/webapp/src/components/AccountSidebar/AccountSidebar.tsx index cb455c46dd..4002110b2f 100644 --- a/webapp/src/components/AccountSidebar/AccountSidebar.tsx +++ b/webapp/src/components/AccountSidebar/AccountSidebar.tsx @@ -6,12 +6,7 @@ import CurrentAccountSidebar from './CurrentAccountSidebar' import OtherAccountSidebar from './OtherAccountSidebar' import './AccountSidebar.css' -const AccountSidebar = ({ - address, - section, - isCurrentAccount, - onBrowse -}: Props) => { +const AccountSidebar = ({ address, section, isCurrentAccount, onBrowse }: Props) => { const handleOnBrowse = useCallback( (vendor: VendorName, section: string, assetType?: AssetType) => { onBrowse({ vendor, section, address, assetType }) diff --git a/webapp/src/components/AccountSidebar/CurrentAccountSidebar/CurrentAccountSidebar.tsx b/webapp/src/components/AccountSidebar/CurrentAccountSidebar/CurrentAccountSidebar.tsx index 80cdf28af8..0dbe12b070 100644 --- a/webapp/src/components/AccountSidebar/CurrentAccountSidebar/CurrentAccountSidebar.tsx +++ b/webapp/src/components/AccountSidebar/CurrentAccountSidebar/CurrentAccountSidebar.tsx @@ -14,18 +14,7 @@ import { AssetFilter } from '../../AssetFilters/utils' const decentraland = VendorName.DECENTRALAND -const { - COLLECTIONS, - LAND, - WEARABLES, - EMOTES, - ENS, - ON_SALE, - ON_RENT, - SALES, - BIDS, - STORE_SETTINGS -} = Sections.decentraland +const { COLLECTIONS, LAND, WEARABLES, EMOTES, ENS, ON_SALE, ON_RENT, SALES, BIDS, STORE_SETTINGS } = Sections.decentraland const CurrentAccountSidebar = ({ section, onBrowse }: Props) => { const { changeFilter } = usePagination() @@ -38,9 +27,7 @@ const CurrentAccountSidebar = ({ section, onBrowse }: Props) => { key={COLLECTIONS} value={COLLECTIONS} currentValue={section} - onClick={section => - changeFilter('section', section, { clearOldFilters: true }) - } + onClick={section => changeFilter('section', section, { clearOldFilters: true })} /> {
{t('account_sidebar.store')}
- onBrowse(decentraland, section)} - /> - onBrowse(decentraland, section)} - /> - onBrowse(decentraland, section)} - /> - onBrowse(decentraland, section)} - /> - onBrowse(decentraland, section)} - /> + onBrowse(decentraland, section)} /> + onBrowse(decentraland, section)} /> + onBrowse(decentraland, section)} /> + onBrowse(decentraland, section)} /> + onBrowse(decentraland, section)} />
({ }) const mapDispatch = (dispatch: Dispatch): MapDispatchProps => ({ - onBrowse: (options: BrowseOptions) => - dispatch(browse({ vendor: VendorName.DECENTRALAND, ...options })) + onBrowse: (options: BrowseOptions) => dispatch(browse({ vendor: VendorName.DECENTRALAND, ...options })) }) export default connect(mapState, mapDispatch)(OtherAccountSidebar) diff --git a/webapp/src/components/AccountSidebar/OtherAccountSidebar/OtherAccountSidebar.tsx b/webapp/src/components/AccountSidebar/OtherAccountSidebar/OtherAccountSidebar.tsx index 95db666fa0..48b23d4d66 100644 --- a/webapp/src/components/AccountSidebar/OtherAccountSidebar/OtherAccountSidebar.tsx +++ b/webapp/src/components/AccountSidebar/OtherAccountSidebar/OtherAccountSidebar.tsx @@ -15,61 +15,38 @@ import { Props } from './OtherAccountSidebar.types' const { ALL, LAND, WEARABLES, EMOTES, ENS } = Sections.decentraland -const OtherAccountSidebar = ({ - section, - assetType, - address, - onBrowse -}: Props) => ( +const OtherAccountSidebar = ({ section, assetType, address, onBrowse }: Props) => ( <>
- onBrowse({ section: WEARABLES, assetType: AssetType.ITEM }) - } + className={classNames('alternative-menu-item', assetType === AssetType.ITEM && 'selected')} + onClick={() => onBrowse({ section: WEARABLES, assetType: AssetType.ITEM })} >
{t('account_sidebar.originals')}
-
- {t('account_sidebar.originals_detail')} -
+
{t('account_sidebar.originals_detail')}
onBrowse({ section: ALL, assetType: AssetType.NFT })} >
{t('account_sidebar.listings')}
-
- {t('account_sidebar.listings_detail')} -
+
{t('account_sidebar.listings_detail')}
-
- {assetType === AssetType.ITEM ? 'CATEGORIES' : 'ASSETS'} -
+
{assetType === AssetType.ITEM ? 'CATEGORIES' : 'ASSETS'}
onBrowse({ section, assetType })} /> diff --git a/webapp/src/components/ActivityPage/ActivityPage.container.ts b/webapp/src/components/ActivityPage/ActivityPage.container.ts index 4735d62dde..a72f441a56 100644 --- a/webapp/src/components/ActivityPage/ActivityPage.container.ts +++ b/webapp/src/components/ActivityPage/ActivityPage.container.ts @@ -4,11 +4,7 @@ import { clearTransactions } from 'decentraland-dapps/dist/modules/transaction/a import { RootState } from '../../modules/reducer' import { getAddress } from '../../modules/wallet/selectors' import { getTransactions } from '../../modules/transaction/selectors' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './ActivityPage.types' +import { MapStateProps, MapDispatchProps, MapDispatch } from './ActivityPage.types' import ActivityPage from './ActivityPage' const mapState = (state: RootState): MapStateProps => ({ diff --git a/webapp/src/components/ActivityPage/ActivityPage.tsx b/webapp/src/components/ActivityPage/ActivityPage.tsx index f826f0561f..bb90622efc 100644 --- a/webapp/src/components/ActivityPage/ActivityPage.tsx +++ b/webapp/src/components/ActivityPage/ActivityPage.tsx @@ -24,12 +24,8 @@ const ActivityPage = (props: Props) => { setShowConfirmation(false) }, [address, onClearHistory]) - const handleConfirm = useCallback(() => setShowConfirmation(true), [ - setShowConfirmation - ]) - const handleCancel = useCallback(() => setShowConfirmation(false), [ - setShowConfirmation - ]) + const handleConfirm = useCallback(() => setShowConfirmation(true), [setShowConfirmation]) + const handleCancel = useCallback(() => setShowConfirmation(false), [setShowConfirmation]) let content = null @@ -52,11 +48,7 @@ const ActivityPage = (props: Props) => { -
- {transactions - .map(tx => ) - .reverse()} -
+
{transactions.map(tx => ).reverse()}
) } @@ -67,12 +59,8 @@ const ActivityPage = (props: Props) => { {content} - - {t('activity_page.clear_history_modal.title')} - - - {t('activity_page.clear_history_modal.text')} - + {t('activity_page.clear_history_modal.title')} + {t('activity_page.clear_history_modal.text')}
@@ -68,25 +53,15 @@ const TransactionDetail = (props: Props) => {
- +
{tx.status || t('global.loading')}
{isPending(tx.status) ? (
) : null} - {tx.status === TransactionStatus.REVERTED ? ( - - ) : null} - {tx.status === TransactionStatus.CONFIRMED || - tx.status === TransactionStatus.REPLACED ? ( - - ) : null} + {tx.status === TransactionStatus.REVERTED ? : null} + {tx.status === TransactionStatus.CONFIRMED || tx.status === TransactionStatus.REPLACED ? : null}
diff --git a/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.container.ts b/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.container.ts index 8894cb9323..92aad3468b 100644 --- a/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.container.ts +++ b/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.container.ts @@ -1,32 +1,21 @@ import { connect } from 'react-redux' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { RootState } from '../../modules/reducer' -import { - MapStateProps, - MapDispatch, - MapDispatchProps -} from './AnalyticsVolumeDayData.types' +import { MapStateProps, MapDispatch, MapDispatchProps } from './AnalyticsVolumeDayData.types' import { getVolumeData, getLoading } from '../../modules/analytics/selectors' -import { - fetchAnalyticsVolumeDataRequest, - FETCH_ANALYTICS_VOLUME_DATA_REQUEST -} from '../../modules/analytics/actions' +import { fetchAnalyticsVolumeDataRequest, FETCH_ANALYTICS_VOLUME_DATA_REQUEST } from '../../modules/analytics/actions' import AnalyticsVolumeDayData from './AnalyticsVolumeDayData' const mapState = (state: RootState): MapStateProps => { const data = getVolumeData(state) return { data, - isLoading: isLoadingType( - getLoading(state), - FETCH_ANALYTICS_VOLUME_DATA_REQUEST - ) + isLoading: isLoadingType(getLoading(state), FETCH_ANALYTICS_VOLUME_DATA_REQUEST) } } const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onFetchVolumeData: options => - dispatch(fetchAnalyticsVolumeDataRequest(options)) + onFetchVolumeData: options => dispatch(fetchAnalyticsVolumeDataRequest(options)) }) export default connect(mapState, mapDispatch)(AnalyticsVolumeDayData) diff --git a/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.tsx b/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.tsx index fefe7635c3..d336a40796 100644 --- a/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.tsx +++ b/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.tsx @@ -1,22 +1,8 @@ import React, { useEffect, useState } from 'react' import CountUp from 'react-countup' -import { - HeaderMenu, - Header, - Stats, - Icon, - Loader, - Mana, - Popup, - SemanticICONS, - NotMobile, - Mobile -} from 'decentraland-ui' +import { HeaderMenu, Header, Stats, Icon, Loader, Mana, Popup, SemanticICONS, NotMobile, Mobile } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - AnalyticsTimeframe, - AnalyticsVolumeData -} from '../../modules/analytics/types' +import { AnalyticsTimeframe, AnalyticsVolumeData } from '../../modules/analytics/types' import { TimeframeSelector } from '../Rankings/TimeframeSelector' import { Props } from './AnalyticsVolumeDayData.types' import { formatAnalyticsVolume, formatDailySales } from './utils' @@ -29,8 +15,7 @@ const StatSections = [ isMana: false, getData: (data: AnalyticsVolumeData) => data.sales, getUSDData: (data: AnalyticsVolumeData) => data.sales, - formatUSDVolume: (number: number, currentTimeframe: AnalyticsTimeframe) => - formatDailySales(number, currentTimeframe) + formatUSDVolume: (number: number, currentTimeframe: AnalyticsTimeframe) => formatDailySales(number, currentTimeframe) }, { key: 'total_volume', @@ -53,9 +38,7 @@ const StatSections = [ const AnalyticsVolumeDayData = (props: Props) => { const { isLoading, data, onFetchVolumeData } = props - const [currentTimeframe, setCurrentTimeframe] = useState( - AnalyticsTimeframe.WEEK - ) + const [currentTimeframe, setCurrentTimeframe] = useState(AnalyticsTimeframe.WEEK) useEffect(() => { onFetchVolumeData(currentTimeframe) @@ -72,17 +55,11 @@ const AnalyticsVolumeDayData = (props: Props) => { - setCurrentTimeframe(timeframe)} - /> + setCurrentTimeframe(timeframe)} /> - setCurrentTimeframe(timeframe)} - /> + setCurrentTimeframe(timeframe)} />
@@ -90,19 +67,12 @@ const AnalyticsVolumeDayData = (props: Props) => { <> {StatSections.map(statSection => (
- +
-
- {t(`home_page.analytics.volume.${statSection.key}`)} -
+
{t(`home_page.analytics.volume.${statSection.key}`)}
} on="hover" @@ -111,23 +81,15 @@ const AnalyticsVolumeDayData = (props: Props) => {
{statSection.isMana ? ( - + ) : ( - + )} - statSection.formatUSDVolume(number, currentTimeframe) - } + formattingFn={number => statSection.formatUSDVolume(number, currentTimeframe)} />
diff --git a/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.types.ts b/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.types.ts index a3cb74a283..7b7292bbf1 100644 --- a/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.types.ts +++ b/webapp/src/components/AnalyticsVolumeDayData/AnalyticsVolumeDayData.types.ts @@ -1,9 +1,6 @@ import { Dispatch } from 'redux' import { AnalyticsVolumeData } from '../../modules/analytics/types' -import { - fetchAnalyticsVolumeDataRequest, - FetchAnalyticsDayDataRequestAction -} from '../../modules/analytics/actions' +import { fetchAnalyticsVolumeDataRequest, FetchAnalyticsDayDataRequestAction } from '../../modules/analytics/actions' export type Props = { data: AnalyticsVolumeData | null diff --git a/webapp/src/components/AssetBrowse/AssetBrowse.container.ts b/webapp/src/components/AssetBrowse/AssetBrowse.container.ts index 6dd079fec9..08a953a37f 100644 --- a/webapp/src/components/AssetBrowse/AssetBrowse.container.ts +++ b/webapp/src/components/AssetBrowse/AssetBrowse.container.ts @@ -14,13 +14,7 @@ import { } from '../../modules/routing/selectors' import { getView } from '../../modules/ui/browse/selectors' import { isMapSet } from '../../modules/routing/utils' -import { - MapDispatch, - MapDispatchProps, - MapStateProps, - OwnProps, - Props -} from './AssetBrowse.types' +import { MapDispatch, MapDispatchProps, MapStateProps, OwnProps, Props } from './AssetBrowse.types' import AssetBrowse from './AssetBrowse' const mapState = (state: RootState): MapStateProps => { @@ -45,11 +39,7 @@ const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ onBrowse: options => dispatch(browse(options)) }) -const mergeProps = ( - stateProps: MapStateProps, - dispatchProps: MapDispatchProps, - ownProps: OwnProps -): Props => ({ +const mergeProps = (stateProps: MapStateProps, dispatchProps: MapDispatchProps, ownProps: OwnProps): Props => ({ ...stateProps, ...dispatchProps, ...ownProps, diff --git a/webapp/src/components/AssetBrowse/AssetBrowse.tsx b/webapp/src/components/AssetBrowse/AssetBrowse.tsx index a357dc96b5..1e33c29c2d 100644 --- a/webapp/src/components/AssetBrowse/AssetBrowse.tsx +++ b/webapp/src/components/AssetBrowse/AssetBrowse.tsx @@ -7,11 +7,7 @@ import { View } from '../../modules/ui/types' import { Section as DecentralandSection } from '../../modules/vendor/decentraland' import { Sections } from '../../modules/vendor/routing/types' import { BrowseOptions } from '../../modules/routing/types' -import { - getPersistedIsMapProperty, - isAccountView, - isListsSection -} from '../../modules/ui/utils' +import { getPersistedIsMapProperty, isAccountView, isListsSection } from '../../modules/ui/utils' import { usePagination } from '../../lib/pagination' import { locations } from '../../modules/routing/locations' import { AccountSidebar } from '../AccountSidebar' @@ -83,12 +79,7 @@ const AssetBrowse = (props: Props) => { const isMapPropertyPersisted = getPersistedIsMapProperty() useEffect(() => { - if ( - section === DecentralandSection.LAND && - !isAccountView(view) && - isMapPropertyPersisted === false && - isMap - ) { + if (section === DecentralandSection.LAND && !isAccountView(view) && isMapPropertyPersisted === false && isMap) { // To prevent the map view from being displayed when the user clicks on the Land navigation tab. // We set the has fetched variable to false so it has to browse back to the list view. setHasFetched(false) @@ -96,11 +87,7 @@ const AssetBrowse = (props: Props) => { }, [section, view, isMap, isMapPropertyPersisted]) useEffect(() => { - if ( - viewInState === view && - !hasFetched && - section !== DecentralandSection.COLLECTIONS - ) { + if (viewInState === view && !hasFetched && section !== DecentralandSection.COLLECTIONS) { // Options used to fetch the assets. const browseOpts: BrowseOptions = { vendor, @@ -115,23 +102,14 @@ const AssetBrowse = (props: Props) => { // Function used to fetch the assets. let fetchAssetsFn: (opts: BrowseOptions) => void = onFetchAssetsFromRoute - if ( - section === DecentralandSection.LAND && - !isAccountView(view) && - isMapPropertyPersisted === false - ) { - const previousPageIsLandDetail = !!matchPath( - visitedLocations[1]?.pathname, - { path: locations.nft(), strict: true, exact: true } - ) + if (section === DecentralandSection.LAND && !isAccountView(view) && isMapPropertyPersisted === false) { + const previousPageIsLandDetail = !!matchPath(visitedLocations[1]?.pathname, { path: locations.nft(), strict: true, exact: true }) // Update the browser options to match the ones persisted. browseOpts.isMap = isMap browseOpts.isFullscreen = isFullscreen browseOpts.onlyOnSale = (!onlyOnSale && onlyOnRent === false && !previousPageIsLandDetail) || - (onlyOnSale === undefined && - onlyOnRent === undefined && - !previousPageIsLandDetail) || + (onlyOnSale === undefined && onlyOnRent === undefined && !previousPageIsLandDetail) || onlyOnSale // We also set the fetch function as onBrowse because we need the url to be updated. @@ -164,10 +142,7 @@ const AssetBrowse = (props: Props) => { <> {isAccountOrCurrentAccount ? ( - + ) : ( )} @@ -182,22 +157,10 @@ const AssetBrowse = (props: Props) => { right = break case DecentralandSection.ON_SALE: - right = ( - - ) + right = break case DecentralandSection.ON_RENT: - right = ( - - ) + right = break case DecentralandSection.SALES: right = @@ -220,18 +183,11 @@ const AssetBrowse = (props: Props) => { right = ( <> {isMap && isFullscreen ? ( - setShowOwnedLandOnMap(show)} - /> + setShowOwnedLandOnMap(show)} /> ) : ( )} - {isMap ? ( - - ) : ( - - )} + {isMap ? : } ) } @@ -260,12 +216,7 @@ const AssetBrowse = (props: Props) => { active={section === value} onClick={ value === Sections.decentraland.COLLECTIONS - ? () => - changeFilter( - 'section', - Sections.decentraland.COLLECTIONS, - { clearOldFilters: true } - ) + ? () => changeFilter('section', Sections.decentraland.COLLECTIONS, { clearOldFilters: true }) : () => onBrowse({ section: value }) } > @@ -276,10 +227,7 @@ const AssetBrowse = (props: Props) => { ) : null} - + {!isFullscreen && left && ( diff --git a/webapp/src/components/AssetBrowse/AssetBrowse.types.ts b/webapp/src/components/AssetBrowse/AssetBrowse.types.ts index 1a17de68be..e8fee482a4 100644 --- a/webapp/src/components/AssetBrowse/AssetBrowse.types.ts +++ b/webapp/src/components/AssetBrowse/AssetBrowse.types.ts @@ -3,12 +3,7 @@ import { RouterLocation } from 'connected-react-router' import { View } from '../../modules/ui/types' import { VendorName } from '../../modules/vendor/types' import { setView, SetViewAction } from '../../modules/ui/actions' -import { - browse, - BrowseAction, - fetchAssetsFromRoute, - FetchAssetsFromRouteAction -} from '../../modules/routing/actions' +import { browse, BrowseAction, fetchAssetsFromRoute, FetchAssetsFromRouteAction } from '../../modules/routing/actions' import { Section } from '../../modules/vendor/routing/types' import { AssetType } from '../../modules/asset/types' @@ -34,31 +29,8 @@ export type Props = { export type MapStateProps = Pick< Props, - | 'isMap' - | 'isFullscreen' - | 'onlyOnSale' - | 'viewInState' - | 'section' - | 'assetType' - | 'onlySmart' - | 'onlyOnRent' - | 'visitedLocations' -> -export type MapDispatchProps = Pick< - Props, - 'onSetView' | 'onFetchAssetsFromRoute' | 'onBrowse' -> -export type MapDispatch = Dispatch< - SetViewAction | FetchAssetsFromRouteAction | BrowseAction -> -export type OwnProps = Pick< - Props, - | 'vendor' - | 'address' - | 'isFullscreen' - | 'isMap' - | 'view' - | 'sections' - | 'section' - | 'contracts' + 'isMap' | 'isFullscreen' | 'onlyOnSale' | 'viewInState' | 'section' | 'assetType' | 'onlySmart' | 'onlyOnRent' | 'visitedLocations' > +export type MapDispatchProps = Pick +export type MapDispatch = Dispatch +export type OwnProps = Pick diff --git a/webapp/src/components/AssetBrowse/Box/Box.tsx b/webapp/src/components/AssetBrowse/Box/Box.tsx index 188bfa810e..e5195a462c 100644 --- a/webapp/src/components/AssetBrowse/Box/Box.tsx +++ b/webapp/src/components/AssetBrowse/Box/Box.tsx @@ -7,9 +7,7 @@ const Box = ({ className, header, children, childrenClassName }: Props) => { return (
{header &&
{header}
} -
- {children} -
+
{children}
) } diff --git a/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.container.ts b/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.container.ts index 8d515ee4e3..cfbfdaa3bf 100644 --- a/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.container.ts +++ b/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.container.ts @@ -1,9 +1,6 @@ import { connect } from 'react-redux' import { RootState } from '../../../modules/reducer' -import { - getOnlyOnRent, - getOnlyOnSale -} from '../../../modules/routing/selectors' +import { getOnlyOnRent, getOnlyOnSale } from '../../../modules/routing/selectors' import { browse } from '../../../modules/routing/actions' import { getTiles } from '../../../modules/tile/selectors' import { MapStateProps, MapDispatch, MapDispatchProps } from './MapBrowse.types' diff --git a/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.tsx b/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.tsx index d9e0e6e8b2..bfcbcceac9 100644 --- a/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.tsx +++ b/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.tsx @@ -6,22 +6,12 @@ import { Coordinate } from 'recharts/types/util/types' import { getNearestTile, Coord } from './utils' import { NFTCategory } from '@dcl/schemas' -export function MapBrowse({ - onlyOnRent, - onlyOnSale, - showOwned, - tiles, - ownedLands, - onBrowse -}: Props) { +export function MapBrowse({ onlyOnRent, onlyOnSale, showOwned, tiles, ownedLands, onBrowse }: Props) { const isMobileOrTable = useTabletAndBelowMediaQuery() const [x, setX] = useState() const [y, setY] = useState() - const handleSetFullscreen = useCallback( - () => onBrowse({ isMap: true, isFullscreen: true }), - [onBrowse] - ) + const handleSetFullscreen = useCallback(() => onBrowse({ isMap: true, isFullscreen: true }), [onBrowse]) const tilesForRent = useMemo( () => diff --git a/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.types.ts b/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.types.ts index 4285ae14c3..3aced31119 100644 --- a/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.types.ts +++ b/webapp/src/components/AssetBrowse/MapBrowse/MapBrowse.types.ts @@ -12,10 +12,7 @@ export type Props = { onBrowse: typeof browse } -export type MapStateProps = Pick< - Props, - 'onlyOnSale' | 'onlyOnRent' | 'tiles' | 'ownedLands' -> +export type MapStateProps = Pick export type MapDispatchProps = Pick diff --git a/webapp/src/components/AssetBrowse/MapBrowse/utils.ts b/webapp/src/components/AssetBrowse/MapBrowse/utils.ts index b0337820f7..96a05420e4 100644 --- a/webapp/src/components/AssetBrowse/MapBrowse/utils.ts +++ b/webapp/src/components/AssetBrowse/MapBrowse/utils.ts @@ -1,5 +1,5 @@ export type Coord = { - x: number, + x: number y: number } @@ -9,13 +9,13 @@ function getDistanceBetween(position1: Coord, position2: Coord) { export function getNearestTile(currentPosition: Coord, coords: Array = []) { if (!coords.length) { - return undefined; + return undefined } let nearestCoord: Coord = coords[0] let nearestDistance = getDistanceBetween(currentPosition, { x: nearestCoord.x, y: nearestCoord.y }) - coords.forEach((tile) => { + coords.forEach(tile => { const tileDistance = getDistanceBetween(currentPosition, { x: tile.x, y: tile.y }) if (tileDistance < nearestDistance) { nearestDistance = tileDistance @@ -23,5 +23,5 @@ export function getNearestTile(currentPosition: Coord, coords: Array = [] } }) - return nearestCoord; + return nearestCoord } diff --git a/webapp/src/components/AssetBrowse/MapTopbar/MapTopbar.container.ts b/webapp/src/components/AssetBrowse/MapTopbar/MapTopbar.container.ts index e95f656c09..daacd5e0b9 100644 --- a/webapp/src/components/AssetBrowse/MapTopbar/MapTopbar.container.ts +++ b/webapp/src/components/AssetBrowse/MapTopbar/MapTopbar.container.ts @@ -1,10 +1,7 @@ import { connect } from 'react-redux' import { Dispatch } from 'redux' import { RootState } from '../../../modules/reducer' -import { - getOnlyOnRent, - getOnlyOnSale, -} from '../../../modules/routing/selectors' +import { getOnlyOnRent, getOnlyOnSale } from '../../../modules/routing/selectors' import { browse } from '../../../modules/routing/actions' import { BrowseOptions } from '../../../modules/routing/types' import { MapStateProps, MapDispatchProps } from './MapTopbar.types' diff --git a/webapp/src/components/AssetBrowse/MapTopbar/MapTopbar.tsx b/webapp/src/components/AssetBrowse/MapTopbar/MapTopbar.tsx index b30491c41e..6cb46b9577 100644 --- a/webapp/src/components/AssetBrowse/MapTopbar/MapTopbar.tsx +++ b/webapp/src/components/AssetBrowse/MapTopbar/MapTopbar.tsx @@ -1,26 +1,13 @@ import { useCallback } from 'react' import classNames from 'classnames' -import { - Button, - CheckboxProps, - Container, - Popup, - Radio, - useTabletAndBelowMediaQuery -} from 'decentraland-ui' +import { Button, CheckboxProps, Container, Popup, Radio, useTabletAndBelowMediaQuery } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { persistIsMapProperty } from '../../../modules/ui/utils' import { Chip } from '../../Chip' import { Props } from './MapTopbar.types' import styles from './MapTopbar.module.css' -export const MapTopbar = ({ - onlyOnSale, - onlyOnRent, - showOwned, - onBrowse, - onShowOwnedChange -}: Props): JSX.Element | null => { +export const MapTopbar = ({ onlyOnSale, onlyOnRent, showOwned, onBrowse, onShowOwnedChange }: Props): JSX.Element | null => { const isMobileOrTable = useTabletAndBelowMediaQuery() const handleIsMapChange = useCallback( @@ -32,10 +19,7 @@ export const MapTopbar = ({ isFullscreen: isMap, search: '', // Forces the onlyOnSale property in the defined cases so the users can see LAND on sale. - onlyOnSale: - (!onlyOnSale && onlyOnRent === false) || - (onlyOnSale === undefined && onlyOnRent === undefined) || - onlyOnSale + onlyOnSale: (!onlyOnSale && onlyOnRent === false) || (onlyOnSale === undefined && onlyOnRent === undefined) || onlyOnSale }) }, [onBrowse, onlyOnSale, onlyOnRent] @@ -66,18 +50,8 @@ export const MapTopbar = ({ const mapToggle = (
- - + +
) @@ -114,11 +88,7 @@ export const MapTopbar = ({ content={
{filters}
} position="bottom right" trigger={ - } diff --git a/webapp/src/components/AssetBrowse/ToggleBox/ToggleBox.tsx b/webapp/src/components/AssetBrowse/ToggleBox/ToggleBox.tsx index 81e5ccc140..f85224462d 100644 --- a/webapp/src/components/AssetBrowse/ToggleBox/ToggleBox.tsx +++ b/webapp/src/components/AssetBrowse/ToggleBox/ToggleBox.tsx @@ -10,13 +10,7 @@ const ToggleBox = (props: Props) => { const isMobile = useMobileMediaQuery() return ( - + {items.map((item, index) => (
{ {item.icon}
{item.title}
- {isMobile && direction === 'row' ? null : ( -
{item.description}
- )} + {isMobile && direction === 'row' ? null :
{item.description}
}
))} diff --git a/webapp/src/components/AssetCard/AssetCard.container.ts b/webapp/src/components/AssetCard/AssetCard.container.ts index 3dc3efea21..a0f8f4e7ae 100644 --- a/webapp/src/components/AssetCard/AssetCard.container.ts +++ b/webapp/src/components/AssetCard/AssetCard.container.ts @@ -9,11 +9,7 @@ import { getAssetPrice, isNFT } from '../../modules/asset/utils' import { locations } from '../../modules/routing/locations' import { getOpenRentalId } from '../../modules/rental/utils' import { getRentalById } from '../../modules/rental/selectors' -import { - getPageName, - getSortBy, - getWearablesUrlParams -} from '../../modules/routing/selectors' +import { getPageName, getSortBy, getWearablesUrlParams } from '../../modules/routing/selectors' import { PageName } from '../../modules/routing/types' import { MapStateProps, OwnProps, MapDispatchProps } from './AssetCard.types' import AssetCard from './AssetCard' @@ -29,21 +25,14 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { } const openRentalId = getOpenRentalId(asset) - let rentalOfNFT: RentalListing | null = openRentalId - ? getRentalById(state, openRentalId) - : null + const rentalOfNFT: RentalListing | null = openRentalId ? getRentalById(state, openRentalId) : null const { minPrice, maxPrice } = getWearablesUrlParams(state) return { price, - showListedTag: - pageName === PageName.ACCOUNT && - Boolean(price) && - getLocation(state).pathname !== locations.root(), - isClaimingBackLandTransactionPending: isNFT(asset) - ? isClaimingBackLandTransactionPending(state, asset) - : false, + showListedTag: pageName === PageName.ACCOUNT && Boolean(price) && getLocation(state).pathname !== locations.root(), + isClaimingBackLandTransactionPending: isNFT(asset) ? isClaimingBackLandTransactionPending(state, asset) : false, rental: rentalOfNFT, showRentalChip: rentalOfNFT !== null && pageName === PageName.ACCOUNT, sortBy: getSortBy(state), diff --git a/webapp/src/components/AssetCard/AssetCard.spec.tsx b/webapp/src/components/AssetCard/AssetCard.spec.tsx index 794e1d2787..db31c44097 100644 --- a/webapp/src/components/AssetCard/AssetCard.spec.tsx +++ b/webapp/src/components/AssetCard/AssetCard.spec.tsx @@ -1,13 +1,6 @@ import { mockAllIsIntersecting } from 'react-intersection-observer/test-utils' import { screen } from '@testing-library/react' -import { - BodyShape, - ChainId, - Network, - NFTCategory, - Rarity, - WearableCategory -} from '@dcl/schemas' +import { BodyShape, ChainId, Network, NFTCategory, Rarity, WearableCategory } from '@dcl/schemas' import { Asset } from '../../modules/asset/types' import { INITIAL_STATE } from '../../modules/favorites/reducer' import { SortBy } from '../../modules/routing/types' diff --git a/webapp/src/components/AssetCard/AssetCard.tsx b/webapp/src/components/AssetCard/AssetCard.tsx index 26e071ce9f..dde3f4d27e 100644 --- a/webapp/src/components/AssetCard/AssetCard.tsx +++ b/webapp/src/components/AssetCard/AssetCard.tsx @@ -5,12 +5,7 @@ import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { Profile } from 'decentraland-dapps/dist/containers' import { Link } from 'react-router-dom' import { Card, Icon, useMobileMediaQuery } from 'decentraland-ui' -import { - getAssetName, - getAssetUrl, - isNFT, - isCatalogItem -} from '../../modules/asset/utils' +import { getAssetName, getAssetUrl, isNFT, isCatalogItem } from '../../modules/asset/utils' import { Asset } from '../../modules/asset/types' import { NFT } from '../../modules/nft/types' import { isLand } from '../../modules/nft/utils' @@ -34,13 +29,7 @@ import { formatWeiToAssetCard, getCatalogCardInformation } from './utils' import { Props } from './AssetCard.types' import './AssetCard.css' -const RentalPrice = ({ - asset, - rentalPricePerDay -}: { - asset: Asset - rentalPricePerDay: string -}) => { +const RentalPrice = ({ asset, rentalPricePerDay }: { asset: Asset; rentalPricePerDay: string }) => { return ( <> @@ -60,10 +49,7 @@ const RentalChip = ({ isClaimingBackLandTransactionPending: boolean rental: RentalListing | null }) => { - const rentalEndDate: Date | null = useMemo( - () => (rental ? getRentalEndDate(rental) : null), - [rental] - ) + const rentalEndDate: Date | null = useMemo(() => (rental ? getRentalEndDate(rental) : null), [rental]) const rentalHasEnded = rental ? hasRentalEnded(rental) : false return ( @@ -108,10 +94,7 @@ const AssetCard = (props: Props) => { const title = getAssetName(asset) const { parcel, estate, wearable, emote, ens } = asset.data - const rentalPricePerDay: string | null = useMemo( - () => (isRentalListingOpen(rental) ? getMaxPriceOfPeriods(rental!) : null), - [rental] - ) + const rentalPricePerDay: string | null = useMemo(() => (isRentalListingOpen(rental) ? getMaxPriceOfPeriods(rental!) : null), [rental]) const catalogItemInformation = useMemo(() => { if (!isNFT(asset) && isCatalogItem(asset)) { @@ -124,31 +107,21 @@ const AssetCard = (props: Props) => { }, [appliedFilters, asset, sortBy]) const renderCatalogItemInformation = useCallback(() => { - const isAvailableForMint = - !isNFT(asset) && asset.isOnSale && asset.available > 0 - const notForSale = - !isAvailableForMint && !isNFT(asset) && !asset.minListingPrice + const isAvailableForMint = !isNFT(asset) && asset.isOnSale && asset.available > 0 + const notForSale = !isAvailableForMint && !isNFT(asset) && !asset.minListingPrice return catalogItemInformation ? (
{catalogItemInformation.action} - {catalogItemInformation.actionIcon && ( - mint - )} + {catalogItemInformation.actionIcon && mint} {catalogItemInformation.price ? (
{catalogItemInformation.price?.includes('-') - ? `${formatWeiToAssetCard( - catalogItemInformation.price.split(' - ')[0] - )} - ${formatWeiToAssetCard( + ? `${formatWeiToAssetCard(catalogItemInformation.price.split(' - ')[0])} - ${formatWeiToAssetCard( catalogItemInformation.price.split(' - ')[1] )}` : formatWeiToAssetCard(catalogItemInformation.price)} @@ -159,11 +132,7 @@ const AssetCard = (props: Props) => { count: (asset as Item).owners })}` )} - {catalogItemInformation.extraInformation && ( - - {catalogItemInformation.extraInformation} - - )} + {catalogItemInformation.extraInformation && {catalogItemInformation.extraInformation}}
) : null }, [asset, catalogItemInformation]) @@ -176,79 +145,48 @@ const AssetCard = (props: Props) => { as={Link} to={getAssetUrl(asset, isManager && isLand(asset))} onClick={onClick} - id={`${asset.contractAddress}-${ - 'tokenId' in asset ? asset.tokenId : asset.itemId - }`} + id={`${asset.contractAddress}-${'tokenId' in asset ? asset.tokenId : asset.itemId}`} > {inView ? ( <> - {!isNFT(asset) && !isMobile ? ( - - ) : null} + {!isNFT(asset) && !isMobile ? : null} {showRentalBubble ? ( - + ) : null} -
+
{title} - {!isNFT(asset) && - isCatalogItem(asset) && - asset.network === Network.MATIC && ( - - - - )} + {!isNFT(asset) && isCatalogItem(asset) && asset.network === Network.MATIC && ( + + + + )}
{!isCatalogItem(asset) && price ? ( {formatWeiToAssetCard(price)} ) : rentalPricePerDay ? ( - + ) : null}
- {!isCatalogItem(asset) && ( - - {t(`networks.${asset.network.toLowerCase()}`)} - - )} + {!isCatalogItem(asset) && {t(`networks.${asset.network.toLowerCase()}`)}} {rentalPricePerDay && price ? (
- +
) : null}
diff --git a/webapp/src/components/AssetCard/AssetCard.types.ts b/webapp/src/components/AssetCard/AssetCard.types.ts index 12d67d4743..83a9753680 100644 --- a/webapp/src/components/AssetCard/AssetCard.types.ts +++ b/webapp/src/components/AssetCard/AssetCard.types.ts @@ -18,13 +18,7 @@ export type Props = { export type MapStateProps = Pick< Props, - | 'showListedTag' - | 'price' - | 'showRentalChip' - | 'rental' - | 'isClaimingBackLandTransactionPending' - | 'sortBy' - | 'appliedFilters' + 'showListedTag' | 'price' | 'showRentalChip' | 'rental' | 'isClaimingBackLandTransactionPending' | 'sortBy' | 'appliedFilters' > export type MapDispatchProps = {} export type OwnProps = Pick diff --git a/webapp/src/components/AssetCard/EmoteTags/EmoteTags.tsx b/webapp/src/components/AssetCard/EmoteTags/EmoteTags.tsx index 5f9ac1a7f9..7e34079bff 100644 --- a/webapp/src/components/AssetCard/EmoteTags/EmoteTags.tsx +++ b/webapp/src/components/AssetCard/EmoteTags/EmoteTags.tsx @@ -16,13 +16,7 @@ const EmoteTags = (props: Props) => {
{rarity ? ( - + ) : null} {loop !== undefined ? ( { content={} trigger={
- +
} /> diff --git a/webapp/src/components/AssetCard/ProximityTags/ProximityTags.container.ts b/webapp/src/components/AssetCard/ProximityTags/ProximityTags.container.ts index ecf499c00f..a4663f41f4 100644 --- a/webapp/src/components/AssetCard/ProximityTags/ProximityTags.container.ts +++ b/webapp/src/components/AssetCard/ProximityTags/ProximityTags.container.ts @@ -1,11 +1,7 @@ import { connect } from 'react-redux' import { RootState } from '../../../modules/reducer' import { getProximities } from '../../../modules/proximity/selectors' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './ProximityTags.types' +import { MapStateProps, MapDispatchProps, MapDispatch } from './ProximityTags.types' import ProximityTags from './ProximityTags' const mapState = (state: RootState): MapStateProps => ({ diff --git a/webapp/src/components/AssetCard/ProximityTags/ProximityTags.tsx b/webapp/src/components/AssetCard/ProximityTags/ProximityTags.tsx index 19a5cd3415..1361da29c2 100644 --- a/webapp/src/components/AssetCard/ProximityTags/ProximityTags.tsx +++ b/webapp/src/components/AssetCard/ProximityTags/ProximityTags.tsx @@ -8,24 +8,9 @@ const ProximityTags = (props: Props) => { const proximity = useProximity(nft, proximities) return ( <> - {proximity?.plaza !== undefined ? ( -
- ) : null} - {proximity?.road !== undefined ? ( -
- ) : null} - {proximity?.district !== undefined ? ( -
- ) : null} + {proximity?.plaza !== undefined ?
: null} + {proximity?.road !== undefined ?
: null} + {proximity?.district !== undefined ?
: null} ) } diff --git a/webapp/src/components/AssetCard/WearableTags/WearableTags.tsx b/webapp/src/components/AssetCard/WearableTags/WearableTags.tsx index 6635c65904..1eb0912ed1 100644 --- a/webapp/src/components/AssetCard/WearableTags/WearableTags.tsx +++ b/webapp/src/components/AssetCard/WearableTags/WearableTags.tsx @@ -15,33 +15,12 @@ const WearableTags = (props: Props) => { return (
- + + {!isCatalogItem(asset) &&
} {!isCatalogItem(asset) && ( -
+ )} - {!isCatalogItem(asset) && ( - - )} - {isSmart ? ( - - ) : null} + {isSmart ? : null}
) } diff --git a/webapp/src/components/AssetCard/utils.spec.tsx b/webapp/src/components/AssetCard/utils.spec.tsx index a4d29237d6..d484d54bb6 100644 --- a/webapp/src/components/AssetCard/utils.spec.tsx +++ b/webapp/src/components/AssetCard/utils.spec.tsx @@ -2,17 +2,10 @@ import { BigNumber, ethers } from 'ethers' import { CatalogSortBy, Item } from '@dcl/schemas' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { BrowseOptions, SortBy } from '../../modules/routing/types' -import { - getAlsoAvailableForMintingText, - getAssetListingsRangeInfoText, - getCatalogCardInformation, - getListingsRangePrice -} from './utils' +import { getAlsoAvailableForMintingText, getAssetListingsRangeInfoText, getCatalogCardInformation, getListingsRangePrice } from './utils' import mintingIcon from '../../images/minting.png' -const applyRange = ( - appliedFilters: Pick -) => { +const applyRange = (appliedFilters: Pick) => { return (appliedFilters = { ...appliedFilters, minPrice: '100', @@ -145,9 +138,7 @@ describe('AssetCard utils', () => { beforeEach(() => { asset = { ...asset, - price: BigNumber.from( - ethers.utils.parseUnits(appliedFilters.minPrice as string) - ) + price: BigNumber.from(ethers.utils.parseUnits(appliedFilters.minPrice as string)) .sub(BigNumber.from(1)) .toString() } @@ -166,9 +157,7 @@ describe('AssetCard utils', () => { beforeEach(() => { asset = { ...asset, - price: BigNumber.from( - ethers.utils.parseUnits(appliedFilters.maxPrice as string) - ) + price: BigNumber.from(ethers.utils.parseUnits(appliedFilters.maxPrice as string)) .add(BigNumber.from(1)) .toString() } @@ -262,9 +251,7 @@ describe('AssetCard utils', () => { beforeEach(() => { asset = { ...asset, - maxListingPrice: BigNumber.from(asset.price) - .sub(1) - .toString() + maxListingPrice: BigNumber.from(asset.price).sub(1).toString() } }) it('should show most expensive in range title, no icon, the minting price and the listings range in the extra section', () => { @@ -281,9 +268,7 @@ describe('AssetCard utils', () => { beforeEach(() => { asset = { ...asset, - maxListingPrice: BigNumber.from(asset.price) - .add(1) - .toString() + maxListingPrice: BigNumber.from(asset.price).add(1).toString() } }) it('should show "Most Expensive" title, no icon, the max listing price and the listings range in the extra section', () => { @@ -301,9 +286,7 @@ describe('AssetCard utils', () => { beforeEach(() => { asset = { ...asset, - price: BigNumber.from( - ethers.utils.parseUnits(appliedFilters.maxPrice as string) - ) + price: BigNumber.from(ethers.utils.parseUnits(appliedFilters.maxPrice as string)) .add(1) .toString() } @@ -333,11 +316,7 @@ describe('AssetCard utils', () => { }) describe.each( - Object.values(CatalogSortBy).filter( - sortBy => - sortBy !== CatalogSortBy.CHEAPEST && - sortBy !== CatalogSortBy.MOST_EXPENSIVE - ) + Object.values(CatalogSortBy).filter(sortBy => sortBy !== CatalogSortBy.CHEAPEST && sortBy !== CatalogSortBy.MOST_EXPENSIVE) )('when sorting by %s', sort => { beforeEach(() => { asset = { @@ -350,7 +329,7 @@ describe('AssetCard utils', () => { maxListingPrice: '100' } as Item appliedFilters = { - sortBy: (sort as unknown) as SortBy + sortBy: sort as unknown as SortBy } }) describe('and there is only mint available', () => { @@ -441,9 +420,7 @@ describe('AssetCard utils', () => { beforeEach(() => { asset = { ...asset, - price: BigNumber.from( - ethers.utils.parseUnits(appliedFilters.maxPrice as string) - ) + price: BigNumber.from(ethers.utils.parseUnits(appliedFilters.maxPrice as string)) .sub(1) .toString() } @@ -462,9 +439,7 @@ describe('AssetCard utils', () => { beforeEach(() => { asset = { ...asset, - price: BigNumber.from( - ethers.utils.parseUnits(appliedFilters.minPrice as string) - ) + price: BigNumber.from(ethers.utils.parseUnits(appliedFilters.minPrice as string)) .sub(1) .toString() } @@ -483,9 +458,7 @@ describe('AssetCard utils', () => { beforeEach(() => { asset = { ...asset, - price: BigNumber.from( - ethers.utils.parseUnits(appliedFilters.maxPrice as string) - ) + price: BigNumber.from(ethers.utils.parseUnits(appliedFilters.maxPrice as string)) .add(1) .toString() } diff --git a/webapp/src/components/AssetCard/utils.tsx b/webapp/src/components/AssetCard/utils.tsx index 77466c1a7e..72e3e07778 100644 --- a/webapp/src/components/AssetCard/utils.tsx +++ b/webapp/src/components/AssetCard/utils.tsx @@ -73,19 +73,10 @@ export function getAssetListingsRangeInfoText(asset: Item) { ) : null } -function getIsMintPriceInRange( - asset: Item, - appliedFilters: Pick -) { +function getIsMintPriceInRange(asset: Item, appliedFilters: Pick) { return ( - (!appliedFilters.minPrice || - BigNumber.from(asset.price).gte( - ethers.utils.parseUnits(appliedFilters.minPrice) - )) && - (!appliedFilters.maxPrice || - BigNumber.from(asset.price).lte( - ethers.utils.parseUnits(appliedFilters.maxPrice) - )) + (!appliedFilters.minPrice || BigNumber.from(asset.price).gte(ethers.utils.parseUnits(appliedFilters.minPrice))) && + (!appliedFilters.maxPrice || BigNumber.from(asset.price).lte(ethers.utils.parseUnits(appliedFilters.maxPrice))) ) } @@ -113,9 +104,7 @@ export function getCatalogCardInformation( if (sortBy === SortBy.CHEAPEST) { const info: CatalogCardInformation = { - action: hasRangeApplied - ? t('asset_card.cheapest_option_range') - : t('asset_card.cheapest_option'), + action: hasRangeApplied ? t('asset_card.cheapest_option_range') : t('asset_card.cheapest_option'), actionIcon: null, price: asset.minPrice ?? null, extraInformation: null @@ -130,17 +119,11 @@ export function getCatalogCardInformation( if (hasRangeApplied) { info.price = asset.minPrice ?? asset.price // TODO check if this is necessary if (appliedFilters.minPrice) { - const isMintingLessThanMinPriceFilter = BigNumber.from( - asset.price - ).lt(ethers.utils.parseUnits(appliedFilters.minPrice)) - info.extraInformation = isMintingLessThanMinPriceFilter - ? getAlsoAvailableForMintingText(asset) - : null + const isMintingLessThanMinPriceFilter = BigNumber.from(asset.price).lt(ethers.utils.parseUnits(appliedFilters.minPrice)) + info.extraInformation = isMintingLessThanMinPriceFilter ? getAlsoAvailableForMintingText(asset) : null } } else { - const mintIsNotCheapestOption = BigNumber.from(asset.price).gt( - BigNumber.from(asset.minPrice) - ) + const mintIsNotCheapestOption = BigNumber.from(asset.price).gt(BigNumber.from(asset.minPrice)) if (mintIsNotCheapestOption) { info.extraInformation = getAlsoAvailableForMintingText(asset) } @@ -149,21 +132,17 @@ export function getCatalogCardInformation( return info } else if (sortBy === SortBy.MOST_EXPENSIVE) { const info: CatalogCardInformation = { - action: hasRangeApplied - ? t('asset_card.most_expensive_range') - : t('asset_card.most_expensive'), + action: hasRangeApplied ? t('asset_card.most_expensive_range') : t('asset_card.most_expensive'), actionIcon: null, price: asset.price, extraInformation: getAssetListingsRangeInfoText(asset) } const isMintingGreaterThanMaxListingPrice = - !!asset.maxListingPrice && - BigNumber.from(asset.price).gt(BigNumber.from(asset.maxListingPrice)) + !!asset.maxListingPrice && BigNumber.from(asset.price).gt(BigNumber.from(asset.maxListingPrice)) info.price = - getIsMintPriceInRange(asset, appliedFilters) && - isMintingGreaterThanMaxListingPrice + getIsMintPriceInRange(asset, appliedFilters) && isMintingGreaterThanMaxListingPrice ? asset.price : asset.maxListingPrice ?? asset.price @@ -182,13 +161,9 @@ export function getCatalogCardInformation( info.action = t('asset_card.available_for_mint') info.actionIcon = mintingIcon } else if (hasOnlyListings) { - info.action = hasRangeApplied - ? t('asset_card.available_listings_in_range') - : t('asset_card.cheapest_listing') + info.action = hasRangeApplied ? t('asset_card.available_listings_in_range') : t('asset_card.cheapest_listing') info.price = - asset.listings && - asset.listings > 1 && - asset.minListingPrice !== asset.maxListingPrice + asset.listings && asset.listings > 1 && asset.minListingPrice !== asset.maxListingPrice ? hasRangeApplied ? getListingsRangePrice(asset) : asset.minListingPrice ?? '' @@ -198,23 +173,15 @@ export function getCatalogCardInformation( if (hasRangeApplied) { const isMintInRange = getIsMintPriceInRange(asset, appliedFilters) - info.action = isMintInRange - ? t('asset_card.available_for_mint') - : t('asset_card.available_listings_in_range') + info.action = isMintInRange ? t('asset_card.available_for_mint') : t('asset_card.available_listings_in_range') info.price = isMintInRange ? asset.price : asset.minListingPrice ?? '' info.actionIcon = isMintInRange ? mintingIcon : null - info.extraInformation = isMintInRange - ? getAssetListingsRangeInfoText(asset) - : null + info.extraInformation = isMintInRange ? getAssetListingsRangeInfoText(asset) : null if (appliedFilters.minPrice) { - const isMintingLessThanMinPriceFilter = BigNumber.from(asset.price).lt( - ethers.utils.parseUnits(appliedFilters.minPrice) - ) + const isMintingLessThanMinPriceFilter = BigNumber.from(asset.price).lt(ethers.utils.parseUnits(appliedFilters.minPrice)) info.extraInformation = - !isMintInRange && isMintingLessThanMinPriceFilter - ? getAlsoAvailableForMintingText(asset) - : info.extraInformation + !isMintInRange && isMintingLessThanMinPriceFilter ? getAlsoAvailableForMintingText(asset) : info.extraInformation } } else { // mint is the cheapest, show "available for mint" and the listings range diff --git a/webapp/src/components/AssetFilters/AssetFilters.container.ts b/webapp/src/components/AssetFilters/AssetFilters.container.ts index 755cbf3fb5..74bea1c575 100644 --- a/webapp/src/components/AssetFilters/AssetFilters.container.ts +++ b/webapp/src/components/AssetFilters/AssetFilters.container.ts @@ -36,16 +36,11 @@ import { AssetFilters } from './AssetFilters' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { const { values = {} } = ownProps - const section = - 'section' in values ? (values.section as Section) : getSection(state) - const contracts = - 'contracts' in values ? values.contracts || [] : getContracts(state) - const creators = - 'creators' in values ? values.creators || [] : getCreators(state) - const onlyOnSale = - 'onlyOnSale' in values ? values.onlyOnSale : getOnlyOnSale(state) - const onlyOnRent = - 'onlyOnRent' in values ? values.onlyOnRent : getOnlyOnRent(state) + const section = 'section' in values ? (values.section as Section) : getSection(state) + const contracts = 'contracts' in values ? values.contracts || [] : getContracts(state) + const creators = 'creators' in values ? values.creators || [] : getCreators(state) + const onlyOnSale = 'onlyOnSale' in values ? values.onlyOnSale : getOnlyOnSale(state) + const onlyOnRent = 'onlyOnRent' in values ? values.onlyOnRent : getOnlyOnRent(state) let landStatus = LANDFilters.ALL_LAND if (onlyOnRent && !onlyOnSale) { @@ -57,27 +52,14 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { return { minPrice: 'minPrice' in values ? values.minPrice || '' : getMinPrice(state), maxPrice: 'maxPrice' in values ? values.maxPrice || '' : getMaxPrice(state), - minEstateSize: - 'minEstateSize' in values - ? values.minEstateSize || '' - : getMinEstateSize(state), - maxEstateSize: - 'maxEstateSize' in values - ? values.maxEstateSize || '' - : getMaxEstateSize(state), + minEstateSize: 'minEstateSize' in values ? values.minEstateSize || '' : getMinEstateSize(state), + maxEstateSize: 'maxEstateSize' in values ? values.maxEstateSize || '' : getMaxEstateSize(state), rarities: 'rarities' in values ? values.rarities || [] : getRarities(state), - status: - 'status' in values - ? values.status - : (getStatus(state) as AssetStatusFilter), + status: 'status' in values ? values.status : (getStatus(state) as AssetStatusFilter), network: 'network' in values ? values.network : getNetwork(state), - bodyShapes: - 'wearableGenders' in values - ? values.wearableGenders - : getWearableGenders(state), + bodyShapes: 'wearableGenders' in values ? values.wearableGenders : getWearableGenders(state), category: section ? getCategoryFromSection(section) : undefined, - isOnlySmart: - 'onlySmart' in values ? !!values.onlySmart : getOnlySmart(state), + isOnlySmart: 'onlySmart' in values ? !!values.onlySmart : getOnlySmart(state), isOnSale: onlyOnSale, emotePlayMode: values.emotePlayMode || getEmotePlayMode(state), assetType: getAssetType(state), @@ -86,40 +68,18 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { landStatus, view: getView(state), section, - rentalDays: - 'rentalDays' in values ? values.rentalDays : getRentalDays(state), - minDistanceToPlaza: - 'minDistanceToPlaza' in values - ? values.minDistanceToPlaza - : getMinDistanceToPlaza(state), - maxDistanceToPlaza: - 'maxDistanceToPlaza' in values - ? values.maxDistanceToPlaza - : getMaxDistanceToPlaza(state), - adjacentToRoad: - 'adjacentToRoad' in values - ? values.adjacentToRoad - : getAdjacentToRoad(state), - emoteHasSound: - 'emoteHasSound' in values - ? values.emoteHasSound - : getEmoteHasSound(state), - emoteHasGeometry: - 'emoteHasGeometry' in values - ? values.emoteHasGeometry - : getEmoteHasGeometry(state) + rentalDays: 'rentalDays' in values ? values.rentalDays : getRentalDays(state), + minDistanceToPlaza: 'minDistanceToPlaza' in values ? values.minDistanceToPlaza : getMinDistanceToPlaza(state), + maxDistanceToPlaza: 'maxDistanceToPlaza' in values ? values.maxDistanceToPlaza : getMaxDistanceToPlaza(state), + adjacentToRoad: 'adjacentToRoad' in values ? values.adjacentToRoad : getAdjacentToRoad(state), + emoteHasSound: 'emoteHasSound' in values ? values.emoteHasSound : getEmoteHasSound(state), + emoteHasGeometry: 'emoteHasGeometry' in values ? values.emoteHasGeometry : getEmoteHasGeometry(state) } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => { +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => { return { - onBrowse: options => - ownProps.onFilterChange - ? ownProps.onFilterChange(options) - : dispatch(browse(options)) + onBrowse: options => (ownProps.onFilterChange ? ownProps.onFilterChange(options) : dispatch(browse(options))) } } diff --git a/webapp/src/components/AssetFilters/AssetFilters.spec.tsx b/webapp/src/components/AssetFilters/AssetFilters.spec.tsx index b17bd4ba39..9c2b20bfca 100644 --- a/webapp/src/components/AssetFilters/AssetFilters.spec.tsx +++ b/webapp/src/components/AssetFilters/AssetFilters.spec.tsx @@ -1,9 +1,6 @@ import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { Section } from '../../modules/vendor/decentraland' -import { - renderWithProviders, - waitForComponentToFinishLoading -} from '../../utils/test' +import { renderWithProviders, waitForComponentToFinishLoading } from '../../utils/test' import { LANDFilters } from '../Vendor/decentraland/types' import { AssetFilters } from './AssetFilters' import { Props } from './AssetFilters.types' @@ -19,9 +16,7 @@ jest.mock('../../modules/vendor/decentraland/nft/api', () => { } }) jest.mock('../../modules/vendor/decentraland/rentals/api', () => { - const module = jest.requireActual( - '../../modules/vendor/decentraland/rentals/api' - ) + const module = jest.requireActual('../../modules/vendor/decentraland/rentals/api') return { ...module, rentalsAPI: { @@ -53,15 +48,9 @@ describe('when in land section', () => { it('should render land status filter', async () => { const screen = renderAssetFilters({ section: Section.LAND }) await waitForComponentToFinishLoading(screen) - expect( - screen.getByRole('radio', { name: t('nft_land_filters.all_land') }) - ).toBeInTheDocument() - expect( - screen.getByRole('radio', { name: t('nft_land_filters.only_for_sale') }) - ).toBeInTheDocument() - expect( - screen.getByRole('radio', { name: t('nft_land_filters.only_for_rent') }) - ).toBeInTheDocument() + expect(screen.getByRole('radio', { name: t('nft_land_filters.all_land') })).toBeInTheDocument() + expect(screen.getByRole('radio', { name: t('nft_land_filters.only_for_sale') })).toBeInTheDocument() + expect(screen.getByRole('radio', { name: t('nft_land_filters.only_for_rent') })).toBeInTheDocument() }) it('should render price filter', async () => { @@ -80,9 +69,7 @@ describe('when in land section', () => { }) await waitForComponentToFinishLoading(screen) // TODO: Make barchart components accesible so we can access better the info ui#311 - expect( - screen.getByText(t('filters.estate_size.label')) - ).toBeInTheDocument() + expect(screen.getByText(t('filters.estate_size.label'))).toBeInTheDocument() }) }) }) diff --git a/webapp/src/components/AssetFilters/AssetFilters.tsx b/webapp/src/components/AssetFilters/AssetFilters.tsx index 3669255184..0b7b6ddb31 100644 --- a/webapp/src/components/AssetFilters/AssetFilters.tsx +++ b/webapp/src/components/AssetFilters/AssetFilters.tsx @@ -1,11 +1,5 @@ import { useCallback, useMemo } from 'react' -import { - EmotePlayMode, - GenderFilterOption, - Network, - Rarity, - WearableGender -} from '@dcl/schemas' +import { EmotePlayMode, GenderFilterOption, Network, Rarity, WearableGender } from '@dcl/schemas' import { SmartWearableFilter } from 'decentraland-ui' import { RarityFilter } from 'decentraland-dapps/dist/containers/RarityFilter' import { getSectionFromCategory } from '../../modules/routing/search' @@ -27,11 +21,7 @@ import { RentalPeriodFilter } from './RentalPeriodFilter' import { MoreFilters } from './MoreFilters' import { EmoteAttributesFilter } from './EmoteAttributesFilter' import { LocationFilter } from './LocationFilter' -import { - AssetFilter, - filtersBySection, - trackBarChartComponentChange -} from './utils' +import { AssetFilter, filtersBySection, trackBarChartComponentChange } from './utils' import { StatusFilter } from './StatusFilter' import './AssetFilters.css' @@ -65,18 +55,10 @@ export const AssetFilters = ({ }: Props): JSX.Element | null => { const isInLandSection = isLandSection(section) - const handleBrowseParamChange = useCallback( - (options: BrowseOptions) => onBrowse(options), - [onBrowse] - ) + const handleBrowseParamChange = useCallback((options: BrowseOptions) => onBrowse(options), [onBrowse]) const handleRangeFilterChange = useCallback( - ( - filterNames: [string, string], - value: [string, string], - source, - prevValues: [string, string] - ) => { + (filterNames: [string, string], value: [string, string], source, prevValues: [string, string]) => { const [filterMinName, filterMaxName] = filterNames const [minValue, maxValue] = value onBrowse({ [filterMinName]: minValue, [filterMaxName]: maxValue }) @@ -116,21 +98,13 @@ export const AssetFilters = ({ const handleOnSaleChange = useCallback( (value: boolean) => { // when toggling off the on sale filter, we need to reset the sortBy to avoid invalid combinations with the on sale sort options - onBrowse( - value - ? { onlyOnSale: value } - : { onlyOnSale: value, sortBy: SortBy.NEWEST } - ) + onBrowse(value ? { onlyOnSale: value } : { onlyOnSale: value, sortBy: SortBy.NEWEST }) }, [onBrowse] ) const handleEmoteAttributesChange = useCallback( - (value: { - emotePlayMode?: EmotePlayMode[] - emoteHasSound?: boolean - emoteHasGeometry?: boolean - }) => { + (value: { emotePlayMode?: EmotePlayMode[]; emoteHasSound?: boolean; emoteHasGeometry?: boolean }) => { onBrowse({ emotePlayMode: value.emotePlayMode, emoteHasSound: value.emoteHasSound, @@ -199,9 +173,7 @@ export const AssetFilters = ({ const shouldRenderFilter = useCallback( (filter: AssetFilter) => { // /lands page won't have any category, we fallback to the section, that will be Section.LAND - const parentSection = category - ? getSectionFromCategory(category) - : section + const parentSection = category ? getSectionFromCategory(category) : section return filtersBySection[parentSection!]?.includes(filter) }, [category, section] @@ -210,17 +182,9 @@ export const AssetFilters = ({ if (isInLandSection) { return (
- + - handleRangeFilterChange(['minPrice', 'maxPrice'], value, source, [ - minPrice, - maxPrice - ]) - } + onChange={(value, source) => handleRangeFilterChange(['minPrice', 'maxPrice'], value, source, [minPrice, maxPrice])} minPrice={minPrice} maxPrice={maxPrice} values={values} @@ -235,22 +199,12 @@ export const AssetFilters = ({ minPrice={minPrice} maxPrice={maxPrice} onChange={(values, source) => - handleRangeFilterChange( - ['minEstateSize', 'maxEstateSize'], - values, - source, - [minEstateSize, maxEstateSize] - ) + handleRangeFilterChange(['minEstateSize', 'maxEstateSize'], values, source, [minEstateSize, maxEstateSize]) } {...locationFilters} /> ) : null} - {landStatus === LANDFilters.ONLY_FOR_RENT && ( - - )} + {landStatus === LANDFilters.ONLY_FOR_RENT && } )} {shouldRenderFilter(AssetFilter.OnlySmart) ? ( - + ) : null} {shouldRenderFilter(AssetFilter.Rarity) ? ( ) : null} {shouldRenderFilter(AssetFilter.Status) && view === View.MARKET ? ( - + ) : null} {shouldRenderFilter(AssetFilter.Price) && (isOnSale || (!!status && status !== AssetStatusFilter.NOT_FOR_SALE)) && view !== View.ACCOUNT ? ( - handleRangeFilterChange(['minPrice', 'maxPrice'], value, source, [ - minPrice, - maxPrice - ]) - } + onChange={(value, source) => handleRangeFilterChange(['minPrice', 'maxPrice'], value, source, [minPrice, maxPrice])} minPrice={minPrice} maxPrice={maxPrice} defaultCollapsed={!!defaultCollapsed?.[AssetFilter.Price]} values={values} /> ) : null} - {shouldRenderFilter(AssetFilter.Creators) && - (!network || (network && network === Network.MATIC)) ? ( - + {shouldRenderFilter(AssetFilter.Creators) && (!network || (network && network === Network.MATIC)) ? ( + ) : null} {shouldRenderFilter(AssetFilter.Collection) ? ( ) : null} - {shouldRenderFilter(AssetFilter.Network) && - status !== AssetStatusFilter.ONLY_MINTING && ( - - )} + {shouldRenderFilter(AssetFilter.Network) && status !== AssetStatusFilter.ONLY_MINTING && ( + + )} {shouldRenderFilter(AssetFilter.BodyShape) && ( { +export const BodyShapeFilter = ({ bodyShapes, onChange, defaultCollapsed = false }: BodyShapeFilterProps) => { const isMobileOrTablet = useTabletAndBelowMediaQuery() const genderOptions = useMemo(() => { return [ @@ -59,14 +50,8 @@ export const BodyShapeFilter = ({ () => isMobileOrTablet ? (
- - {t('nft_filters.body_shapes.title')} - - - {value - ? t(getGenderFilterLabel(bodyShapes)) - : t('nft_filters.body_shapes.all_items')} - + {t('nft_filters.body_shapes.title')} + {value ? t(getGenderFilterLabel(bodyShapes)) : t('nft_filters.body_shapes.all_items')}
) : ( t('nft_filters.body_shapes.title') diff --git a/webapp/src/components/AssetFilters/CollectionFilter/CollectionFilter.tsx b/webapp/src/components/AssetFilters/CollectionFilter/CollectionFilter.tsx index 7e0e45b089..df431b97c4 100644 --- a/webapp/src/components/AssetFilters/CollectionFilter/CollectionFilter.tsx +++ b/webapp/src/components/AssetFilters/CollectionFilter/CollectionFilter.tsx @@ -14,12 +14,7 @@ type CollectionFilterProps = { defaultCollapsed?: boolean } -export const CollectionFilter = ({ - collection, - onlyOnSale, - onChange, - defaultCollapsed = false -}: CollectionFilterProps): JSX.Element => { +export const CollectionFilter = ({ collection, onlyOnSale, onChange, defaultCollapsed = false }: CollectionFilterProps): JSX.Element => { const isMobileOrTablet = useTabletAndBelowMediaQuery() const [savedCollectionInfo, setSavedCollectionInfo] = useState<{ text: string @@ -59,10 +54,7 @@ export const CollectionFilter = ({ const handleFetchOptionsFromValue = useCallback( async (value: string) => { try { - if ( - value === savedCollectionInfo?.value && - onlyOnSale === savedCollectionInfo.onlyOnSale - ) { + if (value === savedCollectionInfo?.value && onlyOnSale === savedCollectionInfo.onlyOnSale) { return { text: savedCollectionInfo.text, value: savedCollectionInfo.value @@ -111,13 +103,9 @@ export const CollectionFilter = ({ () => isMobileOrTablet ? (
- - {t('nft_filters.collection.title')} - + {t('nft_filters.collection.title')} - {savedCollectionInfo?.text - ? savedCollectionInfo.text - : t('nft_filters.collection.all_items')} + {savedCollectionInfo?.text ? savedCollectionInfo.text : t('nft_filters.collection.all_items')}
) : ( @@ -127,12 +115,7 @@ export const CollectionFilter = ({ ) return ( - + ({ @@ -19,8 +12,7 @@ const mapState = (state: RootState): MapStateProps => ({ }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onFetchCreators: (search: string) => - dispatch(fetchCreatorsAccountRequest(search)) + onFetchCreators: (search: string) => dispatch(fetchCreatorsAccountRequest(search)) }) export default connect(mapState, mapDispatch)(CreatorsFilter) diff --git a/webapp/src/components/AssetFilters/CreatorsFilter/CreatorsFilter.tsx b/webapp/src/components/AssetFilters/CreatorsFilter/CreatorsFilter.tsx index 29cefd0c2b..c527c84bce 100644 --- a/webapp/src/components/AssetFilters/CreatorsFilter/CreatorsFilter.tsx +++ b/webapp/src/components/AssetFilters/CreatorsFilter/CreatorsFilter.tsx @@ -26,9 +26,7 @@ export const CreatorsFilter = ({ const [searchTerm, setSearchTerm] = useState('') const [showSuggestions, setShowSuggestions] = useState(false) const [selectedCreators, setSelectedCreators] = useState( - creators?.length && fetchedCreators - ? fetchedCreators.filter(creator => creators.includes(creator.address)) - : [] + creators?.length && fetchedCreators ? fetchedCreators.filter(creator => creators.includes(creator.address)) : [] ) useEffect(() => { @@ -46,10 +44,7 @@ export const CreatorsFilter = ({ const handleCreatorsChange = useCallback( (value: string) => { const creator = fetchedCreators.find(creator => creator.address === value) - if ( - creator && - !selectedCreators.find(c => c.address === creator.address) - ) { + if (creator && !selectedCreators.find(c => c.address === creator.address)) { const newCreators = [...selectedCreators, creator] setSelectedCreators(newCreators) onChange(newCreators.map(creator => creator.address)) @@ -83,9 +78,7 @@ export const CreatorsFilter = ({ () => isMobileOrTablet ? (
- - {t('nft_filters.creators.title')} - + {t('nft_filters.creators.title')} {isFetchingNames ? ( @@ -107,9 +100,7 @@ export const CreatorsFilter = ({ const handleDeleteCreator = useCallback( (creatorAddressToDelete: string) => { - const updatedArray = selectedCreators.filter( - creator => creator.address !== creatorAddressToDelete - ) + const updatedArray = selectedCreators.filter(creator => creator.address !== creatorAddressToDelete) setSelectedCreators(updatedArray) onChange(updatedArray.map(creator => creator.address)) }, @@ -121,10 +112,7 @@ export const CreatorsFilter = ({ // tracks the click outside the main div and close suggestions if needed useEffect(() => { const handleClickOutside = (event: MouseEvent) => { - if ( - dropdownContainerRef.current && - !dropdownContainerRef.current.contains(event.target as Node) - ) { + if (dropdownContainerRef.current && !dropdownContainerRef.current.contains(event.target as Node)) { setShowSuggestions(false) } } @@ -157,16 +145,8 @@ export const CreatorsFilter = ({ }, [clearAndShowSuggestions]) return ( - -
+ +
) : searchTerm ? ( - + ) : ( )} {showSuggestions && !isLoading ? (
- {!searchTerm ? ( -
- {t('nft_filters.creators.dropdown_header')}{' '} -
- ) : null} - {searchTerm && !fetchedCreators.length ? ( -
{t('filters.no_results')}
- ) : null} + {!searchTerm ?
{t('nft_filters.creators.dropdown_header')}
: null} + {searchTerm && !fetchedCreators.length ?
{t('filters.no_results')}
: null} {fetchedCreators.map(creator => ( -
handleCreatorsChange(creator.address)} - > +
handleCreatorsChange(creator.address)}> {creator.name}
))} @@ -209,12 +175,7 @@ export const CreatorsFilter = ({
{selectedCreators.map(creator => ( - handleDeleteCreator(creator.address)} - /> + handleDeleteCreator(creator.address)} /> ))}
diff --git a/webapp/src/components/AssetFilters/CreatorsFilter/CreatorsFilter.types.ts b/webapp/src/components/AssetFilters/CreatorsFilter/CreatorsFilter.types.ts index 030d2a486d..3cd0168c5a 100644 --- a/webapp/src/components/AssetFilters/CreatorsFilter/CreatorsFilter.types.ts +++ b/webapp/src/components/AssetFilters/CreatorsFilter/CreatorsFilter.types.ts @@ -1,8 +1,5 @@ import { Dispatch } from 'redux' -import { - fetchCreatorsAccountRequest, - FetchCreatorsAccountRequestAction -} from '../../../modules/account/actions' +import { fetchCreatorsAccountRequest, FetchCreatorsAccountRequestAction } from '../../../modules/account/actions' import { CreatorAccount } from '../../../modules/account/types' export type Props = { diff --git a/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.spec.tsx b/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.spec.tsx index f488f9ddbd..1198cffe19 100644 --- a/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.spec.tsx +++ b/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.spec.tsx @@ -5,29 +5,19 @@ import { Props } from './EmoteAttributesFilter.types' function renderEmoteAttributesFilter(props: Partial = {}) { return renderWithProviders( - + ) } describe('when rendering the emote attributes filter', () => { it('should render sound filter', () => { const screen = renderEmoteAttributesFilter() - expect( - screen.getByText(t('nft_filters.emote_attributes.with_sound')) - ).toBeInTheDocument() + expect(screen.getByText(t('nft_filters.emote_attributes.with_sound'))).toBeInTheDocument() }) it("shouldn't render geometry filter", () => { const screen = renderEmoteAttributesFilter() - expect( - screen.getByText(t('nft_filters.emote_attributes.with_props')) - ).toBeInTheDocument() + expect(screen.getByText(t('nft_filters.emote_attributes.with_props'))).toBeInTheDocument() }) describe('when sound filter is clicked', () => { diff --git a/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.tsx b/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.tsx index 9883976334..755a434f82 100644 --- a/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.tsx +++ b/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.tsx @@ -7,18 +7,10 @@ import { Props } from './EmoteAttributesFilter.types' const WITH_SOUND_VALUE = 'sound' const WITH_GEOMETRY_VALUE = 'geometry' -export const EmoteAttributesFilter = ({ - emotePlayMode, - emoteHasSound, - emoteHasGeometry, - onChange, - defaultCollapsed = false -}: Props) => { +export const EmoteAttributesFilter = ({ emotePlayMode, emoteHasSound, emoteHasGeometry, onChange, defaultCollapsed = false }: Props) => { const isMobileOrTablet = useTabletAndBelowMediaQuery() const emotePlayModeOptions = useMemo(() => { - const options = Object.values(EmotePlayMode).filter( - value => typeof value === 'string' - ) as EmotePlayMode[] + const options = Object.values(EmotePlayMode).filter(value => typeof value === 'string') as EmotePlayMode[] return options.map(playMode => ({ value: playMode, text: t(`emote.play_mode.${playMode}`) @@ -69,9 +61,7 @@ export const EmoteAttributesFilter = ({ [emotePlayMode, onChange] ) - const areAllItemsSelected = - emotePlayMode?.length === emotePlayModeOptions.length || - !emotePlayMode?.length + const areAllItemsSelected = emotePlayMode?.length === emotePlayModeOptions.length || !emotePlayMode?.length const title = t('nft_filters.emote_attributes.title') const allTitle = t('nft_filters.emote_attributes.all_items') @@ -81,11 +71,7 @@ export const EmoteAttributesFilter = ({
{title} - {areAllItemsSelected - ? allTitle - : emotePlayMode - .map(mode => t(`emote.play_mode.${mode}`)) - .join(', ')} + {areAllItemsSelected ? allTitle : emotePlayMode.map(mode => t(`emote.play_mode.${mode}`)).join(', ')}
) : ( @@ -107,12 +93,7 @@ export const EmoteAttributesFilter = ({ onChange={handleEmoteAttributesChange} values={emoteAttributes || []} /> - + ) } diff --git a/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.types.ts b/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.types.ts index fd96e0644b..48b037cbd7 100644 --- a/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.types.ts +++ b/webapp/src/components/AssetFilters/EmoteAttributesFilter/EmoteAttributesFilter.types.ts @@ -4,10 +4,6 @@ export type Props = { emotePlayMode?: EmotePlayMode[] emoteHasSound?: boolean emoteHasGeometry?: boolean - onChange: (value: { - emotePlayMode?: EmotePlayMode[] - emoteHasSound?: boolean - emoteHasGeometry?: boolean - }) => void + onChange: (value: { emotePlayMode?: EmotePlayMode[]; emoteHasSound?: boolean; emoteHasGeometry?: boolean }) => void defaultCollapsed?: boolean } diff --git a/webapp/src/components/AssetFilters/EstateSizeFilter/EstateSizeFilter.tsx b/webapp/src/components/AssetFilters/EstateSizeFilter/EstateSizeFilter.tsx index 013d2ea90c..7c1934a678 100644 --- a/webapp/src/components/AssetFilters/EstateSizeFilter/EstateSizeFilter.tsx +++ b/webapp/src/components/AssetFilters/EstateSizeFilter/EstateSizeFilter.tsx @@ -27,12 +27,8 @@ export const EstateSizeFilter = ({ () => isMobileOrTablet ? (
- - {t('filters.estate_size.label')} - - - {getPriceLabel(minPrice, maxPrice, network)} - + {t('filters.estate_size.label')} + {getPriceLabel(minPrice, maxPrice, network)}
) : ( t('filters.estate_size.label') @@ -49,14 +45,7 @@ export const EstateSizeFilter = ({ minDistanceToPlaza: Number(minDistanceToPlaza) || undefined, maxDistanceToPlaza: Number(maxDistanceToPlaza) || undefined }), - [ - adjacentToRoad, - landStatus, - minDistanceToPlaza, - maxDistanceToPlaza, - maxPrice, - minPrice - ] + [adjacentToRoad, landStatus, minDistanceToPlaza, maxDistanceToPlaza, maxPrice, minPrice] ) const fetcher = useCallback(async () => { diff --git a/webapp/src/components/AssetFilters/LandStatusFilter/LandStatusFilter.tsx b/webapp/src/components/AssetFilters/LandStatusFilter/LandStatusFilter.tsx index cf65e2660e..17cc59e8dc 100644 --- a/webapp/src/components/AssetFilters/LandStatusFilter/LandStatusFilter.tsx +++ b/webapp/src/components/AssetFilters/LandStatusFilter/LandStatusFilter.tsx @@ -11,11 +11,7 @@ type LandStatusFilterProps = { defaultCollapsed?: boolean } -export const LandStatusFilter = ({ - landStatus, - onChange, - defaultCollapsed = false -}: LandStatusFilterProps): JSX.Element => { +export const LandStatusFilter = ({ landStatus, onChange, defaultCollapsed = false }: LandStatusFilterProps): JSX.Element => { const isMobileOrTablet = useTabletAndBelowMediaQuery() const landStatusFilterOptions = [ { @@ -44,9 +40,7 @@ export const LandStatusFilter = ({ isMobileOrTablet ? (
{t('filters.status')} - - {getLandLabel({ landStatus })} - + {getLandLabel({ landStatus })}
) : ( t('filters.status') diff --git a/webapp/src/components/AssetFilters/LocationFilter/LocationFilter.spec.tsx b/webapp/src/components/AssetFilters/LocationFilter/LocationFilter.spec.tsx index b25156100e..89fb791758 100644 --- a/webapp/src/components/AssetFilters/LocationFilter/LocationFilter.spec.tsx +++ b/webapp/src/components/AssetFilters/LocationFilter/LocationFilter.spec.tsx @@ -1,36 +1,20 @@ import { render } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - DISTANCE_TO_PLAZA_MAX, - DISTANCE_TO_PLAZA_MIN, - LocationFilter, - LocationFilterProps -} from './LocationFilter' +import { DISTANCE_TO_PLAZA_MAX, DISTANCE_TO_PLAZA_MIN, LocationFilter, LocationFilterProps } from './LocationFilter' function renderLocationFilter(props: Partial = {}) { - return render( - - ) + return render() } describe('LocationFilter', () => { test('should render adjacent to road toggle', () => { const { getByRole } = renderLocationFilter() - expect( - getByRole('checkbox', { name: t('nft_filters.adjacent_to_road') }) - ).toBeInTheDocument() + expect(getByRole('checkbox', { name: t('nft_filters.adjacent_to_road') })).toBeInTheDocument() }) test('should render near a plaza toggle', () => { const { getByRole } = renderLocationFilter() - expect( - getByRole('checkbox', { name: t('nft_filters.distance_to_plaza.title') }) - ).toBeInTheDocument() + expect(getByRole('checkbox', { name: t('nft_filters.distance_to_plaza.title') })).toBeInTheDocument() }) test('should call onAdjacentToRoadChange callback when toggle changes', async () => { @@ -50,10 +34,7 @@ describe('LocationFilter', () => { await userEvent.click(getByTestId('near-to-plaza-toggle')) const minAsString = DISTANCE_TO_PLAZA_MIN.toString() const maxAsString = DISTANCE_TO_PLAZA_MAX.toString() - expect(onDistanceToPlazaChangeMock).toHaveBeenCalledWith([ - minAsString, - maxAsString - ]) + expect(onDistanceToPlazaChangeMock).toHaveBeenCalledWith([minAsString, maxAsString]) }) test('should show distance slider when minDistanceToPlaza and maxDistanceToPlaza are defined', () => { diff --git a/webapp/src/components/AssetFilters/LocationFilter/LocationFilter.tsx b/webapp/src/components/AssetFilters/LocationFilter/LocationFilter.tsx index af08b85256..07b57e85d0 100644 --- a/webapp/src/components/AssetFilters/LocationFilter/LocationFilter.tsx +++ b/webapp/src/components/AssetFilters/LocationFilter/LocationFilter.tsx @@ -1,17 +1,11 @@ import { useCallback, useMemo } from 'react' -import { - Box, - CheckboxProps, - Checkbox, - useTabletAndBelowMediaQuery, - SliderField -} from 'decentraland-ui' +import { Box, CheckboxProps, Checkbox, useTabletAndBelowMediaQuery, SliderField } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import styles from './LocationFilter.module.css' import classNames from 'classnames' -export const DISTANCE_TO_PLAZA_MIN = 1; -export const DISTANCE_TO_PLAZA_MAX = 10; +export const DISTANCE_TO_PLAZA_MIN = 1 +export const DISTANCE_TO_PLAZA_MAX = 10 export type LocationFilterProps = { adjacentToRoad?: boolean @@ -48,7 +42,7 @@ export const LocationFilter = ({ const handleToggleDistanceFilter = useCallback( (_evt, props: CheckboxProps) => { - if (!!props.checked) { + if (props.checked) { onDistanceToPlazaChange([DISTANCE_TO_PLAZA_MIN.toString(), DISTANCE_TO_PLAZA_MAX.toString()]) } else { onDistanceToPlazaChange(['', '']) @@ -62,15 +56,13 @@ export const LocationFilter = ({ return t('nft_filters.all_locations') } - let locationTexts = [] + const locationTexts = [] if (adjacentToRoad) { locationTexts.push(t('nft_filters.adjacent_to_road')) } if (minDistanceToPlaza || maxDistanceToPlaza) { - locationTexts.push( - t('nft_filters.distance_to_plaza.title') - ) + locationTexts.push(t('nft_filters.distance_to_plaza.title')) } return locationTexts.join(', ') @@ -94,7 +86,7 @@ export const LocationFilter = ({ return ( @@ -122,16 +114,8 @@ export const LocationFilter = ({ max={DISTANCE_TO_PLAZA_MAX} onChange={handleDistanceToPlazaChange} step={1} - valueFrom={ - minDistanceToPlaza - ? Number.parseFloat(minDistanceToPlaza) - : undefined - } - valueTo={ - maxDistanceToPlaza - ? Number.parseFloat(maxDistanceToPlaza) - : undefined - } + valueFrom={minDistanceToPlaza ? Number.parseFloat(minDistanceToPlaza) : undefined} + valueTo={maxDistanceToPlaza ? Number.parseFloat(maxDistanceToPlaza) : undefined} range header="" label={t('nft_filters.distance_to_plaza.subtitle')} diff --git a/webapp/src/components/AssetFilters/MoreFilters/MoreFilters.spec.tsx b/webapp/src/components/AssetFilters/MoreFilters/MoreFilters.spec.tsx index 60d8206070..afecf7b8b6 100644 --- a/webapp/src/components/AssetFilters/MoreFilters/MoreFilters.spec.tsx +++ b/webapp/src/components/AssetFilters/MoreFilters/MoreFilters.spec.tsx @@ -8,22 +8,14 @@ jest.mock('decentraland-ui/dist/components/Media', () => ({ })) function renderMoreFilters(props: Partial = {}) { - return renderWithProviders( - - ) + return renderWithProviders() } describe('MoreFilters', () => { let useTabletAndBelowMediaQueryMock: jest.MockedFunction beforeEach(() => { - useTabletAndBelowMediaQueryMock = useTabletAndBelowMediaQuery as jest.MockedFunction< - typeof useTabletAndBelowMediaQuery - > + useTabletAndBelowMediaQueryMock = useTabletAndBelowMediaQuery as jest.MockedFunction }) describe('when the isOnSale filter is visible', () => { diff --git a/webapp/src/components/AssetFilters/MoreFilters/MoreFilters.tsx b/webapp/src/components/AssetFilters/MoreFilters/MoreFilters.tsx index 9782ebf0c9..9f6fca0f0d 100644 --- a/webapp/src/components/AssetFilters/MoreFilters/MoreFilters.tsx +++ b/webapp/src/components/AssetFilters/MoreFilters/MoreFilters.tsx @@ -1,10 +1,5 @@ import { useCallback, useMemo } from 'react' -import { - Box, - CheckboxProps, - Checkbox, - SmartWearableFilter -} from 'decentraland-ui' +import { Box, CheckboxProps, Checkbox, SmartWearableFilter } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { useTabletAndBelowMediaQuery } from 'decentraland-ui/dist/components/Media' import { NFTCategory } from '@dcl/schemas' @@ -40,9 +35,7 @@ export const MoreFilters = ({ const filterText = useMemo(() => { const values: string[] = [] - values.push( - isOnSale ? t('nft_filters.for_sale') : t('nft_filters.not_on_sale') - ) + values.push(isOnSale ? t('nft_filters.for_sale') : t('nft_filters.not_on_sale')) if (isOnlySmart && showOnlySmartFilter) { values.push(t('nft_filters.only_smart.selected')) } @@ -53,9 +46,7 @@ export const MoreFilters = ({ () => isMobileOrTablet ? (
- - {t('nft_filters.more_filters')} - + {t('nft_filters.more_filters')} {filterText}
) : ( @@ -65,27 +56,13 @@ export const MoreFilters = ({ ) return isOnSale !== undefined || showOnlySmartFilter ? ( - +
{isOnSale !== undefined ? ( - + ) : null} {showOnlySmartFilter && ( - + )}
diff --git a/webapp/src/components/AssetFilters/NetworkFilter/NetworkFilter.tsx b/webapp/src/components/AssetFilters/NetworkFilter/NetworkFilter.tsx index 0924bdd48b..2e5ca9fb7a 100644 --- a/webapp/src/components/AssetFilters/NetworkFilter/NetworkFilter.tsx +++ b/webapp/src/components/AssetFilters/NetworkFilter/NetworkFilter.tsx @@ -10,16 +10,10 @@ export type NetworkFilterProps = { defaultCollapsed?: boolean } -export const NetworkFilter = ({ - network, - onChange, - defaultCollapsed = false -}: NetworkFilterProps) => { +export const NetworkFilter = ({ network, onChange, defaultCollapsed = false }: NetworkFilterProps) => { const isMobileOrTablet = useTabletAndBelowMediaQuery() const networkOptions = useMemo(() => { - const options = [Network.ETHEREUM, Network.MATIC].filter( - value => typeof value === 'string' - ) as Network[] + const options = [Network.ETHEREUM, Network.MATIC].filter(value => typeof value === 'string') return [ { value: undefined, @@ -32,22 +26,14 @@ export const NetworkFilter = ({ ] }, []) - const handleChange = useCallback((_, { value }) => onChange(value), [ - onChange - ]) + const handleChange = useCallback((_, { value }) => onChange(value), [onChange]) const header = useMemo( () => isMobileOrTablet ? (
- - {t('nft_filters.network.title')} - - - {network - ? t(`networks.${network.toLowerCase()}`) - : t('nft_filters.network.all_items')} - + {t('nft_filters.network.title')} + {network ? t(`networks.${network.toLowerCase()}`) : t('nft_filters.network.all_items')}
) : ( t('nft_filters.network.title') @@ -56,12 +42,7 @@ export const NetworkFilter = ({ ) return ( - +
{networkOptions.map(option => ( { const { values = {} } = ownProps - const section = - 'section' in values ? (values.section as Section) : getSection(state) - const onlyOnSale = - 'onlyOnSale' in values ? values.onlyOnSale : getOnlyOnSale(state) + const section = 'section' in values ? (values.section as Section) : getSection(state) + const onlyOnSale = 'onlyOnSale' in values ? values.onlyOnSale : getOnlyOnSale(state) const onlyOnRent = getOnlyOnRent(state) let landStatus = LANDFilters.ALL_LAND @@ -46,43 +44,19 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { assetType: getAssetType(state), rarities: 'rarities' in values ? values.rarities || [] : getRarities(state), network: 'network' in values ? values.network : getNetwork(state), - bodyShapes: - 'wearableGenders' in values - ? values.wearableGenders - : getWearableGenders(state), + bodyShapes: 'wearableGenders' in values ? values.wearableGenders : getWearableGenders(state), isOnlySmart: getOnlySmart(state), landStatus, emotePlayMode: values.emotePlayMode || getEmotePlayMode(state), - collection: - 'contracts' in values ? values.contracts?.[0] : getContracts(state)[0], - minDistanceToPlaza: - 'minDistanceToPlaza' in values - ? values.minDistanceToPlaza - : getMinDistanceToPlaza(state), - maxDistanceToPlaza: - 'maxDistanceToPlaza' in values - ? values.maxDistanceToPlaza - : getMaxDistanceToPlaza(state), - adjacentToRoad: - 'adjacentToRoad' in values - ? values.adjacentToRoad - : getAdjacentToRoad(state), - minEstateSize: - 'minEstateSize' in values - ? values.minEstateSize || '' - : getMinEstateSize(state), - maxEstateSize: - 'maxEstateSize' in values - ? values.maxEstateSize || '' - : getMaxEstateSize(state), - rentalDays: - 'rentalDays' in values ? values.rentalDays : getRentalDays(state), - emoteHasGeometry: - 'emoteHasGeometry' in values - ? values.emoteHasGeometry - : getEmoteHasGeometry(state), - emoteHasSound: - 'emoteHasSound' in values ? values.emoteHasSound : getEmoteHasSound(state) + collection: 'contracts' in values ? values.contracts?.[0] : getContracts(state)[0], + minDistanceToPlaza: 'minDistanceToPlaza' in values ? values.minDistanceToPlaza : getMinDistanceToPlaza(state), + maxDistanceToPlaza: 'maxDistanceToPlaza' in values ? values.maxDistanceToPlaza : getMaxDistanceToPlaza(state), + adjacentToRoad: 'adjacentToRoad' in values ? values.adjacentToRoad : getAdjacentToRoad(state), + minEstateSize: 'minEstateSize' in values ? values.minEstateSize || '' : getMinEstateSize(state), + maxEstateSize: 'maxEstateSize' in values ? values.maxEstateSize || '' : getMaxEstateSize(state), + rentalDays: 'rentalDays' in values ? values.rentalDays : getRentalDays(state), + emoteHasGeometry: 'emoteHasGeometry' in values ? values.emoteHasGeometry : getEmoteHasGeometry(state), + emoteHasSound: 'emoteHasSound' in values ? values.emoteHasSound : getEmoteHasSound(state) } } diff --git a/webapp/src/components/AssetFilters/PriceFilter/PriceFilter.tsx b/webapp/src/components/AssetFilters/PriceFilter/PriceFilter.tsx index 8687bbb574..f5e77d3b0b 100644 --- a/webapp/src/components/AssetFilters/PriceFilter/PriceFilter.tsx +++ b/webapp/src/components/AssetFilters/PriceFilter/PriceFilter.tsx @@ -77,31 +77,15 @@ export const PriceFilter = ({ const rentalPriceFetchFilters = useCallback( () => ({ - category: (category as any) as RentalsListingsFilterByCategory, + category: category as any as RentalsListingsFilterByCategory, rentalDays, - minEstateSize: minEstateSize - ? Number.parseFloat(minEstateSize) - : undefined, - maxEstateSize: maxEstateSize - ? Number.parseFloat(maxEstateSize) - : undefined, - minDistanceToPlaza: minDistanceToPlaza - ? Number.parseFloat(minDistanceToPlaza) - : undefined, - maxDistanceToPlaza: maxDistanceToPlaza - ? Number.parseFloat(maxDistanceToPlaza) - : undefined, + minEstateSize: minEstateSize ? Number.parseFloat(minEstateSize) : undefined, + maxEstateSize: maxEstateSize ? Number.parseFloat(maxEstateSize) : undefined, + minDistanceToPlaza: minDistanceToPlaza ? Number.parseFloat(minDistanceToPlaza) : undefined, + maxDistanceToPlaza: maxDistanceToPlaza ? Number.parseFloat(maxDistanceToPlaza) : undefined, adjacentToRoad: adjacentToRoad || undefined }), - [ - category, - minEstateSize, - maxEstateSize, - minDistanceToPlaza, - maxDistanceToPlaza, - adjacentToRoad, - rentalDays - ] + [category, minEstateSize, maxEstateSize, minDistanceToPlaza, maxDistanceToPlaza, adjacentToRoad, rentalDays] ) const title = useMemo(() => { @@ -116,9 +100,7 @@ export const PriceFilter = ({ isMobileOrTablet ? (
{title} - - {getPriceLabel(minPrice, maxPrice, network)} - + {getPriceLabel(minPrice, maxPrice, network)}
) : ( title @@ -137,19 +119,17 @@ export const PriceFilter = ({ } else { data = await nftAPI.fetchPrices(priceFetchFilters) } - return Object.entries(data).reduce((acc, [key, value]) => { - acc[ethers.utils.formatEther(key)] = value - return acc - }, {} as Record) + return Object.entries(data).reduce( + (acc, [key, value]) => { + acc[ethers.utils.formatEther(key)] = value + return acc + }, + {} as Record + ) }, [priceFetchFilters, landStatus, rentalPriceFetchFilters]) return ( - + { let upperBound = WEARABLES_MAX_PRICE_ALLOWED @@ -44,10 +30,7 @@ export const getChartUpperBound = (section: string) => { } export const getPriceFiltersForSection = (section: Section): PriceFilters => { - const category = - section === Section.LAND - ? PriceFilterExtraOption.LAND - : getCategoryFromSection(section!) + const category = section === Section.LAND ? PriceFilterExtraOption.LAND : getCategoryFromSection(section) if (!category) { throw Error('Invalid section to fetch price') @@ -55,15 +38,9 @@ export const getPriceFiltersForSection = (section: Section): PriceFilters => { const isWearableHead = section === Section.WEARABLES_HEAD const isWearableAccessory = section === Section.WEARABLES_ACCESSORIES - const wearableCategory = - !isWearableAccessory && category === NFTCategory.WEARABLE - ? getSearchWearableCategory(section!) - : undefined + const wearableCategory = !isWearableAccessory && category === NFTCategory.WEARABLE ? getSearchWearableCategory(section) : undefined - const emoteCategory = - category === NFTCategory.EMOTE - ? getSearchEmoteCategory(section!) - : undefined + const emoteCategory = category === NFTCategory.EMOTE ? getSearchEmoteCategory(section) : undefined return { isWearableHead, diff --git a/webapp/src/components/AssetFilters/RentalPeriodFilter/RentalPeriodFilter.spec.tsx b/webapp/src/components/AssetFilters/RentalPeriodFilter/RentalPeriodFilter.spec.tsx index 13c1363d58..c74b12adc9 100644 --- a/webapp/src/components/AssetFilters/RentalPeriodFilter/RentalPeriodFilter.spec.tsx +++ b/webapp/src/components/AssetFilters/RentalPeriodFilter/RentalPeriodFilter.spec.tsx @@ -1,28 +1,18 @@ import { render } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { PeriodOption } from '../../../modules/rental/types' -import { - RentalPeriodFilter, - RentalPeriodFilterProps -} from './RentalPeriodFilter' +import { RentalPeriodFilter, RentalPeriodFilterProps } from './RentalPeriodFilter' -function renderRentalPeriodFilter( - props: Partial = {} -) { - return render( - - ) +function renderRentalPeriodFilter(props: Partial = {}) { + return render() } describe('RentalPeriodFilter', () => { - it.each(Object.values(PeriodOption))( - 'should render all rental days option for %s', - option => { - const { getByTestId } = renderRentalPeriodFilter() - expect(getByTestId(option)).toBeInTheDocument() - } - ) + it.each(Object.values(PeriodOption))('should render all rental days option for %s', option => { + const { getByTestId } = renderRentalPeriodFilter() + expect(getByTestId(option)).toBeInTheDocument() + }) - describe("when checkbox clicked", () => { + describe('when checkbox clicked', () => { it('should call onChange with the correct value', async () => { const onChangeMock = jest.fn() const { getByTestId } = renderRentalPeriodFilter({ diff --git a/webapp/src/components/AssetFilters/RentalPeriodFilter/RentalPeriodFilter.tsx b/webapp/src/components/AssetFilters/RentalPeriodFilter/RentalPeriodFilter.tsx index 9025745b89..c9c71a9905 100644 --- a/webapp/src/components/AssetFilters/RentalPeriodFilter/RentalPeriodFilter.tsx +++ b/webapp/src/components/AssetFilters/RentalPeriodFilter/RentalPeriodFilter.tsx @@ -12,11 +12,7 @@ export type RentalPeriodFilterProps = { defaultCollapsed?: boolean } -export const RentalPeriodFilter = ({ - onChange, - rentalDays = [], - defaultCollapsed = false -}: RentalPeriodFilterProps) => { +export const RentalPeriodFilter = ({ onChange, rentalDays = [], defaultCollapsed = false }: RentalPeriodFilterProps) => { const isMobileOrTablet = useTabletAndBelowMediaQuery() const handleRentalDaysChange = useCallback( @@ -24,23 +20,22 @@ export const RentalPeriodFilter = ({ if (checked) { onChange([...rentalDays, value]) } else { - onChange(rentalDays.filter((period) => period !== value )) + onChange(rentalDays.filter(period => period !== value)) } }, [rentalDays, onChange] ) - const allPeriodsSelected = useMemo(() => ( - rentalDays.length === 0 || rentalDays.length === Object.values(PeriodOption).length - ), [rentalDays.length]) + const allPeriodsSelected = useMemo( + () => rentalDays.length === 0 || rentalDays.length === Object.values(PeriodOption).length, + [rentalDays.length] + ) const header = useMemo( () => isMobileOrTablet ? (
- - {t('nft_filters.periods.title')} - + {t('nft_filters.periods.title')} {allPeriodsSelected ? t('nft_filters.periods.all_items') @@ -58,7 +53,7 @@ export const RentalPeriodFilter = ({ return ( diff --git a/webapp/src/components/AssetFilters/StatusFilter/StatusFilter.tsx b/webapp/src/components/AssetFilters/StatusFilter/StatusFilter.tsx index ee37248641..0fd9ad4e72 100644 --- a/webapp/src/components/AssetFilters/StatusFilter/StatusFilter.tsx +++ b/webapp/src/components/AssetFilters/StatusFilter/StatusFilter.tsx @@ -12,11 +12,7 @@ export type StatusFilterFilterProps = { defaultCollapsed?: boolean } -export const StatusFilter = ({ - status, - onChange, - defaultCollapsed = false -}: StatusFilterFilterProps) => { +export const StatusFilter = ({ status, onChange, defaultCollapsed = false }: StatusFilterFilterProps) => { const isMobileOrTablet = useTabletAndBelowMediaQuery() const statusOptions = useMemo( () => @@ -42,14 +38,8 @@ export const StatusFilter = ({ () => isMobileOrTablet ? (
- - {t('nft_filters.status.title')} - - - {status - ? t(`nft_filters.status.${status}`) - : t('nft_filters.status.on_sale')} - + {t('nft_filters.status.title')} + {status ? t(`nft_filters.status.${status}`) : t('nft_filters.status.on_sale')}
) : ( t('nft_filters.status.title') @@ -74,9 +64,7 @@ export const StatusFilter = ({ } diff --git a/webapp/src/components/AssetFilters/index.ts b/webapp/src/components/AssetFilters/index.ts index d77d54fb07..d465126cf9 100644 --- a/webapp/src/components/AssetFilters/index.ts +++ b/webapp/src/components/AssetFilters/index.ts @@ -1,3 +1,3 @@ -import AssetFilters from './AssetFilters.container' +import AssetFilters from './AssetFilters.container' -export { AssetFilters }; +export { AssetFilters } diff --git a/webapp/src/components/AssetImage/AssetImage.container.ts b/webapp/src/components/AssetImage/AssetImage.container.ts index 9c87600502..2894565ab2 100644 --- a/webapp/src/components/AssetImage/AssetImage.container.ts +++ b/webapp/src/components/AssetImage/AssetImage.container.ts @@ -4,15 +4,8 @@ import { connect } from 'react-redux' import { RootState } from '../../modules/reducer' import { getWallet } from '../../modules/wallet/selectors' import { getItem } from '../../modules/item/utils' -import { - getIsTryingOn, - getIsPlayingEmote, - getWearablePreviewController -} from '../../modules/ui/preview/selectors' -import { - setIsTryingOn, - setWearablePreviewController -} from '../../modules/ui/preview/actions' +import { getIsTryingOn, getIsPlayingEmote, getWearablePreviewController } from '../../modules/ui/preview/selectors' +import { setIsTryingOn, setWearablePreviewController } from '../../modules/ui/preview/actions' import { getData as getItems } from '../../modules/item/selectors' import { getData as getOrders } from '../../modules/order/selectors' import { isNFT } from '../../modules/asset/utils' @@ -21,17 +14,8 @@ import { fetchItemRequest } from '../../modules/item/actions' import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { Asset } from '../../modules/asset/types' import { fetchSmartWearableVideoHashRequest } from '../../modules/asset/actions' -import { - getVideoHash, - getAssetData, - isFetchingVideoHash -} from '../../modules/asset/selectors' -import { - MapStateProps, - MapDispatchProps, - MapDispatch, - OwnProps -} from './AssetImage.types' +import { getVideoHash, getAssetData, isFetchingVideoHash } from '../../modules/asset/selectors' +import { MapStateProps, MapDispatchProps, MapDispatch, OwnProps } from './AssetImage.types' import AssetImage from './AssetImage' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { @@ -40,17 +24,11 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { const assetId = ownProps.asset.id let avatar: Avatar | undefined = undefined const items = getItems(state) - const item = getItem( - ownProps.asset.contractAddress, - ownProps.asset.itemId, - items - ) + const item = getItem(ownProps.asset.contractAddress, ownProps.asset.itemId, items) const orders = getOrders(state) const order = isNFT(ownProps.asset) ? Object.values(orders).find( - order => - order.contractAddress === ownProps.asset.contractAddress && - order.tokenId === (ownProps.asset as NFT).tokenId + order => order.contractAddress === ownProps.asset.contractAddress && order.tokenId === (ownProps.asset as NFT).tokenId ) : undefined @@ -75,14 +53,10 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ onSetIsTryingOn: value => dispatch(setIsTryingOn(value)), - onSetWearablePreviewController: controller => - dispatch(setWearablePreviewController(controller)), - onPlaySmartWearableVideoShowcase: (videoHash: string) => - dispatch(openModal('SmartWearableVideoShowcaseModal', { videoHash })), - onFetchItem: (contractAddress: string, tokenId: string) => - dispatch(fetchItemRequest(contractAddress, tokenId)), - onFetchSmartWearableVideoHash: (asset: Asset) => - dispatch(fetchSmartWearableVideoHashRequest(asset)) + onSetWearablePreviewController: controller => dispatch(setWearablePreviewController(controller)), + onPlaySmartWearableVideoShowcase: (videoHash: string) => dispatch(openModal('SmartWearableVideoShowcaseModal', { videoHash })), + onFetchItem: (contractAddress: string, tokenId: string) => dispatch(fetchItemRequest(contractAddress, tokenId)), + onFetchSmartWearableVideoHash: (asset: Asset) => dispatch(fetchSmartWearableVideoHashRequest(asset)) }) export default connect(mapState, mapDispatch)(AssetImage) diff --git a/webapp/src/components/AssetImage/AssetImage.tsx b/webapp/src/components/AssetImage/AssetImage.tsx index 009dc1dada..eb9b07e08a 100644 --- a/webapp/src/components/AssetImage/AssetImage.tsx +++ b/webapp/src/components/AssetImage/AssetImage.tsx @@ -2,25 +2,10 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react' import { LazyLoadImage } from 'react-lazy-load-image-component' import classNames from 'classnames' import { Env } from '@dcl/ui-env' -import { - BodyShape, - NFTCategory, - Network, - PreviewEmote, - PreviewType, - Rarity -} from '@dcl/schemas' +import { BodyShape, NFTCategory, Network, PreviewEmote, PreviewType, Rarity } from '@dcl/schemas' import { T, t } from 'decentraland-dapps/dist/modules/translation/utils' import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics/utils' -import { - Badge, - Button, - Center, - Icon, - Loader, - Popup, - WearablePreview -} from 'decentraland-ui' +import { Badge, Button, Center, Icon, Loader, Popup, WearablePreview } from 'decentraland-ui' import { getAssetImage, getAssetName, isNFT } from '../../modules/asset/utils' import { getSelection, getCenter } from '../../modules/nft/estate/utils' import * as events from '../../utils/events' @@ -38,22 +23,20 @@ import { EnsImage } from './EnsImage' import './AssetImage.css' // 1x1 transparent pixel -const PIXEL = - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiYAAAAAkAAxkR2eQAAAAASUVORK5CYII=' +const PIXEL = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiYAAAAAkAAxkR2eQAAAAASUVORK5CYII=' const DEFAULT_COLOR = 'bbbbbb' type Color = { r: number; g: number; b: number } type WrappedColor = { color: Color } -const valueToHex = (value: number) => - ('00' + Math.min(255, (value * 255) | 0).toString(16)).slice(-2) +const valueToHex = (value: number) => ('00' + Math.min(255, (value * 255) | 0).toString(16)).slice(-2) const colorToHex = (color: Color): string => { if (isColor(color)) { return valueToHex(color.r) + valueToHex(color.g) + valueToHex(color.b) } - const maybeWrapped = (color as unknown) as Partial + const maybeWrapped = color as unknown as Partial if (isWrapped(maybeWrapped)) { return colorToHex(maybeWrapped.color!) } @@ -62,12 +45,9 @@ const colorToHex = (color: Color): string => { } // sometimes the color come from the catalyst wrapped in an extra "color": { } object -const isWrapped = (maybeWrapped: Partial) => - maybeWrapped.color && isColor(maybeWrapped.color) +const isWrapped = (maybeWrapped: Partial) => maybeWrapped.color && isColor(maybeWrapped.color) const isColor = (maybeColor: Partial) => - typeof maybeColor.r === 'number' && - typeof maybeColor.g === 'number' && - typeof maybeColor.b === 'number' + typeof maybeColor.r === 'number' && typeof maybeColor.g === 'number' && typeof maybeColor.b === 'number' const AssetImage = (props: Props) => { const { @@ -96,9 +76,7 @@ const AssetImage = (props: Props) => { } = props const { parcel, estate, wearable, emote, ens } = asset.data - const [isLoadingWearablePreview, setIsLoadingWearablePreview] = useState( - isDraggable - ) + const [isLoadingWearablePreview, setIsLoadingWearablePreview] = useState(isDraggable) const [wearablePreviewError, setWearablePreviewError] = useState(false) const [isSoundEnabled, setIsSoundEnabled] = useState(false) const [hasSound, setHasSound] = useState(undefined) @@ -106,9 +84,7 @@ const AssetImage = (props: Props) => { setIsLoadingWearablePreview(false) setWearablePreviewError(false) if (asset.category === NFTCategory.EMOTE && !wearableController) { - onSetWearablePreviewController( - WearablePreview.createController('wearable-preview') - ) + onSetWearablePreviewController(WearablePreview.createController('wearable-preview')) } }, [asset.category, wearableController, onSetWearablePreviewController]) @@ -133,12 +109,7 @@ const AssetImage = (props: Props) => { async (action: ControlOptionAction) => { const ZOOM_DELTA = 0.03 - if ( - ControlOptionAction.PLAY_SMART_WEARABLE_VIDEO_SHOWCASE && - asset && - asset.data.wearable?.isSmart && - videoHash - ) { + if (ControlOptionAction.PLAY_SMART_WEARABLE_VIDEO_SHOWCASE && asset && asset.data.wearable?.isSmart && videoHash) { return onPlaySmartWearableVideoShowcase(videoHash) } @@ -177,44 +148,23 @@ const AssetImage = (props: Props) => { ) useEffect(() => { - if ( - asset.category === NFTCategory.EMOTE && - wearableController && - isDraggable && - !isLoadingWearablePreview - ) { + if (asset.category === NFTCategory.EMOTE && wearableController && isDraggable && !isLoadingWearablePreview) { wearableController.emote?.hasSound().then(sound => { setHasSound(sound) }) } - }, [ - wearableController, - asset.category, - isDraggable, - hasSound, - isLoadingWearablePreview - ]) + }, [wearableController, asset.category, isDraggable, hasSound, isLoadingWearablePreview]) - const estateSelection = useMemo(() => (estate ? getSelection(estate) : []), [ - estate - ]) + const estateSelection = useMemo(() => (estate ? getSelection(estate) : []), [estate]) const [isTracked, setIsTracked] = useState(false) const isAvailableForMint = - isNFT(asset) && - (item?.category === NFTCategory.WEARABLE || - item?.category === NFTCategory.EMOTE) && - item.available > 0 && - item.isOnSale + isNFT(asset) && (item?.category === NFTCategory.WEARABLE || item?.category === NFTCategory.EMOTE) && item.available > 0 && item.isOnSale // pick a random emote const previewEmote = useMemo(() => { - const poses = [ - PreviewEmote.FASHION, - PreviewEmote.FASHION_2, - PreviewEmote.FASHION_3 - ] + const poses = [PreviewEmote.FASHION, PreviewEmote.FASHION_2, PreviewEmote.FASHION_3] return isTryingOn ? poses[(Math.random() * poses.length) | 0] : undefined }, [isTryingOn]) @@ -229,14 +179,7 @@ const AssetImage = (props: Props) => { setIsTracked(true) } - if ( - isPreview && - asset.data.wearable?.isSmart && - asset.urn && - videoHash === undefined && - !isLoadingVideoHash && - !hasFetchedVideoHash - ) { + if (isPreview && asset.data.wearable?.isSmart && asset.urn && videoHash === undefined && !isLoadingVideoHash && !hasFetchedVideoHash) { onFetchSmartWearableVideoHash(asset) } @@ -264,9 +207,7 @@ const AssetImage = (props: Props) => { showForRent={false} showOnSale={false} showOwned={false} - lastUpdated={ - showUpdatedDateWarning ? new Date(asset.updatedAt) : undefined - } + lastUpdated={showUpdatedDateWarning ? new Date(asset.updatedAt) : undefined} > {hasBadges && children} @@ -288,9 +229,7 @@ const AssetImage = (props: Props) => { showOnSale={false} showOwned={false} isEstate - lastUpdated={ - showUpdatedDateWarning ? new Date(asset.updatedAt) : undefined - } + lastUpdated={showUpdatedDateWarning ? new Date(asset.updatedAt) : undefined} > {hasBadges && children} @@ -315,26 +254,18 @@ const AssetImage = (props: Props) => { hair = colorToHex(avatar.avatar.hair.color) } - const hasRepresentation = avatar - ? wearable && - wearable.bodyShapes.some(shape => - avatar.avatar.bodyShape.includes(shape) - ) - : true + const hasRepresentation = avatar ? wearable && wearable.bodyShapes.some(shape => avatar.avatar.bodyShape.includes(shape)) : true const missingBodyShape = hasRepresentation || !avatar ? null : avatar.avatar.bodyShape.includes(BodyShape.MALE) - ? t('wearable_preview.missing_representation_error.male') - : t('wearable_preview.missing_representation_error.female') + ? t('wearable_preview.missing_representation_error.male') + : t('wearable_preview.missing_representation_error.female') const isTryingOnEnabled = isTryingOn && hasRepresentation - const ethereumUrn = - !isNFT(asset) && asset.network === Network.ETHEREUM - ? getEthereumItemUrn(asset) - : '' + const ethereumUrn = !isNFT(asset) && asset.network === Network.ETHEREUM ? getEthereumItemUrn(asset) : '' const wearablePreviewProps = !isNFT(asset) && asset.network === Network.ETHEREUM @@ -354,13 +285,7 @@ const AssetImage = (props: Props) => { wearablePreview = ( <> { ) : null} {isLoadingWearablePreview ? (
- +
) : asset.data.wearable?.isSmart && asset.urn && videoHash ? (
) : null} {missingBodyShape} }} - /> - } + content={{missingBodyShape} }} />} trigger={
{ trigger={ @@ -520,20 +410,10 @@ const AssetImage = (props: Props) => { {hasSound && (
@@ -46,25 +32,16 @@ const AvailableForMintPopup = ({ {t('best_buying_option.minting.price').toUpperCase()}  - } + trigger={info} on="hover" />
- + {formatWeiToAssetCard(price)}
@@ -78,12 +55,9 @@ const AvailableForMintPopup = ({
- - {t('best_buying_option.minting.stock').toUpperCase()} - + {t('best_buying_option.minting.stock').toUpperCase()} - {stock.toLocaleString()}/{' '} - {Rarity.getMaxSupply(rarity).toLocaleString()} + {stock.toLocaleString()}/ {Rarity.getMaxSupply(rarity).toLocaleString()}
diff --git a/webapp/src/components/AssetImage/EnsImage/EnsImage.tsx b/webapp/src/components/AssetImage/EnsImage/EnsImage.tsx index d51af2431b..63cfd63c55 100644 --- a/webapp/src/components/AssetImage/EnsImage/EnsImage.tsx +++ b/webapp/src/components/AssetImage/EnsImage/EnsImage.tsx @@ -7,16 +7,7 @@ export const EnsImage = ({ name, className, onlyLogo }: Props) => { useEffect(() => { const resizeListener = () => { - requestAnimationFrame( - () => - ref.current && - drawImage( - ref.current, - name, - ref.current.offsetWidth, - ref.current.offsetHeight - ) - ) + requestAnimationFrame(() => ref.current && drawImage(ref.current, name, ref.current.offsetWidth, ref.current.offsetHeight)) } window.addEventListener('resize', resizeListener) return () => { @@ -25,24 +16,8 @@ export const EnsImage = ({ name, className, onlyLogo }: Props) => { }, [name]) useEffect(() => { - requestAnimationFrame( - () => - ref.current && - drawImage( - ref.current, - name, - ref.current.offsetWidth, - ref.current.offsetHeight, - onlyLogo - ) - ) + requestAnimationFrame(() => ref.current && drawImage(ref.current, name, ref.current.offsetWidth, ref.current.offsetHeight, onlyLogo)) }, [name]) - return ( - - ) + return } diff --git a/webapp/src/components/AssetImage/EnsImage/utils.ts b/webapp/src/components/AssetImage/EnsImage/utils.ts index 919ef178bb..a4b2cb5256 100644 --- a/webapp/src/components/AssetImage/EnsImage/utils.ts +++ b/webapp/src/components/AssetImage/EnsImage/utils.ts @@ -9,19 +9,14 @@ const gradientColors = [ { min: 11, max: 15, colors: ['#FF9EB1', '#FF2D55'] } // Red gradient for name length 11-15 (max length) ] -const fontFile = new FontFace( - 'Inter', - 'url(https://fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7W0Q5nw.woff2)' -) +const fontFile = new FontFace('Inter', 'url(https://fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7W0Q5nw.woff2)') document.fonts.add(fontFile) const promiseOfLoadedFont = fontFile.load() function getGradientColors(nameLength: number) { // Find the gradient that matches the length of the name - const matchingGradient = gradientColors.find( - gradient => nameLength >= gradient.min && nameLength <= gradient.max - ) + const matchingGradient = gradientColors.find(gradient => nameLength >= gradient.min && nameLength <= gradient.max) // Return the colors if found, or default colors if no match return matchingGradient ? matchingGradient.colors : ['#000000', '#FFFFFF'] // Default to black and white if no match } @@ -34,13 +29,7 @@ const promiseOfALogo = new Promise((resolve, reject) => { img.onerror = reject }) -export async function drawImage( - canvas: HTMLCanvasElement, - name: string, - width: number, - height: number, - onlyLogo?: boolean -): Promise { +export async function drawImage(canvas: HTMLCanvasElement, name: string, width: number, height: number, onlyLogo?: boolean): Promise { // Create a canvas and get the context const ctx = canvas.getContext('2d') @@ -116,19 +105,11 @@ export async function drawImage( const logoWidth = onlyLogo ? width * 0.8 : 40 // LOGO WIDTH const logoHeight = onlyLogo ? height * 0.8 : 40 // LOGO HEIGHT const logoXPosition = width / 2 - logoWidth / 2 // Center the logo - const logoYPosition = onlyLogo - ? height / 2 - logoHeight / 2 - : nameYPosition - logoHeight - 25 // Adjust space above the name + const logoYPosition = onlyLogo ? height / 2 - logoHeight / 2 : nameYPosition - logoHeight - 25 // Adjust space above the name if (!onlyLogo) { ctx.globalAlpha = 0.5 } - ctx.drawImage( - await promiseOfALogo, - logoXPosition, - logoYPosition, - logoWidth, - logoHeight - ) + ctx.drawImage(await promiseOfALogo, logoXPosition, logoYPosition, logoWidth, logoHeight) ctx.globalAlpha = 1 } catch (e) { console.error('Error loading logo', e) diff --git a/webapp/src/components/AssetImage/utils.tsx b/webapp/src/components/AssetImage/utils.tsx index 6874ab3c4d..b19507e9d0 100644 --- a/webapp/src/components/AssetImage/utils.tsx +++ b/webapp/src/components/AssetImage/utils.tsx @@ -1,7 +1,7 @@ import { Item } from '@dcl/schemas' export const getEthereumItemUrn = (item: Item) => { - let regex = /urn:decentraland:ethereum:collections-v1:[^/]+/ + const regex = /urn:decentraland:ethereum:collections-v1:[^/]+/ const match = item.thumbnail.match(regex) return match ? match[0] : '' } diff --git a/webapp/src/components/AssetList/AssetList.container.ts b/webapp/src/components/AssetList/AssetList.container.ts index c36d02bb0b..ca7a87f0d2 100644 --- a/webapp/src/components/AssetList/AssetList.container.ts +++ b/webapp/src/components/AssetList/AssetList.container.ts @@ -35,8 +35,7 @@ const mapState = (state: RootState): MapStateProps => { search: getSearch(state), isLoading: assetType === AssetType.ITEM - ? isLoadingType(getLoadingItems(state), FETCH_ITEMS_REQUEST) || - isLoadingFavoritedItems(state) + ? isLoadingType(getLoadingItems(state), FETCH_ITEMS_REQUEST) || isLoadingFavoritedItems(state) : isLoadingType(getLoadingNFTs(state), FETCH_NFTS_REQUEST), hasFiltersEnabled: hasFiltersEnabled(state), visitedLocations: getVisitedLocations(state) diff --git a/webapp/src/components/AssetList/AssetList.tsx b/webapp/src/components/AssetList/AssetList.tsx index 164c89093c..4157ac631f 100644 --- a/webapp/src/components/AssetList/AssetList.tsx +++ b/webapp/src/components/AssetList/AssetList.tsx @@ -36,10 +36,7 @@ const AssetList = (props: Props) => { useEffect(() => { if (visitedLocations.length > 1) { const [currentLocation, previousLocation] = visitedLocations - const elementId = getLastVisitedElementId( - currentLocation?.pathname, - previousLocation?.pathname - ) + const elementId = getLastVisitedElementId(currentLocation?.pathname, previousLocation?.pathname) if (elementId) { document.getElementById(elementId)?.scrollIntoView() } @@ -57,8 +54,7 @@ const AssetList = (props: Props) => { ) const maxQuerySize = getMaxQuerySize(vendor) - const hasMorePages = - (assets.length !== count || count === maxQuerySize) && page <= MAX_PAGE + const hasMorePages = (assets.length !== count || count === maxQuerySize) && page <= MAX_PAGE const emptyStateTranslationString = useMemo(() => { if (assets.length > 0) { @@ -68,10 +64,7 @@ const AssetList = (props: Props) => { return 'nft_list.empty' } - const isEmoteOrWearableSection = [ - NFTCategory.EMOTE, - NFTCategory.WEARABLE - ].includes(getCategoryFromSection(section)!) + const isEmoteOrWearableSection = [NFTCategory.EMOTE, NFTCategory.WEARABLE].includes(getCategoryFromSection(section)!) if (location.pathname === locations.campaign()) { return 'nft_list.empty_campaign' @@ -98,8 +91,7 @@ const AssetList = (props: Props) => { id={`${emptyStateTranslationString}.action`} values={{ search, - 'if-filters': (chunks: string) => - hasFiltersEnabled ? chunks : '', + 'if-filters': (chunks: string) => (hasFiltersEnabled ? chunks : ''), clearFilters: (chunks: string) => (
) : null} - {assets.length > 0 ? ( - {renderAssetCards()} - ) : null} - + {assets.length > 0 ? {renderAssetCards()} : null} + {shouldRenderEmptyState ? renderEmptyState() : null}
diff --git a/webapp/src/components/AssetList/AssetList.types.ts b/webapp/src/components/AssetList/AssetList.types.ts index c1ab2ec426..16a2754587 100644 --- a/webapp/src/components/AssetList/AssetList.types.ts +++ b/webapp/src/components/AssetList/AssetList.types.ts @@ -1,12 +1,7 @@ import { Dispatch } from 'redux' import { RouterLocation } from 'connected-react-router' import { VendorName } from '../../modules/vendor/types' -import { - browse, - BrowseAction, - clearFilters, - ClearFiltersAction -} from '../../modules/routing/actions' +import { browse, BrowseAction, clearFilters, ClearFiltersAction } from '../../modules/routing/actions' import { Section } from '../../modules/vendor/routing/types' import { Asset, AssetType } from '../../modules/asset/types' @@ -28,16 +23,7 @@ export type Props = { export type MapStateProps = Pick< Props, - | 'vendor' - | 'section' - | 'assets' - | 'page' - | 'count' - | 'isLoading' - | 'assetType' - | 'search' - | 'hasFiltersEnabled' - | 'visitedLocations' + 'vendor' | 'section' | 'assets' | 'page' | 'count' | 'isLoading' | 'assetType' | 'search' | 'hasFiltersEnabled' | 'visitedLocations' > export type MapDispatchProps = Pick export type MapDispatch = Dispatch diff --git a/webapp/src/components/AssetList/utils.spec.ts b/webapp/src/components/AssetList/utils.spec.ts index f84ca134ae..c4994f45a1 100644 --- a/webapp/src/components/AssetList/utils.spec.ts +++ b/webapp/src/components/AssetList/utils.spec.ts @@ -5,31 +5,19 @@ describe('#getLastVisitedElementId', () => { describe('when current location is marketplace browse section', () => { describe('and previous location is nft detail page', () => { it('should return nft element id', () => { - expect( - utils.getLastVisitedElementId( - locations.browse(), - locations.nft('contract', 'tokenId') - ) - ).toEqual('contract-tokenId') + expect(utils.getLastVisitedElementId(locations.browse(), locations.nft('contract', 'tokenId'))).toEqual('contract-tokenId') }) }) describe('and previous location is item detail page', () => { it('should return nft element id', () => { - expect( - utils.getLastVisitedElementId( - locations.browse(), - locations.item('contract', 'itemId') - ) - ).toEqual('contract-itemId') + expect(utils.getLastVisitedElementId(locations.browse(), locations.item('contract', 'itemId'))).toEqual('contract-itemId') }) }) describe('and previous location is any other page', () => { it('should return null', () => { - expect( - utils.getLastVisitedElementId(locations.browse(), locations.account()) - ).toEqual(null) + expect(utils.getLastVisitedElementId(locations.browse(), locations.account())).toEqual(null) }) }) }) @@ -37,20 +25,13 @@ describe('#getLastVisitedElementId', () => { describe('when current location is lands section', () => { describe('and previous location is nft detail page', () => { it('should return nft element id', () => { - expect( - utils.getLastVisitedElementId( - locations.lands(), - locations.nft('contract', 'tokenId') - ) - ).toEqual('contract-tokenId') + expect(utils.getLastVisitedElementId(locations.lands(), locations.nft('contract', 'tokenId'))).toEqual('contract-tokenId') }) }) describe('and previous location is any other page', () => { it('should return null', () => { - expect( - utils.getLastVisitedElementId(locations.browse(), locations.account()) - ).toEqual(null) + expect(utils.getLastVisitedElementId(locations.browse(), locations.account())).toEqual(null) }) }) }) diff --git a/webapp/src/components/AssetList/utils.ts b/webapp/src/components/AssetList/utils.ts index ebcf196d53..b1f01693ff 100644 --- a/webapp/src/components/AssetList/utils.ts +++ b/webapp/src/components/AssetList/utils.ts @@ -5,19 +5,16 @@ function matchAppRoute>(path: string, route: st return matchPath(path, { path: route, strict: true, exact: true }) } -export function getLastVisitedElementId( - currentLocation: string, - lastVisitedLocation: string -) { +export function getLastVisitedElementId(currentLocation: string, lastVisitedLocation: string) { const matchLands = matchAppRoute(currentLocation, locations.lands()) const matchCollectibles = matchAppRoute(currentLocation, locations.browse()) - const previousMatchNfts = matchAppRoute<{contractAddress: string; tokenId: string}>(lastVisitedLocation, locations.nft()) + const previousMatchNfts = matchAppRoute<{ contractAddress: string; tokenId: string }>(lastVisitedLocation, locations.nft()) if ((matchLands && previousMatchNfts) || (matchCollectibles && previousMatchNfts)) { return `${previousMatchNfts.params.contractAddress}-${previousMatchNfts.params.tokenId}` } - const previousMatchItems = matchAppRoute<{ contractAddress: string; itemId: string }>(lastVisitedLocation, locations.item()) + const previousMatchItems = matchAppRoute<{ contractAddress: string; itemId: string }>(lastVisitedLocation, locations.item()) if (matchCollectibles && previousMatchItems) { return `${previousMatchItems.params.contractAddress}-${previousMatchItems.params.itemId}` diff --git a/webapp/src/components/AssetPage/Actions/Actions.tsx b/webapp/src/components/AssetPage/Actions/Actions.tsx index 1e00706ff0..e87e9c6038 100644 --- a/webapp/src/components/AssetPage/Actions/Actions.tsx +++ b/webapp/src/components/AssetPage/Actions/Actions.tsx @@ -22,48 +22,27 @@ const Actions = (props: Props) => { const isENSName = !!data.ens const canSell = orderService.canSell() - const canBid = - !isOwner && - isBiddable && - (!wallet || !bids.some(bid => bid.bidder === wallet.address)) + const canBid = !isOwner && isBiddable && (!wallet || !bids.some(bid => bid.bidder === wallet.address)) return (
{order ? ( isOwner && canSell ? ( <> - - ) : !isOwner ? ( <> - {canBid ? ( - ) : null} @@ -74,12 +53,7 @@ const Actions = (props: Props) => { ) ) : isOwner && canSell ? ( - ) : isOwner && !canSell ? ( @@ -87,21 +61,12 @@ const Actions = (props: Props) => { {t('asset_page.actions.sell')} ) : canBid ? ( - ) : null} {isOwner && !order ? ( - ) : null} diff --git a/webapp/src/components/AssetPage/Actions/Actions.types.ts b/webapp/src/components/AssetPage/Actions/Actions.types.ts index 19ab39feea..0456334359 100644 --- a/webapp/src/components/AssetPage/Actions/Actions.types.ts +++ b/webapp/src/components/AssetPage/Actions/Actions.types.ts @@ -2,10 +2,7 @@ import { Bid, Order } from '@dcl/schemas' import { Wallet } from 'decentraland-dapps/dist/modules//wallet/types' import { Dispatch } from 'redux' import { NFT } from '../../../modules/nft/types' -import { - OpenModalAction, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' +import { OpenModalAction, openModal } from 'decentraland-dapps/dist/modules/modal/actions' export type Props = { wallet: Wallet | null diff --git a/webapp/src/components/AssetPage/AssetPage.tsx b/webapp/src/components/AssetPage/AssetPage.tsx index fc21641fc6..197887ac72 100644 --- a/webapp/src/components/AssetPage/AssetPage.tsx +++ b/webapp/src/components/AssetPage/AssetPage.tsx @@ -17,13 +17,10 @@ import { EmoteDetail } from './EmoteDetail' import './AssetPage.css' const AssetPage = ({ type }: Props) => { - const renderItemDetail = useCallback( - (item: Item) => , - [] - ) + const renderItemDetail = useCallback((item: Item) => , []) return ( <> - + @@ -40,20 +37,8 @@ const AssetPage = ({ type }: Props) => { }, { ens: nft => , - estate: nft => ( - - ), - parcel: nft => ( - - ), + estate: nft => , + parcel: nft => , wearable: nft => , emote: nft => }, diff --git a/webapp/src/components/AssetPage/BaseDetail/BaseDetail.tsx b/webapp/src/components/AssetPage/BaseDetail/BaseDetail.tsx index ca0f738c99..cb930ea297 100644 --- a/webapp/src/components/AssetPage/BaseDetail/BaseDetail.tsx +++ b/webapp/src/components/AssetPage/BaseDetail/BaseDetail.tsx @@ -10,18 +10,7 @@ import Title from '../Title' import { Props } from './BaseDetail.types' import './BaseDetail.css' -const BaseDetail = ({ - asset, - rental, - assetImage, - badges, - left, - box, - below, - className, - actions, - showDetails -}: Props) => { +const BaseDetail = ({ asset, rental, assetImage, badges, left, box, below, className, actions, showDetails }: Props) => { return (
@@ -36,9 +25,7 @@ const BaseDetail = ({ {left}
- {showDetails && actions ? ( -
{actions}
- ) : null} + {showDetails && actions ?
{actions}
: null} {showDetails ? ( ) : ( diff --git a/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.spec.tsx b/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.spec.tsx index 7c47a3bb3b..2da8c22611 100644 --- a/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.spec.tsx +++ b/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.spec.tsx @@ -1,13 +1,4 @@ -import { - Bid, - ChainId, - Item, - ListingStatus, - Network, - NFTCategory, - Order, - Rarity -} from '@dcl/schemas' +import { Bid, ChainId, Item, ListingStatus, Network, NFTCategory, Order, Rarity } from '@dcl/schemas' import React, { RefObject } from 'react' import { t } from 'decentraland-dapps/dist/modules/translation/utils' @@ -31,7 +22,7 @@ jest.mock('decentraland-dapps/dist/containers', () => { const dateNowFn = Date.now describe('Best Buying Option', () => { - let asset: Item = { + const asset: Item = { contractAddress: '0xaddress', urn: '', itemId: '1', @@ -62,7 +53,7 @@ describe('Best Buying Option', () => { firstListedAt: null } - let orderResponse: Order = { + const orderResponse: Order = { id: '1', marketplaceAddress: '0xmarketplace', contractAddress: '0xaddress', @@ -79,7 +70,7 @@ describe('Best Buying Option', () => { issuedId: '1' } - let bid: Bid = { + const bid: Bid = { id: '1', bidAddress: '0xbid', bidder: 'bidder', @@ -106,20 +97,14 @@ describe('Best Buying Option', () => { describe('Mint option', () => { it('should render the mint option', async () => { const reference: RefObject = React.createRef() - const { getByText } = renderWithProviders( - - ) + const { getByText } = renderWithProviders() - expect( - getByText(t('best_buying_option.minting.title')) - ).toBeInTheDocument() + expect(getByText(t('best_buying_option.minting.title'))).toBeInTheDocument() }) it('should render the mint price', async () => { const reference: RefObject = React.createRef() - const { getByText } = renderWithProviders( - - ) + const { getByText } = renderWithProviders() const price = formatWeiMANA(asset.price) @@ -143,9 +128,7 @@ describe('Best Buying Option', () => { it('should render the listing option', async () => { const reference: RefObject = React.createRef() - const { findByTestId, findByText } = renderWithProviders( - - ) + const { findByTestId, findByText } = renderWithProviders() await findByTestId('best-buying-option-container') @@ -158,9 +141,7 @@ describe('Best Buying Option', () => { it('should render the listing price and de highest offer for that NFT', async () => { const reference: RefObject = React.createRef() - const { getByText, findByTestId } = renderWithProviders( - - ) + const { getByText, findByTestId } = renderWithProviders() await findByTestId('best-buying-option-container') @@ -188,9 +169,7 @@ describe('Best Buying Option', () => { it('should render no options available', async () => { const reference: RefObject = React.createRef() - const { getByText, findByTestId } = renderWithProviders( - - ) + const { getByText, findByTestId } = renderWithProviders() await findByTestId('best-buying-option-container') diff --git a/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.tsx b/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.tsx index d868e9ba70..07ca512469 100644 --- a/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.tsx +++ b/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.tsx @@ -1,17 +1,7 @@ import React, { useEffect, useState } from 'react' import { Link, useHistory, useLocation } from 'react-router-dom' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - Bid, - BidSortBy, - Item, - ListingStatus, - Network, - Order, - OrderFilters, - OrderSortBy, - Rarity -} from '@dcl/schemas' +import { Bid, BidSortBy, Item, ListingStatus, Network, Order, OrderFilters, OrderSortBy, Rarity } from '@dcl/schemas' import { Button, Popup } from 'decentraland-ui' import { getExpirationDateLabel } from '../../../lib/date' import { locations } from '../../../modules/routing/locations' @@ -47,8 +37,7 @@ const BestBuyingOption = ({ asset, tableRef }: Props) => { pathname: location.pathname, search: `selectedTableTab=owners` }) - tableRef && - tableRef.current?.scrollIntoView({ block: 'center', behavior: 'smooth' }) + tableRef && tableRef.current?.scrollIntoView({ block: 'center', behavior: 'smooth' }) } useEffect(() => { @@ -57,7 +46,7 @@ const BestBuyingOption = ({ asset, tableRef }: Props) => { setBuyOption(BuyOptions.MINT) setIsLoading(false) } else if (!listing) { - let params: OrderFilters = { + const params: OrderFilters = { contractAddress: asset.contractAddress, first: 1, skip: 0, @@ -78,13 +67,7 @@ const BestBuyingOption = ({ asset, tableRef }: Props) => { setBuyOption(BuyOptions.BUY_LISTING) setListing({ order: response.data[0], total: response.total }) bidAPI - .fetchByNFT( - asset.contractAddress, - response.data[0].tokenId, - ListingStatus.OPEN, - BidSortBy.MOST_EXPENSIVE, - '1' - ) + .fetchByNFT(asset.contractAddress, response.data[0].tokenId, ListingStatus.OPEN, BidSortBy.MOST_EXPENSIVE, '1') .then(response => { setIsLoading(false) setMostExpensiveBid(response.data[0]) @@ -130,13 +113,7 @@ const BestBuyingOption = ({ asset, tableRef }: Props) => { - } + trigger={info} on="hover" /> @@ -151,24 +128,13 @@ const BestBuyingOption = ({ asset, tableRef }: Props) => { : t('best_buying_option.minting.ethereum_mana') } position="top center" - trigger={ - info - } + trigger={info} on="hover" />
- + {formatWeiToAssetCard(asset.price)}
@@ -182,43 +148,26 @@ const BestBuyingOption = ({ asset, tableRef }: Props) => {
- - {t('best_buying_option.minting.stock').toUpperCase()} - + {t('best_buying_option.minting.stock').toUpperCase()} - {asset.available.toLocaleString()}/{' '} - {Rarity.getMaxSupply(asset.rarity).toLocaleString()} + {asset.available.toLocaleString()}/ {Rarity.getMaxSupply(asset.rarity).toLocaleString()}
- +
- ) : buyOption === BuyOptions.BUY_LISTING && - asset && - listing && - !getIsOrderExpired(listing.order.expiresAt) ? ( + ) : buyOption === BuyOptions.BUY_LISTING && asset && listing && !getIsOrderExpired(listing.order.expiresAt) ? (
{t('best_buying_option.buy_listing.title')}:   - {t('best_buying_option.buy_listing.issue_number')}  # - {listing.order.issuedId} + {t('best_buying_option.buy_listing.issue_number')}  #{listing.order.issuedId}
- - {t('best_buying_option.minting.price').toUpperCase()} - + {t('best_buying_option.minting.price').toUpperCase()}
- + {formatWeiToAssetCard(listing.order.price)}
@@ -233,21 +182,12 @@ const BestBuyingOption = ({ asset, tableRef }: Props) => {
- - {t( - 'best_buying_option.buy_listing.highest_offer' - ).toUpperCase()} - + {t('best_buying_option.buy_listing.highest_offer').toUpperCase()}
{mostExpensiveBid ? ( <>
- + {formatWeiToAssetCard(mostExpensiveBid.price)}
@@ -259,9 +199,7 @@ const BestBuyingOption = ({ asset, tableRef }: Props) => {
) : ( - - {t('best_buying_option.buy_listing.no_offer')} - + {t('best_buying_option.buy_listing.no_offer')} )}
@@ -272,40 +210,23 @@ const BestBuyingOption = ({ asset, tableRef }: Props) => { tokenId={listing.order.tokenId} buyWithCardClassName={styles.buyWithCardClassName} /> - clock   - {getExpirationDateLabel( - listing.order.expiresAt * - (isLegacyOrder(listing.order) ? 1 : 1000) - )} - . + {getExpirationDateLabel(listing.order.expiresAt * (isLegacyOrder(listing.order) ? 1 : 1000))}.
) : (
- {t('best_buying_option.empty.title')} + {t('best_buying_option.empty.title')}
- - {t('best_buying_option.empty.title')} - + {t('best_buying_option.empty.title')} {t('best_buying_option.empty.you_can')} - + {t('best_buying_option.empty.check_the_current_owners')} diff --git a/webapp/src/components/AssetPage/BidList/BidList.tsx b/webapp/src/components/AssetPage/BidList/BidList.tsx index ae43c2a1eb..9351d0563c 100644 --- a/webapp/src/components/AssetPage/BidList/BidList.tsx +++ b/webapp/src/components/AssetPage/BidList/BidList.tsx @@ -11,12 +11,7 @@ const BidList = (props: Props) => { // this is because when you change from one nft detail to another you would still see the previous nft bids const filteredBids = useMemo( - () => - bids.filter( - bid => - bid.contractAddress === nft.contractAddress && - bid.tokenId === nft.tokenId - ), + () => bids.filter(bid => bid.contractAddress === nft.contractAddress && bid.tokenId === nft.tokenId), [nft, bids] ) diff --git a/webapp/src/components/AssetPage/BidList/BidList.types.ts b/webapp/src/components/AssetPage/BidList/BidList.types.ts index fa59defc1a..0b8206aaae 100644 --- a/webapp/src/components/AssetPage/BidList/BidList.types.ts +++ b/webapp/src/components/AssetPage/BidList/BidList.types.ts @@ -1,10 +1,7 @@ import { Dispatch } from 'redux' import { Bid } from '@dcl/schemas' import { NFT } from '../../../modules/nft/types' -import { - fetchBidsByNFTRequest, - FetchBidsByNFTRequestAction -} from '../../../modules/bid/actions' +import { fetchBidsByNFTRequest, FetchBidsByNFTRequestAction } from '../../../modules/bid/actions' export type Props = { nft: NFT diff --git a/webapp/src/components/AssetPage/BidsTable/BidsTable.container.ts b/webapp/src/components/AssetPage/BidsTable/BidsTable.container.ts index 4a304e83a7..ab957e49e6 100644 --- a/webapp/src/components/AssetPage/BidsTable/BidsTable.container.ts +++ b/webapp/src/components/AssetPage/BidsTable/BidsTable.container.ts @@ -3,10 +3,7 @@ import { getLoading } from 'decentraland-dapps/dist/modules/wallet/selectors' import { connect } from 'react-redux' import { RootState } from '../../../modules/reducer' import { getAddress } from '../../../modules/wallet/selectors' -import { - ACCEPT_BID_REQUEST, - acceptBidRequest -} from '../../../modules/bid/actions' +import { ACCEPT_BID_REQUEST, acceptBidRequest } from '../../../modules/bid/actions' import { MapDispatch, MapDispatchProps, MapStateProps } from './BidsTable.types' import BidsTable from './BidsTable' diff --git a/webapp/src/components/AssetPage/BidsTable/BidsTable.tsx b/webapp/src/components/AssetPage/BidsTable/BidsTable.tsx index ac74b0c6a5..8de44dc18c 100644 --- a/webapp/src/components/AssetPage/BidsTable/BidsTable.tsx +++ b/webapp/src/components/AssetPage/BidsTable/BidsTable.tsx @@ -64,14 +64,7 @@ const BidsTable = (props: Props) => { if (nft) { setIsLoading(true) bidAPI - .fetchByNFT( - nft.contractAddress, - nft.tokenId, - null, - sortBy, - ROWS_PER_PAGE.toString(), - ((page - 1) * ROWS_PER_PAGE).toString() - ) + .fetchByNFT(nft.contractAddress, nft.tokenId, null, sortBy, ROWS_PER_PAGE.toString(), ((page - 1) * ROWS_PER_PAGE).toString()) .then(response => { if (cancel) return setTotal(response.total) @@ -145,16 +138,11 @@ const BidsTable = (props: Props) => { } onConfirm={() => { - showConfirmationModal.bid && - onAccept(showConfirmationModal.bid) + showConfirmationModal.bid && onAccept(showConfirmationModal.bid) }} - valueToConfirm={ethers.utils.formatEther( - showConfirmationModal.bid.price - )} + valueToConfirm={ethers.utils.formatEther(showConfirmationModal.bid.price)} network={nft.network} - onCancel={() => - setShowConfirmationModal({ display: false, bid: null }) - } + onCancel={() => setShowConfirmationModal({ display: false, bid: null })} loading={isAcceptingBid} disabled={isAcceptingBid} /> diff --git a/webapp/src/components/AssetPage/BidsTable/utils.tsx b/webapp/src/components/AssetPage/BidsTable/utils.tsx index 1753c957c5..1ecccc9aed 100644 --- a/webapp/src/components/AssetPage/BidsTable/utils.tsx +++ b/webapp/src/components/AssetPage/BidsTable/utils.tsx @@ -16,22 +16,14 @@ export const formatDataToTable = ( ): DataTableType[] => { return bids.reduce((accumulator: DataTableType[], bid: Bid) => { const value: DataTableType = { - [t('offers_table.from')]: ( - - ), + [t('offers_table.from')]: , ...(!isMobile && { [t('offers_table.published_date')]: getDateAndMonthName(bid.createdAt) }), ...(!isMobile && { - [t('offers_table.expiration_date')]: formatDistanceToNow( - +bid.expiresAt, - { - addSuffix: true - } - ) + [t('offers_table.expiration_date')]: formatDistanceToNow(+bid.expiresAt, { + addSuffix: true + }) }), [t('listings_table.offer')]: (
@@ -45,11 +37,7 @@ export const formatDataToTable = ( {')'}
{address === bid.seller ? ( - ) : null} diff --git a/webapp/src/components/AssetPage/BuyNFTBox/BuyNFTBox.tsx b/webapp/src/components/AssetPage/BuyNFTBox/BuyNFTBox.tsx index 22848e8d4d..b66ce2d5dc 100644 --- a/webapp/src/components/AssetPage/BuyNFTBox/BuyNFTBox.tsx +++ b/webapp/src/components/AssetPage/BuyNFTBox/BuyNFTBox.tsx @@ -10,11 +10,7 @@ import makeOffer from '../../../images/makeOffer.png' import { locations } from '../../../modules/routing/locations' import { bidAPI } from '../../../modules/vendor/decentraland' import { AssetType } from '../../../modules/asset/types' -import { - getIsLegacyOrderExpired, - getIsOrderExpired, - isLegacyOrder -} from '../../../lib/orders' +import { getIsLegacyOrderExpired, getIsOrderExpired, isLegacyOrder } from '../../../lib/orders' import { ManaToFiat } from '../../ManaToFiat' import { formatWeiToAssetCard } from '../../AssetCard/utils' import { BuyNFTButtons } from '../SaleActionBox/BuyNFTButtons' @@ -31,15 +27,7 @@ const BuyNFTBox = ({ nft, address, order, wallet }: Props) => { let cancel = false if (!isOwner && nft) { bidAPI - .fetchByNFT( - nft.contractAddress, - nft.tokenId, - null, - undefined, - FIRST, - undefined, - address - ) + .fetchByNFT(nft.contractAddress, nft.tokenId, null, undefined, FIRST, undefined, address) .then(response => { if (response.total === 0 && !cancel) setCanBid(true) }) @@ -67,17 +55,10 @@ const BuyNFTBox = ({ nft, address, order, wallet }: Props) => {
- - {t('best_buying_option.minting.price').toUpperCase()} - + {t('best_buying_option.minting.price').toUpperCase()}
- + {formatWeiToAssetCard(order.price)}
@@ -92,12 +73,8 @@ const BuyNFTBox = ({ nft, address, order, wallet }: Props) => {
- - {t('best_buying_option.buy_listing.issue_number').toUpperCase()} - -
- #{order.issuedId} -
+ {t('best_buying_option.buy_listing.issue_number').toUpperCase()} +
#{order.issuedId}
{isOwner ? ( @@ -105,10 +82,7 @@ const BuyNFTBox = ({ nft, address, order, wallet }: Props) => { {isLegacyOrder(order) ? (
- +
{getIsLegacyOrderExpired(order.expiresAt) @@ -119,62 +93,33 @@ const BuyNFTBox = ({ nft, address, order, wallet }: Props) => {
) : null} - {!isLegacyOrder(order) || - (isLegacyOrder(order) && - !getIsLegacyOrderExpired(order.expiresAt)) ? ( + {!isLegacyOrder(order) || (isLegacyOrder(order) && !getIsLegacyOrderExpired(order.expiresAt)) ? ( ) : null} {isLegacyOrder(order) ? ( - ) : ( - )} ) : !isOrderExpired ? ( - + ) : null} {canBid && !isOwner && ( - @@ -193,21 +138,11 @@ const BuyNFTBox = ({ nft, address, order, wallet }: Props) => { if (!nft) return null return (
- {!order ? ( - ) : null} @@ -217,53 +152,31 @@ const BuyNFTBox = ({ nft, address, order, wallet }: Props) => { return (
- {!!order + {order ? renderHasListing() : isOwner - ? renderOwnerAndNoListingOptions() - : nft && ( -
-
-
- - {t('best_buying_option.minting.price').toUpperCase()} - -
- {t('asset_card.not_for_sale')} + ? renderOwnerAndNoListingOptions() + : nft && ( +
+
+
+ {t('best_buying_option.minting.price').toUpperCase()} +
{t('asset_card.not_for_sale')}
-
-
- - {t( - 'best_buying_option.buy_listing.issue_number' - ).toUpperCase()} - -
- #{nft.issuedId} +
+ {t('best_buying_option.buy_listing.issue_number').toUpperCase()} +
#{nft.issuedId}
+ {!isOwner && canBid && ( + + )}
- {!isOwner && canBid && ( - - )} -
- )} + )}
) } diff --git a/webapp/src/components/AssetPage/CategoryBadge/CategoryBadge.tsx b/webapp/src/components/AssetPage/CategoryBadge/CategoryBadge.tsx index 21217bd615..24b1f60ba1 100644 --- a/webapp/src/components/AssetPage/CategoryBadge/CategoryBadge.tsx +++ b/webapp/src/components/AssetPage/CategoryBadge/CategoryBadge.tsx @@ -8,9 +8,7 @@ import { BrowseOptions } from '../../../modules/routing/types' import { Props } from './CategoryBadge.types' const CategoryBadge = ({ category, assetType }: Props) => { - const isEmote = Object.values(EmoteCategory).includes( - category as EmoteCategory - ) + const isEmote = Object.values(EmoteCategory).includes(category as EmoteCategory) const section = getSearchSection(category) const href = useMemo(() => { @@ -25,19 +23,11 @@ const CategoryBadge = ({ category, assetType }: Props) => { // TODO: we have to handle these types of errors and report them somewhere useEffect(() => { if (!section) { - throw new Error( - `Invalid ${isEmote ? 'emote' : 'wearable'} category ${category}` - ) + throw new Error(`Invalid ${isEmote ? 'emote' : 'wearable'} category ${category}`) } }, [section, category, isEmote]) - return ( - - ) + return } export default React.memo(CategoryBadge) diff --git a/webapp/src/components/AssetPage/Collection/Collection.tsx b/webapp/src/components/AssetPage/Collection/Collection.tsx index 37a1c55ec3..1688b72b89 100644 --- a/webapp/src/components/AssetPage/Collection/Collection.tsx +++ b/webapp/src/components/AssetPage/Collection/Collection.tsx @@ -27,9 +27,7 @@ const Collection = (props: Props) => { let name = collection.name if (asset.network === Network.ETHEREUM) { const networkContracts = contracts[network] - const contract = networkContracts.find( - contract => contract.address === asset.contractAddress - ) + const contract = networkContracts.find(contract => contract.address === asset.contractAddress) name = contract?.name || name } diff --git a/webapp/src/components/AssetPage/Description/Description.tsx b/webapp/src/components/AssetPage/Description/Description.tsx index a7199a955c..8441a27e78 100644 --- a/webapp/src/components/AssetPage/Description/Description.tsx +++ b/webapp/src/components/AssetPage/Description/Description.tsx @@ -15,20 +15,11 @@ const Description = (props: Props) => {
{t('asset_page.description')}
- {text - ? hasMoreLines && !showMore - ? `${text.substring(0, MAX_LENGTH)}...` - : text - : t('asset_page.no_description')} + {text ? (hasMoreLines && !showMore ? `${text.substring(0, MAX_LENGTH)}...` : text) : t('asset_page.no_description')}
{hasMoreLines ? ( - setShowMore(prevState => !prevState)} - className={styles.readMore} - > - {showMore - ? t('asset_page.read_less').toLocaleUpperCase() - : t('asset_page.read_more').toLocaleUpperCase()} + setShowMore(prevState => !prevState)} className={styles.readMore}> + {showMore ? t('asset_page.read_less').toLocaleUpperCase() : t('asset_page.read_more').toLocaleUpperCase()} ) : null}
diff --git a/webapp/src/components/AssetPage/EmoteDetail/EmoteDetail.tsx b/webapp/src/components/AssetPage/EmoteDetail/EmoteDetail.tsx index 7f48836149..9da57c5018 100644 --- a/webapp/src/components/AssetPage/EmoteDetail/EmoteDetail.tsx +++ b/webapp/src/components/AssetPage/EmoteDetail/EmoteDetail.tsx @@ -90,31 +90,15 @@ const EmoteDetail = ({ nft }: Props) => {
<div className={styles.badges}> - <RarityBadge - rarity={emote.rarity} - assetType={AssetType.NFT} - category={NFTCategory.EMOTE} - /> + <RarityBadge rarity={emote.rarity} assetType={AssetType.NFT} category={NFTCategory.EMOTE} /> <IconBadge icon={loop ? 'play-loop' : 'play-once'} text={t(`emote.play_mode.${loop ? 'loop' : 'simple'}`)} href={emoteBadgeHref} /> <CampaignBadge contract={nft.contractAddress} /> - {emote.hasSound && ( - <IconBadge - icon="sound" - text={t('emote.sound')} - href={emoteSoundHref} - /> - )} - {emote.hasGeometry && ( - <IconBadge - icon="props" - text={t('emote.props')} - href={emoteGeometryHref} - /> - )} + {emote.hasSound && <IconBadge icon="sound" text={t('emote.sound')} href={emoteSoundHref} />} + {emote.hasGeometry && <IconBadge icon="props" text={t('emote.props')} href={emoteGeometryHref} />} </div> </div> <Description text={emote.description} /> diff --git a/webapp/src/components/AssetPage/EstateDetail/EstateDetail.tsx b/webapp/src/components/AssetPage/EstateDetail/EstateDetail.tsx index b86129a928..3b88a72c98 100644 --- a/webapp/src/components/AssetPage/EstateDetail/EstateDetail.tsx +++ b/webapp/src/components/AssetPage/EstateDetail/EstateDetail.tsx @@ -49,9 +49,7 @@ const EstateDetail = ({ nft, order, rental }: Props) => { /> {estate.size === 0 && ( <div className="dissolved-wrapper"> - <div className="dissolved-notice"> - {t('estate_detail.dissolved')} - </div> + <div className="dissolved-notice">{t('estate_detail.dissolved')}</div> </div> )} </> @@ -82,12 +80,7 @@ const EstateDetail = ({ nft, order, rental }: Props) => { below={ <> <BidList nft={nft} /> - {estate.size > 0 && ( - <ParcelCoordinates - parcelCoordinates={nft.data.estate?.parcels || []} - total={nft.data.estate?.size || 0} - /> - )} + {estate.size > 0 && <ParcelCoordinates parcelCoordinates={nft.data.estate?.parcels || []} total={nft.data.estate?.size || 0} />} <TransactionHistory asset={nft} /> <RentalHistory asset={nft} /> </> diff --git a/webapp/src/components/AssetPage/EstateDetail/ParcelCoordinates/ParcelCoordinates.tsx b/webapp/src/components/AssetPage/EstateDetail/ParcelCoordinates/ParcelCoordinates.tsx index 598d04fd8b..f611f92e98 100644 --- a/webapp/src/components/AssetPage/EstateDetail/ParcelCoordinates/ParcelCoordinates.tsx +++ b/webapp/src/components/AssetPage/EstateDetail/ParcelCoordinates/ParcelCoordinates.tsx @@ -19,15 +19,8 @@ const ParcelCoordinates = (props: Props) => { <Collapsible collapsedHeight={35}> <Row className={styles.coordinates}> {parcelCoordinates.map((parcel, index) => ( - <Link - key={index} - to={locations.parcel(parcel.x.toString(), parcel.y.toString())} - > - <Coordinate - className={styles.coordinate} - x={parcel.x} - y={parcel.y} - /> + <Link key={index} to={locations.parcel(parcel.x.toString(), parcel.y.toString())}> + <Coordinate className={styles.coordinate} x={parcel.x} y={parcel.y} /> </Link> ))} {parcelCoordinates.length < total ? ( diff --git a/webapp/src/components/AssetPage/Expiration/Expiration.tsx b/webapp/src/components/AssetPage/Expiration/Expiration.tsx index 3c3e9e4fba..3743eea863 100644 --- a/webapp/src/components/AssetPage/Expiration/Expiration.tsx +++ b/webapp/src/components/AssetPage/Expiration/Expiration.tsx @@ -22,12 +22,9 @@ const Expiration = ({ order }: Props) => { <div className={styles.container}> <Icon name="clock outline" /> {t('asset_page.expires')}{' '} - {formatDistanceToNow( - order.expiresAt * (isLegacyOrder(order) ? 1 : 1000), - { - addSuffix: true - } - )} + {formatDistanceToNow(order.expiresAt * (isLegacyOrder(order) ? 1 : 1000), { + addSuffix: true + })} </div> ) } diff --git a/webapp/src/components/AssetPage/Expiration/Expiration.types.ts b/webapp/src/components/AssetPage/Expiration/Expiration.types.ts index da6b2c223a..d04bd0d710 100644 --- a/webapp/src/components/AssetPage/Expiration/Expiration.types.ts +++ b/webapp/src/components/AssetPage/Expiration/Expiration.types.ts @@ -1,4 +1,4 @@ -import { Order } from "@dcl/schemas" +import { Order } from '@dcl/schemas' export type Props = { order?: Order diff --git a/webapp/src/components/AssetPage/Highlight/Highlight.tsx b/webapp/src/components/AssetPage/Highlight/Highlight.tsx index d9a5c824cb..873ec48034 100644 --- a/webapp/src/components/AssetPage/Highlight/Highlight.tsx +++ b/webapp/src/components/AssetPage/Highlight/Highlight.tsx @@ -17,9 +17,7 @@ const Highlight = (props: Props) => { <Column align="left">{icon}</Column> <Column align="right"> <div className="name">{name}</div> - {description ? ( - <div className="description">{description}</div> - ) : null} + {description ? <div className="description">{description}</div> : null} </Column> </Row> </Column> diff --git a/webapp/src/components/AssetPage/IconBadge/IconBadge.tsx b/webapp/src/components/AssetPage/IconBadge/IconBadge.tsx index 67de95bf6b..ce3837bb3e 100644 --- a/webapp/src/components/AssetPage/IconBadge/IconBadge.tsx +++ b/webapp/src/components/AssetPage/IconBadge/IconBadge.tsx @@ -4,22 +4,11 @@ import classNames from 'classnames' import { Props } from './IconBadge.types' import './IconBadge.css' -const IconBadge = ({ - icon, - text, - onClick, - href, - className, - children -}: Props) => { +const IconBadge = ({ icon, text, onClick, href, className, children }: Props) => { const childrenInt = React.useMemo( () => ( <> - {children ? ( - <span className="custom-icon">{children}</span> - ) : ( - <span className={classNames(icon && 'icon', icon)} /> - )} + {children ? <span className="custom-icon">{children}</span> : <span className={classNames(icon && 'icon', icon)} />} <span className="text">{text}</span> </> ), @@ -27,11 +16,7 @@ const IconBadge = ({ ) return href ? ( - <Link - className={classNames('IconBadge', className)} - onClick={onClick} - to={href} - > + <Link className={classNames('IconBadge', className)} onClick={onClick} to={href}> {childrenInt} </Link> ) : ( diff --git a/webapp/src/components/AssetPage/ItemDetail/ItemDetail.tsx b/webapp/src/components/AssetPage/ItemDetail/ItemDetail.tsx index 39cae3dba2..6543f868a3 100644 --- a/webapp/src/components/AssetPage/ItemDetail/ItemDetail.tsx +++ b/webapp/src/components/AssetPage/ItemDetail/ItemDetail.tsx @@ -36,9 +36,7 @@ const ItemDetail = ({ item }: Props) => { let hasGeometry = false const tableRef = useRef<HTMLDivElement>(null) - const requiredPermissions = useSelector((state: RootState) => - getRequiredPermissions(state, item.id) - ) + const requiredPermissions = useSelector((state: RootState) => getRequiredPermissions(state, item.id)) switch (item.category) { case NFTCategory.WEARABLE: @@ -95,19 +93,10 @@ const ItemDetail = ({ item }: Props) => { <div> <Title asset={item} /> <div className={styles.badges}> - <RarityBadge - rarity={item.rarity} - assetType={AssetType.ITEM} - category={NFTCategory.WEARABLE} - size="small" - /> + <RarityBadge rarity={item.rarity} assetType={AssetType.ITEM} category={NFTCategory.WEARABLE} size="small" /> {category && ( <CategoryBadge - category={ - item.data.emote - ? item.data.emote.category - : item.data.wearable!.category - } + category={item.data.emote ? item.data.emote.category : item.data.wearable!.category} assetType={AssetType.ITEM} /> )} @@ -118,35 +107,16 @@ const ItemDetail = ({ item }: Props) => { href={emoteBadgeHref} /> )} - {hasSound && ( - <IconBadge - icon="sound" - text={t('emote.sound')} - href={emoteSoundHref} - /> - )} - {hasGeometry && ( - <IconBadge - icon="props" - text={t('emote.props')} - href={emoteGeometryHref} - /> - )} + {hasSound && <IconBadge icon="sound" text={t('emote.sound')} href={emoteSoundHref} />} + {hasGeometry && <IconBadge icon="props" text={t('emote.props')} href={emoteGeometryHref} />} {bodyShapes.length > 0 && !item.data.emote && ( <GenderBadge bodyShapes={bodyShapes} assetType={AssetType.ITEM} - section={ - item.category === NFTCategory.WEARABLE - ? Section.WEARABLES - : Section.EMOTES - } + section={item.category === NFTCategory.WEARABLE ? Section.WEARABLES : Section.EMOTES} /> )} - {item.category === NFTCategory.WEARABLE && - item.data.wearable!.isSmart && ( - <SmartBadge assetType={AssetType.ITEM} /> - )} + {item.category === NFTCategory.WEARABLE && item.data.wearable!.isSmart && <SmartBadge assetType={AssetType.ITEM} />} <CampaignBadge contract={item.contractAddress} /> </div> @@ -164,9 +134,7 @@ const ItemDetail = ({ item }: Props) => { {item.network === Network.MATIC ? <Owner asset={item} /> : null} <Collection asset={item} /> </div> - {item.data.wearable?.isSmart && ( - <RequiredPermissions asset={item} /> - )} + {item.data.wearable?.isSmart && <RequiredPermissions asset={item} />} <BestBuyingOption asset={item} tableRef={tableRef} /> </div> </div> diff --git a/webapp/src/components/AssetPage/JumpIn/JumpIn.tsx b/webapp/src/components/AssetPage/JumpIn/JumpIn.tsx index b9894e5f75..c1f427b0ac 100644 --- a/webapp/src/components/AssetPage/JumpIn/JumpIn.tsx +++ b/webapp/src/components/AssetPage/JumpIn/JumpIn.tsx @@ -12,11 +12,7 @@ const JumpIn = (props: Props) => { return ( <Badge className={classNames([styles.JumpIn, className])} color="#ff2d55"> - <a - href={buildExplorerUrl(x, y)} - target="_blank" - rel="noopener noreferrer" - > + <a href={buildExplorerUrl(x, y)} target="_blank" rel="noopener noreferrer"> {!compact ? t('asset_page.jump_in') : null} <i className={classNames(styles.jumpInIcon, { diff --git a/webapp/src/components/AssetPage/ListingsTable/ListingsTable.spec.tsx b/webapp/src/components/AssetPage/ListingsTable/ListingsTable.spec.tsx index d0965b1b5f..87e7986b71 100644 --- a/webapp/src/components/AssetPage/ListingsTable/ListingsTable.spec.tsx +++ b/webapp/src/components/AssetPage/ListingsTable/ListingsTable.spec.tsx @@ -1,13 +1,5 @@ import { waitFor } from '@testing-library/react' -import { - ChainId, - Item, - ListingStatus, - Network, - NFTCategory, - Order, - Rarity -} from '@dcl/schemas' +import { ChainId, Item, ListingStatus, Network, NFTCategory, Order, Rarity } from '@dcl/schemas' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { formatDistanceToNow, getDateAndMonthName } from '../../../lib/date' import { formatWeiMANA } from '../../../lib/mana' @@ -28,7 +20,7 @@ jest.mock('decentraland-dapps/dist/containers', () => { }) describe('Listings Table', () => { - let asset: Item = { + const asset: Item = { contractAddress: '0xaddress', urn: '', itemId: '1', @@ -59,7 +51,7 @@ describe('Listings Table', () => { firstListedAt: null } - let ownersResponse: OwnersResponse = { + const ownersResponse: OwnersResponse = { issuedId: 1, ownerId: '0x92712b730b9a474f99a47bb8b1750190d5959a2b', orderStatus: 'open', @@ -67,7 +59,7 @@ describe('Listings Table', () => { tokenId: '1' } - let orderResponse: Order = { + const orderResponse: Order = { id: '1', marketplaceAddress: '0xmarketplace', contractAddress: '0xaddress', @@ -101,9 +93,7 @@ describe('Listings Table', () => { }) it('should render the empty table message', async () => { - const { getByText, findByTestId } = renderWithProviders( - <ListingsTable asset={asset} /> - ) + const { getByText, findByTestId } = renderWithProviders(<ListingsTable asset={asset} />) const loader = await findByTestId('loader') @@ -111,9 +101,7 @@ describe('Listings Table', () => { expect(loader).not.toBeInTheDocument() }) - expect( - getByText(t('listings_table.there_are_no_listings')) - ).toBeInTheDocument() + expect(getByText(t('listings_table.there_are_no_listings'))).toBeInTheDocument() }) }) diff --git a/webapp/src/components/AssetPage/ListingsTable/ListingsTable.tsx b/webapp/src/components/AssetPage/ListingsTable/ListingsTable.tsx index fc10525da3..dccf0f85ca 100644 --- a/webapp/src/components/AssetPage/ListingsTable/ListingsTable.tsx +++ b/webapp/src/components/AssetPage/ListingsTable/ListingsTable.tsx @@ -31,7 +31,7 @@ const ListingsTable = (props: Props) => { if (asset) { setIsLoading(true) - let params: OrderFilters = { + const params: OrderFilters = { contractAddress: asset.contractAddress, first: ROWS_PER_PAGE, skip: (page - 1) * ROWS_PER_PAGE, @@ -51,9 +51,7 @@ const ListingsTable = (props: Props) => { setTotalPages(Math.ceil(response.total / ROWS_PER_PAGE) || 0) setOrders( formatDataToTable( - isNFT(asset) - ? response.data.filter(order => order.tokenId !== asset.tokenId) - : response.data, + isNFT(asset) ? response.data.filter(order => order.tokenId !== asset.tokenId) : response.data, isMobileOrTablet ) ) diff --git a/webapp/src/components/AssetPage/ListingsTable/utils.tsx b/webapp/src/components/AssetPage/ListingsTable/utils.tsx index 1408d6e196..1c16589783 100644 --- a/webapp/src/components/AssetPage/ListingsTable/utils.tsx +++ b/webapp/src/components/AssetPage/ListingsTable/utils.tsx @@ -12,30 +12,17 @@ import { ManaToFiat } from '../../ManaToFiat' import { DataTableType } from '../../Table/TableContent/TableContent.types' import styles from './ListingsTable.module.css' -export const formatDataToTable = ( - orders: Order[], - isMobile = false -): DataTableType[] => { +export const formatDataToTable = (orders: Order[], isMobile = false): DataTableType[] => { return orders.reduce((accumulator: DataTableType[], order: Order) => { const value: DataTableType = { - [t('listings_table.owner')]: ( - <LinkedProfile - className={styles.linkedProfileRow} - address={order.owner} - /> - ), + [t('listings_table.owner')]: <LinkedProfile className={styles.linkedProfileRow} address={order.owner} />, ...(!isMobile && { - [t('listings_table.published_date')]: getDateAndMonthName( - order.createdAt - ) + [t('listings_table.published_date')]: getDateAndMonthName(order.createdAt) }), ...(!isMobile && { - [t('listings_table.expiration_date')]: formatDistanceToNow( - +order.expiresAt * (isLegacyOrder(order) ? 1 : 1000), - { - addSuffix: true - } - ) + [t('listings_table.expiration_date')]: formatDistanceToNow(+order.expiresAt * (isLegacyOrder(order) ? 1 : 1000), { + addSuffix: true + }) }), ...(!isMobile && { [t('listings_table.issue_number')]: ( @@ -43,9 +30,7 @@ export const formatDataToTable = ( <div className={styles.badgeContainer}> {order.status === ListingStatus.OPEN && order.expiresAt && - (isLegacyOrder(order) - ? order.expiresAt - : order.expiresAt * 1000) >= Date.now() ? ( + (isLegacyOrder(order) ? order.expiresAt : order.expiresAt * 1000) >= Date.now() ? ( <ListedBadge className={styles.badge} /> ) : null} <div className={styles.row}> @@ -70,17 +55,8 @@ export const formatDataToTable = ( </div> {order && ( <div> - <Button - inverted - as={Link} - to={locations.nft(order.contractAddress, order.tokenId)} - size="small" - > - {isMobile ? ( - <Icon name="chevron right" className={styles.gotToNFT} /> - ) : ( - t('listings_table.view_listing') - )} + <Button inverted as={Link} to={locations.nft(order.contractAddress, order.tokenId)} size="small"> + {isMobile ? <Icon name="chevron right" className={styles.gotToNFT} /> : t('listings_table.view_listing')} </Button> </div> )} diff --git a/webapp/src/components/AssetPage/ListingsTableContainer/ListingsTableContainer.tsx b/webapp/src/components/AssetPage/ListingsTableContainer/ListingsTableContainer.tsx index 91dbacc140..65b4cf4362 100644 --- a/webapp/src/components/AssetPage/ListingsTableContainer/ListingsTableContainer.tsx +++ b/webapp/src/components/AssetPage/ListingsTableContainer/ListingsTableContainer.tsx @@ -9,105 +9,92 @@ import TableContainer from '../../Table/TableContainer' import { Props, SortByType } from './ListingsTableContainer.types' import styles from './ListingsTableContainer.module.css' -const ListingsTableContainer = forwardRef<HTMLDivElement, Props>( - (props, ref) => { - const { item } = props +const ListingsTableContainer = forwardRef<HTMLDivElement, Props>((props, ref) => { + const { item } = props - const BelowTabs = { - LISTINGS: { - value: 'listings', - displayValue: t('listings_table.listings') - }, - OWNERS: { - value: 'owners', - displayValue: t('owners_table.owners') - } + const BelowTabs = { + LISTINGS: { + value: 'listings', + displayValue: t('listings_table.listings') + }, + OWNERS: { + value: 'owners', + displayValue: t('owners_table.owners') } + } - const locations = useLocation() - const [belowTab, setBelowTab] = useState(BelowTabs.LISTINGS.value) - const [sortBy, setSortBy] = useState<SortByType>(OrderSortBy.CHEAPEST) + const locations = useLocation() + const [belowTab, setBelowTab] = useState(BelowTabs.LISTINGS.value) + const [sortBy, setSortBy] = useState<SortByType>(OrderSortBy.CHEAPEST) - const ownerSortByOptions = [ - { - text: t('owners_table.issue_number_asc'), - value: OrderDirection.ASC - }, - { - text: t('owners_table.issue_number_desc'), - value: OrderDirection.DESC - } - ] + const ownerSortByOptions = [ + { + text: t('owners_table.issue_number_asc'), + value: OrderDirection.ASC + }, + { + text: t('owners_table.issue_number_desc'), + value: OrderDirection.DESC + } + ] - const listingSortByOptions = [ - { - text: t('listings_table.cheapest'), - value: OrderSortBy.CHEAPEST - }, - { - text: t('listings_table.newest'), - value: OrderSortBy.RECENTLY_LISTED - }, - { - text: t('listings_table.oldest'), - value: OrderSortBy.OLDEST - }, - { - text: t('listings_table.issue_number_asc'), - value: OrderSortBy.ISSUED_ID_ASC - }, - { - text: t('listings_table.issue_number_desc'), - value: OrderSortBy.ISSUED_ID_DESC - } - ] + const listingSortByOptions = [ + { + text: t('listings_table.cheapest'), + value: OrderSortBy.CHEAPEST + }, + { + text: t('listings_table.newest'), + value: OrderSortBy.RECENTLY_LISTED + }, + { + text: t('listings_table.oldest'), + value: OrderSortBy.OLDEST + }, + { + text: t('listings_table.issue_number_asc'), + value: OrderSortBy.ISSUED_ID_ASC + }, + { + text: t('listings_table.issue_number_desc'), + value: OrderSortBy.ISSUED_ID_DESC + } + ] - const handleTabChange = useCallback( - (tab: string) => { - const sortByTab = - tab === BelowTabs.LISTINGS.value - ? OrderSortBy.CHEAPEST - : OrderDirection.ASC - setBelowTab(tab) - setSortBy(sortByTab) - }, - [BelowTabs.LISTINGS] - ) + const handleTabChange = useCallback( + (tab: string) => { + const sortByTab = tab === BelowTabs.LISTINGS.value ? OrderSortBy.CHEAPEST : OrderDirection.ASC + setBelowTab(tab) + setSortBy(sortByTab) + }, + [BelowTabs.LISTINGS] + ) - useEffect(() => { - const params = new URLSearchParams(locations.search) - if (params.get('selectedTableTab') === BelowTabs.OWNERS.value) - handleTabChange(BelowTabs.OWNERS.value) - }, [BelowTabs.OWNERS, handleTabChange, locations.search]) + useEffect(() => { + const params = new URLSearchParams(locations.search) + if (params.get('selectedTableTab') === BelowTabs.OWNERS.value) handleTabChange(BelowTabs.OWNERS.value) + }, [BelowTabs.OWNERS, handleTabChange, locations.search]) - return ( - <div className={styles.listingsTableContainer}> - <TableContainer - children={ - belowTab === BelowTabs.LISTINGS.value ? ( - <ListingsTable asset={item} sortBy={sortBy as OrderSortBy} /> - ) : ( - <OwnersTable - asset={item} - orderDirection={sortBy as OrderDirection} - /> - ) - } - ref={ref} - tabsList={[BelowTabs.LISTINGS, BelowTabs.OWNERS]} - activeTab={belowTab} - handleTabChange={(tab: string) => handleTabChange(tab)} - sortbyList={ - belowTab === BelowTabs.LISTINGS.value - ? listingSortByOptions - : ownerSortByOptions - } - handleSortByChange={(value: string) => setSortBy(value as SortByType)} - sortBy={sortBy} - /> - </div> - ) - } -) + return ( + <div className={styles.listingsTableContainer}> + <TableContainer + children={ + belowTab === BelowTabs.LISTINGS.value ? ( + <ListingsTable asset={item} sortBy={sortBy as OrderSortBy} /> + ) : ( + <OwnersTable asset={item} orderDirection={sortBy as OrderDirection} /> + ) + } + ref={ref} + tabsList={[BelowTabs.LISTINGS, BelowTabs.OWNERS]} + activeTab={belowTab} + handleTabChange={(tab: string) => handleTabChange(tab)} + sortbyList={belowTab === BelowTabs.LISTINGS.value ? listingSortByOptions : ownerSortByOptions} + handleSortByChange={(value: string) => setSortBy(value as SortByType)} + sortBy={sortBy} + /> + </div> + ) +}) export default React.memo(ListingsTableContainer) diff --git a/webapp/src/components/AssetPage/OnBack/OnBack.spec.tsx b/webapp/src/components/AssetPage/OnBack/OnBack.spec.tsx index f941dc4f51..2d3f0c6d48 100644 --- a/webapp/src/components/AssetPage/OnBack/OnBack.spec.tsx +++ b/webapp/src/components/AssetPage/OnBack/OnBack.spec.tsx @@ -13,22 +13,19 @@ const BASE_DETAIL_TOP_HEADER = 'top-header' const FAVORITES_COUNTER_TEST_ID = 'favorites-counter' function renderOnBack(props: Partial<OnBackProps> = {}) { - return renderWithProviders( - <OnBack asset={props.asset || ({} as Asset)} onBack={jest.fn()} />, - { - preloadedState: { - favorites: { - ...INITIAL_STATE, - data: { - items: { - '0xContractAddress-itemId': { pickedByUser: false, count: 35 } - }, - lists: {} - } + return renderWithProviders(<OnBack asset={props.asset || ({} as Asset)} onBack={jest.fn()} />, { + preloadedState: { + favorites: { + ...INITIAL_STATE, + data: { + items: { + '0xContractAddress-itemId': { pickedByUser: false, count: 35 } + }, + lists: {} } } } - ) + }) } describe('OnBack', () => { @@ -37,9 +34,7 @@ describe('OnBack', () => { beforeEach(() => { asset = { id: '0xContractAddress-itemId', name: 'Asset Name' } as Asset - useMobileMediaQueryMock = useMobileMediaQuery as jest.MockedFunction< - typeof useMobileMediaQuery - > + useMobileMediaQueryMock = useMobileMediaQuery as jest.MockedFunction<typeof useMobileMediaQuery> }) describe('when the dispositive is not mobile', () => { @@ -51,11 +46,7 @@ describe('OnBack', () => { const { getByTestId } = renderOnBack({ asset }) - expect( - within( - getByTestId(BASE_DETAIL_TOP_HEADER) ?? new HTMLElement() - ).queryByTestId(FAVORITES_COUNTER_TEST_ID) - ).toBeNull() + expect(within(getByTestId(BASE_DETAIL_TOP_HEADER) ?? new HTMLElement()).queryByTestId(FAVORITES_COUNTER_TEST_ID)).toBeNull() }) }) @@ -69,11 +60,7 @@ describe('OnBack', () => { const { getByTestId } = renderOnBack({ asset }) - expect( - within( - getByTestId(BASE_DETAIL_TOP_HEADER) ?? new HTMLElement() - ).queryByTestId(FAVORITES_COUNTER_TEST_ID) - ).toBeNull() + expect(within(getByTestId(BASE_DETAIL_TOP_HEADER) ?? new HTMLElement()).queryByTestId(FAVORITES_COUNTER_TEST_ID)).toBeNull() }) }) @@ -107,9 +94,7 @@ describe('OnBack', () => { }) expect(getByTestId(FAVORITES_COUNTER_TEST_ID)).toBeInTheDocument() expect( - within( - getByTestId(BASE_DETAIL_TOP_HEADER) ?? new HTMLElement() - ).queryByTestId(FAVORITES_COUNTER_TEST_ID) + within(getByTestId(BASE_DETAIL_TOP_HEADER) ?? new HTMLElement()).queryByTestId(FAVORITES_COUNTER_TEST_ID) ).toBeInTheDocument() }) }) diff --git a/webapp/src/components/AssetPage/OwnersTable/OwnersTable.spec.tsx b/webapp/src/components/AssetPage/OwnersTable/OwnersTable.spec.tsx index 04024b99da..1d0b94b925 100644 --- a/webapp/src/components/AssetPage/OwnersTable/OwnersTable.spec.tsx +++ b/webapp/src/components/AssetPage/OwnersTable/OwnersTable.spec.tsx @@ -18,7 +18,7 @@ jest.mock('decentraland-dapps/dist/containers', () => { }) describe('Owners Table', () => { - let asset: Item = { + const asset: Item = { contractAddress: '0xaddress', urn: '', itemId: '1', @@ -48,7 +48,7 @@ describe('Owners Table', () => { chainId: ChainId.ETHEREUM_GOERLI, firstListedAt: null } - let ownersResponse: OwnersResponse = { + const ownersResponse: OwnersResponse = { issuedId: 1, ownerId: ownerIdMock, orderStatus: 'open', @@ -69,9 +69,7 @@ describe('Owners Table', () => { }) it('should render the empty table message', async () => { - const { getByText, findByTestId } = renderWithProviders( - <OwnersTable asset={asset} /> - ) + const { getByText, findByTestId } = renderWithProviders(<OwnersTable asset={asset} />) const loader = await findByTestId('loader') @@ -79,9 +77,7 @@ describe('Owners Table', () => { expect(loader).not.toBeInTheDocument() }) - expect( - getByText(t('owners_table.there_are_no_owners')) - ).toBeInTheDocument() + expect(getByText(t('owners_table.there_are_no_owners'))).toBeInTheDocument() }) }) diff --git a/webapp/src/components/AssetPage/OwnersTable/OwnersTable.tsx b/webapp/src/components/AssetPage/OwnersTable/OwnersTable.tsx index 413537afb5..a3c4b868f6 100644 --- a/webapp/src/components/AssetPage/OwnersTable/OwnersTable.tsx +++ b/webapp/src/components/AssetPage/OwnersTable/OwnersTable.tsx @@ -1,10 +1,6 @@ import React, { useEffect, useState } from 'react' import { Button } from 'decentraland-ui' -import { - nftAPI, - OwnersFilters, - OwnersSortBy -} from '../../../modules/vendor/decentraland' +import { nftAPI, OwnersFilters, OwnersSortBy } from '../../../modules/vendor/decentraland' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import emptyOwners from '../../../images/emptyOwners.png' import { TableContent } from '../../Table/TableContent' @@ -29,7 +25,7 @@ const OwnersTable = (props: Props) => { useEffect(() => { if (asset && asset.itemId) { setIsLoading(true) - let params: OwnersFilters = { + const params: OwnersFilters = { contractAddress: asset.contractAddress, itemId: asset.itemId, first: ROWS_PER_PAGE, diff --git a/webapp/src/components/AssetPage/OwnersTable/utils.tsx b/webapp/src/components/AssetPage/OwnersTable/utils.tsx index 04f1af9dc4..ed9cfed2b3 100644 --- a/webapp/src/components/AssetPage/OwnersTable/utils.tsx +++ b/webapp/src/components/AssetPage/OwnersTable/utils.tsx @@ -10,26 +10,16 @@ import ListedBadge from '../../ListedBadge' import { DataTableType } from '../../Table/TableContent/TableContent.types' import styles from './OwnersTable.module.css' -export const formatDataToTable = ( - owners: OwnersResponse[], - asset: Asset -): DataTableType[] => { +export const formatDataToTable = (owners: OwnersResponse[], asset: Asset): DataTableType[] => { return owners?.map((owner: OwnersResponse) => { const value: DataTableType = { - [t('owners_table.owner')]: ( - <LinkedProfile - className={styles.linkedProfileRow} - address={owner.ownerId} - /> - ), + [t('owners_table.owner')]: <LinkedProfile className={styles.linkedProfileRow} address={owner.ownerId} />, [t('owners_table.issue_number')]: ( <div className={styles.issuedIdContainer}> <div className={styles.row}> {owner.orderStatus === ListingStatus.OPEN && !!owner.orderExpiresAt && - (owner.orderExpiresAt.length === 10 - ? +owner.orderExpiresAt * 1000 - : +owner.orderExpiresAt) >= Date.now() ? ( + (owner.orderExpiresAt.length === 10 ? +owner.orderExpiresAt * 1000 : +owner.orderExpiresAt) >= Date.now() ? ( <ListedBadge className={styles.badge} /> ) : null} #<span className={styles.issuedId}>{owner.issuedId}</span> diff --git a/webapp/src/components/AssetPage/ParcelDetail/ParcelDetail.tsx b/webapp/src/components/AssetPage/ParcelDetail/ParcelDetail.tsx index e4e442423c..de00bd695c 100644 --- a/webapp/src/components/AssetPage/ParcelDetail/ParcelDetail.tsx +++ b/webapp/src/components/AssetPage/ParcelDetail/ParcelDetail.tsx @@ -31,15 +31,7 @@ const ParcelDetail = ({ nft, order, rental }: Props) => { <BaseDetail asset={nft} rental={rental ?? undefined} - assetImage={ - <AssetImage - asset={nft} - isDraggable - withNavigation - hasPopup - showUpdatedDateWarning - /> - } + assetImage={<AssetImage asset={nft} isDraggable withNavigation hasPopup showUpdatedDateWarning />} showDetails={isLand(nft)} isOnSale={!!nft.activeOrderId} badges={ @@ -64,10 +56,7 @@ const ParcelDetail = ({ nft, order, rental }: Props) => { id="asset_page.part_of_estate" values={{ estate_name: ( - <Link - title={parcel.estate!.name} - to={locations.nft(nft.owner, parcel.estate!.tokenId)} - > + <Link title={parcel.estate!.name} to={locations.nft(nft.owner, parcel.estate!.tokenId)}> {parcel.estate!.name} </Link> ) diff --git a/webapp/src/components/AssetPage/ProximityHighlights/ProximityHighlights.container.ts b/webapp/src/components/AssetPage/ProximityHighlights/ProximityHighlights.container.ts index bf0f9a69f2..0b2d6191ab 100644 --- a/webapp/src/components/AssetPage/ProximityHighlights/ProximityHighlights.container.ts +++ b/webapp/src/components/AssetPage/ProximityHighlights/ProximityHighlights.container.ts @@ -1,11 +1,7 @@ import { connect } from 'react-redux' import { RootState } from '../../../modules/reducer' import { getProximities } from '../../../modules/proximity/selectors' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './ProximityHighlights.types' +import { MapStateProps, MapDispatchProps, MapDispatch } from './ProximityHighlights.types' import ProximityHighlights from './ProximityHighlights' const mapState = (state: RootState): MapStateProps => ({ diff --git a/webapp/src/components/AssetPage/ProximityHighlights/ProximityHighlights.tsx b/webapp/src/components/AssetPage/ProximityHighlights/ProximityHighlights.tsx index 11448f2908..90e2953cce 100644 --- a/webapp/src/components/AssetPage/ProximityHighlights/ProximityHighlights.tsx +++ b/webapp/src/components/AssetPage/ProximityHighlights/ProximityHighlights.tsx @@ -11,27 +11,16 @@ import './ProximityHighlights.css' const ProximityHighlights = (props: Props) => { const { nft, proximities } = props - const proximity = useProximity( - nft as NFT<VendorName.DECENTRALAND>, - proximities - ) + const proximity = useProximity(nft as NFT<VendorName.DECENTRALAND>, proximities) return proximity ? ( <div className="ProximityHighlights"> <Highlights> {proximity?.plaza !== undefined ? ( - <Highlight - icon={<div className="plaza" />} - name={t('asset_page.plaza')} - description={getDistanceText(proximity?.plaza)} - /> + <Highlight icon={<div className="plaza" />} name={t('asset_page.plaza')} description={getDistanceText(proximity?.plaza)} /> ) : null} {proximity?.road !== undefined ? ( - <Highlight - icon={<div className="road" />} - name={t('asset_page.road')} - description={getDistanceText(proximity?.road)} - /> + <Highlight icon={<div className="road" />} name={t('asset_page.road')} description={getDistanceText(proximity?.road)} /> ) : null} {proximity?.district !== undefined ? ( <Highlight diff --git a/webapp/src/components/AssetPage/RentalHistory/RentalHistory.tsx b/webapp/src/components/AssetPage/RentalHistory/RentalHistory.tsx index 196f0d4d2c..2b6741201b 100644 --- a/webapp/src/components/AssetPage/RentalHistory/RentalHistory.tsx +++ b/webapp/src/components/AssetPage/RentalHistory/RentalHistory.tsx @@ -14,9 +14,7 @@ const ROWS_PER_PAGE = 12 const RentalHistory = (props: Props) => { const { asset } = props - const tabList = [ - { value: 'rental_history', displayValue: t('rental_history.title') } - ] + const tabList = [{ value: 'rental_history', displayValue: t('rental_history.title') }] const [rentals, setRentals] = useState<DataTableType[]>([]) const [page, setPage] = useState(1) diff --git a/webapp/src/components/AssetPage/RentalHistory/utils.tsx b/webapp/src/components/AssetPage/RentalHistory/utils.tsx index 06c99ff5b7..6f70aafd66 100644 --- a/webapp/src/components/AssetPage/RentalHistory/utils.tsx +++ b/webapp/src/components/AssetPage/RentalHistory/utils.tsx @@ -19,9 +19,7 @@ const formatEventDate = (updatedAt: number) => { : formatDistanceToNow(newUpdatedAt, { addSuffix: true }) } -export const formatDataToTable = ( - rentals: RentalListing[] -): DataTableType[] => { +export const formatDataToTable = (rentals: RentalListing[]): DataTableType[] => { return rentals?.map((rental: RentalListing) => { const value: DataTableType = { [t('rental_history.lessor')]: <LinkedProfile address={rental.lessor!} />, diff --git a/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.container.ts b/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.container.ts index cdfcdc774b..3a5bfa8325 100644 --- a/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.container.ts +++ b/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.container.ts @@ -1,19 +1,10 @@ import { connect } from 'react-redux' -import { - getAssetData, - getRequiredPermissions, - isFetchingRequiredPermissions -} from '../../../modules/asset/selectors' +import { getAssetData, getRequiredPermissions, isFetchingRequiredPermissions } from '../../../modules/asset/selectors' import { RootState } from '../../../modules/reducer' import { fetchSmartWearableRequiredPermissionsRequest } from '../../../modules/asset/actions' import { Asset } from '../../../modules/asset/types' import RequiredPermissions from './RequiredPermissions' -import { - OwnProps, - MapStateProps, - MapDispatchProps, - MapDispatch -} from './RequiredPermissions.types' +import { OwnProps, MapStateProps, MapDispatchProps, MapDispatch } from './RequiredPermissions.types' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { const { id } = ownProps.asset @@ -26,8 +17,7 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { } const mapDispatchProps = (dispatch: MapDispatch): MapDispatchProps => ({ - onFetchRequiredPermissions: (asset: Asset) => - dispatch(fetchSmartWearableRequiredPermissionsRequest(asset)) + onFetchRequiredPermissions: (asset: Asset) => dispatch(fetchSmartWearableRequiredPermissionsRequest(asset)) }) export default connect(mapState, mapDispatchProps)(RequiredPermissions) diff --git a/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.spec.tsx b/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.spec.tsx index 6b079c6304..21ed5a3c09 100644 --- a/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.spec.tsx +++ b/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.spec.tsx @@ -52,13 +52,7 @@ describe('when the permissions were fetched and the array is not empty', () => { it('should render them as badges', () => { const { getByText } = renderRequiredPermissions({ requiredPermissions }) requiredPermissions.forEach(requiredPermission => { - expect( - getByText( - t( - `smart_wearable.required_permission.${requiredPermission.toLowerCase()}` - ) - ) - ).toBeInTheDocument() + expect(getByText(t(`smart_wearable.required_permission.${requiredPermission.toLowerCase()}`))).toBeInTheDocument() }) }) }) diff --git a/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.tsx b/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.tsx index b12bc19230..9364e7de04 100644 --- a/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.tsx +++ b/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.tsx @@ -6,24 +6,11 @@ import { Props } from './RequiredPermissions.types' import styles from './RequiredPermissions.module.css' const RequiredPermissions = (props: Props) => { - let { - asset, - isLoading, - hasFetched, - requiredPermissions, - onFetchRequiredPermissions - } = props + const { asset, isLoading, hasFetched, requiredPermissions, onFetchRequiredPermissions } = props useEffect(() => { - if (requiredPermissions.length === 0 && !isLoading && !hasFetched) - onFetchRequiredPermissions(asset) - }, [ - asset, - isLoading, - hasFetched, - onFetchRequiredPermissions, - requiredPermissions.length - ]) + if (requiredPermissions.length === 0 && !isLoading && !hasFetched) onFetchRequiredPermissions(asset) + }, [asset, isLoading, hasFetched, onFetchRequiredPermissions, requiredPermissions.length]) return requiredPermissions.length > 0 ? ( <Stats title="" className={styles.RequiredPermissions}> @@ -55,9 +42,7 @@ const RequiredPermissions = (props: Props) => { <Chip key={`${requiredPermission}-${i}`} className={styles.permission} - text={t( - `smart_wearable.required_permission.${requiredPermission.toLowerCase()}` - )} + text={t(`smart_wearable.required_permission.${requiredPermission.toLowerCase()}`)} /> ))} </div> diff --git a/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.types.ts b/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.types.ts index 1aff94255a..d5f0020725 100644 --- a/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.types.ts +++ b/webapp/src/components/AssetPage/RequiredPermissions/RequiredPermissions.types.ts @@ -11,11 +11,6 @@ export type Props = { } export type OwnProps = Pick<Props, 'asset'> -export type MapStateProps = Pick< - Props, - 'requiredPermissions' | 'isLoading' | 'hasFetched' -> +export type MapStateProps = Pick<Props, 'requiredPermissions' | 'isLoading' | 'hasFetched'> export type MapDispatchProps = Pick<Props, 'onFetchRequiredPermissions'> -export type MapDispatch = Dispatch< - FetchSmartWearableRequiredPermissionsRequestAction -> +export type MapDispatch = Dispatch<FetchSmartWearableRequiredPermissionsRequestAction> diff --git a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.container.tsx b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.container.tsx index 4025093afd..2c5727fb22 100644 --- a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.container.tsx +++ b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.container.tsx @@ -4,12 +4,7 @@ import { Order } from '@dcl/schemas' import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { getOpenModals } from 'decentraland-dapps/dist/modules/modal/selectors' import { isConnecting } from 'decentraland-dapps/dist/modules/wallet/selectors' -import { - MapDispatchProps, - MapDispatch, - MapStateProps, - OwnProps -} from './BuyNFTButtons.types' +import { MapDispatchProps, MapDispatch, MapStateProps, OwnProps } from './BuyNFTButtons.types' import { executeOrderWithCardRequest } from '../../../../modules/order/actions' import { buyItemWithCardRequest } from '../../../../modules/item/actions' import { Asset, AssetType } from '../../../../modules/asset/types' @@ -20,15 +15,10 @@ import BuyNFTButtons from './BuyNFTButtons' const mapState = (state: RootState): MapStateProps => ({ wallet: getWallet(state), isConnecting: isConnecting(state), - isBuyingWithCryptoModalOpen: - getOpenModals(state)['BuyNftWithCryptoModal']?.open || - getOpenModals(state)['MintNftWithCryptoModal']?.open + isBuyingWithCryptoModalOpen: getOpenModals(state)['BuyNftWithCryptoModal']?.open || getOpenModals(state)['MintNftWithCryptoModal']?.open }) -const mapDispatch = ( - dispatch: MapDispatch, - ownProps: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: MapDispatch, ownProps: OwnProps): MapDispatchProps => ({ onExecuteOrderWithCard: nft => dispatch(executeOrderWithCardRequest(nft)), onBuyWithCrypto: (asset: Asset, order?: Order | null) => ownProps.assetType === AssetType.NFT diff --git a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.tsx b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.tsx index 9a43cee4e0..1b04f500ec 100644 --- a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.tsx +++ b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.tsx @@ -50,42 +50,21 @@ const BuyNFTButtons = ({ onBuyWithCrypto(asset, order) } }, - [ - isConnecting, - wallet, - isBuyingWithCryptoModalOpen, - location.pathname, - analytics, - onRedirect, - onBuyWithCrypto - ] + [isConnecting, wallet, isBuyingWithCryptoModalOpen, location.pathname, analytics, onRedirect, onBuyWithCrypto] ) return ( <> - <AssetProvider - type={assetType} - contractAddress={asset.contractAddress} - tokenId={tokenId} - > + <AssetProvider type={assetType} contractAddress={asset.contractAddress} tokenId={tokenId}> {(asset, order) => { - if (!asset) - return ( - <Loader active size="medium" className={styles.loading_asset} /> - ) + if (!asset) return <Loader active size="medium" className={styles.loading_asset} /> if (asset && shouldOpenBuyWithCryptoModal) { onBuyWithCrypto(asset, order) } return ( <> - <BuyWithCryptoButton - assetNetwork={asset.network} - onClick={() => handleBuyWithCrypto(asset, order)} - /> - <BuyWithCardButton - className={buyWithCardClassName} - onClick={() => handleBuyWithCard(asset)} - /> + <BuyWithCryptoButton assetNetwork={asset.network} onClick={() => handleBuyWithCrypto(asset, order)} /> + <BuyWithCardButton className={buyWithCardClassName} onClick={() => handleBuyWithCard(asset)} /> </> ) }} diff --git a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.types.ts b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.types.ts index 62ef3ba8b5..a1e527e308 100644 --- a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.types.ts +++ b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyNFTButtons.types.ts @@ -4,14 +4,8 @@ import { OpenModalAction } from 'decentraland-dapps/dist/modules/modal/actions' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { CallHistoryMethodAction } from 'connected-react-router' import { Asset, AssetType } from '../../../../modules/asset/types' -import { - ExecuteOrderWithCardRequestAction, - executeOrderWithCardRequest -} from '../../../../modules/order/actions' -import { - BuyItemWithCardRequestAction, - buyItemWithCardRequest -} from '../../../../modules/item/actions' +import { ExecuteOrderWithCardRequestAction, executeOrderWithCardRequest } from '../../../../modules/order/actions' +import { BuyItemWithCardRequestAction, buyItemWithCardRequest } from '../../../../modules/item/actions' export type Props = { asset: Asset @@ -27,26 +21,11 @@ export type Props = { onRedirect: (path: string) => void } -export type OwnProps = Pick< - Props, - 'asset' | 'assetType' | 'tokenId' | 'buyWithCardClassName' -> +export type OwnProps = Pick<Props, 'asset' | 'assetType' | 'tokenId' | 'buyWithCardClassName'> -export type MapStateProps = Pick< - Props, - 'wallet' | 'isConnecting' | 'isBuyingWithCryptoModalOpen' -> +export type MapStateProps = Pick<Props, 'wallet' | 'isConnecting' | 'isBuyingWithCryptoModalOpen'> -export type MapDispatchProps = Pick< - Props, - | 'onExecuteOrderWithCard' - | 'onBuyItemWithCard' - | 'onBuyWithCrypto' - | 'onRedirect' -> +export type MapDispatchProps = Pick<Props, 'onExecuteOrderWithCard' | 'onBuyItemWithCard' | 'onBuyWithCrypto' | 'onRedirect'> export type MapDispatch = Dispatch< - | ExecuteOrderWithCardRequestAction - | BuyItemWithCardRequestAction - | OpenModalAction - | CallHistoryMethodAction + ExecuteOrderWithCardRequestAction | BuyItemWithCardRequestAction | OpenModalAction | CallHistoryMethodAction > diff --git a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.tsx b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.tsx index 9f125b63b6..aedf8928a2 100644 --- a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.tsx +++ b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.tsx @@ -8,11 +8,7 @@ export const BuyWithCardButton = (props: Props) => { const { className, ...otherProps } = props return ( - <Button - className={classNames(styles.buy_with_card, className)} - fluid - {...otherProps} - > + <Button className={classNames(styles.buy_with_card, className)} fluid {...otherProps}> <Icon name="credit card outline" /> {t('asset_page.actions.buy_with_card')} </Button> diff --git a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.types.ts b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.types.ts index 8ff765791d..64b3f61f68 100644 --- a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.types.ts +++ b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCardButton/BuyWithCardButton.types.ts @@ -1,3 +1,3 @@ -import type { ButtonProps } from "decentraland-ui/dist/components/Button/Button" +import type { ButtonProps } from 'decentraland-ui/dist/components/Button/Button' -export type Props = ButtonProps \ No newline at end of file +export type Props = ButtonProps diff --git a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCryptoButton/BuyWithCryptoButton.types.ts b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCryptoButton/BuyWithCryptoButton.types.ts index ccb66b343b..64b3f61f68 100644 --- a/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCryptoButton/BuyWithCryptoButton.types.ts +++ b/webapp/src/components/AssetPage/SaleActionBox/BuyNFTButtons/BuyWithCryptoButton/BuyWithCryptoButton.types.ts @@ -1,3 +1,3 @@ -import type { ButtonProps } from "decentraland-ui/dist/components/Button/Button" +import type { ButtonProps } from 'decentraland-ui/dist/components/Button/Button' export type Props = ButtonProps diff --git a/webapp/src/components/AssetPage/SaleActionBox/ItemSaleActions/ItemSaleActions.container.ts b/webapp/src/components/AssetPage/SaleActionBox/ItemSaleActions/ItemSaleActions.container.ts index d188077779..2168c32cbb 100644 --- a/webapp/src/components/AssetPage/SaleActionBox/ItemSaleActions/ItemSaleActions.container.ts +++ b/webapp/src/components/AssetPage/SaleActionBox/ItemSaleActions/ItemSaleActions.container.ts @@ -2,8 +2,7 @@ import { connect } from 'react-redux' import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { RootState } from '../../../../modules/reducer' import { getWallet } from '../../../../modules/wallet/selectors' -import { MapStateProps, OwnProps } from './ItemSaleActions.types' -import { MapDispatch, MapDispatchProps } from './ItemSaleActions.types' +import { MapStateProps, OwnProps, MapDispatch, MapDispatchProps } from './ItemSaleActions.types' import ItemSaleActions from './ItemSaleActions' const mapState = (state: RootState): MapStateProps => { @@ -14,10 +13,7 @@ const mapState = (state: RootState): MapStateProps => { } } -const mapDispatch = ( - dispatch: MapDispatch, - ownProps: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: MapDispatch, ownProps: OwnProps): MapDispatchProps => ({ onBuyWithCrypto: () => dispatch( openModal('MintNftWithCryptoModal', { diff --git a/webapp/src/components/AssetPage/SaleActionBox/ItemSaleActions/ItemSaleActions.tsx b/webapp/src/components/AssetPage/SaleActionBox/ItemSaleActions/ItemSaleActions.tsx index fb4595de44..c0f0cc7609 100644 --- a/webapp/src/components/AssetPage/SaleActionBox/ItemSaleActions/ItemSaleActions.tsx +++ b/webapp/src/components/AssetPage/SaleActionBox/ItemSaleActions/ItemSaleActions.tsx @@ -10,47 +10,24 @@ import styles from './ItemSaleActions.module.css' const ItemSaleActions = ({ item, wallet, customClassnames }: Props) => { const isOwner = wallet?.address === item.creator const canBuy = !isOwner && item.isOnSale && item.available > 0 - const builderCollectionUrl = getBuilderCollectionDetailUrl( - item.contractAddress - ) + const builderCollectionUrl = getBuilderCollectionDetailUrl(item.contractAddress) return ( <> {isOwner ? ( <div className={styles.ownerButtons}> - <Button - as="a" - href={builderCollectionUrl} - fluid - className={customClassnames?.primaryButton} - > + <Button as="a" href={builderCollectionUrl} fluid className={customClassnames?.primaryButton}> {t('asset_page.actions.edit_price')} </Button> - <Button - as="a" - href={builderCollectionUrl} - fluid - className={customClassnames?.secondaryButton} - > + <Button as="a" href={builderCollectionUrl} fluid className={customClassnames?.secondaryButton}> {t('asset_page.actions.change_beneficiary')} </Button> - <Button - as="a" - href={builderCollectionUrl} - fluid - className={customClassnames?.outlinedButton} - > + <Button as="a" href={builderCollectionUrl} fluid className={customClassnames?.outlinedButton}> {t('asset_page.actions.mint_item')} </Button> </div> ) : ( - canBuy && ( - <BuyNFTButtons - asset={item} - assetType={AssetType.ITEM} - buyWithCardClassName={customClassnames?.buyWithCardClassName} - /> - ) + canBuy && <BuyNFTButtons asset={item} assetType={AssetType.ITEM} buyWithCardClassName={customClassnames?.buyWithCardClassName} /> )} </> ) diff --git a/webapp/src/components/AssetPage/SaleRentActionBox/PeriodsDropdown/PeriodsDropdown.tsx b/webapp/src/components/AssetPage/SaleRentActionBox/PeriodsDropdown/PeriodsDropdown.tsx index 588bb05e76..772be91341 100644 --- a/webapp/src/components/AssetPage/SaleRentActionBox/PeriodsDropdown/PeriodsDropdown.tsx +++ b/webapp/src/components/AssetPage/SaleRentActionBox/PeriodsDropdown/PeriodsDropdown.tsx @@ -11,22 +11,11 @@ import { Mana } from '../../../Mana' import { Props } from './PeriodsDropdown.types' import styles from './PeriodsDropdown.module.css' -const Trigger = ({ - value, - periods -}: { - value: number | undefined - periods: RentalListingPeriod[] -}) => { +const Trigger = ({ value, periods }: { value: number | undefined; periods: RentalListingPeriod[] }) => { const period = value !== undefined ? periods[value] : undefined const pricePerRent = period - ? ethers.BigNumber.from(period.pricePerDay) - .mul(period.maxDays) - .toString() - : ethers.BigNumber.from(periods[0].pricePerDay) - .mul(periods[0].maxDays) - .toString() - + ? ethers.BigNumber.from(period.pricePerDay).mul(period.maxDays).toString() + : ethers.BigNumber.from(periods[0].pricePerDay).mul(periods[0].maxDays).toString() return ( <div className={period ? styles.trigger : styles.triggerPlaceholder}> @@ -53,9 +42,7 @@ const PeriodsDropdown = ({ value, periods, className, onChange }: Props) => { const options: DropdownItemProps[] = useMemo( () => periods.map((period, index) => { - const pricePerRent = ethers.BigNumber.from(period.pricePerDay) - .mul(period.maxDays) - .toString() + const pricePerRent = ethers.BigNumber.from(period.pricePerDay).mul(period.maxDays).toString() const startDate = new Date() const endDate = add(startDate, { days: period.maxDays }) return { @@ -87,11 +74,7 @@ const PeriodsDropdown = ({ value, periods, className, onChange }: Props) => { return ( <Dropdown className={classNames(styles.periodDropdown, className)} - trigger={ - value !== undefined || isOpenDropdown ? ( - <Trigger value={value} periods={periods} /> - ) : null - } + trigger={value !== undefined || isOpenDropdown ? <Trigger value={value} periods={periods} /> : null} onClick={() => setIsOpenDropdown(prevState => !prevState)} value={value} placeholder={t('asset_page.sales_rent_action_box.select_period')} diff --git a/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.container.ts b/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.container.ts index c28cf55b19..48b3c2562c 100644 --- a/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.container.ts +++ b/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.container.ts @@ -4,12 +4,7 @@ import { RootState } from '../../../modules/reducer' import { getMana, getWallet } from '../../../modules/wallet/selectors' import { getNFTBids } from '../../../modules/ui/nft/bid/selectors' import { Network } from '@dcl/schemas' -import { - OwnProps, - MapStateProps, - MapDispatchProps, - MapDispatch -} from './SaleRentActionBox.types' +import { OwnProps, MapStateProps, MapDispatchProps, MapDispatch } from './SaleRentActionBox.types' import SaleRentActionBox from './SaleRentActionBox' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { @@ -17,20 +12,14 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { return { wallet, currentMana: - ownProps.nft.network === Network.ETHEREUM || - ownProps.nft.network === Network.MATIC + ownProps.nft.network === Network.ETHEREUM || ownProps.nft.network === Network.MATIC ? getMana(state, ownProps.nft.network) : undefined, - userHasAlreadyBidsOnNft: wallet - ? getNFTBids(state).some(bid => bid.bidder === wallet.address) - : false + userHasAlreadyBidsOnNft: wallet ? getNFTBids(state).some(bid => bid.bidder === wallet.address) : false } } -const mapDispatch = ( - dispatch: MapDispatch, - ownProps: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: MapDispatch, ownProps: OwnProps): MapDispatchProps => ({ onRent: (selectedPeriodIndex: number) => dispatch( openModal('ConfirmRentModal', { diff --git a/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.tsx b/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.tsx index 05400d2223..2d9ee2285e 100644 --- a/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.tsx +++ b/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.tsx @@ -35,37 +35,16 @@ enum View { RENT } -const SaleRentActionBox = ({ - nft, - wallet, - order, - rental, - userHasAlreadyBidsOnNft, - currentMana, - onRent -}: Props) => { +const SaleRentActionBox = ({ nft, wallet, order, rental, userHasAlreadyBidsOnNft, currentMana, onRent }: Props) => { const isMobileView = isMobile() const isRentalOpen = isRentalListingOpen(rental) const isOwner = isOwnedBy(nft, wallet, rental ? rental : undefined) - const isTenant = - rental && - wallet && - addressEquals(rental.tenant ?? undefined, wallet.address) + const isTenant = rental && wallet && addressEquals(rental.tenant ?? undefined, wallet.address) - const [selectedRentalPeriodIndex, setSelectedRentalPeriodIndex] = useState< - number | undefined - >(undefined) - const [view, setView] = useState( - !!order || !isRentalOpen ? View.SALE : View.RENT - ) - const maxPriceOfPeriods: string | null = useMemo( - () => (rental ? getMaxPriceOfPeriods(rental) : null), - [rental] - ) - const toggleView = useCallback( - () => (view === View.RENT ? setView(View.SALE) : setView(View.RENT)), - [view] - ) + const [selectedRentalPeriodIndex, setSelectedRentalPeriodIndex] = useState<number | undefined>(undefined) + const [view, setView] = useState(!!order || !isRentalOpen ? View.SALE : View.RENT) + const maxPriceOfPeriods: string | null = useMemo(() => (rental ? getMaxPriceOfPeriods(rental) : null), [rental]) + const toggleView = useCallback(() => (view === View.RENT ? setView(View.SALE) : setView(View.RENT)), [view]) const isNFTPartOfAState = useMemo(() => isPartOfEstate(nft), [nft]) // Validations for the sale screen @@ -79,12 +58,8 @@ const SaleRentActionBox = ({ onRent(selectedRentalPeriodIndex) }, [selectedRentalPeriodIndex, onRent]) - const rentalEndDate: Date | null = isCurrentlyRented - ? getRentalEndDate(rental!) - : null - const rentalEndTime = isCurrentlyRented - ? getRentalEndDate(rental!)!.getTime() - : 0 + const rentalEndDate: Date | null = isCurrentlyRented ? getRentalEndDate(rental!) : null + const rentalEndTime = isCurrentlyRented ? getRentalEndDate(rental!)!.getTime() : 0 const rentalHasEnded = isCurrentlyRented && hasRentalEnded(rental!) const isPeriodSelected = selectedRentalPeriodIndex !== undefined @@ -96,17 +71,14 @@ const SaleRentActionBox = ({ ethers.utils .parseEther(formatBalance(currentMana)) .gte( - ethers.BigNumber.from( - rental.periods[selectedRentalPeriodIndex].pricePerDay - ).mul(rental.periods[selectedRentalPeriodIndex].maxDays) + ethers.BigNumber.from(rental.periods[selectedRentalPeriodIndex].pricePerDay).mul( + rental.periods[selectedRentalPeriodIndex].maxDays + ) ), [rental, currentMana, selectedRentalPeriodIndex, isPeriodSelected] ) const hasEnoughManaToBuy = useMemo( - () => - !!order && - !!currentMana && - ethers.utils.parseEther(formatBalance(currentMana)).gte(order.price), + () => !!order && !!currentMana && ethers.utils.parseEther(formatBalance(currentMana)).gte(order.price), [order, currentMana] ) @@ -140,12 +112,7 @@ const SaleRentActionBox = ({ <div className={styles.price}> <div className={styles.title}>{t('global.price')}</div> <div className={styles.priceValue}> - <Mana - className={styles.priceInMana} - withTooltip - size="medium" - network={rental!.network} - > + <Mana className={styles.priceInMana} withTooltip size="medium" network={rental!.network}> {formatWeiMANA(maxPriceOfPeriods)} </Mana> <span className={styles.perDay}>/{t('global.day')}</span> @@ -164,9 +131,7 @@ const SaleRentActionBox = ({ {!isOwner ? ( <> <Popup - content={t( - 'asset_page.sales_rent_action_box.parcel_belongs_to_estate_rent' - )} + content={t('asset_page.sales_rent_action_box.parcel_belongs_to_estate_rent')} position="top center" on={isMobileView ? 'click' : 'hover'} disabled={!isNFTPartOfAState} @@ -174,11 +139,7 @@ const SaleRentActionBox = ({ <div className={styles.fullWidth}> <Button primary - disabled={ - isNFTPartOfAState || - !hasEnoughManaToRent || - !isPeriodSelected - } + disabled={isNFTPartOfAState || !hasEnoughManaToRent || !isPeriodSelected} onClick={handleOnRent} className={styles.rent} > @@ -187,13 +148,8 @@ const SaleRentActionBox = ({ </div> } /> - {rental && - wallet && - isPeriodSelected && - !hasEnoughManaToRent ? ( - <div className={styles.notEnoughMana}> - {t('asset_page.sales_rent_action_box.not_enough_mana')} - </div> + {rental && wallet && isPeriodSelected && !hasEnoughManaToRent ? ( + <div className={styles.notEnoughMana}>{t('asset_page.sales_rent_action_box.not_enough_mana')}</div> ) : null} </> ) : null} @@ -204,13 +160,7 @@ const SaleRentActionBox = ({ <div className={styles.price}> <div className={styles.title}>{t('global.price')}</div> <div className={styles.content}> - <Mana - showTooltip - className={styles.priceInMana} - withTooltip - size="medium" - network={order.network} - > + <Mana showTooltip className={styles.priceInMana} withTooltip size="medium" network={order.network}> {formatWeiMANA(order.price)} </Mana> <span className={styles.priceInFiat}> @@ -221,12 +171,10 @@ const SaleRentActionBox = ({ ) : isOwner && rental?.tenant && !rentalHasEnded ? ( <div className={styles.upperMessage}> {t('asset_page.sales_rent_action_box.in_rent_owner', { - tenant: <LinkedProfile address={rental.tenant!} inline />, + tenant: <LinkedProfile address={rental.tenant} inline />, asset_type: nft.category, rental_end_date: rentalEndDate, - strong: (children: React.ReactElement) => ( - <strong>{children}</strong> - ) + strong: (children: React.ReactElement) => <strong>{children}</strong> })} </div> ) : isTenant && !rentalHasEnded ? ( @@ -234,9 +182,7 @@ const SaleRentActionBox = ({ {t('asset_page.sales_rent_action_box.in_rent_tenant', { asset_type: nft.category, rental_end_date: rentalEndDate, - strong: (children: React.ReactElement) => ( - <strong>{children}</strong> - ) + strong: (children: React.ReactElement) => <strong>{children}</strong> })} </div> ) : (isTenant || isOwner) && rentalHasEnded ? ( @@ -244,20 +190,13 @@ const SaleRentActionBox = ({ {t('asset_page.sales_rent_action_box.rent_ended', { asset_type: nft.category, rental_end_date: rentalEndDate, - strong: (children: React.ReactElement) => ( - <strong>{children}</strong> - ) + strong: (children: React.ReactElement) => <strong>{children}</strong> })} </div> ) : ( - <div className={styles.upperMessage}> - {t('asset_page.sales_rent_action_box.not_for_sale')} - </div> + <div className={styles.upperMessage}>{t('asset_page.sales_rent_action_box.not_for_sale')}</div> )} - {isOwner && - rental && - wallet && - canBeClaimed(wallet?.address, rental, nft) ? ( + {isOwner && rental && wallet && canBeClaimed(wallet?.address, rental, nft) ? ( <div className={styles.upperMessageDescription}> {t('asset_page.sales_rent_action_box.claim_back_message', { asset_type: nft.category @@ -270,9 +209,7 @@ const SaleRentActionBox = ({ <Button as={'a'} href={`${builderUrl}/land/${ - nft.category === NFTCategory.ESTATE - ? `${nft.tokenId}` - : `${nft.data.parcel?.x},${nft.data.parcel?.y}` + nft.category === NFTCategory.ESTATE ? `${nft.tokenId}` : `${nft.data.parcel?.x},${nft.data.parcel?.y}` }`} fluid primary @@ -285,11 +222,7 @@ const SaleRentActionBox = ({ {order ? ( <Button as={Link} - to={locations.buy( - AssetType.NFT, - nft.contractAddress, - nft.tokenId - )} + to={locations.buy(AssetType.NFT, nft.contractAddress, nft.tokenId)} disabled={!hasEnoughManaToBuy} className={styles.buy} primary @@ -300,9 +233,7 @@ const SaleRentActionBox = ({ ) : null} {canBid ? ( <Popup - content={t( - 'asset_page.sales_rent_action_box.parcel_belongs_to_estate_bid' - )} + content={t('asset_page.sales_rent_action_box.parcel_belongs_to_estate_bid')} position="top center" on="hover" disabled={!isNFTPartOfAState} @@ -313,8 +244,7 @@ const SaleRentActionBox = ({ to={locations.bid(nft.contractAddress, nft.tokenId)} className={classNames({ [styles.bid]: order, - [styles.bid_manage_in_builder]: - isTenant && !rentalHasEnded + [styles.bid_manage_in_builder]: isTenant && !rentalHasEnded })} disabled={isNFTPartOfAState} primary={!order && !(isTenant && !rentalHasEnded)} @@ -329,21 +259,14 @@ const SaleRentActionBox = ({ ) : null} </div> {order && wallet && !hasEnoughManaToBuy ? ( - <div className={styles.notEnoughMana}> - {t('asset_page.sales_rent_action_box.not_enough_mana')} - </div> + <div className={styles.notEnoughMana}>{t('asset_page.sales_rent_action_box.not_enough_mana')}</div> ) : null} </> ) : null} </> )} {isOwner ? ( - <Button - as={Link} - to={locations.manage(nft.contractAddress, nft.tokenId)} - fluid - className={styles.manage} - > + <Button as={Link} to={locations.manage(nft.contractAddress, nft.tokenId)} fluid className={styles.manage}> {t('asset_page.actions.manage')} </Button> ) : null} diff --git a/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.types.ts b/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.types.ts index d7a6a42401..3a8cd70734 100644 --- a/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.types.ts +++ b/webapp/src/components/AssetPage/SaleRentActionBox/SaleRentActionBox.types.ts @@ -15,11 +15,6 @@ export type Props = { } export type OwnProps = Pick<Props, 'nft' | 'rental' | 'order'> -export type MapStateProps = Pick< - Props, - | 'wallet' - | 'userHasAlreadyBidsOnNft' - | 'currentMana' -> +export type MapStateProps = Pick<Props, 'wallet' | 'userHasAlreadyBidsOnNft' | 'currentMana'> export type MapDispatchProps = Pick<Props, 'onRent'> export type MapDispatch = Dispatch<OpenModalAction> diff --git a/webapp/src/components/AssetPage/SmartBadge/SmartBadge.tsx b/webapp/src/components/AssetPage/SmartBadge/SmartBadge.tsx index 147c72f59c..7dc6389c0c 100644 --- a/webapp/src/components/AssetPage/SmartBadge/SmartBadge.tsx +++ b/webapp/src/components/AssetPage/SmartBadge/SmartBadge.tsx @@ -20,11 +20,7 @@ const SmartBadge = ({ assetType, clickable = true }: Props) => { ) return ( - <IconBadge - className={classNames('SmartBadge', { clickable })} - text={t('wearable.smart_badge')} - href={clickable ? href : undefined} - > + <IconBadge className={classNames('SmartBadge', { clickable })} text={t('wearable.smart_badge')} href={clickable ? href : undefined}> <SmartIcon /> </IconBadge> ) diff --git a/webapp/src/components/AssetPage/Title/Title.spec.tsx b/webapp/src/components/AssetPage/Title/Title.spec.tsx index acf6c9c6cb..8ee845a346 100644 --- a/webapp/src/components/AssetPage/Title/Title.spec.tsx +++ b/webapp/src/components/AssetPage/Title/Title.spec.tsx @@ -33,9 +33,7 @@ describe('Title', () => { beforeEach(() => { asset = { id: '0xContractAddress-itemId', name: 'Asset Name' } as Asset - useMobileMediaQueryMock = useMobileMediaQuery as jest.MockedFunction< - typeof useMobileMediaQuery - > + useMobileMediaQueryMock = useMobileMediaQuery as jest.MockedFunction<typeof useMobileMediaQuery> }) it('should render the Asset Name', () => { diff --git a/webapp/src/components/AssetPage/Title/Title.tsx b/webapp/src/components/AssetPage/Title/Title.tsx index d6204f893d..f52db381fa 100644 --- a/webapp/src/components/AssetPage/Title/Title.tsx +++ b/webapp/src/components/AssetPage/Title/Title.tsx @@ -12,16 +12,11 @@ const Title = ({ asset }: Props) => { return ( <div className={styles.title}> <span className={styles.text}> - {getAssetName(asset)}{' '} - {isNFT(asset) && asset.issuedId ? `#${asset.issuedId}` : ''}{' '} + {getAssetName(asset)} {isNFT(asset) && asset.issuedId ? `#${asset.issuedId}` : ''}{' '} </span> {/* TODO (lists): this may be moved after the new detail page for unified markets */} {!isMobile && !isNFT(asset) && asset.network === Network.MATIC ? ( - <FavoritesCounter - isCollapsed - className={styles.favorites} - item={asset} - /> + <FavoritesCounter isCollapsed className={styles.favorites} item={asset} /> ) : null} </div> ) diff --git a/webapp/src/components/AssetPage/TransactionHistory/TransactionHistory.tsx b/webapp/src/components/AssetPage/TransactionHistory/TransactionHistory.tsx index 9262f8ea20..103ee07eae 100644 --- a/webapp/src/components/AssetPage/TransactionHistory/TransactionHistory.tsx +++ b/webapp/src/components/AssetPage/TransactionHistory/TransactionHistory.tsx @@ -41,7 +41,7 @@ const TransactionHistory = (props: Props) => { let cancel = false if (!isAssetNull) { setIsLoading(true) - let params: Record<string, string | number> = { + const params: Record<string, string | number> = { contractAddress: assetContractAddress!, first: ROWS_PER_PAGE, skip: (page - 1) * ROWS_PER_PAGE @@ -67,17 +67,7 @@ const TransactionHistory = (props: Props) => { return () => { cancel = true } - }, [ - assetContractAddress, - assetTokenId, - assetItemId, - setIsLoading, - setSales, - page, - isAssetNull, - isAssetNFT, - isMobileOrTablet - ]) + }, [assetContractAddress, assetTokenId, assetItemId, setIsLoading, setSales, page, isAssetNull, isAssetNFT, isMobileOrTablet]) return sales.length > 0 ? ( <div className="TransactionHistory"> diff --git a/webapp/src/components/AssetPage/TransactionHistory/utils.tsx b/webapp/src/components/AssetPage/TransactionHistory/utils.tsx index 1e047b7bc2..21ed32b81d 100644 --- a/webapp/src/components/AssetPage/TransactionHistory/utils.tsx +++ b/webapp/src/components/AssetPage/TransactionHistory/utils.tsx @@ -18,21 +18,14 @@ const formatEventDate = (updatedAt: number) => { : formatDistanceToNow(newUpdatedAt, { addSuffix: true }) } -export const formatDataToTable = ( - sales: Sale[], - isMobile = false -): DataTableType[] => { +export const formatDataToTable = (sales: Sale[], isMobile = false): DataTableType[] => { return sales?.map((sale: Sale) => { const value: DataTableType = { ...(!isMobile && { - [t('transaction_history.from')]: ( - <LinkedProfile address={sale.seller} className="linkedProfile" /> - ) + [t('transaction_history.from')]: <LinkedProfile address={sale.seller} className="linkedProfile" /> }), ...(!isMobile && { - [t('transaction_history.to')]: ( - <LinkedProfile address={sale.buyer} className="linkedProfile" /> - ) + [t('transaction_history.to')]: <LinkedProfile address={sale.buyer} className="linkedProfile" /> }), [t('transaction_history.type')]: t(`global.${sale.type}`), [t('transaction_history.when')]: formatEventDate(sale.timestamp), diff --git a/webapp/src/components/AssetPage/WearableDetail/WearableDetail.tsx b/webapp/src/components/AssetPage/WearableDetail/WearableDetail.tsx index 0b7518dbf1..f2349be844 100644 --- a/webapp/src/components/AssetPage/WearableDetail/WearableDetail.tsx +++ b/webapp/src/components/AssetPage/WearableDetail/WearableDetail.tsx @@ -69,23 +69,10 @@ const WearableDetail = ({ nft }: Props) => { <div className={styles.wearableBadgesContainer}> <Title asset={nft} /> <div className={styles.badges}> - <RarityBadge - rarity={wearable.rarity} - assetType={AssetType.NFT} - category={NFTCategory.WEARABLE} - /> - <CategoryBadge - category={wearable.category} - assetType={AssetType.NFT} - /> - <GenderBadge - bodyShapes={wearable.bodyShapes} - assetType={AssetType.NFT} - section={Section.WEARABLES} - /> - {wearable.isSmart ? ( - <SmartBadge assetType={AssetType.NFT} /> - ) : null} + <RarityBadge rarity={wearable.rarity} assetType={AssetType.NFT} category={NFTCategory.WEARABLE} /> + <CategoryBadge category={wearable.category} assetType={AssetType.NFT} /> + <GenderBadge bodyShapes={wearable.bodyShapes} assetType={AssetType.NFT} section={Section.WEARABLES} /> + {wearable.isSmart ? <SmartBadge assetType={AssetType.NFT} /> : null} <CampaignBadge contract={nft.contractAddress} /> </div> </div> diff --git a/webapp/src/components/AssetPage/YourOffer/YourOffer.container.ts b/webapp/src/components/AssetPage/YourOffer/YourOffer.container.ts index 3d5cf1d902..b2cd45ffcb 100644 --- a/webapp/src/components/AssetPage/YourOffer/YourOffer.container.ts +++ b/webapp/src/components/AssetPage/YourOffer/YourOffer.container.ts @@ -12,8 +12,7 @@ const mapState = (state: RootState): MapStateProps => ({ }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onUpdate: bid => - dispatch(push(locations.bid(bid.contractAddress, bid.tokenId))), + onUpdate: bid => dispatch(push(locations.bid(bid.contractAddress, bid.tokenId))), onCancel: bid => dispatch(cancelBidRequest(bid)) }) diff --git a/webapp/src/components/AssetPage/YourOffer/YourOffer.tsx b/webapp/src/components/AssetPage/YourOffer/YourOffer.tsx index 318eab09b2..bf8d51ded5 100644 --- a/webapp/src/components/AssetPage/YourOffer/YourOffer.tsx +++ b/webapp/src/components/AssetPage/YourOffer/YourOffer.tsx @@ -26,29 +26,16 @@ const Price = (props: { bid: Bid }) => { {t('offers_table.offer').toUpperCase()}  <Popup content={ - bid.network === Network.MATIC - ? t('best_buying_option.minting.polygon_mana') - : t('best_buying_option.minting.ethereum_mana') + bid.network === Network.MATIC ? t('best_buying_option.minting.polygon_mana') : t('best_buying_option.minting.ethereum_mana') } position="top center" - trigger={ - <img - src={infoIcon} - alt="info" - className={styles.informationTooltip} - /> - } + trigger={<img src={infoIcon} alt="info" className={styles.informationTooltip} />} on="hover" /> </span> <div className={styles.row}> <div className={styles.informationBold}> - <Mana - withTooltip - size="large" - network={bid.network} - className={styles.informationBold} - > + <Mana withTooltip size="large" network={bid.network} className={styles.informationBold}> {formatWeiMANA(bid.price)} </Mana> </div> @@ -69,9 +56,7 @@ const PublishDate = (props: { bid: Bid }) => { return ( <div className={`${styles.column} ${styles.center}`}> <img src={calendar} alt="calendar" className={styles.calendar} /> - <span className={styles.texts}> - {t('offers_table.date_published').toUpperCase()} - </span> + <span className={styles.texts}>{t('offers_table.date_published').toUpperCase()}</span> {formatDistanceToNow(+bid.createdAt, { addSuffix: true @@ -85,9 +70,7 @@ const ExpirationDate = (props: { bid: Bid }) => { return ( <div className={`${styles.column} ${styles.center}`}> <img src={expiration} alt="expiration" className={styles.calendar} /> - <span className={styles.texts}> - {t('offers_table.expiration_date').toUpperCase()} - </span> + <span className={styles.texts}>{t('offers_table.expiration_date').toUpperCase()}</span> {formatDistanceToNow(+bid.expiresAt, { addSuffix: true @@ -105,15 +88,7 @@ const YourOffer = (props: Props) => { useEffect(() => { if (nft && address) { bidAPI - .fetchByNFT( - nft.contractAddress, - nft.tokenId, - null, - undefined, - FIRST, - undefined, - address - ) + .fetchByNFT(nft.contractAddress, nft.tokenId, null, undefined, FIRST, undefined, address) .then(response => { setBid(response.data[0]) }) @@ -126,11 +101,7 @@ const YourOffer = (props: Props) => { return bid ? ( <div className={styles.YourOffer}> <span className={styles.title}> - <img - src={iconListings} - alt={t('offers_table.your_offer')} - className={styles.offerIcon} - /> + <img src={iconListings} alt={t('offers_table.your_offer')} className={styles.offerIcon} /> {t('offers_table.your_offer')} </span> @@ -150,20 +121,10 @@ const YourOffer = (props: Props) => { )} <div className={styles.actionsContainer}> - <Button - inverted - fluid - className={styles.actions} - onClick={() => onCancel(bid)} - > + <Button inverted fluid className={styles.actions} onClick={() => onCancel(bid)}> {t('offers_table.remove')} </Button> - <Button - primary - fluid - className={styles.actions} - onClick={() => onUpdate(bid)} - > + <Button primary fluid className={styles.actions} onClick={() => onUpdate(bid)}> {t('global.update')} </Button> </div> diff --git a/webapp/src/components/AssetPage/YourOffer/YourOffer.types.ts b/webapp/src/components/AssetPage/YourOffer/YourOffer.types.ts index 831d5cb212..459861eadd 100644 --- a/webapp/src/components/AssetPage/YourOffer/YourOffer.types.ts +++ b/webapp/src/components/AssetPage/YourOffer/YourOffer.types.ts @@ -16,6 +16,4 @@ export type MapStateProps = Pick<Props, 'address'> export type MapDispatchProps = Pick<Props, 'onUpdate' | 'onCancel'> -export type MapDispatch = Dispatch< - CallHistoryMethodAction | CancelBidRequestAction -> +export type MapDispatch = Dispatch<CallHistoryMethodAction | CancelBidRequestAction> diff --git a/webapp/src/components/AssetProvider/AssetProvider.container.ts b/webapp/src/components/AssetProvider/AssetProvider.container.ts index e48eb79297..7a7d2e4fa9 100644 --- a/webapp/src/components/AssetProvider/AssetProvider.container.ts +++ b/webapp/src/components/AssetProvider/AssetProvider.container.ts @@ -5,11 +5,7 @@ import { FETCH_APPLICATION_FEATURES_REQUEST } from 'decentraland-dapps/dist/modu import { isConnecting } from 'decentraland-dapps/dist/modules/wallet/selectors' import { isLoadingFeatureFlags as getIsLoadingFeatureFlags } from '../../modules/features/selectors' import { RootState } from '../../modules/reducer' -import { - fetchNFTRequest, - FETCH_NFT_REQUEST, - clearNFTErrors -} from '../../modules/nft/actions' +import { fetchNFTRequest, FETCH_NFT_REQUEST, clearNFTErrors } from '../../modules/nft/actions' import { clearItemErrors, fetchItemRequest } from '../../modules/item/actions' import { getContractAddress as getNFTContractAddress, @@ -25,10 +21,7 @@ import { getError as getItemsError, getData as getItems } from '../../modules/item/selectors' -import { - isFetchingRequiredPermissions, - isFetchingVideoHash -} from '../../modules/asset/selectors' +import { isFetchingRequiredPermissions, isFetchingVideoHash } from '../../modules/asset/selectors' import { getData as getOrders } from '../../modules/order/selectors' import { getNFT } from '../../modules/nft/utils' import { getItem } from '../../modules/item/utils' @@ -39,12 +32,7 @@ import { getOpenRentalId } from '../../modules/rental/utils' import { FetchOneOptions } from '../../modules/vendor' import { getContract } from '../../modules/contract/selectors' import { ContractName } from '../../modules/vendor/decentraland' -import { - MapDispatch, - MapDispatchProps, - MapStateProps, - OwnProps -} from './AssetProvider.types' +import { MapDispatch, MapDispatchProps, MapStateProps, OwnProps } from './AssetProvider.types' import AssetProvider from './AssetProvider' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { @@ -91,10 +79,7 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { network: Network.ETHEREUM }) - const isLandOrEstate = - !!contractAddress && - (contractAddress === landContract?.address || - contractAddress === estateContract?.address) + const isLandOrEstate = !!contractAddress && (contractAddress === landContract?.address || contractAddress === estateContract?.address) return { tokenId, @@ -102,31 +87,18 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { asset, rental, order, - isLoading: !asset - ? isLoading - : isFetchingRequiredPermissions(state, asset.id) || - isFetchingVideoHash(state, asset.id), - isLoadingFeatureFlags: isLoadingType( - getIsLoadingFeatureFlags(state), - FETCH_APPLICATION_FEATURES_REQUEST - ), + isLoading: !asset ? isLoading : isFetchingRequiredPermissions(state, asset.id) || isFetchingVideoHash(state, asset.id), + isLoadingFeatureFlags: isLoadingType(getIsLoadingFeatureFlags(state), FETCH_APPLICATION_FEATURES_REQUEST), isLandOrEstate, error, isConnecting: isConnecting(state) } } -const mapDispatch = ( - dispatch: MapDispatch, - ownProps: OwnProps -): MapDispatchProps => ({ - onFetchNFT: ( - contractAddress: string, - tokenId: string, - options?: FetchOneOptions - ) => dispatch(fetchNFTRequest(contractAddress, tokenId, options)), - onFetchItem: (contractAddress: string, tokenId: string) => - dispatch(fetchItemRequest(contractAddress, tokenId)), +const mapDispatch = (dispatch: MapDispatch, ownProps: OwnProps): MapDispatchProps => ({ + onFetchNFT: (contractAddress: string, tokenId: string, options?: FetchOneOptions) => + dispatch(fetchNFTRequest(contractAddress, tokenId, options)), + onFetchItem: (contractAddress: string, tokenId: string) => dispatch(fetchItemRequest(contractAddress, tokenId)), onClearErrors: () => { if (ownProps.type === AssetType.ITEM) { return dispatch(clearItemErrors()) @@ -136,18 +108,12 @@ const mapDispatch = ( } }) -const mergeProps = ( - stateProps: MapStateProps, - dispatchProps: MapDispatchProps, - ownProps: OwnProps -) => ({ +const mergeProps = (stateProps: MapStateProps, dispatchProps: MapDispatchProps, ownProps: OwnProps) => ({ ...stateProps, ...dispatchProps, ...ownProps }) -export default connect(mapState, mapDispatch, mergeProps)(AssetProvider) as < - T extends AssetType = AssetType ->( +export default connect(mapState, mapDispatch, mergeProps)(AssetProvider) as <T extends AssetType = AssetType>( props: OwnProps<T> ) => JSX.Element diff --git a/webapp/src/components/AssetProvider/AssetProvider.tsx b/webapp/src/components/AssetProvider/AssetProvider.tsx index 344e4d4382..1936e2aa67 100644 --- a/webapp/src/components/AssetProvider/AssetProvider.tsx +++ b/webapp/src/components/AssetProvider/AssetProvider.tsx @@ -46,14 +46,7 @@ const AssetProvider = (props: Props) => { }, [contractAddress, tokenId]) useEffect(() => { - if ( - contractAddress && - tokenId && - asset === null && - !isLoading && - !hasFetchedOnce && - !isConnecting - ) { + if (contractAddress && tokenId && asset === null && !isLoading && !hasFetchedOnce && !isConnecting) { switch (type) { case AssetType.NFT: if (hasLoadedInitialFlags) { @@ -86,16 +79,7 @@ const AssetProvider = (props: Props) => { isConnecting ]) - return ( - <> - {children( - asset, - order, - rental, - isLoading || (!hasLoadedInitialFlags && type === AssetType.NFT) - )} - </> - ) + return <>{children(asset, order, rental, isLoading || (!hasLoadedInitialFlags && type === AssetType.NFT))}</> } export default React.memo(AssetProvider) diff --git a/webapp/src/components/AssetProvider/AssetProvider.types.ts b/webapp/src/components/AssetProvider/AssetProvider.types.ts index 24a54c7e14..a2a9cc06a0 100644 --- a/webapp/src/components/AssetProvider/AssetProvider.types.ts +++ b/webapp/src/components/AssetProvider/AssetProvider.types.ts @@ -1,16 +1,8 @@ import { Dispatch } from 'redux' import React from 'react' import { Order, RentalListing, RentalStatus } from '@dcl/schemas' -import { - ClearNFTErrorsAction, - fetchNFTRequest, - FetchNFTRequestAction -} from '../../modules/nft/actions' -import { - ClearItemErrorsAction, - fetchItemRequest, - FetchItemRequestAction -} from '../../modules/item/actions' +import { ClearNFTErrorsAction, fetchNFTRequest, FetchNFTRequestAction } from '../../modules/nft/actions' +import { ClearItemErrorsAction, fetchItemRequest, FetchItemRequestAction } from '../../modules/item/actions' import { Asset, AssetType } from '../../modules/asset/types' export type Props<T extends AssetType = AssetType> = { @@ -30,12 +22,7 @@ export type Props<T extends AssetType = AssetType> = { onFetchNFT: typeof fetchNFTRequest onFetchItem: typeof fetchItemRequest onClearErrors: () => void - children: ( - asset: Asset<T> | null, - order: Order | null, - rental: RentalListing | null, - isLoading: boolean - ) => React.ReactNode | null + children: (asset: Asset<T> | null, order: Order | null, rental: RentalListing | null, isLoading: boolean) => React.ReactNode | null } export type MapStateProps = Pick< @@ -51,18 +38,7 @@ export type MapStateProps = Pick< | 'error' | 'isConnecting' > -export type MapDispatchProps = Pick< - Props, - 'onFetchNFT' | 'onFetchItem' | 'onClearErrors' -> -export type MapDispatch = Dispatch< - | FetchNFTRequestAction - | FetchItemRequestAction - | ClearNFTErrorsAction - | ClearItemErrorsAction -> -export type OwnProps<T extends AssetType = AssetType> = Pick< - Props<T>, - 'type' | 'children' | 'rentalStatus' | 'retry' -> & +export type MapDispatchProps = Pick<Props, 'onFetchNFT' | 'onFetchItem' | 'onClearErrors'> +export type MapDispatch = Dispatch<FetchNFTRequestAction | FetchItemRequestAction | ClearNFTErrorsAction | ClearItemErrorsAction> +export type OwnProps<T extends AssetType = AssetType> = Pick<Props<T>, 'type' | 'children' | 'rentalStatus' | 'retry'> & Partial<Pick<Props<T>, 'contractAddress' | 'tokenId'>> diff --git a/webapp/src/components/AssetProviderPage/AssetProviderPage.container.ts b/webapp/src/components/AssetProviderPage/AssetProviderPage.container.ts index 8875b3cf97..adc2703c77 100644 --- a/webapp/src/components/AssetProviderPage/AssetProviderPage.container.ts +++ b/webapp/src/components/AssetProviderPage/AssetProviderPage.container.ts @@ -12,8 +12,4 @@ const mapState = (state: RootState): MapStateProps => ({ const mapDispatch = () => ({}) -export default connect(mapState, mapDispatch)(AssetProviderPage) as < - T extends AssetType = AssetType ->( - props: OwnProps<T> -) => JSX.Element +export default connect(mapState, mapDispatch)(AssetProviderPage) as <T extends AssetType = AssetType>(props: OwnProps<T>) => JSX.Element diff --git a/webapp/src/components/AssetProviderPage/AssetProviderPage.tsx b/webapp/src/components/AssetProviderPage/AssetProviderPage.tsx index c628055e92..e181984de5 100644 --- a/webapp/src/components/AssetProviderPage/AssetProviderPage.tsx +++ b/webapp/src/components/AssetProviderPage/AssetProviderPage.tsx @@ -24,10 +24,7 @@ export const NotFound = () => ( const AssetProviderPage = (props: Props) => { const { type, isConnecting, children, fullWidth = false } = props const rentalStatuses: RentalStatus[] | undefined = useMemo( - () => - type === AssetType.NFT - ? [RentalStatus.OPEN, RentalStatus.EXECUTED, RentalStatus.CANCELLED] - : undefined, + () => (type === AssetType.NFT ? [RentalStatus.OPEN, RentalStatus.EXECUTED, RentalStatus.CANCELLED] : undefined), [type] ) diff --git a/webapp/src/components/AssetProviderPage/AssetProviderPage.types.ts b/webapp/src/components/AssetProviderPage/AssetProviderPage.types.ts index 60f970323a..fe32a716cb 100644 --- a/webapp/src/components/AssetProviderPage/AssetProviderPage.types.ts +++ b/webapp/src/components/AssetProviderPage/AssetProviderPage.types.ts @@ -5,15 +5,8 @@ export type Props<T extends AssetType = AssetType> = { type: T isConnecting: boolean fullWidth?: boolean - children: ( - asset: Asset<T>, - order: Order | null, - rental: RentalListing | null - ) => React.ReactNode | null + children: (asset: Asset<T>, order: Order | null, rental: RentalListing | null) => React.ReactNode | null } export type MapStateProps = Pick<Props, 'isConnecting'> -export type OwnProps<T extends AssetType = AssetType> = Pick< - Props<T>, - 'type' | 'children' | 'fullWidth' -> +export type OwnProps<T extends AssetType = AssetType> = Pick<Props<T>, 'type' | 'children' | 'fullWidth'> diff --git a/webapp/src/components/AssetTopbar/AssetTopbar.container.ts b/webapp/src/components/AssetTopbar/AssetTopbar.container.ts index 23ba998581..60cf7f7e19 100644 --- a/webapp/src/components/AssetTopbar/AssetTopbar.container.ts +++ b/webapp/src/components/AssetTopbar/AssetTopbar.container.ts @@ -44,8 +44,7 @@ const mapState = (state: RootState): MapStateProps => { hasFiltersEnabled: hasFiltersEnabled(state), isLoading: assetType === AssetType.ITEM - ? isLoadingType(getLoadingItems(state), FETCH_ITEMS_REQUEST) || - isLoadingFavoritedItems(state) + ? isLoadingType(getLoadingItems(state), FETCH_ITEMS_REQUEST) || isLoadingFavoritedItems(state) : isLoadingType(getLoadingNFTs(state), FETCH_NFTS_REQUEST) } } diff --git a/webapp/src/components/AssetTopbar/AssetTopbar.tsx b/webapp/src/components/AssetTopbar/AssetTopbar.tsx index 2385c0a4b5..f964948cef 100644 --- a/webapp/src/components/AssetTopbar/AssetTopbar.tsx +++ b/webapp/src/components/AssetTopbar/AssetTopbar.tsx @@ -1,28 +1,13 @@ import { useCallback, useEffect, useRef, useState } from 'react' import { NFTCategory } from '@dcl/schemas' import classNames from 'classnames' -import { - Close, - Dropdown, - DropdownProps, - Field, - Icon, - useTabletAndBelowMediaQuery -} from 'decentraland-ui' +import { Close, Dropdown, DropdownProps, Field, Icon, useTabletAndBelowMediaQuery } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { getCountText } from './utils' import { SortBy } from '../../modules/routing/types' import { isCatalogView } from '../../modules/routing/utils' -import { - getCategoryFromSection, - getSectionFromCategory -} from '../../modules/routing/search' -import { - isAccountView, - isLandSection, - isListsSection, - persistIsMapProperty -} from '../../modules/ui/utils' +import { getCategoryFromSection, getSectionFromCategory } from '../../modules/routing/search' +import { isAccountView, isLandSection, isListsSection, persistIsMapProperty } from '../../modules/ui/utils' import { View } from '../../modules/ui/types' import trash from '../../images/trash.png' import { Chip } from '../Chip' @@ -51,9 +36,7 @@ export const AssetTopbar = ({ const searchBarFieldRef = useRef<HTMLDivElement>(null) const category = section ? getCategoryFromSection(section) : undefined const [searchValueForDropdown, setSearchValueForDropdown] = useState(search) - const [shouldRenderSearchDropdown, setShouldRenderSearchDropdown] = useState( - false - ) + const [shouldRenderSearchDropdown, setShouldRenderSearchDropdown] = useState(false) const handleInputChange = useCallback( text => { @@ -101,13 +84,7 @@ export const AssetTopbar = ({ }, [onBrowse, setSearchValue]) const handleSearch = useCallback( - ({ - value, - contractAddresses - }: { - value?: string - contractAddresses?: string[] - }) => { + ({ value, contractAddresses }: { value?: string; contractAddresses?: string[] }) => { if (contractAddresses && contractAddresses.length) { onBrowse({ contracts: contractAddresses, @@ -150,18 +127,13 @@ export const AssetTopbar = ({ isFullscreen: isMap, search: '', // Forces the onlyOnSale property in the defined cases so the users can see LAND on sale. - onlyOnSale: - (!onlyOnSale && onlyOnRent === false) || - (onlyOnSale === undefined && onlyOnRent === undefined) || - onlyOnSale + onlyOnSale: (!onlyOnSale && onlyOnRent === false) || (onlyOnSale === undefined && onlyOnRent === undefined) || onlyOnSale }) }, [onBrowse, onlyOnSale, onlyOnRent] ) - const sortByValue = sortByOptions.find(option => option.value === sortBy) - ? sortBy - : sortByOptions[0].value + const sortByValue = sortByOptions.find(option => option.value === sortBy) ? sortBy : sortByOptions[0].value useEffect(() => { // when the category changes, close the dropdown @@ -171,9 +143,7 @@ export const AssetTopbar = ({ const handleFieldClick = useCallback(() => { // opens the dropdown on the field focus setShouldRenderSearchDropdown( - (category === NFTCategory.EMOTE || category === NFTCategory.WEARABLE) && - view !== View.CURRENT_ACCOUNT && - view !== View.ACCOUNT + (category === NFTCategory.EMOTE || category === NFTCategory.WEARABLE) && view !== View.CURRENT_ACCOUNT && view !== View.ACCOUNT ) }, [category, view]) @@ -194,12 +164,7 @@ export const AssetTopbar = ({ onClickOutside={handleSearchBarDropdownClickOutside} /> ) - }, [ - category, - handleSearch, - handleSearchBarDropdownClickOutside, - searchValueForDropdown - ]) + }, [category, handleSearch, handleSearchBarDropdownClickOutside, searchValueForDropdown]) return ( <div className={styles.assetTopbar} ref={searchBarFieldRef}> @@ -225,21 +190,9 @@ export const AssetTopbar = ({ )} {shouldRenderSearchDropdown && renderSearch()} {isLandSection(section) && !isAccountView(view!) && ( - <div - className={classNames(styles.mapToggle, { [styles.map]: isMap })} - > - <Chip - className="grid" - icon="table" - isActive={!isMap} - onClick={handleIsMapChange.bind(null, false)} - /> - <Chip - className="atlas" - icon="map marker alternate" - isActive={isMap} - onClick={handleIsMapChange.bind(null, true)} - /> + <div className={classNames(styles.mapToggle, { [styles.map]: isMap })}> + <Chip className="grid" icon="table" isActive={!isMap} onClick={handleIsMapChange.bind(null, false)} /> + <Chip className="atlas" icon="map marker alternate" isActive={isMap} onClick={handleIsMapChange.bind(null, true)} /> </div> )} </div> @@ -250,15 +203,10 @@ export const AssetTopbar = ({ <div className={styles.countContainer}> <p className={styles.countText}> {count && isCatalogView(view) - ? t( + ? t(search ? 'nft_filters.query_results' : 'nft_filters.results', { + count: count.toLocaleString(), search - ? 'nft_filters.query_results' - : 'nft_filters.results', - { - count: count.toLocaleString(), - search - } - ) + }) : getCountText(count, search)} </p> </div> @@ -266,19 +214,10 @@ export const AssetTopbar = ({ ) : null} {!isListsSection(section) ? ( <div className={styles.rightOptionsContainer}> - <Dropdown - direction="left" - value={sortByValue} - options={sortByOptions} - onChange={handleOrderByDropdownChange} - /> + <Dropdown direction="left" value={sortByValue} options={sortByOptions} onChange={handleOrderByDropdownChange} /> {isMobile ? ( <i - className={classNames( - styles.openFilters, - styles.openFiltersWrapper, - hasFiltersEnabled && styles.active - )} + className={classNames(styles.openFilters, styles.openFiltersWrapper, hasFiltersEnabled && styles.active)} onClick={onOpenFiltersModal} /> ) : null} diff --git a/webapp/src/components/AssetTopbar/AssetTopbar.types.ts b/webapp/src/components/AssetTopbar/AssetTopbar.types.ts index 4e905fd01b..a7d77dd794 100644 --- a/webapp/src/components/AssetTopbar/AssetTopbar.types.ts +++ b/webapp/src/components/AssetTopbar/AssetTopbar.types.ts @@ -39,7 +39,4 @@ export type MapStateProps = Pick< | 'isLoading' > -export type MapDispatchProps = Pick< - Props, - 'onBrowse' | 'onClearFilters' | 'onOpenFiltersModal' -> +export type MapDispatchProps = Pick<Props, 'onBrowse' | 'onClearFilters' | 'onOpenFiltersModal'> diff --git a/webapp/src/components/AssetTopbar/AssetTypeFilter/AssetTypeFilter.tsx b/webapp/src/components/AssetTopbar/AssetTypeFilter/AssetTypeFilter.tsx index eae6d77f1a..52c8b756e9 100644 --- a/webapp/src/components/AssetTopbar/AssetTypeFilter/AssetTypeFilter.tsx +++ b/webapp/src/components/AssetTopbar/AssetTypeFilter/AssetTypeFilter.tsx @@ -11,13 +11,8 @@ type AssetTypeFilterProps = { onChange: (assetType: AssetType) => void } -export const AssetTypeFilter = ({ - view, - assetType, - onChange -}: AssetTypeFilterProps) => { - const toggleBoxI18nKey = - view && isAccountView(view) ? 'account_page' : 'browse_page' +export const AssetTypeFilter = ({ view, assetType, onChange }: AssetTypeFilterProps) => { + const toggleBoxI18nKey = view && isAccountView(view) ? 'account_page' : 'browse_page' return ( <ToggleBox direction="row" @@ -27,14 +22,14 @@ export const AssetTypeFilter = ({ title: t(`${toggleBoxI18nKey}.primary_market_title`), active: assetType === AssetType.ITEM, description: t(`${toggleBoxI18nKey}.primary_market_subtitle`), - onClick: () => assetType !== AssetType.ITEM ? onChange(AssetType.ITEM) : undefined, + onClick: () => (assetType !== AssetType.ITEM ? onChange(AssetType.ITEM) : undefined), icon: <div className={styles.marketIcon} /> }, { title: t(`${toggleBoxI18nKey}.secondary_market_title`), active: assetType === AssetType.NFT, description: t(`${toggleBoxI18nKey}.secondary_market_subtitle`), - onClick: () => assetType !== AssetType.NFT ? onChange(AssetType.NFT) : undefined, + onClick: () => (assetType !== AssetType.NFT ? onChange(AssetType.NFT) : undefined), icon: <div className={styles.listingsIcon} /> } ]} diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectibleResultItemRow/CollectibleResultItemRow.tsx b/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectibleResultItemRow/CollectibleResultItemRow.tsx index b4613a8d14..508a8d8d1f 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectibleResultItemRow/CollectibleResultItemRow.tsx +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectibleResultItemRow/CollectibleResultItemRow.tsx @@ -10,10 +10,7 @@ type CollectibleResultItemRowProps = { onClick: (item: Item) => void } -const CollectibleResultItemRow = ({ - item, - onClick -}: CollectibleResultItemRowProps) => { +const CollectibleResultItemRow = ({ item, onClick }: CollectibleResultItemRowProps) => { return ( <Link to={getAssetUrl(item)} onClick={() => onClick(item)}> <div className={styles.collectibleItemRowContainer}> diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectionResultRow/CollectionResultRow.spec.tsx b/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectionResultRow/CollectionResultRow.spec.tsx index 6bf38c198e..3eb445c3c7 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectionResultRow/CollectionResultRow.spec.tsx +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectionResultRow/CollectionResultRow.spec.tsx @@ -19,26 +19,18 @@ describe('CollectionResultRow', () => { } test('renders without crashing', () => { - const { getByTestId } = renderWithProviders( - <CollectionResultRow {...defaultProps} /> - ) + const { getByTestId } = renderWithProviders(<CollectionResultRow {...defaultProps} />) expect(getByTestId(defaultProps['data-testid'])).toBeInTheDocument() }) test('renders collection name correctly', () => { - const { getByText } = renderWithProviders( - <CollectionResultRow {...defaultProps} /> - ) + const { getByText } = renderWithProviders(<CollectionResultRow {...defaultProps} />) expect(getByText('My Collection')).toBeInTheDocument() }) test('renders creator profile correctly', () => { - const { getByText } = renderWithProviders( - <CollectionResultRow {...defaultProps} /> - ) - expect( - getByText(mockCollection.eth_address.slice(0, 6)) - ).toBeInTheDocument() // shows only the first 6 characters + const { getByText } = renderWithProviders(<CollectionResultRow {...defaultProps} />) + expect(getByText(mockCollection.eth_address.slice(0, 6))).toBeInTheDocument() // shows only the first 6 characters }) test('calls onClick when container is clicked', () => { diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectionResultRow/CollectionResultRow.tsx b/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectionResultRow/CollectionResultRow.tsx index 000fd8d679..3116880ac6 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectionResultRow/CollectionResultRow.tsx +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/CollectionResultRow/CollectionResultRow.tsx @@ -9,17 +9,9 @@ type CollectionResultRowProps = { 'data-testid'?: string } -const CollectionResultRow = ({ - collection, - onClick, - 'data-testid': dataTestId -}: CollectionResultRowProps) => { +const CollectionResultRow = ({ collection, onClick, 'data-testid': dataTestId }: CollectionResultRowProps) => { return ( - <div - className={styles.collectionRowContainer} - onClick={onClick} - data-testid={dataTestId} - > + <div className={styles.collectionRowContainer} onClick={onClick} data-testid={dataTestId}> <div className={styles.image}> <CollectionImage contractAddress={collection.contract_address} /> </div> diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/CreatorResultRow/CreatorResultRow.spec.tsx b/webapp/src/components/AssetTopbar/SearchBarDropdown/CreatorResultRow/CreatorResultRow.spec.tsx index b0b8a9dfb5..de4d13e8eb 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/CreatorResultRow/CreatorResultRow.spec.tsx +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/CreatorResultRow/CreatorResultRow.spec.tsx @@ -29,23 +29,17 @@ describe('CreatorsResultItemRow', () => { } test('renders without crashing', () => { - const { getByRole } = renderWithProviders( - <CreatorsResultItemRow {...defaultProps} /> - ) + const { getByRole } = renderWithProviders(<CreatorsResultItemRow {...defaultProps} />) expect(getByRole('link')).toBeInTheDocument() }) test('renders creator name correctly', () => { - const { getByText } = renderWithProviders( - <CreatorsResultItemRow {...defaultProps} /> - ) + const { getByText } = renderWithProviders(<CreatorsResultItemRow {...defaultProps} />) expect(getByText('John Doe')).toBeInTheDocument() }) test('calls onClick when container is clicked', () => { - const { getByRole } = renderWithProviders( - <CreatorsResultItemRow {...defaultProps} /> - ) + const { getByRole } = renderWithProviders(<CreatorsResultItemRow {...defaultProps} />) expect(getByRole('link')).toHaveAttribute( 'href', locations.account(defaultProps.creator.address, { diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.container.tsx b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.container.tsx index 0ae0efa261..049065d657 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.container.tsx +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.container.tsx @@ -1,29 +1,18 @@ import { connect } from 'react-redux' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { RootState } from '../../../modules/reducer' -import { - fetchCreatorsAccountRequest, - FETCH_CREATORS_ACCOUNT_REQUEST -} from '../../../modules/account/actions' +import { fetchCreatorsAccountRequest, FETCH_CREATORS_ACCOUNT_REQUEST } from '../../../modules/account/actions' import { getCreators, getLoading } from '../../../modules/account/selectors' -import { - MapDispatch, - MapDispatchProps, - MapStateProps -} from './SearchBarDropdown.types' +import { MapDispatch, MapDispatchProps, MapStateProps } from './SearchBarDropdown.types' import { SearchBarDropdown } from './SearchBarDropdown' const mapState = (state: RootState): MapStateProps => ({ fetchedCreators: getCreators(state), - isLoadingCreators: isLoadingType( - getLoading(state), - FETCH_CREATORS_ACCOUNT_REQUEST - ) + isLoadingCreators: isLoadingType(getLoading(state), FETCH_CREATORS_ACCOUNT_REQUEST) }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onFetchCreators: (search: string, searchUUID?: string) => - dispatch(fetchCreatorsAccountRequest(search, searchUUID)) + onFetchCreators: (search: string, searchUUID?: string) => dispatch(fetchCreatorsAccountRequest(search, searchUUID)) }) export default connect(mapState, mapDispatch)(SearchBarDropdown) diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.spec.tsx b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.spec.tsx index 0d6eabd7d3..60f0c19097 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.spec.tsx +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.spec.tsx @@ -1,11 +1,5 @@ import { Context as ResponsiveContext } from 'react-responsive' -import { - BodyShape, - NFTCategory, - Network, - Rarity, - WearableCategory -} from '@dcl/schemas' +import { BodyShape, NFTCategory, Network, Rarity, WearableCategory } from '@dcl/schemas' import { fireEvent, waitFor, within } from '@testing-library/react' import { catalogAPI } from '../../../modules/vendor/decentraland/catalog/api' import { renderWithProviders } from '../../../utils/test' @@ -17,10 +11,7 @@ import { VendorName } from '../../../modules/vendor' import { SortBy } from '../../../modules/routing/types' import { builderAPI } from '../../../modules/vendor/decentraland/builder/api' import { SearchBarDropdownProps } from './SearchBarDropdown.types' -import { - LOCAL_STORAGE_RECENT_SEARCHES_KEY, - SearchBarDropdown -} from './SearchBarDropdown' +import { LOCAL_STORAGE_RECENT_SEARCHES_KEY, SearchBarDropdown } from './SearchBarDropdown' import { COLLECTION_ROW_DATA_TEST_ID, NO_RESULTS_DATA_TEST_ID, @@ -78,13 +69,11 @@ const MOCKED_COLLECTION = { minters: ['0x214ffc0f0103735728dc66b61a22e4f163e275ae'], is_approved: true, reviewed_at: '2022-07-11T19:46:43.000Z', - forum_link: - 'https://forum.decentraland.org/t/collection-flock-fits-fuego-created-by-blocked-is-ready-for-review/12886', + forum_link: 'https://forum.decentraland.org/t/collection-flock-fits-fuego-created-by-blocked-is-ready-for-review/12886', lock: '2022-07-04T04:24:42.510Z', forum_id: 51917, item_count: '1', - urn: - 'urn:decentraland:matic:collections-v2:0x1682e68c0fc58716e24949ae72f6ca331dedf21b' + urn: 'urn:decentraland:matic:collections-v2:0x1682e68c0fc58716e24949ae72f6ca331dedf21b' } const MOCKED_CREATOR = { @@ -128,16 +117,13 @@ const MOCKED_ITEM = { minListingPrice: null, listings: 0, owners: null, - urn: - 'urn:decentraland:matic:collections-v2:0xffce00acc0d17eb01c3d2f9c3fcb3ab26519c562:0', + urn: 'urn:decentraland:matic:collections-v2:0xffce00acc0d17eb01c3d2f9c3fcb3ab26519c562:0', picks: { count: 0 } } -function renderSearchDropBarDropdown( - props: Partial<SearchBarDropdownProps> = {} -) { +function renderSearchDropBarDropdown(props: Partial<SearchBarDropdownProps> = {}) { const defaultProps: SearchBarDropdownProps = { searchTerm: '', category: NFTCategory.WEARABLE, @@ -203,10 +189,7 @@ describe('SearchBarDropdown', () => { it('should have the correct asset url in the result rendered', async () => { const { container } = renderSearchDropBarDropdown(props) await waitFor(async () => { - expect(within(container).getByRole('link')).toHaveAttribute( - 'href', - getAssetUrl(MOCKED_ITEM as Asset) - ) + expect(within(container).getByRole('link')).toHaveAttribute('href', getAssetUrl(MOCKED_ITEM as Asset)) }) }) @@ -215,18 +198,14 @@ describe('SearchBarDropdown', () => { await waitFor(async () => { const link = within(container).getByRole('link') await fireEvent.click(link) - expect( - localStorage.getItem(LOCAL_STORAGE_RECENT_SEARCHES_KEY) - ).toBe(JSON.stringify([MOCKED_ITEM])) + expect(localStorage.getItem(LOCAL_STORAGE_RECENT_SEARCHES_KEY)).toBe(JSON.stringify([MOCKED_ITEM])) }) }) it('should render the see all button', async () => { const { getByTestId } = renderSearchDropBarDropdown(props) await waitFor(async () => { - expect( - getByTestId(SEE_ALL_COLLECTIBLES_DATA_TEST_ID) - ).toBeInTheDocument() + expect(getByTestId(SEE_ALL_COLLECTIBLES_DATA_TEST_ID)).toBeInTheDocument() }) }) @@ -237,7 +216,7 @@ describe('SearchBarDropdown', () => { onSearch }) await waitFor(async () => { - let button = getByTestId(SEE_ALL_COLLECTIBLES_DATA_TEST_ID) + const button = getByTestId(SEE_ALL_COLLECTIBLES_DATA_TEST_ID) await fireEvent.click(button) expect(onSearch).toHaveBeenCalledWith({ value: props.searchTerm @@ -277,9 +256,7 @@ describe('SearchBarDropdown', () => { }) describe('and the user is searching for creators', () => { - const renderAndSelectCreatorsTab = async ( - props: Partial<SearchBarDropdownProps> = {} - ) => { + const renderAndSelectCreatorsTab = async (props: Partial<SearchBarDropdownProps> = {}) => { const render = renderSearchDropBarDropdown(props) await waitFor(() => { const creatorsTab = render.getByText('Creators') @@ -340,18 +317,14 @@ describe('SearchBarDropdown', () => { await waitFor(async () => { const link = within(container).getByRole('link') await fireEvent.click(link) - expect( - localStorage.getItem(LOCAL_STORAGE_RECENT_SEARCHES_KEY) - ).toBe(JSON.stringify([MOCKED_CREATOR])) + expect(localStorage.getItem(LOCAL_STORAGE_RECENT_SEARCHES_KEY)).toBe(JSON.stringify([MOCKED_CREATOR])) }) }) it('should not render the see all button', async () => { const { queryByTestId } = await renderAndSelectCreatorsTab(props) await waitFor(async () => { - expect( - queryByTestId(SEE_ALL_COLLECTIBLES_DATA_TEST_ID) - ).not.toBeInTheDocument() + expect(queryByTestId(SEE_ALL_COLLECTIBLES_DATA_TEST_ID)).not.toBeInTheDocument() }) }) }) @@ -373,9 +346,7 @@ describe('SearchBarDropdown', () => { }) describe('and the user is searching for collections', () => { - const renderAndSelectCollectionsTab = async ( - props: Partial<SearchBarDropdownProps> = {} - ) => { + const renderAndSelectCollectionsTab = async (props: Partial<SearchBarDropdownProps> = {}) => { const render = renderSearchDropBarDropdown(props) await waitFor(() => { const creatorsTab = render.getByText('Collections') @@ -390,9 +361,7 @@ describe('SearchBarDropdown', () => { describe('and there are results', () => { beforeEach(() => { - ;(builderAPI.fetchPublishedCollectionsBySearchTerm as jest.Mock).mockResolvedValue( - [MOCKED_COLLECTION] - ) + ;(builderAPI.fetchPublishedCollectionsBySearchTerm as jest.Mock).mockResolvedValue([MOCKED_COLLECTION]) ;(catalogAPI.get as jest.Mock).mockResolvedValue({ data: [] }) @@ -413,9 +382,7 @@ describe('SearchBarDropdown', () => { onSearch }) await waitFor(async () => { - const collectionRow = within(container).getByTestId( - `${COLLECTION_ROW_DATA_TEST_ID}-${MOCKED_COLLECTION.name}` - ) + const collectionRow = within(container).getByTestId(`${COLLECTION_ROW_DATA_TEST_ID}-${MOCKED_COLLECTION.name}`) await fireEvent.click(collectionRow) expect(onSearch).toHaveBeenCalledWith({ contractAddresses: [MOCKED_COLLECTION.contract_address] @@ -431,13 +398,9 @@ describe('SearchBarDropdown', () => { onSearch }) await waitFor(async () => { - const collectionRow = within(container).getByTestId( - `${COLLECTION_ROW_DATA_TEST_ID}-${MOCKED_COLLECTION.name}` - ) + const collectionRow = within(container).getByTestId(`${COLLECTION_ROW_DATA_TEST_ID}-${MOCKED_COLLECTION.name}`) await fireEvent.click(collectionRow) - expect( - localStorage.getItem(LOCAL_STORAGE_RECENT_SEARCHES_KEY) - ).toBe(JSON.stringify([MOCKED_COLLECTION])) + expect(localStorage.getItem(LOCAL_STORAGE_RECENT_SEARCHES_KEY)).toBe(JSON.stringify([MOCKED_COLLECTION])) }) }) }) @@ -445,9 +408,7 @@ describe('SearchBarDropdown', () => { it('should not render the see all button', async () => { const { queryByTestId } = await renderAndSelectCollectionsTab(props) await waitFor(async () => { - expect( - queryByTestId(SEE_ALL_COLLECTIBLES_DATA_TEST_ID) - ).not.toBeInTheDocument() + expect(queryByTestId(SEE_ALL_COLLECTIBLES_DATA_TEST_ID)).not.toBeInTheDocument() }) }) diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.tsx b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.tsx index e7294ecbde..1d8a114706 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.tsx +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.tsx @@ -32,9 +32,7 @@ function isCreatorRecentSearch(search: RecentSearch): search is CreatorAccount { return 'collections' in search } -function isCollectionRecentSearch( - search: RecentSearch -): search is BuilderCollectionAttributes { +function isCollectionRecentSearch(search: RecentSearch): search is BuilderCollectionAttributes { return 'contract_address' in search } @@ -73,17 +71,9 @@ export const SearchBarDropdown = ({ const handleSaveToLocalStorage = useCallback( (selection: RecentSearch) => { - if ( - !recentSearches.some( - recentSearch => - JSON.stringify(recentSearch) === JSON.stringify(selection) - ) - ) { + if (!recentSearches.some(recentSearch => JSON.stringify(recentSearch) === JSON.stringify(selection))) { const withNewSelection = [...recentSearches, selection] - localStorage.setItem( - LOCAL_STORAGE_RECENT_SEARCHES_KEY, - JSON.stringify(withNewSelection) - ) + localStorage.setItem(LOCAL_STORAGE_RECENT_SEARCHES_KEY, JSON.stringify(withNewSelection)) setRecentSearches(withNewSelection) } }, @@ -92,23 +82,15 @@ export const SearchBarDropdown = ({ const handleRemoveRecentSearch = useCallback( (item: RecentSearch) => { - const newRecentSearches = recentSearches.filter( - recentSearch => recentSearch !== item - ) - localStorage.setItem( - LOCAL_STORAGE_RECENT_SEARCHES_KEY, - JSON.stringify(newRecentSearches) - ) + const newRecentSearches = recentSearches.filter(recentSearch => recentSearch !== item) + localStorage.setItem(LOCAL_STORAGE_RECENT_SEARCHES_KEY, JSON.stringify(newRecentSearches)) setRecentSearches(newRecentSearches) }, [recentSearches] ) const handleSeeAll = useCallback(() => { - if ( - currentSearchTab === SearchTab.EMOTES || - currentSearchTab === SearchTab.WEARABLES - ) { + if (currentSearchTab === SearchTab.EMOTES || currentSearchTab === SearchTab.WEARABLES) { onSearch({ value: searchTerm }) getAnalytics().track(events.SEARCH_ALL, { tab: currentSearchTab, @@ -116,9 +98,7 @@ export const SearchBarDropdown = ({ searchUUID: uuidv5(searchTerm, UUID_NAMESPACE) }) } else if (currentSearchTab === SearchTab.COLLECTIONS) { - const contractAddresses = (results as BuilderCollectionAttributes[]).map( - collection => collection.contract_address - ) + const contractAddresses = (results as BuilderCollectionAttributes[]).map(collection => collection.contract_address) onSearch({ contractAddresses, value: '' }) getAnalytics().track(events.SEARCH_ALL, { tab: currentSearchTab, @@ -148,10 +128,7 @@ export const SearchBarDropdown = ({ let cancel = false if (searchTerm) { const searchUUID = uuidv5(searchTerm, UUID_NAMESPACE) - if ( - currentSearchTab === SearchTab.EMOTES || - currentSearchTab === SearchTab.WEARABLES - ) { + if (currentSearchTab === SearchTab.EMOTES || currentSearchTab === SearchTab.WEARABLES) { setIsLoading(true) catalogAPI .get({ @@ -195,9 +172,7 @@ export const SearchBarDropdown = ({ tab: currentSearchTab, searchTerm, searchUUID, - collections: response.map( - collection => collection.contract_address - ) + collections: response.map(collection => collection.contract_address) }) }) .finally(() => !cancel && setIsLoading(false)) @@ -209,22 +184,12 @@ export const SearchBarDropdown = ({ cancel = true } } - }, [ - category, - currentSearchTab, - searchTerm, - isSearchingEmotes, - isSearchingWearables, - onFetchCreators - ]) + }, [category, currentSearchTab, searchTerm, isSearchingEmotes, isSearchingWearables, onFetchCreators]) // tracks the click outside the main div and close suggestions if needed useEffect(() => { const handleClickOutside = (event: MouseEvent) => { - if ( - dropdownContainerRef.current && - !dropdownContainerRef.current.contains(event.target as Node) - ) { + if (dropdownContainerRef.current && !dropdownContainerRef.current.contains(event.target as Node)) { onClickOutside(event) } } @@ -257,41 +222,22 @@ export const SearchBarDropdown = ({ data-testid={`${COLLECTIBLE_DATA_TEST_ID}-${item.name}`} key={item.id} item={item} - onClick={collectible => - onCollectibleResultClick(collectible, index) - } + onClick={collectible => onCollectibleResultClick(collectible, index)} /> ))} - <Button - className={styles.seeAllButton} - inverted - fluid - onClick={handleSeeAll} - data-testid={SEE_ALL_COLLECTIBLES_DATA_TEST_ID} - > + <Button className={styles.seeAllButton} inverted fluid onClick={handleSeeAll} data-testid={SEE_ALL_COLLECTIBLES_DATA_TEST_ID}> <Icon name="search" className="searchIcon" /> - {isSearchingEmotes - ? t('search_dropdown.see_all_emotes') - : t('search_dropdown.see_all_wearables')} + {isSearchingEmotes ? t('search_dropdown.see_all_emotes') : t('search_dropdown.see_all_wearables')} </Button> </> ) : !isLoading ? ( - <span - className={styles.searchEmpty} - data-testid={NO_RESULTS_DATA_TEST_ID} - > + <span className={styles.searchEmpty} data-testid={NO_RESULTS_DATA_TEST_ID}> {t('search_dropdown.no_results')} </span> ) : null} </> ) - }, [ - handleSeeAll, - isLoading, - isSearchingEmotes, - onCollectibleResultClick, - results - ]) + }, [handleSeeAll, isLoading, isSearchingEmotes, onCollectibleResultClick, results]) const onCreatorsResultClick = useCallback( (creator, index) => { @@ -309,19 +255,11 @@ export const SearchBarDropdown = ({ const renderCreatorsSearch = useCallback(() => { return ( <> - {fetchedCreators - .slice(0, MAX_AMOUNT_OF_RESULTS) - .map((creator, index) => ( - <CreatorResultItemRow - key={creator.address} - creator={creator} - onClick={creator => onCreatorsResultClick(creator, index)} - /> - ))} + {fetchedCreators.slice(0, MAX_AMOUNT_OF_RESULTS).map((creator, index) => ( + <CreatorResultItemRow key={creator.address} creator={creator} onClick={creator => onCreatorsResultClick(creator, index)} /> + ))} {fetchedCreators.length === 0 && !isLoadingCreators ? ( - <span className={styles.searchEmpty}> - {t('search_dropdown.no_results')} - </span> + <span className={styles.searchEmpty}>{t('search_dropdown.no_results')}</span> ) : null} </> ) @@ -352,11 +290,7 @@ export const SearchBarDropdown = ({ data-testid={`${COLLECTION_ROW_DATA_TEST_ID}-${collection.name}`} /> ))} - {results.length === 0 && !isLoadingCreators ? ( - <span className={styles.searchEmpty}> - {t('search_dropdown.no_results')} - </span> - ) : null} + {results.length === 0 && !isLoadingCreators ? <span className={styles.searchEmpty}>{t('search_dropdown.no_results')}</span> : null} </> ) }, [isLoadingCreators, onCollectionResultClick, results]) @@ -366,31 +300,18 @@ export const SearchBarDropdown = ({ case SearchTab.COLLECTIONS: case SearchTab.WEARABLES: case SearchTab.EMOTES: - return [...Array(5).keys()].map(index => ( - <SearchBarDropdownOptionSkeleton key={index} /> - )) + return [...Array(5).keys()].map(index => <SearchBarDropdownOptionSkeleton key={index} />) default: - return [...Array(5).keys()].map(index => ( - <SearchBarDropdownOptionSkeleton - key={index} - lines={1} - shape="circle" - /> - )) + return [...Array(5).keys()].map(index => <SearchBarDropdownOptionSkeleton key={index} lines={1} shape="circle" />) } }, [currentSearchTab]) const renderRecentContent = useCallback(() => { if (recentSearches.length) { return ( - <div - className={styles.recentSearchesContainer} - data-testid={RECENT_SEARCHES_DATA_TEST_ID} - > - <div className={styles.recentSearchesTitle}> - {t('search_dropdown.recent')} - </div> + <div className={styles.recentSearchesContainer} data-testid={RECENT_SEARCHES_DATA_TEST_ID}> + <div className={styles.recentSearchesTitle}>{t('search_dropdown.recent')}</div> {[...recentSearches] .reverse() .slice(0, MAX_RECENT_RESULTS) @@ -398,11 +319,7 @@ export const SearchBarDropdown = ({ <div className={styles.recentSearchContainer} key={index}> {isCollectionRecentSearch(recentSearch) ? ( <> - <img - src={clock} - alt="clock" - className={styles.recentIcon} - /> + <img src={clock} alt="clock" className={styles.recentIcon} /> <CollectionResultRow key={recentSearch.contract_address} collection={recentSearch} @@ -415,28 +332,13 @@ export const SearchBarDropdown = ({ </> ) : isCreatorRecentSearch(recentSearch) ? ( <> - <img - src={clock} - alt="clock" - className={styles.recentIcon} - /> - <CreatorResultItemRow - key={recentSearch.address} - creator={recentSearch} - onClick={handleSaveToLocalStorage} - /> + <img src={clock} alt="clock" className={styles.recentIcon} /> + <CreatorResultItemRow key={recentSearch.address} creator={recentSearch} onClick={handleSaveToLocalStorage} /> </> ) : isItemRecentSearch(recentSearch) ? ( <> - <img - src={clock} - alt="clock" - className={styles.recentIcon} - /> - <CollectibleResultItemRow - item={recentSearch} - onClick={handleSaveToLocalStorage} - /> + <img src={clock} alt="clock" className={styles.recentIcon} /> + <CollectibleResultItemRow item={recentSearch} onClick={handleSaveToLocalStorage} /> </> ) : null} <Close onClick={() => handleRemoveRecentSearch(recentSearch)} /> @@ -445,12 +347,7 @@ export const SearchBarDropdown = ({ </div> ) } - }, [ - handleRemoveRecentSearch, - handleSaveToLocalStorage, - onSearch, - recentSearches - ]) + }, [handleRemoveRecentSearch, handleSaveToLocalStorage, onSearch, recentSearches]) const renderContent = useCallback(() => { if (isLoading || isLoadingCreators) { @@ -489,29 +386,15 @@ export const SearchBarDropdown = ({ <div className={styles.tabsContainer}> <Tabs> <Tabs.Tab - active={ - isSearchingWearables - ? currentSearchTab === SearchTab.WEARABLES - : currentSearchTab === SearchTab.EMOTES - } - onClick={() => - handleTabChange( - isSearchingWearables ? SearchTab.WEARABLES : SearchTab.EMOTES - ) - } + active={isSearchingWearables ? currentSearchTab === SearchTab.WEARABLES : currentSearchTab === SearchTab.EMOTES} + onClick={() => handleTabChange(isSearchingWearables ? SearchTab.WEARABLES : SearchTab.EMOTES)} > {isSearchingWearables ? t('menu.wearables') : t('menu.emotes')} </Tabs.Tab> - <Tabs.Tab - active={currentSearchTab === SearchTab.CREATORS} - onClick={() => handleTabChange(SearchTab.CREATORS)} - > + <Tabs.Tab active={currentSearchTab === SearchTab.CREATORS} onClick={() => handleTabChange(SearchTab.CREATORS)}> {t('search_dropdown.creators')} </Tabs.Tab> - <Tabs.Tab - active={currentSearchTab === SearchTab.COLLECTIONS} - onClick={() => handleTabChange(SearchTab.COLLECTIONS)} - > + <Tabs.Tab active={currentSearchTab === SearchTab.COLLECTIONS} onClick={() => handleTabChange(SearchTab.COLLECTIONS)}> {t('search_dropdown.collections')} </Tabs.Tab> </Tabs> @@ -520,11 +403,7 @@ export const SearchBarDropdown = ({ }, [currentSearchTab, handleTabChange, isSearchingWearables]) return recentSearches.length || searchTerm ? ( - <div - className={styles.searchBarDropdown} - ref={dropdownContainerRef} - data-testid="search-bar-dropdown" - > + <div className={styles.searchBarDropdown} ref={dropdownContainerRef} data-testid="search-bar-dropdown"> {searchTerm ? ( <> {renderTabs()} diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.types.ts b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.types.ts index 5e10d93c8b..249045b9f6 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.types.ts +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdown.types.ts @@ -1,21 +1,12 @@ import { Dispatch } from 'redux' import { NFTCategory } from '@dcl/schemas' -import { - FetchCreatorsAccountRequestAction, - fetchCreatorsAccountRequest -} from '../../../modules/account/actions' +import { FetchCreatorsAccountRequestAction, fetchCreatorsAccountRequest } from '../../../modules/account/actions' import { CreatorAccount } from '../../../modules/account/types' export type SearchBarDropdownProps = { searchTerm: string category: NFTCategory | undefined - onSearch: ({ - value, - contractAddresses - }: { - value?: string - contractAddresses?: string[] - }) => void + onSearch: ({ value, contractAddresses }: { value?: string; contractAddresses?: string[] }) => void fetchedCreators: CreatorAccount[] onFetchCreators: typeof fetchCreatorsAccountRequest isLoadingCreators: boolean @@ -29,10 +20,7 @@ export enum SearchTab { COLLECTIONS = 'collections' } -export type MapStateProps = Pick< - SearchBarDropdownProps, - 'fetchedCreators' | 'isLoadingCreators' -> +export type MapStateProps = Pick<SearchBarDropdownProps, 'fetchedCreators' | 'isLoadingCreators'> export type MapDispatchProps = Pick<SearchBarDropdownProps, 'onFetchCreators'> export type MapDispatch = Dispatch<FetchCreatorsAccountRequestAction> diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdownOptionSkeleton/SearchBarDropdownOptionSkeleton.tsx b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdownOptionSkeleton/SearchBarDropdownOptionSkeleton.tsx index c8fcf40057..5d4b24d86a 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdownOptionSkeleton/SearchBarDropdownOptionSkeleton.tsx +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/SearchBarDropdownOptionSkeleton/SearchBarDropdownOptionSkeleton.tsx @@ -7,21 +7,10 @@ type SearchBarDropdownOptionSkeletonProps = { lines?: 1 | 2 } -const SearchBarDropdownOptionSkeleton = ({ - shape = 'rect', - lines = 2 -}: SearchBarDropdownOptionSkeletonProps) => { +const SearchBarDropdownOptionSkeleton = ({ shape = 'rect', lines = 2 }: SearchBarDropdownOptionSkeletonProps) => { return ( - <div - className={styles.skeletonContainer} - data-testid={SKELETONS_DATA_TEST_ID} - > - <div - className={classNames( - styles.assetImageSkeleton, - shape === 'rect' ? styles.rectangle : styles.circle - )} - /> + <div className={styles.skeletonContainer} data-testid={SKELETONS_DATA_TEST_ID}> + <div className={classNames(styles.assetImageSkeleton, shape === 'rect' ? styles.rectangle : styles.circle)} /> <div className={styles.skeletonDataContainer}> <span className={styles.itemNameSkeleton} /> {lines > 1 ? <span className={styles.creatorSkeleton} /> : null} diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/constants.ts b/webapp/src/components/AssetTopbar/SearchBarDropdown/constants.ts index 5ad4c034b2..40632637c4 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/constants.ts +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/constants.ts @@ -3,4 +3,4 @@ export const SKELETONS_DATA_TEST_ID = 'skeletons' export const COLLECTIBLE_DATA_TEST_ID = 'collectible' export const COLLECTION_ROW_DATA_TEST_ID = 'collection-row' export const SEE_ALL_COLLECTIBLES_DATA_TEST_ID = 'see-all-collectibles' -export const NO_RESULTS_DATA_TEST_ID = 'no-results' \ No newline at end of file +export const NO_RESULTS_DATA_TEST_ID = 'no-results' diff --git a/webapp/src/components/AssetTopbar/SearchBarDropdown/index.ts b/webapp/src/components/AssetTopbar/SearchBarDropdown/index.ts index 0d2337e716..e76a3c9603 100644 --- a/webapp/src/components/AssetTopbar/SearchBarDropdown/index.ts +++ b/webapp/src/components/AssetTopbar/SearchBarDropdown/index.ts @@ -1,4 +1,2 @@ import SearchBarDropdown from './SearchBarDropdown.container' export { SearchBarDropdown } - - diff --git a/webapp/src/components/AssetTopbar/SelectedFilters/Pill/Pill.tsx b/webapp/src/components/AssetTopbar/SelectedFilters/Pill/Pill.tsx index 90a2c787bf..e883bc7d78 100644 --- a/webapp/src/components/AssetTopbar/SelectedFilters/Pill/Pill.tsx +++ b/webapp/src/components/AssetTopbar/SelectedFilters/Pill/Pill.tsx @@ -9,23 +9,11 @@ type Props = { onDelete: (id: string) => void } -export const Pill = ({ - id, - label, - className, - onDelete -}: Props): JSX.Element => { +export const Pill = ({ id, label, className, onDelete }: Props): JSX.Element => { return ( - <div - className={classNames(styles.pill, className)} - data-testid={`pill-${id}`} - > + <div className={classNames(styles.pill, className)} data-testid={`pill-${id}`}> {label} - <button - onClick={onDelete.bind(null, id)} - data-testid="b" - className={styles.deleteBtn} - > + <button onClick={onDelete.bind(null, id)} data-testid="b" className={styles.deleteBtn}> <Icon name="times" /> </button> </div> diff --git a/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.container.ts b/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.container.ts index 1343e4a096..fe424da4cd 100644 --- a/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.container.ts +++ b/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.container.ts @@ -3,10 +3,7 @@ import { Dispatch } from 'redux' import { RootState } from '../../../modules/reducer' import { browse } from '../../../modules/routing/actions' import { isLandSection } from '../../../modules/ui/utils' -import { - getCurrentBrowseOptions, - getSection -} from '../../../modules/routing/selectors' +import { getCurrentBrowseOptions, getSection } from '../../../modules/routing/selectors' import { MapStateProps, MapDispatchProps } from './SelectedFilters.types' import { SelectedFilters } from './SelectedFilters' import { getCategoryFromSection } from '../../../modules/routing/search' diff --git a/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.spec.tsx b/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.spec.tsx index 8648a4f225..e994b31826 100644 --- a/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.spec.tsx +++ b/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.spec.tsx @@ -8,15 +8,7 @@ import { getCollectionByAddress } from './utils' jest.mock('./utils') function renderSelectedFilters(props: Partial<Props> = {}) { - return render( - <SelectedFilters - isLandSection={false} - category={undefined} - browseOptions={{}} - onBrowse={jest.fn()} - {...props} - /> - ) + return render(<SelectedFilters isLandSection={false} category={undefined} browseOptions={{}} onBrowse={jest.fn()} {...props} />) } describe('rarities filter', () => { @@ -72,21 +64,13 @@ describe.each([ ['onlySmart', { onlySmart: true }, { onlySmart: undefined }], ['onlyOnSale', { onlyOnSale: false }, { onlyOnSale: true }], ['adjacentToRoad', { adjacentToRoad: true }, { adjacentToRoad: undefined }], - [ - 'price', - { minPrice: '10', maxPrice: '100' }, - { minPrice: undefined, maxPrice: undefined } - ], + ['price', { minPrice: '10', maxPrice: '100' }, { minPrice: undefined, maxPrice: undefined }], [ 'distanceToPlaza', { minDistanceToPlaza: '2', maxDistanceToPlaza: '10' }, { minDistanceToPlaza: undefined, maxDistanceToPlaza: undefined } ], - [ - 'estateSize', - { minEstateSize: '1', maxEstateSize: '5' }, - { minEstateSize: undefined, maxEstateSize: undefined } - ] + ['estateSize', { minEstateSize: '1', maxEstateSize: '5' }, { minEstateSize: undefined, maxEstateSize: undefined }] ])('%s filter', (id, browseOptions, resettedOptions) => { test(`should render ${id} filter pill`, () => { const { getByTestId } = renderSelectedFilters({ browseOptions }) @@ -113,16 +97,9 @@ describe('collections filter', () => { beforeEach(() => { contract1 = '0xanAddress' contract2 = '0xanotherAddress' - collectionsData = [ - { contractAddress: contract1 }, - { contractAddress: contract2 } - ] - ;(getCollectionByAddress as jest.Mock).mockResolvedValueOnce( - collectionsData[0] - ) - ;(getCollectionByAddress as jest.Mock).mockResolvedValueOnce( - collectionsData[1] - ) + collectionsData = [{ contractAddress: contract1 }, { contractAddress: contract2 }] + ;(getCollectionByAddress as jest.Mock).mockResolvedValueOnce(collectionsData[0]) + ;(getCollectionByAddress as jest.Mock).mockResolvedValueOnce(collectionsData[1]) }) test.only('should render pill for each collection selected', async () => { @@ -130,15 +107,7 @@ describe('collections filter', () => { browseOptions: { contracts: [contract1, contract2] } }) - expect( - await findByTestId( - `pill-collection-${collectionsData[0].contractAddress}` - ) - ).toBeInTheDocument() - expect( - await findByTestId( - `pill-collection-${collectionsData[1].contractAddress}` - ) - ).toBeInTheDocument() + expect(await findByTestId(`pill-collection-${collectionsData[0].contractAddress}`)).toBeInTheDocument() + expect(await findByTestId(`pill-collection-${collectionsData[1].contractAddress}`)).toBeInTheDocument() }) }) diff --git a/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.tsx b/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.tsx index 7dfa64e583..749722a68e 100644 --- a/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.tsx +++ b/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.tsx @@ -6,11 +6,11 @@ import { getGenderFilterLabel, getLandLabel, getNetwork, - getPriceLabel + getPriceLabel, + AssetStatusFilter } from '../../../utils/filters' import { CreatorAccount } from '../../../modules/account/types' import ProfilesCache from '../../../lib/profiles' -import { AssetStatusFilter } from '../../../utils/filters' import { profileToCreatorAccount } from '../../AssetFilters/CreatorsFilter/utils' import { AssetType } from '../../../modules/asset/types' import { Pill } from './Pill/Pill' @@ -18,12 +18,7 @@ import { Props } from './SelectedFilters.types' import { getCollectionByAddress } from './utils' import styles from './SelectedFilters.module.css' -export const SelectedFilters = ({ - browseOptions, - isLandSection, - category, - onBrowse -}: Props) => { +export const SelectedFilters = ({ browseOptions, isLandSection, category, onBrowse }: Props) => { const { rarities, network, @@ -47,13 +42,9 @@ export const SelectedFilters = ({ emoteHasSound, emoteHasGeometry } = browseOptions - const [collections, setCollections] = useState<Record<string, string>[] | []>( - [] - ) + const [collections, setCollections] = useState<Record<string, string>[] | []>([]) - const [selectedCreators, setSelectedCreators] = useState< - Pick<CreatorAccount, 'address' | 'name'>[] - >() + const [selectedCreators, setSelectedCreators] = useState<Pick<CreatorAccount, 'address' | 'name'>[]>() useEffect(() => { const fetchData = async (contract: string) => { @@ -91,10 +82,7 @@ export const SelectedFilters = ({ [minPrice, maxPrice, network, category] ) - const estateSizeLabel = useMemo( - () => getEstateSizeLabel(minEstateSize, maxEstateSize), - [minEstateSize, maxEstateSize] - ) + const estateSizeLabel = useMemo(() => getEstateSizeLabel(minEstateSize, maxEstateSize), [minEstateSize, maxEstateSize]) const landStatusLabel = useMemo(() => { if (isLandSection && (onlyOnSale || onlyOnRent)) { @@ -178,9 +166,7 @@ export const SelectedFilters = ({ const handleDeleteRentalDays = useCallback( removeDays => { onBrowse({ - rentalDays: rentalDays?.filter( - day => removeDays.toString() !== day.toString() - ) + rentalDays: rentalDays?.filter(day => removeDays.toString() !== day.toString()) }) }, [onBrowse, rentalDays] @@ -197,41 +183,14 @@ export const SelectedFilters = ({ return ( <div className={styles.pillContainer}> {emoteHasSound ? ( - <Pill - label={t('nft_filters.emote_attributes.with_sound')} - id="emoteHasSound" - onDelete={handleDeleteEmoteHasSound} - /> + <Pill label={t('nft_filters.emote_attributes.with_sound')} id="emoteHasSound" onDelete={handleDeleteEmoteHasSound} /> ) : null} {emoteHasGeometry ? ( - <Pill - label={t('nft_filters.emote_attributes.with_props')} - id="emoteHasGeomtry" - onDelete={handleDeleteEmoteHasGeometry} - /> - ) : null} - {rarities?.map(rarity => ( - <Pill - key={rarity} - label={rarity} - id={rarity} - onDelete={handleDeleteRarity} - /> - ))} - {network ? ( - <Pill - label={t(`networks.${network.toLowerCase()}`)} - id="network" - onDelete={handleDeleteNetwork} - /> - ) : null} - {onlySmart ? ( - <Pill - label={t('nft_filters.only_smart.selected')} - id="onlySmart" - onDelete={handleDeleteOnlySmart} - /> + <Pill label={t('nft_filters.emote_attributes.with_props')} id="emoteHasGeomtry" onDelete={handleDeleteEmoteHasGeometry} /> ) : null} + {rarities?.map(rarity => <Pill key={rarity} label={rarity} id={rarity} onDelete={handleDeleteRarity} />)} + {network ? <Pill label={t(`networks.${network.toLowerCase()}`)} id="network" onDelete={handleDeleteNetwork} /> : null} + {onlySmart ? <Pill label={t('nft_filters.only_smart.selected')} id="onlySmart" onDelete={handleDeleteOnlySmart} /> : null} {collections.length ? collections.map(collection => ( <Pill @@ -244,65 +203,22 @@ export const SelectedFilters = ({ : null} {selectedCreators?.length ? selectedCreators.map(creator => ( - <Pill - key={creator.address} - label={creator.name} - id={creator.address} - onDelete={() => handleDeleteCreator(creator.address)} - /> + <Pill key={creator.address} label={creator.name} id={creator.address} onDelete={() => handleDeleteCreator(creator.address)} /> )) : null} {wearableGenders?.length ? ( - <Pill - label={t(getGenderFilterLabel(wearableGenders))} - id="wearable_genders" - onDelete={handleDeleteGender} - /> + <Pill label={t(getGenderFilterLabel(wearableGenders))} id="wearable_genders" onDelete={handleDeleteGender} /> ) : null} {!onlyOnSale && !isLandSection && assetType !== AssetType.ITEM ? ( // TODO UNIFIED: CHECK THIS - <Pill - label={t('nft_filters.not_on_sale')} - id="onlyOnSale" - onDelete={handleDeleteOnlySale} - /> + <Pill label={t('nft_filters.not_on_sale')} id="onlyOnSale" onDelete={handleDeleteOnlySale} /> ) : null} {emotePlayMode?.map(playMode => ( - <Pill - key={playMode} - label={t(`emote.play_mode.${playMode}`)} - onDelete={handleDeleteEmotePlayMode} - id={playMode} - /> + <Pill key={playMode} label={t(`emote.play_mode.${playMode}`)} onDelete={handleDeleteEmotePlayMode} id={playMode} /> ))} - {minPrice || maxPrice ? ( - <Pill - label={priceLabel} - className={styles.pricePill} - onDelete={handleDeletePrice} - id="price" - /> - ) : null} - {minEstateSize || maxEstateSize ? ( - <Pill - label={estateSizeLabel} - onDelete={handleDeleteEstateSize} - id="estateSize" - /> - ) : null} - {isLandSection && landStatusLabel ? ( - <Pill - label={landStatusLabel} - onDelete={handleDeleteLandStatus} - id="land_filter" - /> - ) : null} - {adjacentToRoad ? ( - <Pill - label={t('nft_filters.adjacent_to_road')} - onDelete={handleDeleteAdjacentToRoad} - id="adjacentToRoad" - /> - ) : null} + {minPrice || maxPrice ? <Pill label={priceLabel} className={styles.pricePill} onDelete={handleDeletePrice} id="price" /> : null} + {minEstateSize || maxEstateSize ? <Pill label={estateSizeLabel} onDelete={handleDeleteEstateSize} id="estateSize" /> : null} + {isLandSection && landStatusLabel ? <Pill label={landStatusLabel} onDelete={handleDeleteLandStatus} id="land_filter" /> : null} + {adjacentToRoad ? <Pill label={t('nft_filters.adjacent_to_road')} onDelete={handleDeleteAdjacentToRoad} id="adjacentToRoad" /> : null} {minDistanceToPlaza || maxDistanceToPlaza ? ( <Pill label={t('nft_filters.distance_to_plaza.selection', { @@ -324,12 +240,7 @@ export const SelectedFilters = ({ )) : null} {status && status !== AssetStatusFilter.ON_SALE ? ( - <Pill - key={status} - label={t(`nft_filters.status.${status}`)} - onDelete={handleDeleteStatus} - id={status.toString()} - /> + <Pill key={status} label={t(`nft_filters.status.${status}`)} onDelete={handleDeleteStatus} id={status.toString()} /> ) : null} </div> ) diff --git a/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.types.ts b/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.types.ts index 7d8623d073..d89025d5a5 100644 --- a/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.types.ts +++ b/webapp/src/components/AssetTopbar/SelectedFilters/SelectedFilters.types.ts @@ -9,8 +9,5 @@ export type Props = { onBrowse: typeof browse } -export type MapStateProps = Pick< - Props, - 'browseOptions' | 'isLandSection' | 'category' -> +export type MapStateProps = Pick<Props, 'browseOptions' | 'isLandSection' | 'category'> export type MapDispatchProps = Pick<Props, 'onBrowse'> diff --git a/webapp/src/components/AssetTopbar/SelectedFilters/utils.ts b/webapp/src/components/AssetTopbar/SelectedFilters/utils.ts index 3da3fb8d6f..8b3ce622de 100644 --- a/webapp/src/components/AssetTopbar/SelectedFilters/utils.ts +++ b/webapp/src/components/AssetTopbar/SelectedFilters/utils.ts @@ -7,4 +7,3 @@ export async function getCollectionByAddress(address: string) { return data[0] } - diff --git a/webapp/src/components/AssetTopbar/utils.ts b/webapp/src/components/AssetTopbar/utils.ts index e3c4586c7f..01037ea62e 100644 --- a/webapp/src/components/AssetTopbar/utils.ts +++ b/webapp/src/components/AssetTopbar/utils.ts @@ -1,31 +1,18 @@ import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { MAX_QUERY_SIZE } from '../../modules/vendor/api' -export function getCountText( - count: number | undefined, - search: string | undefined -) { +export function getCountText(count: number | undefined, search: string | undefined) { if (count === undefined) { return '' } else if (search) { return count > 0 - ? t( - count < MAX_QUERY_SIZE - ? 'nft_filters.query_results' - : 'nft_filters.query_more_than_results', - { - count: count.toLocaleString(), - search - } - ) + ? t(count < MAX_QUERY_SIZE ? 'nft_filters.query_results' : 'nft_filters.query_more_than_results', { + count: count.toLocaleString(), + search + }) : t('nft_filters.no_items') } - return t( - count < MAX_QUERY_SIZE - ? 'nft_filters.results' - : 'nft_filters.more_than_results', - { - count: count.toLocaleString() - } - ) + return t(count < MAX_QUERY_SIZE ? 'nft_filters.results' : 'nft_filters.more_than_results', { + count: count.toLocaleString() + }) } diff --git a/webapp/src/components/Atlas/Atlas.tsx b/webapp/src/components/Atlas/Atlas.tsx index 9620c8cda6..c9bec1353d 100644 --- a/webapp/src/components/Atlas/Atlas.tsx +++ b/webapp/src/components/Atlas/Atlas.tsx @@ -1,14 +1,8 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { Button, Popup as UIPopup } from 'decentraland-ui' +import { Button, Popup as UIPopup, Atlas as AtlasComponent, AtlasTile, Color, Layer } from 'decentraland-ui' import { NFTCategory, RentalStatus } from '@dcl/schemas' import classNames from 'classnames' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - Atlas as AtlasComponent, - AtlasTile, - Color, - Layer -} from 'decentraland-ui' import { locations } from '../../modules/routing/locations' import { isErrorWithMessage } from '../../lib/error' import { nftAPI } from '../../modules/vendor/decentraland/nft/api' @@ -52,11 +46,7 @@ const Atlas: React.FC<Props> = (props: Props) => { const timeout = useRef<ReturnType<typeof setTimeout> | null>(null) const selection = useMemo( - () => - (props.selection || []).reduce( - (set, pair) => set.add(getCoords(pair.x, pair.y)), - new Set<string>() - ), + () => (props.selection || []).reduce((set, pair) => set.add(getCoords(pair.x, pair.y)), new Set<string>()), [props.selection] ) @@ -91,26 +81,12 @@ const Atlas: React.FC<Props> = (props: Props) => { [tilesByEstateId] ) - const userTiles = useMemo( - () => - nfts.reduce( - (lands, nft) => setLand(lands, nft), - new Map<string, ReturnType<Layer>>() - ), - [nfts, setLand] - ) + const userTiles = useMemo(() => nfts.reduce((lands, nft) => setLand(lands, nft), new Map<string, ReturnType<Layer>>()), [nfts, setLand]) const userRentedTiles = useMemo( () => nftsOnRent.reduce( - (lands, [nft, rental]) => - setLand( - lands, - nft, - rental.status === RentalStatus.EXECUTED - ? Color.SUNISH - : Color.SUMMER_RED - ), + (lands, [nft, rental]) => setLand(lands, nft, rental.status === RentalStatus.EXECUTED ? Color.SUNISH : Color.SUMMER_RED), new Map<string, ReturnType<Layer>>() ), [nftsOnRent, setLand] @@ -125,14 +101,7 @@ const Atlas: React.FC<Props> = (props: Props) => { const id = selection.values().next().value as string const center = tiles[id] as Tile const tile = tiles[getCoords(x, y)] as Tile - if ( - center && - tile && - center.estate_id && - tile.estate_id && - center.estate_id === tile.estate_id && - isEstate - ) { + if (center && tile && center.estate_id && tile.estate_id && center.estate_id === tile.estate_id && isEstate) { return true } return false @@ -144,11 +113,7 @@ const Atlas: React.FC<Props> = (props: Props) => { (x: number, y: number) => { const key = getCoords(x, y) const tile = tiles[key] as AtlasTile & { price?: string } - if ( - tile && - (('price' in tile && showOnSale) || - ('rentalPricePerDay' in tile && showForRent)) - ) { + if (tile && (('price' in tile && showOnSale) || ('rentalPricePerDay' in tile && showForRent))) { return { color: '#00d3ff', left: !!tile.left, @@ -175,10 +140,7 @@ const Atlas: React.FC<Props> = (props: Props) => { [isSelected] ) - const allUserTiles = useMemo( - () => new Map([...userTiles].concat([...userRentedTiles])), - [userRentedTiles, userTiles] - ) + const allUserTiles = useMemo(() => new Map([...userTiles].concat([...userRentedTiles])), [userRentedTiles, userTiles]) const userLayer: Layer = useCallback( (x: number, y: number) => { @@ -214,12 +176,8 @@ const Atlas: React.FC<Props> = (props: Props) => { const tokenId = await nftAPI.fetchTokenId(tile.x, tile.y) land && onNavigate(locations.nft(land.address, tokenId)) } catch (error) { - const errorMessage = isErrorWithMessage(error) - ? error.message - : t('global.unknown_error') - console.warn( - `Couldn't fetch parcel ${tile.x},${tile.y}: ${errorMessage}` - ) + const errorMessage = isErrorWithMessage(error) ? error.message : t('global.unknown_error') + console.warn(`Couldn't fetch parcel ${tile.x},${tile.y}: ${errorMessage}`) } } }, @@ -237,10 +195,7 @@ const Atlas: React.FC<Props> = (props: Props) => { const tile = tiles[id] const tileRent = tile ? nftsOnRent.find(([nft]) => - nft.data.parcel - ? Number(nft.data.parcel.x) === tile.x && - Number(nft.data.parcel.y) === tile.y - : null + nft.data.parcel ? Number(nft.data.parcel.x) === tile.x && Number(nft.data.parcel.y) === tile.y : null ) : null @@ -300,9 +255,7 @@ const Atlas: React.FC<Props> = (props: Props) => { } }, [withPopup, showPopup, mouseX, mouseY]) - const handleInfoPopupOpen = useCallback(() => setIsInfoPopupOpen(true), [ - setIsInfoPopupOpen - ]) + const handleInfoPopupOpen = useCallback(() => setIsInfoPopupOpen(true), [setIsInfoPopupOpen]) const handleInfoPopupClose = useCallback( (evt: React.MouseEvent) => { @@ -313,12 +266,7 @@ const Atlas: React.FC<Props> = (props: Props) => { ) // layers - const layers = [ - userLayer, - ...(props.layers || []), - selectedStrokeLayer, - selectedFillLayer - ] + const layers = [userLayer, ...(props.layers || []), selectedStrokeLayer, selectedFillLayer] if (showOnSale || showForRent) { layers.unshift(forSaleOrRentLayer) @@ -330,25 +278,13 @@ const Atlas: React.FC<Props> = (props: Props) => { <UIPopup content={ <div className="atlas-references-container"> - <h3 className="references-title"> - {t('nft_filters.map.map_colors')} - </h3> + <h3 className="references-title">{t('nft_filters.map.map_colors')}</h3> <div className="atlas-references"> - <span className="reference plaza"> - {t('nft_filters.map.plaza')} - </span> - <span className="reference owned"> - {t('nft_filters.map.owned_land')} - </span> - <span className="reference rented"> - {t('nft_filters.map.rented_land')} - </span> - <span className="reference sale"> - {t('nft_filters.map.sale_or_rent')} - </span> - <span className="reference taken"> - {t('nft_filters.map.taken')} - </span> + <span className="reference plaza">{t('nft_filters.map.plaza')}</span> + <span className="reference owned">{t('nft_filters.map.owned_land')}</span> + <span className="reference rented">{t('nft_filters.map.rented_land')}</span> + <span className="reference sale">{t('nft_filters.map.sale_or_rent')}</span> + <span className="reference taken">{t('nft_filters.map.taken')}</span> </div> </div> } @@ -378,9 +314,7 @@ const Atlas: React.FC<Props> = (props: Props) => { layers={layers} withZoomControls={withZoomControls} /> - {lastAtlasModifiedDate && - lastUpdated && - lastUpdated > lastAtlasModifiedDate ? ( + {lastAtlasModifiedDate && lastUpdated && lastUpdated > lastAtlasModifiedDate ? ( <ErrorBanner className="atlas-warning-banner" info={t('atlas_updated_warning.info', { @@ -389,13 +323,7 @@ const Atlas: React.FC<Props> = (props: Props) => { /> ) : null} {hoveredTile ? ( - <Popup - x={x} - y={y} - visible={showPopup} - tile={hoveredTile} - position={x > window.innerWidth - 280 ? 'left' : 'right'} - /> + <Popup x={x} y={y} visible={showPopup} tile={hoveredTile} position={x > window.innerWidth - 280 ? 'left' : 'right'} /> ) : null} {children} </div> diff --git a/webapp/src/components/Atlas/Atlas.types.ts b/webapp/src/components/Atlas/Atlas.types.ts index f9126ccbdd..18c2704049 100644 --- a/webapp/src/components/Atlas/Atlas.types.ts +++ b/webapp/src/components/Atlas/Atlas.types.ts @@ -39,9 +39,6 @@ export type Props = Partial<AtlasProps> & { children?: React.ReactNode } -export type MapStateProps = Pick< - Props, - 'tiles' | 'nfts' | 'nftsOnRent' | 'tilesByEstateId' | 'getContract' | 'lastAtlasModifiedDate' -> +export type MapStateProps = Pick<Props, 'tiles' | 'nfts' | 'nftsOnRent' | 'tilesByEstateId' | 'getContract' | 'lastAtlasModifiedDate'> export type MapDispatchProps = Pick<Props, 'onNavigate'> export type MapDispatch = Dispatch<CallHistoryMethodAction> diff --git a/webapp/src/components/Atlas/Popup/Popup.tsx b/webapp/src/components/Atlas/Popup/Popup.tsx index 04869f8987..a1334601d9 100644 --- a/webapp/src/components/Atlas/Popup/Popup.tsx +++ b/webapp/src/components/Atlas/Popup/Popup.tsx @@ -26,27 +26,19 @@ export default class Popup extends React.PureComponent<Props> { return ( <div - className={`AtlasPopup ${position} ${ - tile.owner ? 'has-owner' : 'no-owner' - }`} + className={`AtlasPopup ${position} ${tile.owner ? 'has-owner' : 'no-owner'}`} style={{ top: y, left: x, opacity: visible ? 1 : 0 }} > <Section className="land-name"> <Row className="name-row"> - <span className="name"> - {tile.name || - (!isEstate ? t('global.parcel') : t('global.estate'))} - </span> + <span className="name">{tile.name || (!isEstate ? t('global.parcel') : t('global.estate'))}</span> <Coordinate className="coordinates" x={tile.x} y={tile.y} /> </Row> </Section> <Section className="owner"> <Header sub>{t('atlas.owner')}</Header> - <Profile - address={tile.owner || ethers.constants.AddressZero} - debounce={500} - /> + <Profile address={tile.owner || ethers.constants.AddressZero} debounce={500} /> </Section> {tile.price || tile.rentalPricePerDay ? ( diff --git a/webapp/src/components/Bid/AcceptButton/AcceptButton.tsx b/webapp/src/components/Bid/AcceptButton/AcceptButton.tsx index 68790a1361..8bf53dadc8 100644 --- a/webapp/src/components/Bid/AcceptButton/AcceptButton.tsx +++ b/webapp/src/components/Bid/AcceptButton/AcceptButton.tsx @@ -3,10 +3,7 @@ import { Button, Popup } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { useFingerprint } from '../../../modules/nft/hooks' -import { - isInsufficientMANA, - checkFingerprint -} from '../../../modules/bid/utils' +import { isInsufficientMANA, checkFingerprint } from '../../../modules/bid/utils' import { isLandLocked } from '../../../modules/rental/utils' import { LandLockedPopup } from '../../LandLockedPopup' import { Props } from './AcceptButton.types' @@ -16,27 +13,18 @@ const AcceptButton = (props: Props) => { const [fingerprint, isLoadingFingerprint] = useFingerprint(nft) const [hasInsufficientMANA, setHasInsufficientMANA] = useState(false) - const isCurrentlyLocked = - rental && nft && isLandLocked(userAddress, rental, nft) + const isCurrentlyLocked = rental && nft && isLandLocked(userAddress, rental, nft) useEffect(() => { isInsufficientMANA(bid) .then(setHasInsufficientMANA) - .catch(error => - console.error(`Could not get the MANA from bidder ${bid.bidder}`, error) - ) + .catch(error => console.error(`Could not get the MANA from bidder ${bid.bidder}`, error)) }, [bid]) const isValidFingerprint = checkFingerprint(bid, fingerprint) const isValidSeller = !!nft && nft.owner === bid.seller - const isDisabled = - isCurrentlyLocked || - !nft || - isLoadingFingerprint || - hasInsufficientMANA || - !isValidFingerprint || - !isValidSeller + const isDisabled = isCurrentlyLocked || !nft || isLoadingFingerprint || hasInsufficientMANA || !isValidFingerprint || !isValidSeller let button = ( <Button primary disabled={isDisabled} onClick={onClick}> @@ -61,13 +49,7 @@ const AcceptButton = (props: Props) => { /> ) } else if (!isValidSeller) { - button = ( - <Popup - content={t('bid.invalid_seller')} - position="top center" - trigger={<div className="popup-button">{button}</div>} - /> - ) + button = <Popup content={t('bid.invalid_seller')} position="top center" trigger={<div className="popup-button">{button}</div>} /> } else if (isCurrentlyLocked) { button = ( <LandLockedPopup asset={nft} rental={rental} userAddress={userAddress}> diff --git a/webapp/src/components/Bid/Bid.container.ts b/webapp/src/components/Bid/Bid.container.ts index 1de102d214..9ee283b6fc 100644 --- a/webapp/src/components/Bid/Bid.container.ts +++ b/webapp/src/components/Bid/Bid.container.ts @@ -5,13 +5,7 @@ import { getLoading } from '../../modules/bid/selectors' import { RootState } from '../../modules/reducer' import { getArchivedBidIds } from '../../modules/ui/nft/bid/selectors' import { locations } from '../../modules/routing/locations' -import { - cancelBidRequest, - archiveBid, - unarchiveBid, - acceptBidRequest, - ACCEPT_BID_REQUEST -} from '../../modules/bid/actions' +import { cancelBidRequest, archiveBid, unarchiveBid, acceptBidRequest, ACCEPT_BID_REQUEST } from '../../modules/bid/actions' import { getWallet } from '../../modules/wallet/selectors' import { MapStateProps, MapDispatchProps, MapDispatch } from './Bid.types' import Bid from './Bid' @@ -23,8 +17,7 @@ const mapState = (state: RootState): MapStateProps => ({ }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onUpdate: bid => - dispatch(push(locations.bid(bid.contractAddress, bid.tokenId))), + onUpdate: bid => dispatch(push(locations.bid(bid.contractAddress, bid.tokenId))), onCancel: bid => dispatch(cancelBidRequest(bid)), onArchive: bid => dispatch(archiveBid(bid)), onUnarchive: bid => dispatch(unarchiveBid(bid)), diff --git a/webapp/src/components/Bid/Bid.tsx b/webapp/src/components/Bid/Bid.tsx index 704a9b7024..4a1ec9d378 100644 --- a/webapp/src/components/Bid/Bid.tsx +++ b/webapp/src/components/Bid/Bid.tsx @@ -20,19 +20,8 @@ import { getAssetName } from '../../modules/asset/utils' import './Bid.css' const Bid = (props: Props) => { - const { - bid, - wallet, - archivedBidIds, - onAccept, - onArchive, - onUnarchive, - onCancel, - onUpdate, - isArchivable, - hasImage, - isAcceptingBid - } = props + const { bid, wallet, archivedBidIds, onAccept, onArchive, onUnarchive, onCancel, onUpdate, isArchivable, hasImage, isAcceptingBid } = + props const isArchived = archivedBidIds.includes(bid.id) const isBidder = !!wallet && addressEquals(wallet.address, bid.bidder) @@ -48,18 +37,12 @@ const Bid = (props: Props) => { <div className="bid-row"> {hasImage ? ( <div className="image"> - <AssetProvider - type={AssetType.NFT} - contractAddress={bid.contractAddress} - tokenId={bid.tokenId} - > + <AssetProvider type={AssetType.NFT} contractAddress={bid.contractAddress} tokenId={bid.tokenId}> {(nft, _order, _rental, isLoading) => ( <> {!nft && isLoading ? <Loader active /> : null} {nft ? ( - <Link - to={locations.nft(bid.contractAddress, bid.tokenId)} - > + <Link to={locations.nft(bid.contractAddress, bid.tokenId)}> <AssetImage asset={nft} />{' '} </Link> ) : null} @@ -78,9 +61,7 @@ const Bid = (props: Props) => { {formatWeiMANA(bid.price)} </Mana> </Stats> - <Stats title={t('bid.time_left')}> - {formatDistanceToNow(+bid.expiresAt)} - </Stats> + <Stats title={t('bid.time_left')}>{formatDistanceToNow(+bid.expiresAt)}</Stats> </div> {isBidder || isSeller ? ( <div className="actions"> @@ -89,38 +70,22 @@ const Bid = (props: Props) => { <Button primary onClick={() => onUpdate(bid)}> {t('global.update')} </Button> - <Button onClick={() => onCancel(bid)}> - {t('global.cancel')} - </Button> + <Button onClick={() => onCancel(bid)}>{t('global.cancel')}</Button> </> ) : null} {isSeller ? ( <> - <AssetProvider - type={AssetType.NFT} - contractAddress={bid.contractAddress} - tokenId={bid.tokenId} - > + <AssetProvider type={AssetType.NFT} contractAddress={bid.contractAddress} tokenId={bid.tokenId}> {(nft, _order, rental) => ( - <AcceptButton - userAddress={wallet.address} - nft={nft} - rental={rental} - bid={bid} - onClick={handleAccept} - /> + <AcceptButton userAddress={wallet.address} nft={nft} rental={rental} bid={bid} onClick={handleAccept} /> )} </AssetProvider> {isArchivable ? ( !isArchived ? ( - <Button onClick={() => onArchive(bid)}> - {t('my_bids_page.archive')} - </Button> + <Button onClick={() => onArchive(bid)}>{t('my_bids_page.archive')}</Button> ) : ( - <Button onClick={() => onUnarchive(bid)}> - {t('my_bids_page.unarchive')} - </Button> + <Button onClick={() => onUnarchive(bid)}>{t('my_bids_page.unarchive')}</Button> ) ) : null} </> @@ -130,21 +95,13 @@ const Bid = (props: Props) => { </div> </div> {isBidder ? ( - <AssetProvider - type={AssetType.NFT} - contractAddress={bid.contractAddress} - tokenId={bid.tokenId} - > + <AssetProvider type={AssetType.NFT} contractAddress={bid.contractAddress} tokenId={bid.tokenId}> {nft => <WarningMessage nft={nft} bid={bid} />} </AssetProvider> ) : null} </div> {showConfirmationModal ? ( - <AssetProvider - type={AssetType.NFT} - contractAddress={bid.contractAddress} - tokenId={bid.tokenId} - > + <AssetProvider type={AssetType.NFT} contractAddress={bid.contractAddress} tokenId={bid.tokenId}> {nft => nft && ( <ConfirmInputValueModal diff --git a/webapp/src/components/Bid/Bid.types.ts b/webapp/src/components/Bid/Bid.types.ts index d19029d819..84c627cf1d 100644 --- a/webapp/src/components/Bid/Bid.types.ts +++ b/webapp/src/components/Bid/Bid.types.ts @@ -27,20 +27,10 @@ export type Props = { isAcceptingBid: boolean } -export type MapStateProps = Pick< - Props, - 'archivedBidIds' | 'wallet' | 'isAcceptingBid' -> -export type MapDispatchProps = Pick< - Props, - 'onUpdate' | 'onCancel' | 'onArchive' | 'onUnarchive' | 'onAccept' -> +export type MapStateProps = Pick<Props, 'archivedBidIds' | 'wallet' | 'isAcceptingBid'> +export type MapDispatchProps = Pick<Props, 'onUpdate' | 'onCancel' | 'onArchive' | 'onUnarchive' | 'onAccept'> export type MapDispatch = Dispatch< - | CallHistoryMethodAction - | CancelBidRequestAction - | ArchiveBidAction - | UnarchiveBidAction - | AcceptBidRequestAction + CallHistoryMethodAction | CancelBidRequestAction | ArchiveBidAction | UnarchiveBidAction | AcceptBidRequestAction > export type OwnProps = Pick<Props, 'bid' | 'isArchivable' | 'hasImage'> diff --git a/webapp/src/components/Bid/WarningMessage/WarningMessage.tsx b/webapp/src/components/Bid/WarningMessage/WarningMessage.tsx index 5daad6b078..28cfde708d 100644 --- a/webapp/src/components/Bid/WarningMessage/WarningMessage.tsx +++ b/webapp/src/components/Bid/WarningMessage/WarningMessage.tsx @@ -2,10 +2,7 @@ import React, { useEffect, useState } from 'react' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { useFingerprint } from '../../../modules/nft/hooks' -import { - isInsufficientMANA, - checkFingerprint -} from '../../../modules/bid/utils' +import { isInsufficientMANA, checkFingerprint } from '../../../modules/bid/utils' import { Props } from './WarningMessage.types' import './WarningMessage.css' @@ -18,25 +15,15 @@ const WarningMessage = (props: Props) => { useEffect(() => { isInsufficientMANA(bid) .then(setHasInsufficientMANA) - .catch(error => - console.error(`Could not get the MANA from bidder ${bid.bidder}`, error) - ) + .catch(error => console.error(`Could not get the MANA from bidder ${bid.bidder}`, error)) }, [bid]) const isValidFingerprint = checkFingerprint(bid, fingerprint) if (hasInsufficientMANA) { - return ( - <div className="WarningMessage"> - {t('bid.not_enough_mana_on_bid_placed')} - </div> - ) + return <div className="WarningMessage">{t('bid.not_enough_mana_on_bid_placed')}</div> } else if (!isValidFingerprint) { - return ( - <div className="WarningMessage"> - {t('bid.invalid_fingerprint_on_bid_placed')} - </div> - ) + return <div className="WarningMessage">{t('bid.invalid_fingerprint_on_bid_placed')}</div> } return null diff --git a/webapp/src/components/BidPage/BidModal/BidModal.tsx b/webapp/src/components/BidPage/BidModal/BidModal.tsx index 66fc8b0030..3cc3f6237f 100644 --- a/webapp/src/components/BidPage/BidModal/BidModal.tsx +++ b/webapp/src/components/BidPage/BidModal/BidModal.tsx @@ -3,17 +3,12 @@ import { ethers } from 'ethers' import { Contract, NFTCategory } from '@dcl/schemas' import { Header, Form, Field, Button } from 'decentraland-ui' import { t, T } from 'decentraland-dapps/dist/modules/translation/utils' -import { withAuthorizedAction } from 'decentraland-dapps/dist/containers' +import { withAuthorizedAction, ChainButton } from 'decentraland-dapps/dist/containers' import { AuthorizedAction } from 'decentraland-dapps/dist/containers/withAuthorizedAction/AuthorizationModal' import { toFixedMANAValue } from 'decentraland-dapps/dist/lib/mana' import { ContractName } from 'decentraland-transactions' import { AuthorizationType } from 'decentraland-dapps/dist/modules/authorization/types' -import { ChainButton } from 'decentraland-dapps/dist/containers' -import { - getRentalEndDate, - hasRentalEnded, - isRentalListingExecuted -} from '../../../modules/rental/utils' +import { getRentalEndDate, hasRentalEnded, isRentalListingExecuted } from '../../../modules/rental/utils' import { getAssetName, isOwnedBy } from '../../../modules/asset/utils' import { parseMANANumber } from '../../../lib/mana' import { AssetAction } from '../../AssetAction' @@ -31,16 +26,7 @@ import { Props } from './BidModal.types' import './BidModal.css' const BidModal = (props: Props) => { - const { - nft, - rental, - wallet, - onNavigate, - onPlaceBid, - isPlacingBid, - isLoadingAuthorization, - getContract - } = props + const { nft, rental, wallet, onNavigate, onPlaceBid, isPlacingBid, isLoadingAuthorization, getContract } = props const [price, setPrice] = useState('') const [expiresAt, setExpiresAt] = useState(getDefaultExpirationDate()) @@ -50,13 +36,7 @@ const BidModal = (props: Props) => { const [showConfirmationModal, setShowConfirmationModal] = useState(false) const handlePlaceBid = useCallback( - () => - onPlaceBid( - nft, - parseMANANumber(price), - +new Date(`${expiresAt} 00:00:00`), - fingerprint - ), + () => onPlaceBid(nft, parseMANANumber(price), +new Date(`${expiresAt} 00:00:00`), fingerprint), [nft, price, expiresAt, fingerprint, onPlaceBid] ) @@ -96,10 +76,7 @@ const BidModal = (props: Props) => { const isInvalidPrice = parseMANANumber(price) <= 0 const isInvalidDate = +new Date(`${expiresAt} 00:00:00`) < Date.now() - const hasInsufficientMANA = - !!price && - !!wallet && - parseMANANumber(price) > wallet.networks[nft.network].mana + const hasInsufficientMANA = !!price && !!wallet && parseMANANumber(price) > wallet.networks[nft.network].mana const isDisabled = isOwnedBy(nft, wallet) || @@ -123,10 +100,7 @@ const BidModal = (props: Props) => { }} /> </p> - {isLand(nft) && - rental && - isRentalListingExecuted(rental) && - !hasRentalEnded(rental) ? ( + {isLand(nft) && rental && isRentalListingExecuted(rental) && !hasRentalEnded(rental) ? ( <div className="rentalMessage"> <T id="bid_page.rental_executed" @@ -149,18 +123,14 @@ const BidModal = (props: Props) => { onChange={(_event, props) => { setPrice(toFixedMANAValue(props.value)) }} - message={ - hasInsufficientMANA ? t('bid_page.not_enougn_mana') : undefined - } + message={hasInsufficientMANA ? t('bid_page.not_enougn_mana') : undefined} /> <Field network={nft.network} label={t('bid_page.expiration_date')} type="date" value={expiresAt} - onChange={(_event, props) => - setExpiresAt(props.value || getDefaultExpirationDate()) - } + onChange={(_event, props) => setExpiresAt(props.value || getDefaultExpirationDate())} error={isInvalidDate} message={isInvalidDate ? t('bid_page.invalid_date') : undefined} /> @@ -172,19 +142,11 @@ const BidModal = (props: Props) => { <Button as="div" disabled={isLoadingFingerprint || isPlacingBid} - onClick={() => - onNavigate(locations.nft(nft.contractAddress, nft.tokenId)) - } + onClick={() => onNavigate(locations.nft(nft.contractAddress, nft.tokenId))} > {t('global.cancel')} </Button> - <ChainButton - type="submit" - primary - loading={isPlacingBid} - disabled={isDisabled} - chainId={nft.chainId} - > + <ChainButton type="submit" primary loading={isPlacingBid} disabled={isDisabled} chainId={nft.chainId}> {t('bid_page.submit')} </ChainButton> </div> diff --git a/webapp/src/components/BidPage/BidPage.container.ts b/webapp/src/components/BidPage/BidPage.container.ts index 1ae9de4f7b..8291349139 100644 --- a/webapp/src/components/BidPage/BidPage.container.ts +++ b/webapp/src/components/BidPage/BidPage.container.ts @@ -16,8 +16,7 @@ const mapState = (state: RootState): MapStateProps => ({ const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ onNavigate: path => dispatch(push(path)), - onPlaceBid: (nft, price, expiresAt, fingerprint) => - dispatch(placeBidRequest(nft, price, expiresAt, fingerprint)), + onPlaceBid: (nft, price, expiresAt, fingerprint) => dispatch(placeBidRequest(nft, price, expiresAt, fingerprint)), onClearBidError: () => dispatch(clearBidError()) }) diff --git a/webapp/src/components/BidPage/BidPage.tsx b/webapp/src/components/BidPage/BidPage.tsx index 6eb7adc891..8d3f697dd4 100644 --- a/webapp/src/components/BidPage/BidPage.tsx +++ b/webapp/src/components/BidPage/BidPage.tsx @@ -9,13 +9,7 @@ import { BidModal } from './BidModal' import { Props } from './BidPage.types' const BidPage = (props: Props) => { - const { - onNavigate, - onPlaceBid, - isPlacingBid, - onClearBidError, - getContract - } = props + const { onNavigate, onPlaceBid, isPlacingBid, onClearBidError, getContract } = props return ( <> <Navbar /> diff --git a/webapp/src/components/BidPage/BidPage.types.ts b/webapp/src/components/BidPage/BidPage.types.ts index 475b088ab6..d74b974e43 100644 --- a/webapp/src/components/BidPage/BidPage.types.ts +++ b/webapp/src/components/BidPage/BidPage.types.ts @@ -1,12 +1,7 @@ import { Dispatch } from 'redux' import { CallHistoryMethodAction } from 'connected-react-router' import { Authorization } from 'decentraland-dapps/dist/modules/authorization/types' -import { - clearBidError, - ClearBidErrorAction, - placeBidRequest, - PlaceBidRequestAction -} from '../../modules/bid/actions' +import { clearBidError, ClearBidErrorAction, placeBidRequest, PlaceBidRequestAction } from '../../modules/bid/actions' import { Contract } from '../../modules/vendor/services' import { getContract } from '../../modules/contract/selectors' @@ -19,11 +14,6 @@ export type Props = { onClearBidError: typeof clearBidError } -export type MapStateProps = Pick< - Props, - 'isPlacingBid' | 'getContract' -> +export type MapStateProps = Pick<Props, 'isPlacingBid' | 'getContract'> export type MapDispatchProps = Pick<Props, 'onNavigate' | 'onPlaceBid' | 'onClearBidError'> -export type MapDispatch = Dispatch< - CallHistoryMethodAction | PlaceBidRequestAction | ClearBidErrorAction -> +export type MapDispatch = Dispatch<CallHistoryMethodAction | PlaceBidRequestAction | ClearBidErrorAction> diff --git a/webapp/src/components/Bids/Bids.container.ts b/webapp/src/components/Bids/Bids.container.ts index be7bac0014..4f668ec4a9 100644 --- a/webapp/src/components/Bids/Bids.container.ts +++ b/webapp/src/components/Bids/Bids.container.ts @@ -5,16 +5,9 @@ import { isConnecting } from 'decentraland-dapps/dist/modules/wallet/selectors' import { RootState } from '../../modules/reducer' import { getWallet } from '../../modules/wallet/selectors' -import { - getBidderBids, - getSellerBids, - getArchivedBidIds -} from '../../modules/ui/nft/bid/selectors' +import { getBidderBids, getSellerBids, getArchivedBidIds } from '../../modules/ui/nft/bid/selectors' import { getLoading } from '../../modules/bid/selectors' -import { - fetchBidsByAddressRequest, - FETCH_BIDS_BY_ADDRESS_REQUEST -} from '../../modules/bid/actions' +import { fetchBidsByAddressRequest, FETCH_BIDS_BY_ADDRESS_REQUEST } from '../../modules/bid/actions' import { MapStateProps, MapDispatch, MapDispatchProps } from './Bids.types' import Bids from './Bids' diff --git a/webapp/src/components/Bids/Bids.tsx b/webapp/src/components/Bids/Bids.tsx index 6391060f55..b0943cd7e0 100644 --- a/webapp/src/components/Bids/Bids.tsx +++ b/webapp/src/components/Bids/Bids.tsx @@ -9,24 +9,12 @@ import { Props } from './Bids.types' import './Bids.css' const Bids = (props: Props) => { - const { - wallet, - isConnecting, - isLoading, - bidderBids, - sellerBids, - archivedBidIds, - onNavigate, - onFetchBids - } = props + const { wallet, isConnecting, isLoading, bidderBids, sellerBids, archivedBidIds, onNavigate, onFetchBids } = props const [showArchived, setShowArchivedSeller] = useState(false) const { pathname, search } = useLocation() - const handleToggleSeller = useCallback( - () => setShowArchivedSeller(!showArchived), - [showArchived, setShowArchivedSeller] - ) + const handleToggleSeller = useCallback(() => setShowArchivedSeller(!showArchived), [showArchived, setShowArchivedSeller]) // Redirect to signIn if trying to access current account without a wallet useEffect(() => { @@ -53,13 +41,7 @@ const Bids = (props: Props) => { <> <HeaderMenu> <HeaderMenu.Left> - <Header sub> - {t( - showArchived - ? 'my_bids_page.bids_archived' - : 'my_bids_page.bids_received' - )} - </Header> + <Header sub>{t(showArchived ? 'my_bids_page.bids_archived' : 'my_bids_page.bids_received')}</Header> </HeaderMenu.Left> <HeaderMenu.Right> {showArchived || archived.length > 0 ? ( @@ -83,18 +65,10 @@ const Bids = (props: Props) => { ) : null} {filteredSeller.length === 0 && !isLoading ? ( <div className="center"> - <div className="empty"> - {t( - showArchived - ? 'my_bids_page.empty_archived' - : 'my_bids_page.empty_received' - )} - </div> + <div className="empty">{t(showArchived ? 'my_bids_page.empty_archived' : 'my_bids_page.empty_received')}</div> </div> ) : null} - {filteredSeller.length > 0 - ? filteredSeller.map(bid => <Bid key={bid.id} bid={bid} />) - : null} + {filteredSeller.length > 0 ? filteredSeller.map(bid => <Bid key={bid.id} bid={bid} />) : null} </div> <HeaderMenu> <HeaderMenu.Left> @@ -112,9 +86,7 @@ const Bids = (props: Props) => { <div className="empty">{t('my_bids_page.empty_placed')}</div> </div> ) : null} - {bidderBids.length > 0 - ? bidderBids.map(bid => <Bid key={bid.id} bid={bid} />) - : null} + {bidderBids.length > 0 ? bidderBids.map(bid => <Bid key={bid.id} bid={bid} />) : null} </div> </> )} diff --git a/webapp/src/components/Bids/Bids.types.ts b/webapp/src/components/Bids/Bids.types.ts index b71842d23e..09da00ebc4 100644 --- a/webapp/src/components/Bids/Bids.types.ts +++ b/webapp/src/components/Bids/Bids.types.ts @@ -2,10 +2,7 @@ import { Dispatch } from 'redux' import { CallHistoryMethodAction } from 'connected-react-router' import { Bid } from '@dcl/schemas' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' -import { - fetchBidsByAddressRequest, - FetchBidsByAddressRequestAction -} from '../../modules/bid/actions' +import { fetchBidsByAddressRequest, FetchBidsByAddressRequestAction } from '../../modules/bid/actions' export type Props = { wallet: Wallet | null @@ -18,16 +15,6 @@ export type Props = { onFetchBids: typeof fetchBidsByAddressRequest } -export type MapStateProps = Pick< - Props, - | 'wallet' - | 'sellerBids' - | 'bidderBids' - | 'archivedBidIds' - | 'isConnecting' - | 'isLoading' -> +export type MapStateProps = Pick<Props, 'wallet' | 'sellerBids' | 'bidderBids' | 'archivedBidIds' | 'isConnecting' | 'isLoading'> export type MapDispatchProps = Pick<Props, 'onNavigate' | 'onFetchBids'> -export type MapDispatch = Dispatch< - CallHistoryMethodAction | FetchBidsByAddressRequestAction -> +export type MapDispatch = Dispatch<CallHistoryMethodAction | FetchBidsByAddressRequestAction> diff --git a/webapp/src/components/BrowsePage/BrowsePage.container.ts b/webapp/src/components/BrowsePage/BrowsePage.container.ts index 2b873ad955..e403505d7b 100644 --- a/webapp/src/components/BrowsePage/BrowsePage.container.ts +++ b/webapp/src/components/BrowsePage/BrowsePage.container.ts @@ -1,13 +1,7 @@ import { connect } from 'react-redux' import { RootState } from '../../modules/reducer' -import { - getIsFullscreen, - getAssetType, - getSection, - getVendor, - getContracts -} from '../../modules/routing/selectors' +import { getIsFullscreen, getAssetType, getSection, getVendor, getContracts } from '../../modules/routing/selectors' import { MapStateProps } from './BrowsePage.types' import BrowsePage from './BrowsePage' import { getIsCampaignCollectionsBannerEnabled } from '../../modules/features/selectors' @@ -16,9 +10,7 @@ const mapState = (state: RootState): MapStateProps => ({ vendor: getVendor(state), assetType: getAssetType(state), section: getSection(state), - isCampaignCollectiblesBannerEnabled: getIsCampaignCollectionsBannerEnabled( - state - ), + isCampaignCollectiblesBannerEnabled: getIsCampaignCollectionsBannerEnabled(state), isFullscreen: getIsFullscreen(state), contracts: getContracts(state) }) diff --git a/webapp/src/components/BrowsePage/BrowsePage.tsx b/webapp/src/components/BrowsePage/BrowsePage.tsx index 1fb35f960e..d573604d9a 100644 --- a/webapp/src/components/BrowsePage/BrowsePage.tsx +++ b/webapp/src/components/BrowsePage/BrowsePage.tsx @@ -23,7 +23,11 @@ const BrowsePage = (props: Props) => { <> <Navbar /> <Navigation activeTab={activeTab} isFullscreen={isFullscreen} /> - {isCampaignCollectiblesBannerEnabled ? <CampaignBanner><CampaignCollectiblesBanner /></CampaignBanner> : null} + {isCampaignCollectiblesBannerEnabled ? ( + <CampaignBanner> + <CampaignCollectiblesBanner /> + </CampaignBanner> + ) : null} <AssetBrowse vendor={vendor} isFullscreen={Boolean(isFullscreen)} diff --git a/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.containter.ts b/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.containter.ts index 5c44692bc5..29c640480e 100644 --- a/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.containter.ts +++ b/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.containter.ts @@ -1,40 +1,26 @@ import { connect } from 'react-redux' -import { - getLoading as getLoadingAuthorizations -} from 'decentraland-dapps/dist/modules/authorization/selectors' +import { getLoading as getLoadingAuthorizations } from 'decentraland-dapps/dist/modules/authorization/selectors' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { FETCH_AUTHORIZATIONS_REQUEST } from 'decentraland-dapps/dist/modules/authorization/actions' import { RootState } from '../../../modules/reducer' -import { - executeOrderRequest, - executeOrderWithCardRequest, - EXECUTE_ORDER_REQUEST, - clearOrderErrors -} from '../../../modules/order/actions' +import { executeOrderRequest, executeOrderWithCardRequest, EXECUTE_ORDER_REQUEST, clearOrderErrors } from '../../../modules/order/actions' import { getLoading as getLoadingOrders } from '../../../modules/order/selectors' import { getContract } from '../../../modules/contract/selectors' import { Contract } from '../../../modules/vendor/services' import { getIsBuyWithCardPage } from '../../../modules/routing/selectors' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './BuyNFTModal.types' +import { MapStateProps, MapDispatchProps, MapDispatch } from './BuyNFTModal.types' import BuyNFTModal from './BuyNFTModal' const mapState = (state: RootState): MapStateProps => ({ isLoading: - isLoadingType( - getLoadingAuthorizations(state), - FETCH_AUTHORIZATIONS_REQUEST - ) || isLoadingType(getLoadingOrders(state), EXECUTE_ORDER_REQUEST), + isLoadingType(getLoadingAuthorizations(state), FETCH_AUTHORIZATIONS_REQUEST) || + isLoadingType(getLoadingOrders(state), EXECUTE_ORDER_REQUEST), isBuyWithCardPage: getIsBuyWithCardPage(state), getContract: (query: Partial<Contract>) => getContract(state, query) }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onExecuteOrder: (order, nft, fingerprint, silent) => - dispatch(executeOrderRequest(order, nft, fingerprint, silent)), + onExecuteOrder: (order, nft, fingerprint, silent) => dispatch(executeOrderRequest(order, nft, fingerprint, silent)), onExecuteOrderWithCard: nft => dispatch(executeOrderWithCardRequest(nft)), onClearOrderErrors: () => dispatch(clearOrderErrors()) }) diff --git a/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.tsx b/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.tsx index 68a020e2a6..4c9f1c40de 100644 --- a/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.tsx +++ b/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.tsx @@ -5,10 +5,7 @@ import { Link } from 'react-router-dom' import { Contract, NFTCategory } from '@dcl/schemas' import { Header, Button, Mana, Icon } from 'decentraland-ui' import { T, t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - ChainButton, - withAuthorizedAction -} from 'decentraland-dapps/dist/containers' +import { ChainButton, withAuthorizedAction } from 'decentraland-dapps/dist/containers' import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics/utils' import { ContractName } from 'decentraland-transactions' import { AuthorizationType } from 'decentraland-dapps/dist/modules/authorization/types' @@ -52,11 +49,7 @@ const BuyNFTModal = (props: Props) => { onClearOrderErrors } = props - const [ - fingerprint, - isFingerprintLoading, - contractFingerprint - ] = useFingerprint(nft) + const [fingerprint, isFingerprintLoading, contractFingerprint] = useFingerprint(nft) const analytics = getAnalytics() const handleExecuteOrder = useCallback( @@ -68,15 +61,7 @@ const BuyNFTModal = (props: Props) => { !!order && onExecuteOrder(order, nft, fingerprint, !alreadyAuthorized) }, - [ - isBuyWithCardPage, - onExecuteOrderWithCard, - onExecuteOrder, - order, - nft, - fingerprint, - analytics - ] + [isBuyWithCardPage, onExecuteOrderWithCard, onExecuteOrder, order, nft, fingerprint, analytics] ) const handleCancel = useCallback(() => { @@ -100,7 +85,7 @@ const BuyNFTModal = (props: Props) => { handleExecuteOrder() return } - if (!!order) { + if (order) { onClearOrderErrors() onAuthorizedAction({ targetContractName: ContractName.MANAToken, @@ -112,15 +97,7 @@ const BuyNFTModal = (props: Props) => { onAuthorized: handleExecuteOrder }) } - }, [ - handleExecuteOrder, - onAuthorizedAction, - onClearOrderErrors, - isBuyWithCardPage, - order, - mana, - marketplace - ]) + }, [handleExecuteOrder, onAuthorizedAction, onClearOrderErrors, isBuyWithCardPage, order, mana, marketplace]) const isDisabled = !order || @@ -134,23 +111,15 @@ const BuyNFTModal = (props: Props) => { const translationPageDescriptorId = compact([ 'buy', - isWearableOrEmote(nft) - ? isBuyWithCardPage - ? 'with_card' - : 'with_mana' - : null, + isWearableOrEmote(nft) ? (isBuyWithCardPage ? 'with_card' : 'with_mana') : null, 'page' ]).join('_') let subtitle = null if (!order) { - subtitle = ( - <T id={`${translationPageDescriptorId}.not_for_sale`} values={{ name }} /> - ) + subtitle = <T id={`${translationPageDescriptorId}.not_for_sale`} values={{ name }} /> } else if (isOwner) { - subtitle = ( - <T id={`${translationPageDescriptorId}.is_owner`} values={{ name }} /> - ) + subtitle = <T id={`${translationPageDescriptorId}.is_owner`} values={{ name }} /> } else if (hasInsufficientMANA && !isBuyWithCardPage) { const description = ( <T @@ -161,11 +130,7 @@ const BuyNFTModal = (props: Props) => { }} /> ) - subtitle = isWearableOrEmote(nft) ? ( - <NotEnoughMana asset={nft} description={description} /> - ) : ( - description - ) + subtitle = isWearableOrEmote(nft) ? <NotEnoughMana asset={nft} description={description} /> : description } else { subtitle = isWearableOrEmote(nft) ? ( <div className="subtitle-wrapper"> @@ -194,29 +159,17 @@ const BuyNFTModal = (props: Props) => { <div className={isDisabled ? 'error' : ''}>{subtitle}</div> <AssetProviderPage type={AssetType.NFT}> {(asset, newOrder) => { - return newOrder && order && newOrder.price !== order.price ? ( - <PriceHasChanged asset={asset} newPrice={newOrder.price} /> - ) : null + return newOrder && order && newOrder.price !== order.price ? <PriceHasChanged asset={asset} newPrice={newOrder.price} /> : null }} </AssetProviderPage> - {hasLowPrice && !isBuyWithCardPage ? ( - <PriceTooLow chainId={nft.chainId} network={nft.network} /> - ) : null} + {hasLowPrice && !isBuyWithCardPage ? <PriceTooLow chainId={nft.chainId} network={nft.network} /> : null} <PartiallySupportedNetworkCard asset={nft} /> {!isFingerprintLoading && contractFingerprint !== fingerprint ? ( <ErrorBanner info={t('atlas_updated_warning.fingerprint_missmatch')} /> ) : null} - <div - className={classNames('buttons', isWearableOrEmote(nft) && 'with-mana')} - > - <Button - as={Link} - to={locations.nft(nft.contractAddress, nft.tokenId)} - onClick={handleCancel} - > - {!isBuyWithCardPage && (hasLowPrice || hasInsufficientMANA) - ? t('global.go_back') - : t('global.cancel')} + <div className={classNames('buttons', isWearableOrEmote(nft) && 'with-mana')}> + <Button as={Link} to={locations.nft(nft.contractAddress, nft.tokenId)} onClick={handleCancel}> + {!isBuyWithCardPage && (hasLowPrice || hasInsufficientMANA) ? t('global.go_back') : t('global.cancel')} </Button> {(!hasInsufficientMANA && !hasLowPrice) || isBuyWithCardPage ? ( <ChainButton @@ -238,9 +191,7 @@ const BuyNFTModal = (props: Props) => { ) : null} </div> {isWearableOrEmote(nft) && isBuyWithCardPage ? ( - <CardPaymentsExplanation - translationPageDescriptorId={translationPageDescriptorId} - /> + <CardPaymentsExplanation translationPageDescriptorId={translationPageDescriptorId} /> ) : null} </AssetAction> ) diff --git a/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.types.ts b/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.types.ts index e629678ff8..71c0ac8563 100644 --- a/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.types.ts +++ b/webapp/src/components/BuyPage/BuyNFTModal/BuyNFTModal.types.ts @@ -29,14 +29,6 @@ export type Props = { onClearOrderErrors: typeof clearOrderErrors } & WithAuthorizedActionProps -export type MapStateProps = Pick< - Props, - 'isLoading' | 'getContract' | 'isBuyWithCardPage' -> -export type MapDispatchProps = Pick< - Props, - 'onExecuteOrder' | 'onExecuteOrderWithCard' | 'onClearOrderErrors' -> -export type MapDispatch = Dispatch< - ExecuteOrderRequestAction | ExecuteOrderWithCardRequestAction | ClearOrderErrorsAction -> +export type MapStateProps = Pick<Props, 'isLoading' | 'getContract' | 'isBuyWithCardPage'> +export type MapDispatchProps = Pick<Props, 'onExecuteOrder' | 'onExecuteOrderWithCard' | 'onClearOrderErrors'> +export type MapDispatch = Dispatch<ExecuteOrderRequestAction | ExecuteOrderWithCardRequestAction | ClearOrderErrorsAction> diff --git a/webapp/src/components/BuyPage/BuyPage.tsx b/webapp/src/components/BuyPage/BuyPage.tsx index 8aac7974b0..7cfb60bf62 100644 --- a/webapp/src/components/BuyPage/BuyPage.tsx +++ b/webapp/src/components/BuyPage/BuyPage.tsx @@ -19,11 +19,8 @@ import './BuyPage.css' const BuyPage = (props: Props) => { const { type } = props - const isInsufficientMANA = ( - wallet: Wallet, - network: Network.ETHEREUM | Network.MATIC, - price: string - ) => wallet.networks[network].mana < +ethers.utils.formatEther(price) + const isInsufficientMANA = (wallet: Wallet, network: Network.ETHEREUM | Network.MATIC, price: string) => + wallet.networks[network].mana < +ethers.utils.formatEther(price) return ( <> @@ -34,31 +31,17 @@ const BuyPage = (props: Props) => { <AssetProviderPage type={type}> {(asset, order) => { const network = (order || asset)?.network - const price = - type === AssetType.ITEM - ? (asset as Item).price - : order - ? order.price - : '' + const price = type === AssetType.ITEM ? (asset as Item).price : order ? order.price : '' const modalProps = { wallet: wallet, isOwner: isOwnedBy(asset, wallet), - hasInsufficientMANA: isInsufficientMANA( - wallet, - network, - price - ), - hasLowPrice: - wallet.chainId !== asset.chainId && isPriceTooLow(price) + hasInsufficientMANA: isInsufficientMANA(wallet, network, price), + hasLowPrice: wallet.chainId !== asset.chainId && isPriceTooLow(price) } return type === AssetType.NFT ? ( - <BuyNFTModal - nft={asset as NFT} - order={order} - {...modalProps} - /> + <BuyNFTModal nft={asset as NFT} order={order} {...modalProps} /> ) : type === AssetType.ITEM ? ( <MintItemModal item={asset as Item} {...modalProps} /> ) : null diff --git a/webapp/src/components/BuyPage/CardPaymentsExplanation/CardPaymentsExplanation.tsx b/webapp/src/components/BuyPage/CardPaymentsExplanation/CardPaymentsExplanation.tsx index e2875cec5f..a94a76622e 100644 --- a/webapp/src/components/BuyPage/CardPaymentsExplanation/CardPaymentsExplanation.tsx +++ b/webapp/src/components/BuyPage/CardPaymentsExplanation/CardPaymentsExplanation.tsx @@ -10,27 +10,14 @@ const CardPaymentsExplanation = (props: Props) => { <p className="explanation"> {t(`${translationPageDescriptorId}.explanation`, { link_to_transak: ( - <a - href="https://transak.com/" - target="_blank" - rel="noopener noreferrer" - > + <a href="https://transak.com/" target="_blank" rel="noopener noreferrer"> Transak </a> ), - regions: ( - <span className="regions"> - {t(`${translationPageDescriptorId}.regions_where_operates`)} - </span> - ) + regions: <span className="regions">{t(`${translationPageDescriptorId}.regions_where_operates`)}</span> })} </p> - <a - className="learn-more" - href="https://transak.com/nft-checkout" - target="_blank" - rel="noopener noreferrer" - > + <a className="learn-more" href="https://transak.com/nft-checkout" target="_blank" rel="noopener noreferrer"> {t('global.learn_more')} </a> </div> diff --git a/webapp/src/components/BuyPage/MintItemModal/MintItemModal.containter.ts b/webapp/src/components/BuyPage/MintItemModal/MintItemModal.containter.ts index 6020513240..12e4261cb0 100644 --- a/webapp/src/components/BuyPage/MintItemModal/MintItemModal.containter.ts +++ b/webapp/src/components/BuyPage/MintItemModal/MintItemModal.containter.ts @@ -1,40 +1,23 @@ import { connect } from 'react-redux' -import { - getLoading as getLoadingAuthorizations -} from 'decentraland-dapps/dist/modules/authorization/selectors' +import { getLoading as getLoadingAuthorizations } from 'decentraland-dapps/dist/modules/authorization/selectors' import { FETCH_AUTHORIZATIONS_REQUEST } from 'decentraland-dapps/dist/modules/authorization/actions' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { FETCH_APPLICATION_FEATURES_REQUEST } from 'decentraland-dapps/dist/modules/features/actions' import { RootState } from '../../../modules/reducer' import { isLoadingFeatureFlags as getLoadingFeatureFlags } from '../../../modules/features/selectors' -import { - buyItemRequest, - buyItemWithCardRequest, - BUY_ITEM_REQUEST, - clearItemErrors -} from '../../../modules/item/actions' +import { buyItemRequest, buyItemWithCardRequest, BUY_ITEM_REQUEST, clearItemErrors } from '../../../modules/item/actions' import { getLoading as getItemsLoading } from '../../../modules/item/selectors' import { getContract } from '../../../modules/contract/selectors' import { getIsBuyWithCardPage } from '../../../modules/routing/selectors' import { Contract } from '../../../modules/vendor/services' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './MintItemModal.types' +import { MapStateProps, MapDispatchProps, MapDispatch } from './MintItemModal.types' import MintItemModal from './MintItemModal' const mapState = (state: RootState): MapStateProps => ({ isLoading: - isLoadingType( - getLoadingAuthorizations(state), - FETCH_AUTHORIZATIONS_REQUEST - ) || + isLoadingType(getLoadingAuthorizations(state), FETCH_AUTHORIZATIONS_REQUEST) || isLoadingType(getItemsLoading(state), BUY_ITEM_REQUEST) || - isLoadingType( - getLoadingFeatureFlags(state), - FETCH_APPLICATION_FEATURES_REQUEST - ), + isLoadingType(getLoadingFeatureFlags(state), FETCH_APPLICATION_FEATURES_REQUEST), isBuyWithCardPage: getIsBuyWithCardPage(state), getContract: (query: Partial<Contract>) => getContract(state, query) }) diff --git a/webapp/src/components/BuyPage/MintItemModal/MintItemModal.tsx b/webapp/src/components/BuyPage/MintItemModal/MintItemModal.tsx index 602e8c5c6a..e83325f20c 100644 --- a/webapp/src/components/BuyPage/MintItemModal/MintItemModal.tsx +++ b/webapp/src/components/BuyPage/MintItemModal/MintItemModal.tsx @@ -6,10 +6,7 @@ import { Header, Button, Mana, Icon } from 'decentraland-ui' import { Contract, Item } from '@dcl/schemas' import { T, t } from 'decentraland-dapps/dist/modules/translation/utils' import { AuthorizationType } from 'decentraland-dapps/dist/modules/authorization/types' -import { - ChainButton, - withAuthorizedAction -} from 'decentraland-dapps/dist/containers' +import { ChainButton, withAuthorizedAction } from 'decentraland-dapps/dist/containers' import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics/utils' import { AuthorizedAction } from 'decentraland-dapps/dist/containers/withAuthorizedAction/AuthorizationModal' import { ContractName } from 'decentraland-transactions' @@ -80,7 +77,7 @@ const MintItemModal = (props: Props) => { handleExecuteOrder() return } - if (!!item) { + if (item) { onClearItemErrors() onAuthorizedAction({ targetContractName: ContractName.MANAToken, @@ -104,18 +101,13 @@ const MintItemModal = (props: Props) => { collectionStore.label ]) - const isDisabled = - !item.price || isOwner || (hasInsufficientMANA && !isBuyWithCardPage) + const isDisabled = !item.price || isOwner || (hasInsufficientMANA && !isBuyWithCardPage) const name = <Name asset={item} /> const translationPageDescriptorId = compact([ 'mint', - isWearableOrEmote(item) - ? isBuyWithCardPage - ? 'with_card' - : 'with_mana' - : null, + isWearableOrEmote(item) ? (isBuyWithCardPage ? 'with_card' : 'with_mana') : null, 'page' ]).join('_') @@ -141,9 +133,7 @@ const MintItemModal = (props: Props) => { /> ) } else if (isOwner) { - subtitle = ( - <T id={`${translationPageDescriptorId}.is_owner`} values={{ name }} /> - ) + subtitle = <T id={`${translationPageDescriptorId}.is_owner`} values={{ name }} /> } else if (hasInsufficientMANA && !isBuyWithCardPage) { const description = ( <T @@ -154,11 +144,7 @@ const MintItemModal = (props: Props) => { }} /> ) - subtitle = isWearableOrEmote(item) ? ( - <NotEnoughMana asset={item} description={description} /> - ) : ( - description - ) + subtitle = isWearableOrEmote(item) ? <NotEnoughMana asset={item} description={description} /> : description } else { subtitle = isWearableOrEmote(item) ? ( <div className="subtitle-wrapper"> @@ -187,29 +173,14 @@ const MintItemModal = (props: Props) => { <div className={isDisabled ? 'error' : ''}>{subtitle}</div> <AssetProviderPage type={AssetType.ITEM}> {(asset: Item) => { - return asset.price !== item.price ? ( - <PriceHasChanged asset={item} newPrice={asset.price} /> - ) : null + return asset.price !== item.price ? <PriceHasChanged asset={item} newPrice={asset.price} /> : null }} </AssetProviderPage> - {hasLowPrice && !isBuyWithCardPage ? ( - <PriceTooLow chainId={item.chainId} network={item.network} /> - ) : null} + {hasLowPrice && !isBuyWithCardPage ? <PriceTooLow chainId={item.chainId} network={item.network} /> : null} <PartiallySupportedNetworkCard asset={item} /> - <div - className={classNames( - 'buttons', - isWearableOrEmote(item) && 'with-mana' - )} - > - <Button - as={Link} - to={locations.item(item.contractAddress, item.itemId)} - onClick={handleCancel} - > - {!isBuyWithCardPage && (hasLowPrice || hasInsufficientMANA) - ? t('global.go_back') - : t('global.cancel')} + <div className={classNames('buttons', isWearableOrEmote(item) && 'with-mana')}> + <Button as={Link} to={locations.item(item.contractAddress, item.itemId)} onClick={handleCancel}> + {!isBuyWithCardPage && (hasLowPrice || hasInsufficientMANA) ? t('global.go_back') : t('global.cancel')} </Button> {(!hasInsufficientMANA && !hasLowPrice) || isBuyWithCardPage ? ( <ChainButton @@ -231,9 +202,7 @@ const MintItemModal = (props: Props) => { ) : null} </div> {isWearableOrEmote(item) && isBuyWithCardPage ? ( - <CardPaymentsExplanation - translationPageDescriptorId={translationPageDescriptorId} - /> + <CardPaymentsExplanation translationPageDescriptorId={translationPageDescriptorId} /> ) : null} </AssetAction> ) diff --git a/webapp/src/components/BuyPage/MintItemModal/MintItemModal.types.ts b/webapp/src/components/BuyPage/MintItemModal/MintItemModal.types.ts index aa000e0b97..772920a179 100644 --- a/webapp/src/components/BuyPage/MintItemModal/MintItemModal.types.ts +++ b/webapp/src/components/BuyPage/MintItemModal/MintItemModal.types.ts @@ -27,11 +27,6 @@ export type Props = { onClearItemErrors: typeof clearItemErrors } & WithAuthorizedActionProps -export type MapStateProps = Pick< - Props, - 'isLoading' | 'isBuyWithCardPage' | 'getContract' -> +export type MapStateProps = Pick<Props, 'isLoading' | 'isBuyWithCardPage' | 'getContract'> export type MapDispatchProps = Pick<Props, 'onBuyItem' | 'onBuyItemWithCard' | 'onClearItemErrors'> -export type MapDispatch = Dispatch< - BuyItemRequestAction | BuyItemWithCardRequestAction | ClearItemErrorsAction -> +export type MapDispatch = Dispatch<BuyItemRequestAction | BuyItemWithCardRequestAction | ClearItemErrorsAction> diff --git a/webapp/src/components/BuyPage/NotEnoughMana/NotEnoughMana.tsx b/webapp/src/components/BuyPage/NotEnoughMana/NotEnoughMana.tsx index 6c49c33230..7cf6618d55 100644 --- a/webapp/src/components/BuyPage/NotEnoughMana/NotEnoughMana.tsx +++ b/webapp/src/components/BuyPage/NotEnoughMana/NotEnoughMana.tsx @@ -13,19 +13,8 @@ const NotEnoughMana = (props: Props) => { <Card.Content> <div className={styles.paragraph}>{description}</div> <div className={styles.buttons}> - <Button - basic - size="small" - onClick={() => onGetMana()} - className={styles.getMana} - > - <Mana - showTooltip - inline - size="small" - network={asset.network} - primary - /> + <Button basic size="small" onClick={() => onGetMana()} className={styles.getMana}> + <Mana showTooltip inline size="small" network={asset.network} primary /> {t('asset_page.actions.get_mana')} </Button> <Button basic size="small" onClick={() => onBuyWithCard(asset)}> diff --git a/webapp/src/components/BuyPage/NotEnoughMana/NotEnoughMana.types.ts b/webapp/src/components/BuyPage/NotEnoughMana/NotEnoughMana.types.ts index 81336079ae..15b38af57b 100644 --- a/webapp/src/components/BuyPage/NotEnoughMana/NotEnoughMana.types.ts +++ b/webapp/src/components/BuyPage/NotEnoughMana/NotEnoughMana.types.ts @@ -1,14 +1,8 @@ import React from 'react' import { Dispatch } from 'redux' -import { - openBuyManaWithFiatModalRequest, - OpenBuyManaWithFiatModalRequestAction -} from 'decentraland-dapps/dist/modules/gateway/actions' +import { openBuyManaWithFiatModalRequest, OpenBuyManaWithFiatModalRequestAction } from 'decentraland-dapps/dist/modules/gateway/actions' import { Asset } from '../../../modules/asset/types' -import { - openTransak, - OpenTransakAction -} from '../../../modules/transak/actions' +import { openTransak, OpenTransakAction } from '../../../modules/transak/actions' export type Props = { asset: Asset @@ -18,6 +12,4 @@ export type Props = { } export type MapDispatchProps = Pick<Props, 'onGetMana' | 'onBuyWithCard'> -export type MapDispatch = Dispatch< - OpenTransakAction | OpenBuyManaWithFiatModalRequestAction -> +export type MapDispatch = Dispatch<OpenTransakAction | OpenBuyManaWithFiatModalRequestAction> diff --git a/webapp/src/components/BuyPage/PartiallySupportedNetworkCard/PartiallySupportedNetworkCard.tsx b/webapp/src/components/BuyPage/PartiallySupportedNetworkCard/PartiallySupportedNetworkCard.tsx index 2e11a6790d..381a8f390d 100644 --- a/webapp/src/components/BuyPage/PartiallySupportedNetworkCard/PartiallySupportedNetworkCard.tsx +++ b/webapp/src/components/BuyPage/PartiallySupportedNetworkCard/PartiallySupportedNetworkCard.tsx @@ -10,9 +10,7 @@ import styles from './PartiallySupportedNetworkCard.module.css' export const PartiallySupportedNetworkCard = ({ asset }: Props) => ( <ChainProvider> {({ chainId }) => - chainId && - asset.network === Network.MATIC && - getNetwork(chainId) === Network.MATIC ? ( + chainId && asset.network === Network.MATIC && getNetwork(chainId) === Network.MATIC ? ( <Card className={styles.card}> <Card.Content> <p> diff --git a/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.container.ts b/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.container.ts index c0e766b738..138ed64511 100644 --- a/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.container.ts +++ b/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.container.ts @@ -3,11 +3,7 @@ import { switchNetworkRequest } from 'decentraland-dapps/dist/modules/wallet/act import { RootState } from '../../../modules/reducer' import { getIsBuyWithCardPage } from '../../../modules/routing/selectors' import PriceTooLow from './PriceTooLow' -import { - MapDispatchProps, - MapDispatch, - MapStateProps -} from './PriceTooLow.types' +import { MapDispatchProps, MapDispatch, MapStateProps } from './PriceTooLow.types' const mapState = (state: RootState): MapStateProps => ({ isBuyWithCardPage: getIsBuyWithCardPage(state) diff --git a/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.tsx b/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.tsx index a51be81d78..cd70f68458 100644 --- a/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.tsx +++ b/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.tsx @@ -17,12 +17,7 @@ const PriceTooLow = (props: Props) => { const price = <Price network={network} price={getMinSaleValueInWei()!} /> return ( - <Card - className={classNames( - styles.card, - isBuyWithCardPage ? styles.buyWithCard : undefined - )} - > + <Card className={classNames(styles.card, isBuyWithCardPage ? styles.buyWithCard : undefined)}> <Card.Content> <div className={styles.paragraph}> <T id="price_too_low.minimum_price" values={{ price }} /> @@ -34,12 +29,7 @@ const PriceTooLow = (props: Props) => { </div> <div className={isBuyWithCardPage ? undefined : 'buttons'}> {!isBuyWithCardPage ? ( - <Button - basic - size="small" - onClick={() => onSwitchNetwork(chainId)} - className={styles.switchNetwork} - > + <Button basic size="small" onClick={() => onSwitchNetwork(chainId)} className={styles.switchNetwork}> {t('price_too_low.switch_network', { network: humanNetwork })} </Button> ) : null} diff --git a/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.types.ts b/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.types.ts index d5937b32ba..f93b44d1b6 100644 --- a/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.types.ts +++ b/webapp/src/components/BuyPage/PriceTooLow/PriceTooLow.types.ts @@ -1,9 +1,6 @@ import { Dispatch } from 'redux' import { ChainId, Network } from '@dcl/schemas' -import { - switchNetworkRequest, - SwitchNetworkRequestAction -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { switchNetworkRequest, SwitchNetworkRequestAction } from 'decentraland-dapps/dist/modules/wallet/actions' export type Props = { chainId: ChainId diff --git a/webapp/src/components/BuyPage/StatusPage/StatusPage.container.ts b/webapp/src/components/BuyPage/StatusPage/StatusPage.container.ts index f42b7b6941..4fd007461b 100644 --- a/webapp/src/components/BuyPage/StatusPage/StatusPage.container.ts +++ b/webapp/src/components/BuyPage/StatusPage/StatusPage.container.ts @@ -8,10 +8,7 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { const { contractAddress, tokenId } = ownProps.match.params return { - purchase: - contractAddress && tokenId - ? getNFTPurchase(state, contractAddress, tokenId) - : null + purchase: contractAddress && tokenId ? getNFTPurchase(state, contractAddress, tokenId) : null } } diff --git a/webapp/src/components/BuyPage/StatusPage/StatusPage.tsx b/webapp/src/components/BuyPage/StatusPage/StatusPage.tsx index 2155372648..bef81b0b8f 100644 --- a/webapp/src/components/BuyPage/StatusPage/StatusPage.tsx +++ b/webapp/src/components/BuyPage/StatusPage/StatusPage.tsx @@ -45,32 +45,16 @@ const StatusPage = ({ type, purchase }: Props) => { {status === PurchaseStatus.PENDING ? ( <div className="status-wrapper"> <Loader size="small" active inline /> - <p className="status"> - {t(`asset_purchase_with_card_${status}_page.status`)} - </p> + <p className="status">{t(`asset_purchase_with_card_${status}_page.status`)}</p> </div> ) : null} <p className="description"> - {t( - `asset_purchase_with_card_${status}_page.description`, - { - my_assets: ( - <Link to={locations.currentAccount(browserOptions)}> - {t('navigation.my_assets')} - </Link> - ) - } - )} + {t(`asset_purchase_with_card_${status}_page.description`, { + my_assets: <Link to={locations.currentAccount(browserOptions)}>{t('navigation.my_assets')}</Link> + })} </p> {status === PurchaseStatus.COMPLETE ? ( - <Button - className="cta" - as={Link} - to={locations.browse(browserOptions)} - inverted - primary - fluid - > + <Button className="cta" as={Link} to={locations.browse(browserOptions)} inverted primary fluid> {t(`asset_purchase_with_card_${status}_page.cta`)} </Button> ) : null} diff --git a/webapp/src/components/Campaign/CampaignBadge/CampaignBadge.tsx b/webapp/src/components/Campaign/CampaignBadge/CampaignBadge.tsx index ce5717cc29..b7e02da62d 100644 --- a/webapp/src/components/Campaign/CampaignBadge/CampaignBadge.tsx +++ b/webapp/src/components/Campaign/CampaignBadge/CampaignBadge.tsx @@ -40,9 +40,7 @@ const CampaignBadge = ({ contract, isCampaignBrowserEnabled }: Props) => { })() }, [contract, isCampaignBrowserEnabled]) - return showBadge ? ( - <IconBadge text={t(`campaign.badge`)} icon="sparkles" href={href} /> - ) : null + return showBadge ? <IconBadge text={t(`campaign.badge`)} icon="sparkles" href={href} /> : null } export default React.memo(CampaignBadge) diff --git a/webapp/src/components/Campaign/CampaignBanner/CampaignBanner.tsx b/webapp/src/components/Campaign/CampaignBanner/CampaignBanner.tsx index 1f3b1b46a0..57fad65f68 100644 --- a/webapp/src/components/Campaign/CampaignBanner/CampaignBanner.tsx +++ b/webapp/src/components/Campaign/CampaignBanner/CampaignBanner.tsx @@ -1,7 +1,7 @@ -import React from "react" +import React from 'react' import './CampaignBanner.css' -const CampaignBanner: React.FC = (props) => { +const CampaignBanner: React.FC = props => { return <div className="CampaignBanner">{props.children}</div> } diff --git a/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.container.ts b/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.container.ts index c6b0169c89..e470462f43 100644 --- a/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.container.ts +++ b/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.container.ts @@ -1,12 +1,7 @@ import { connect } from 'react-redux' import { getIsCampaignBrowserEnabled } from '../../../modules/features/selectors' import { RootState } from '../../../modules/reducer' -import { - getIsFullscreen, - getAssetType, - getSection, - getVendor -} from '../../../modules/routing/selectors' +import { getIsFullscreen, getAssetType, getSection, getVendor } from '../../../modules/routing/selectors' import { fetchEventRequest } from '../../../modules/event/actions' import { getData as getContracts } from '../../../modules/event/selectors' import { MapStateProps, MapDispatch } from './CampaignBrowserPage.types' diff --git a/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.tsx b/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.tsx index 60314a60d0..26baf79cf6 100644 --- a/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.tsx +++ b/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.tsx @@ -17,13 +17,7 @@ import { Props } from './CampaignBrowserPage.types' import './CampaignBrowserPage.css' const CampaignBrowserPage = (props: Props) => { - const { - isFullscreen, - section, - contracts, - onFetchEventContracts, - isCampaignBrowserEnabled - } = props + const { isFullscreen, section, contracts, onFetchEventContracts, isCampaignBrowserEnabled } = props const vendor = isVendor(props.vendor) ? props.vendor : VendorName.DECENTRALAND useEffect(() => { diff --git a/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.types.ts b/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.types.ts index 53be34fd28..6950fcab8d 100644 --- a/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.types.ts +++ b/webapp/src/components/Campaign/CampaignBrowserPage/CampaignBrowserPage.types.ts @@ -1,9 +1,6 @@ import { Dispatch } from 'redux' import { AssetType } from '../../../modules/asset/types' -import { - fetchEventRequest, - FetchEventRequestAction -} from '../../../modules/event/actions' +import { fetchEventRequest, FetchEventRequestAction } from '../../../modules/event/actions' import { Section } from '../../../modules/vendor/routing/types' import { VendorName } from '../../../modules/vendor/types' @@ -17,14 +14,6 @@ export type Props = { isCampaignBrowserEnabled: boolean } -export type MapStateProps = Pick< - Props, - | 'vendor' - | 'isFullscreen' - | 'assetType' - | 'section' - | 'contracts' - | 'isCampaignBrowserEnabled' -> +export type MapStateProps = Pick<Props, 'vendor' | 'isFullscreen' | 'assetType' | 'section' | 'contracts' | 'isCampaignBrowserEnabled'> export type MapDispatchProps = Pick<Props, 'onFetchEventContracts'> export type MapDispatch = Dispatch<FetchEventRequestAction> diff --git a/webapp/src/components/Campaign/banners/CampaignBrowserBanner/CampaignBrowserBanner.tsx b/webapp/src/components/Campaign/banners/CampaignBrowserBanner/CampaignBrowserBanner.tsx index c1da69de66..d596e88f46 100644 --- a/webapp/src/components/Campaign/banners/CampaignBrowserBanner/CampaignBrowserBanner.tsx +++ b/webapp/src/components/Campaign/banners/CampaignBrowserBanner/CampaignBrowserBanner.tsx @@ -9,11 +9,7 @@ const CampaignBrowserBanner: React.FC = () => { return ( <div className="CampaignBrowserBanner"> <div className="banner-container"> - <img - src={logo} - alt={t('campaign.event_hashtag')} - className="event-banner-logo" - /> + <img src={logo} alt={t('campaign.event_hashtag')} className="event-banner-logo" /> <div className="copy"> <Header>{t('event_campaign.campaign_browser.title')}</Header> <p> @@ -23,11 +19,7 @@ const CampaignBrowserBanner: React.FC = () => { })} </p> </div> - <img - src={wearableIcon} - alt={t('campaign.event_hashtag')} - className="event-banner-icon" - /> + <img src={wearableIcon} alt={t('campaign.event_hashtag')} className="event-banner-icon" /> </div> <Mobile> <div className="event-banner-vertical-icon" /> diff --git a/webapp/src/components/Campaign/banners/CampaignHomepageBanner/CampaignHomepageBanner.tsx b/webapp/src/components/Campaign/banners/CampaignHomepageBanner/CampaignHomepageBanner.tsx index 004874be00..cc4661f105 100644 --- a/webapp/src/components/Campaign/banners/CampaignHomepageBanner/CampaignHomepageBanner.tsx +++ b/webapp/src/components/Campaign/banners/CampaignHomepageBanner/CampaignHomepageBanner.tsx @@ -7,19 +7,13 @@ const CampaignHomepageBanner: React.FC = () => { return ( <div className="CampaignHomepageBanner"> <div className="event-banner-text event-banner-logo-container"> - <img - src={logo} - alt={t('campaign.event_hashtag')} - className="event-banner-logo" - /> + <img src={logo} alt={t('campaign.event_hashtag')} className="event-banner-logo" /> </div> <div className="event-banner-text"> <span className="title">{t('event_campaign.homepage.title')}</span> <span className="subtitle"> {t('event_campaign.homepage.subtitle', { - event_hashtag: ( - <b className="event-banner-pink">{t('campaign.event_hashtag')}</b> - ), + event_hashtag: <b className="event-banner-pink">{t('campaign.event_hashtag')}</b>, enter: <br /> })} </span> diff --git a/webapp/src/components/CancelSalePage/CancelSalePage.container.ts b/webapp/src/components/CancelSalePage/CancelSalePage.container.ts index b7db1105de..956d66f5b4 100644 --- a/webapp/src/components/CancelSalePage/CancelSalePage.container.ts +++ b/webapp/src/components/CancelSalePage/CancelSalePage.container.ts @@ -3,15 +3,8 @@ import { goBack, push } from 'connected-react-router' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { RootState } from '../../modules/reducer' import { getLoading } from '../../modules/order/selectors' -import { - cancelOrderRequest, - CANCEL_ORDER_REQUEST -} from '../../modules/order/actions' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './CancelSalePage.types' +import { cancelOrderRequest, CANCEL_ORDER_REQUEST } from '../../modules/order/actions' +import { MapStateProps, MapDispatchProps, MapDispatch } from './CancelSalePage.types' import CancelSalePage from './CancelSalePage' const mapState = (state: RootState): MapStateProps => ({ diff --git a/webapp/src/components/CancelSalePage/CancelSalePage.tsx b/webapp/src/components/CancelSalePage/CancelSalePage.tsx index f37d976ef3..4b9f669ff3 100644 --- a/webapp/src/components/CancelSalePage/CancelSalePage.tsx +++ b/webapp/src/components/CancelSalePage/CancelSalePage.tsx @@ -32,20 +32,10 @@ const CancelSalePage = (props: Props) => { const name = getAssetName(nft) if (!order) { isDisabled = true - subtitle = ( - <T - id="cancel_sale_page.not_for_sale" - values={{ name: <b>{name}</b> }} - /> - ) + subtitle = <T id="cancel_sale_page.not_for_sale" values={{ name: <b>{name}</b> }} /> } else if (order.owner !== wallet.address) { isDisabled = true - subtitle = ( - <T - id="cancel_sale_page.invalid_owner" - values={{ name: <b>{name}</b> }} - /> - ) + subtitle = <T id="cancel_sale_page.invalid_owner" values={{ name: <b>{name}</b> }} /> } else { subtitle = ( <T @@ -66,15 +56,7 @@ const CancelSalePage = (props: Props) => { <Header size="large">{t('cancel_sale_page.title')}</Header> <div className="subtitle">{subtitle}</div> <div className="buttons"> - <Button - onClick={() => - onNavigate( - locations.nft(nft.contractAddress, nft.tokenId) - ) - } - > - {t('global.cancel')} - </Button> + <Button onClick={() => onNavigate(locations.nft(nft.contractAddress, nft.tokenId))}>{t('global.cancel')}</Button> <ChainButton primary loading={isLoading} diff --git a/webapp/src/components/CancelSalePage/CancelSalePage.types.ts b/webapp/src/components/CancelSalePage/CancelSalePage.types.ts index 281f06f6c2..29ec9ee76f 100644 --- a/webapp/src/components/CancelSalePage/CancelSalePage.types.ts +++ b/webapp/src/components/CancelSalePage/CancelSalePage.types.ts @@ -1,9 +1,6 @@ import { Dispatch } from 'redux' import { CallHistoryMethodAction } from 'connected-react-router' -import { - cancelOrderRequest, - CancelOrderRequestAction -} from '../../modules/order/actions' +import { cancelOrderRequest, CancelOrderRequestAction } from '../../modules/order/actions' export type Props = { isLoading: boolean @@ -13,10 +10,5 @@ export type Props = { } export type MapStateProps = Pick<Props, 'isLoading'> -export type MapDispatchProps = Pick< - Props, - 'onNavigate' | 'onCancelOrder' | 'onGoBack' -> -export type MapDispatch = Dispatch< - CallHistoryMethodAction | CancelOrderRequestAction -> +export type MapDispatchProps = Pick<Props, 'onNavigate' | 'onCancelOrder' | 'onGoBack'> +export type MapDispatch = Dispatch<CallHistoryMethodAction | CancelOrderRequestAction> diff --git a/webapp/src/components/Chip/Chip.tsx b/webapp/src/components/Chip/Chip.tsx index de5a49db69..8f6ebb942f 100644 --- a/webapp/src/components/Chip/Chip.tsx +++ b/webapp/src/components/Chip/Chip.tsx @@ -18,29 +18,15 @@ const Chip = (props: Props) => { } } - const containerClass = classNames( - 'Chip', - type, - className, - { - active: isActive, - disabled: isDisabled, - clickeable: onClick && !isDisabled - } - ) + const containerClass = classNames('Chip', type, className, { + active: isActive, + disabled: isDisabled, + clickeable: onClick && !isDisabled + }) return ( - <div - className={containerClass} - tabIndex={0} - onClick={isActive || isDisabled ? undefined : onClick} - onKeyDown={handleKeyDown} - > - {text ? ( - <span className="text">{text}</span> - ) : icon ? ( - <Icon name={icon} /> - ) : null} + <div className={containerClass} tabIndex={0} onClick={isActive || isDisabled ? undefined : onClick} onKeyDown={handleKeyDown}> + {text ? <span className="text">{text}</span> : icon ? <Icon name={icon} /> : null} </div> ) } diff --git a/webapp/src/components/Collapsible/Collapsible.tsx b/webapp/src/components/Collapsible/Collapsible.tsx index f578e776d8..f10bdad97e 100644 --- a/webapp/src/components/Collapsible/Collapsible.tsx +++ b/webapp/src/components/Collapsible/Collapsible.tsx @@ -9,9 +9,7 @@ const Collapsible = (props: Props) => { const [isCollapsed, setIsCollapsed] = useState(true) const [isCollapsible, setIsCollapsible] = useState(false) const mainElement = useRef<HTMLDivElement>(null) - const handleChangeShowMore = useCallback(() => setIsCollapsed(!isCollapsed), [ - isCollapsed - ]) + const handleChangeShowMore = useCallback(() => setIsCollapsed(!isCollapsed), [isCollapsed]) useEffect(() => { setIsCollapsed(true) @@ -31,21 +29,14 @@ const Collapsible = (props: Props) => { return ( <div className={styles.Collapsible}> - <div - style={{ height: isCollapsed ? collapsedHeight : 'auto' }} - className={styles.collapsibleWrapper} - > + <div style={{ height: isCollapsed ? collapsedHeight : 'auto' }} className={styles.collapsibleWrapper}> <div ref={mainElement} className={styles.children}> {children} </div> </div> {isCollapsible && ( <Row className={styles.showMore}> - <span onClick={handleChangeShowMore}> - {isCollapsed - ? t('parcel_coordinates.show_more') - : t('parcel_coordinates.show_less')} - </span> + <span onClick={handleChangeShowMore}>{isCollapsed ? t('parcel_coordinates.show_more') : t('parcel_coordinates.show_less')}</span> </Row> )} </div> diff --git a/webapp/src/components/CollectionImage/CollectionImage.tsx b/webapp/src/components/CollectionImage/CollectionImage.tsx index 62d260e3ab..5a6bbaf6e2 100644 --- a/webapp/src/components/CollectionImage/CollectionImage.tsx +++ b/webapp/src/components/CollectionImage/CollectionImage.tsx @@ -13,8 +13,7 @@ const CollectionImage = ({ contractAddress }: Props) => { <div className="CollectionImage"> <CollectionProvider contractAddress={contractAddress} withItems> {({ items, isLoading }) => { - const renderRow = (items: Item[]) => - items.map((item, index) => <AssetImage key={index} asset={item} />) + const renderRow = (items: Item[]) => items.map((item, index) => <AssetImage key={index} asset={item} />) if (isLoading || !items) { return ( @@ -35,13 +34,7 @@ const CollectionImage = ({ contractAddress }: Props) => { return ( <> {row1.length > 0 ? ( - <div - className={classNames( - 'item-row', - items?.length === 2 && 'full-width-image' - )} - style={rowHeight} - > + <div className={classNames('item-row', items?.length === 2 && 'full-width-image')} style={rowHeight}> {renderRow(row1)} </div> ) : null} diff --git a/webapp/src/components/CollectionList/CollectionList.container.ts b/webapp/src/components/CollectionList/CollectionList.container.ts index 7441f3c2f1..539f006892 100644 --- a/webapp/src/components/CollectionList/CollectionList.container.ts +++ b/webapp/src/components/CollectionList/CollectionList.container.ts @@ -1,22 +1,11 @@ import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' -import { - FETCH_COLLECTIONS_REQUEST, - fetchCollectionsRequest -} from '../../modules/collection/actions' -import { - getCollections, - getCount, - getLoading -} from '../../modules/collection/selectors' +import { FETCH_COLLECTIONS_REQUEST, fetchCollectionsRequest } from '../../modules/collection/actions' +import { getCollections, getCount, getLoading } from '../../modules/collection/selectors' import { RootState } from '../../modules/reducer' import CollectionList from './CollectionList' -import { - MapStateProps, - MapDispatch, - MapDispatchProps -} from './CollectionList.types' +import { MapStateProps, MapDispatch, MapDispatchProps } from './CollectionList.types' const mapState = (state: RootState): MapStateProps => ({ collections: getCollections(state), diff --git a/webapp/src/components/CollectionList/CollectionList.tsx b/webapp/src/components/CollectionList/CollectionList.tsx index 97f7e7a986..a2ace95677 100644 --- a/webapp/src/components/CollectionList/CollectionList.tsx +++ b/webapp/src/components/CollectionList/CollectionList.tsx @@ -11,24 +11,11 @@ import ListedBadge from '../ListedBadge' import { Props } from './CollectionList.types' import styles from './CollectionList.module.css' -const CollectionList = ({ - collections, - count, - creator, - isLoading, - onFetchCollections -}: Props) => { - const { - page, - first, - offset, - pages, - sortBy, - filters, - goToPage, - changeSorting, - changeFilter - } = usePagination<keyof CollectionFilters, CollectionSortBy>({ +const CollectionList = ({ collections, count, creator, isLoading, onFetchCollections }: Props) => { + const { page, first, offset, pages, sortBy, filters, goToPage, changeSorting, changeFilter } = usePagination< + keyof CollectionFilters, + CollectionSortBy + >({ pageSize: COLLECTIONS_PER_PAGE, count }) @@ -48,8 +35,7 @@ const CollectionList = ({ first, skip: offset, creator, - sortBy: - (sortBy as CollectionSortBy | undefined) ?? CollectionSortBy.NEWEST, + sortBy: (sortBy as CollectionSortBy | undefined) ?? CollectionSortBy.NEWEST, search: filters.search ?? undefined }, true @@ -98,22 +84,13 @@ const CollectionList = ({ <div className={styles.empty}>{t('global.no_results')}</div> ) : ( collections.map(collection => ( - <Card - key={collection.contractAddress} - className={styles.card} - fluid - > - <Link - className={styles.link} - to={locations.collection(collection.contractAddress)} - > + <Card key={collection.contractAddress} className={styles.card} fluid> + <Link className={styles.link} to={locations.collection(collection.contractAddress)}> <Card.Content className={styles.cardContent}> <div className={styles.detailsContainer}> <div className={styles.detailsLeft}> <div className={styles.image}> - <CollectionImage - contractAddress={collection.contractAddress} - /> + <CollectionImage contractAddress={collection.contractAddress} /> </div> </div> <div className={styles.detailsRight}> @@ -125,9 +102,7 @@ const CollectionList = ({ </div> </div> </div> - {collection.isOnSale && ( - <ListedBadge className={styles.listedBadge} /> - )} + {collection.isOnSale && <ListedBadge className={styles.listedBadge} />} </Card.Content> </Link> </Card> diff --git a/webapp/src/components/CollectionList/CollectionList.types.ts b/webapp/src/components/CollectionList/CollectionList.types.ts index 1d48526786..5fd6759788 100644 --- a/webapp/src/components/CollectionList/CollectionList.types.ts +++ b/webapp/src/components/CollectionList/CollectionList.types.ts @@ -1,9 +1,6 @@ import { Collection } from '@dcl/schemas' import { Dispatch } from 'redux' -import { - fetchCollectionsRequest, - FetchCollectionsRequestAction -} from '../../modules/collection/actions' +import { fetchCollectionsRequest, FetchCollectionsRequestAction } from '../../modules/collection/actions' export type Props = { collections: Collection[] diff --git a/webapp/src/components/CollectionPage/CollectionPage.tsx b/webapp/src/components/CollectionPage/CollectionPage.tsx index dd9626e42b..0acdc8422b 100644 --- a/webapp/src/components/CollectionPage/CollectionPage.tsx +++ b/webapp/src/components/CollectionPage/CollectionPage.tsx @@ -1,19 +1,6 @@ import React, { useCallback, useState } from 'react' import { NFTCategory } from '@dcl/schemas' -import { - Back, - Column, - Page, - Row, - Section, - Header, - Badge, - Icon, - Color, - Button, - Loader, - useMobileMediaQuery -} from 'decentraland-ui' +import { Back, Column, Page, Row, Section, Header, Badge, Icon, Color, Button, Loader, useMobileMediaQuery } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { getBuilderCollectionDetailUrl } from '../../modules/collection/utils' import { formatWeiMANA } from '../../lib/mana' @@ -65,20 +52,11 @@ const CollectionPage = (props: Props) => { {contractAddress ? ( <CollectionProvider contractAddress={contractAddress} withItems> {({ collection, items, isLoading }) => { - const isCollectionOwner = - !!collection && - !!currentAddress && - collection.creator.toLowerCase() === currentAddress + const isCollectionOwner = !!collection && !!currentAddress && collection.creator.toLowerCase() === currentAddress - const builderCollectionUrl = getBuilderCollectionDetailUrl( - contractAddress - ) - const hasWearables = items?.some( - item => item.category === NFTCategory.WEARABLE - ) - const hasEmotes = items?.some( - item => item.category === NFTCategory.EMOTE - ) + const builderCollectionUrl = getBuilderCollectionDetailUrl(contractAddress) + const hasWearables = items?.some(item => item.category === NFTCategory.WEARABLE) + const hasEmotes = items?.some(item => item.category === NFTCategory.EMOTE) const filteredItems = items?.filter(item => { return hasWearables && hasEmotes @@ -88,11 +66,7 @@ const CollectionPage = (props: Props) => { : items }) - const tableItems = formatDataToTable( - filteredItems, - isCollectionOwner, - isMobile - ) + const tableItems = formatDataToTable(filteredItems, isCollectionOwner, isMobile) const showShowTabs = hasEmotes && hasWearables @@ -115,38 +89,19 @@ const CollectionPage = (props: Props) => { {collection.isOnSale && ( <Badge color={Color.SUMMER_RED}> <Icon name="tag" /> - <span className={styles.badge}> - {t('collection_page.on_sale')} - </span> + <span className={styles.badge}>{t('collection_page.on_sale')}</span> </Badge> )} </Row> </Column> {isCollectionOwner && ( - <Column - align="right" - className={styles.columnRight} - > + <Column align="right" className={styles.columnRight}> <Row align="right"> - <Button - primary - inverted - compact - as="a" - href={builderCollectionUrl} - > + <Button primary inverted compact as="a" href={builderCollectionUrl}> {t('collection_page.edit_in_builder')} </Button> - <Button - primary - inverted - compact - as="a" - href={builderCollectionUrl} - > - {collection.isOnSale - ? t('collection_page.unlist_from_market') - : t('collection_page.list_on_market')} + <Button primary inverted compact as="a" href={builderCollectionUrl}> + {collection.isOnSale ? t('collection_page.unlist_from_market') : t('collection_page.list_on_market')} </Button> </Row> </Column> @@ -164,9 +119,7 @@ const CollectionPage = (props: Props) => { <TableContent data={tableItems} isLoading={isLoading} - empty={() => ( - <div>{t('collection_page.no_collection')}</div> - )} + empty={() => <div>{t('collection_page.no_collection')}</div>} mobileTableBody={filteredItems.map(item => ( <div key={item.id} className="mobile-row"> <AssetCell asset={item} /> diff --git a/webapp/src/components/CollectionPage/utils.tsx b/webapp/src/components/CollectionPage/utils.tsx index ac0282368c..6cd783831a 100644 --- a/webapp/src/components/CollectionPage/utils.tsx +++ b/webapp/src/components/CollectionPage/utils.tsx @@ -7,21 +7,14 @@ import AssetCell from '../OnSaleOrRentList/AssetCell' import { DataTableType } from '../Table/TableContent/TableContent.types' import styles from './CollectionPage.module.css' -export const formatDataToTable = ( - rentals?: Item[], - isCollectionOwner: boolean = false, - isMobile = false -): DataTableType[] => { - const builderCollectionUrl = (contractAddress: string) => - getBuilderCollectionDetailUrl(contractAddress) +export const formatDataToTable = (rentals?: Item[], isCollectionOwner: boolean = false, isMobile = false): DataTableType[] => { + const builderCollectionUrl = (contractAddress: string) => getBuilderCollectionDetailUrl(contractAddress) const getItemCategoryText = (item: Item) => { switch (item.category) { case NFTCategory.EMOTE: case NFTCategory.WEARABLE: - return t( - `${item.category}.category.${item.data[item.category]?.category}` - ) + return t(`${item.category}.category.${item.data[item.category]?.category}`) default: return t(`global.${item.category}`) } @@ -44,8 +37,7 @@ export const formatDataToTable = ( [t('global.stock')]: ( <> {' '} - {item.available.toLocaleString()}/ - {Rarity.getMaxSupply(item.rarity).toLocaleString()} + {item.available.toLocaleString()}/{Rarity.getMaxSupply(item.rarity).toLocaleString()} </> ) }), @@ -60,22 +52,10 @@ export const formatDataToTable = ( if (isCollectionOwner) { value[''] = ( <div className={styles.ellipsis}> - <Dropdown - className={styles.ellipsis} - icon="ellipsis horizontal" - direction="left" - > + <Dropdown className={styles.ellipsis} icon="ellipsis horizontal" direction="left"> <Dropdown.Menu> - <Dropdown.Item - text={t('collection_page.edit_price')} - as="a" - href={builderCollectionUrl} - /> - <Dropdown.Item - text={t('collection_page.mint_item')} - as="a" - href={builderCollectionUrl} - /> + <Dropdown.Item text={t('collection_page.edit_price')} as="a" href={builderCollectionUrl} /> + <Dropdown.Item text={t('collection_page.mint_item')} as="a" href={builderCollectionUrl} /> </Dropdown.Menu> </Dropdown> </div> diff --git a/webapp/src/components/CollectionProvider/CollectionProvider.container.ts b/webapp/src/components/CollectionProvider/CollectionProvider.container.ts index c63405b2ba..5570e22bce 100644 --- a/webapp/src/components/CollectionProvider/CollectionProvider.container.ts +++ b/webapp/src/components/CollectionProvider/CollectionProvider.container.ts @@ -2,10 +2,7 @@ import { Collection } from '@dcl/schemas' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { connect } from 'react-redux' import { Dispatch } from 'redux' -import { - fetchSingleCollectionRequest, - FETCH_COLLECTIONS_REQUEST -} from '../../modules/collection/actions' +import { fetchSingleCollectionRequest, FETCH_COLLECTIONS_REQUEST } from '../../modules/collection/actions' import { getLoading, getCollectionsByAddress, @@ -13,37 +10,21 @@ import { getError as getCollectionError } from '../../modules/collection/selectors' import { fetchCollectionItemsRequest } from '../../modules/item/actions' -import { - getItemsByContractAddress, - isFetchingItemsOfCollection -} from '../../modules/item/selectors' +import { getItemsByContractAddress, isFetchingItemsOfCollection } from '../../modules/item/selectors' import { RootState } from '../../modules/reducer' import CollectionProvider from './CollectionProvider' -import { - MapStateProps, - MapDispatchProps, - OwnProps -} from './CollectionProvider.types' +import { MapStateProps, MapDispatchProps, OwnProps } from './CollectionProvider.types' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => ({ collection: getCollectionsByAddress(state)[ownProps.contractAddress], items: getItemsByContractAddress(state)[ownProps.contractAddress] ?? [], - isLoadingCollection: - isLoadingType(getLoading(state), FETCH_COLLECTIONS_REQUEST) || - isFetchingCollection(state, ownProps.contractAddress), - isLoadingCollectionItems: isFetchingItemsOfCollection( - state, - ownProps.contractAddress - ), + isLoadingCollection: isLoadingType(getLoading(state), FETCH_COLLECTIONS_REQUEST) || isFetchingCollection(state, ownProps.contractAddress), + isLoadingCollectionItems: isFetchingItemsOfCollection(state, ownProps.contractAddress), error: getCollectionError(state) }) -const mapDispatch = ( - dispatch: Dispatch, - { contractAddress }: OwnProps -): MapDispatchProps => ({ - onFetchCollection: () => - dispatch(fetchSingleCollectionRequest(contractAddress)), +const mapDispatch = (dispatch: Dispatch, { contractAddress }: OwnProps): MapDispatchProps => ({ + onFetchCollection: () => dispatch(fetchSingleCollectionRequest(contractAddress)), onFetchCollectionItems: (collection: Collection) => dispatch( fetchCollectionItemsRequest({ diff --git a/webapp/src/components/CollectionProvider/CollectionProvider.tsx b/webapp/src/components/CollectionProvider/CollectionProvider.tsx index f0b7c31758..3d34b23ab9 100644 --- a/webapp/src/components/CollectionProvider/CollectionProvider.tsx +++ b/webapp/src/components/CollectionProvider/CollectionProvider.tsx @@ -18,12 +18,7 @@ const CollectionProvider = ({ onFetchCollection() } - if ( - !isLoadingCollectionItems && - collection && - withItems && - (!items || items.length !== collection.size) - ) { + if (!isLoadingCollectionItems && collection && withItems && (!items || items.length !== collection.size)) { onFetchCollectionItems(collection) } }, [ diff --git a/webapp/src/components/CollectionProvider/CollectionProvider.types.tsx b/webapp/src/components/CollectionProvider/CollectionProvider.types.tsx index 2557efedfc..2d64fe490c 100644 --- a/webapp/src/components/CollectionProvider/CollectionProvider.types.tsx +++ b/webapp/src/components/CollectionProvider/CollectionProvider.types.tsx @@ -11,21 +11,9 @@ export type Props = { onFetchCollection: () => void onFetchCollectionItems: (collection: Collection) => void error: string | null - children: ( - data: Pick<Props, 'collection' | 'items'> & { isLoading: boolean } - ) => ReactNode + children: (data: Pick<Props, 'collection' | 'items'> & { isLoading: boolean }) => ReactNode } -export type MapStateProps = Pick< - Props, - | 'collection' - | 'items' - | 'isLoadingCollection' - | 'isLoadingCollectionItems' - | 'error' -> -export type MapDispatchProps = Pick< - Props, - 'onFetchCollection' | 'onFetchCollectionItems' -> +export type MapStateProps = Pick<Props, 'collection' | 'items' | 'isLoadingCollection' | 'isLoadingCollectionItems' | 'error'> +export type MapDispatchProps = Pick<Props, 'onFetchCollection' | 'onFetchCollectionItems'> export type OwnProps = Pick<Props, 'contractAddress' | 'withItems'> diff --git a/webapp/src/components/ConfirmInputValueModal/ConfirmInputValueModal.tsx b/webapp/src/components/ConfirmInputValueModal/ConfirmInputValueModal.tsx index 72682a5861..dac768c000 100644 --- a/webapp/src/components/ConfirmInputValueModal/ConfirmInputValueModal.tsx +++ b/webapp/src/components/ConfirmInputValueModal/ConfirmInputValueModal.tsx @@ -47,13 +47,7 @@ const ConfirmInputValueModal = ({ > {t('global.cancel')} </Button> - <Button - type="submit" - primary - disabled={isDisabled} - loading={loading} - onClick={onConfirm} - > + <Button type="submit" primary disabled={isDisabled} loading={loading} onClick={onConfirm}> {t('global.proceed')} </Button> </Modal.Actions> diff --git a/webapp/src/components/DetailsBox/DetailsBox.tsx b/webapp/src/components/DetailsBox/DetailsBox.tsx index 78e2660b58..e914270ae6 100644 --- a/webapp/src/components/DetailsBox/DetailsBox.tsx +++ b/webapp/src/components/DetailsBox/DetailsBox.tsx @@ -12,12 +12,7 @@ import { Availability, Expiration, Type } from './DetailsRow' export const DetailsBox = (props: Props) => { const { asset, order, rental, className } = props - const owner = - rental && rental.lessor - ? rental.lessor - : isNFT(asset) - ? asset.owner - : asset.creator + const owner = rental && rental.lessor ? rental.lessor : isNFT(asset) ? asset.owner : asset.creator return ( <Box header={t('details_box.title')} className={classNames(className)}> diff --git a/webapp/src/components/DetailsBox/DetailsRow/Availability/Availability.tsx b/webapp/src/components/DetailsBox/DetailsRow/Availability/Availability.tsx index b7012ea2fe..e9e7977398 100644 --- a/webapp/src/components/DetailsBox/DetailsRow/Availability/Availability.tsx +++ b/webapp/src/components/DetailsBox/DetailsRow/Availability/Availability.tsx @@ -16,9 +16,7 @@ export const Availability = (props: Props) => { <span> / {Rarity.getMaxSupply( - asset.category === NFTCategory.WEARABLE - ? asset.data.wearable!.rarity - : asset.data.emote!.rarity + asset.category === NFTCategory.WEARABLE ? asset.data.wearable!.rarity : asset.data.emote!.rarity ).toLocaleString()} </span> </Info> diff --git a/webapp/src/components/DetailsBox/DetailsRow/Expiration/Expiration.tsx b/webapp/src/components/DetailsBox/DetailsRow/Expiration/Expiration.tsx index cb6aaee4ee..1f32ba24fb 100644 --- a/webapp/src/components/DetailsBox/DetailsRow/Expiration/Expiration.tsx +++ b/webapp/src/components/DetailsBox/DetailsRow/Expiration/Expiration.tsx @@ -11,8 +11,7 @@ export const Expiration = (props: Props) => { return ( <> {order ? ( - asset.category === NFTCategory.WEARABLE || - asset.category === NFTCategory.EMOTE ? ( + asset.category === NFTCategory.WEARABLE || asset.category === NFTCategory.EMOTE ? ( <ExpirationInfo title={t('details_box.expires_at')} popupContent={t('details_box.expires_at_info')} @@ -20,18 +19,10 @@ export const Expiration = (props: Props) => { expirationDate={order.expiresAt} /> ) : ( - <ExpirationInfo - title={t('details_box.order_expiration')} - expirationDate={order.expiresAt} - /> + <ExpirationInfo title={t('details_box.order_expiration')} expirationDate={order.expiresAt} /> ) ) : null} - {rental ? ( - <ExpirationInfo - title={t('details_box.rental_expiration')} - expirationDate={rental.expiration} - /> - ) : null} + {rental ? <ExpirationInfo title={t('details_box.rental_expiration')} expirationDate={rental.expiration} /> : null} </> ) } diff --git a/webapp/src/components/DetailsBox/DetailsRow/Expiration/ExpirationInfo.tsx b/webapp/src/components/DetailsBox/DetailsRow/Expiration/ExpirationInfo.tsx index b1c5af7bb7..35c2d37011 100644 --- a/webapp/src/components/DetailsBox/DetailsRow/Expiration/ExpirationInfo.tsx +++ b/webapp/src/components/DetailsBox/DetailsRow/Expiration/ExpirationInfo.tsx @@ -4,20 +4,12 @@ import formatDistanceToNow from 'date-fns/formatDistanceToNow' import { Info } from '../../Info' import { Props } from './ExpirationInfo.types' -export const ExpirationInfo = ({ - title, - popupContent, - icon, - expirationDate -}: Props) => ( +export const ExpirationInfo = ({ title, popupContent, icon, expirationDate }: Props) => ( <Info title={title} popupContent={popupContent} icon={icon}> <span> - {formatDistanceToNow( - expirationDate * (expirationDate.toString().length === 10 ? 1000 : 1), - { - addSuffix: true - } - )} + {formatDistanceToNow(expirationDate * (expirationDate.toString().length === 10 ? 1000 : 1), { + addSuffix: true + })} </span> </Info> ) diff --git a/webapp/src/components/DetailsBox/DetailsRow/Type/Type.tsx b/webapp/src/components/DetailsBox/DetailsRow/Type/Type.tsx index 3dcc91a538..aa9f6e2c9b 100644 --- a/webapp/src/components/DetailsBox/DetailsRow/Type/Type.tsx +++ b/webapp/src/components/DetailsBox/DetailsRow/Type/Type.tsx @@ -27,8 +27,7 @@ export const Type = (props: Props) => { <Info title={t('global.type')}> <div className={styles.type}> {categoryName} - {asset.category === NFTCategory.PARCEL && - (asset as NFT).data.parcel?.estate ? ( + {asset.category === NFTCategory.PARCEL && (asset as NFT).data.parcel?.estate ? ( <> {' ('} <T @@ -36,17 +35,10 @@ export const Type = (props: Props) => { values={{ estate_name: ( <Link - title={ - (asset as NFT).data.parcel?.estate?.name ?? - t('global.estate') - } - to={locations.nft( - owner, - asset.data.parcel?.estate!.tokenId - )} + title={(asset as NFT).data.parcel?.estate?.name ?? t('global.estate')} + to={locations.nft(owner, asset.data.parcel?.estate!.tokenId)} > - {(asset as NFT).data.parcel?.estate?.name ?? - t('global.estate')} + {(asset as NFT).data.parcel?.estate?.name ?? t('global.estate')} </Link> ) }} @@ -54,9 +46,7 @@ export const Type = (props: Props) => { {')'} </> ) : null} - {asset.category === NFTCategory.ESTATE - ? ` (${asset.data.estate!.size})` - : ''} + {asset.category === NFTCategory.ESTATE ? ` (${asset.data.estate!.size})` : ''} </div> </Info> ) : null diff --git a/webapp/src/components/DetailsBox/Info/Info.tsx b/webapp/src/components/DetailsBox/Info/Info.tsx index 6cd92ae2b2..d404612809 100644 --- a/webapp/src/components/DetailsBox/Info/Info.tsx +++ b/webapp/src/components/DetailsBox/Info/Info.tsx @@ -9,13 +9,7 @@ export const Info = ({ title, icon, popupContent, children }: Props) => ( {title} {icon ? ( popupContent ? ( - <Popup - content={popupContent} - position="top center" - trigger={ - <Icon name={icon} size="small" className={styles.infoIcon} /> - } - /> + <Popup content={popupContent} position="top center" trigger={<Icon name={icon} size="small" className={styles.infoIcon} />} /> ) : ( <Icon name={icon} size="small" className={styles.infoIcon} /> ) diff --git a/webapp/src/components/ErrorBanner/ErrorBanner.tsx b/webapp/src/components/ErrorBanner/ErrorBanner.tsx index bceee793eb..1d49b08cf6 100644 --- a/webapp/src/components/ErrorBanner/ErrorBanner.tsx +++ b/webapp/src/components/ErrorBanner/ErrorBanner.tsx @@ -9,9 +9,7 @@ export default function ErrorBanner({ info, className }: Props) { <div className={styles.icon}> <Icon name="exclamation triangle" /> </div> - <span className={styles.info}> - {info} - </span> + <span className={styles.info}>{info}</span> </div> ) } diff --git a/webapp/src/components/ErrorBanner/ErrorBanner.types.ts b/webapp/src/components/ErrorBanner/ErrorBanner.types.ts index 5cf3a505d1..fb4aead70e 100644 --- a/webapp/src/components/ErrorBanner/ErrorBanner.types.ts +++ b/webapp/src/components/ErrorBanner/ErrorBanner.types.ts @@ -1,4 +1,4 @@ export type Props = { - info: string; - className?: string; + info: string + className?: string } diff --git a/webapp/src/components/ErrorBanner/index.ts b/webapp/src/components/ErrorBanner/index.ts index cdd8433e0e..09d5ca0411 100644 --- a/webapp/src/components/ErrorBanner/index.ts +++ b/webapp/src/components/ErrorBanner/index.ts @@ -1,2 +1,2 @@ -import ErrorBanner from "./ErrorBanner"; +import ErrorBanner from './ErrorBanner' export default ErrorBanner diff --git a/webapp/src/components/ExternalLinkModal/ExternalLinkModal.tsx b/webapp/src/components/ExternalLinkModal/ExternalLinkModal.tsx index 5580a4c7ff..10fec909dd 100644 --- a/webapp/src/components/ExternalLinkModal/ExternalLinkModal.tsx +++ b/webapp/src/components/ExternalLinkModal/ExternalLinkModal.tsx @@ -18,14 +18,7 @@ const ExternalLinkModal = ({ link, onClose }: Props) => { </Modal.Content> <Modal.Actions> <Button onClick={onClose}>{t('global.cancel')}</Button> - <Button - as={'a'} - target="_blank" - rel="noopener noreferrer" - primary - href={link} - onClick={onClose} - > + <Button as={'a'} target="_blank" rel="noopener noreferrer" primary href={link} onClick={onClose}> {t('global.proceed')} </Button> </Modal.Actions> diff --git a/webapp/src/components/FavoritesCounter/FavoritesCounter.container.ts b/webapp/src/components/FavoritesCounter/FavoritesCounter.container.ts index 4fb4f7b0f2..7632f6382a 100644 --- a/webapp/src/components/FavoritesCounter/FavoritesCounter.container.ts +++ b/webapp/src/components/FavoritesCounter/FavoritesCounter.container.ts @@ -2,19 +2,10 @@ import { connect } from 'react-redux' import { Item } from '@dcl/schemas' import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { bulkPickUnpickStart } from '../../modules/favorites/actions' -import { - getIsPickedByUser, - getCount, - isPickingOrUnpicking -} from '../../modules/favorites/selectors' +import { getIsPickedByUser, getCount, isPickingOrUnpicking } from '../../modules/favorites/selectors' import { RootState } from '../../modules/reducer' import FavoritesCounter from './FavoritesCounter' -import { - MapDispatch, - MapDispatchProps, - MapStateProps, - OwnProps -} from './FavoritesCounter.types' +import { MapDispatch, MapDispatchProps, MapStateProps, OwnProps } from './FavoritesCounter.types' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { const { @@ -27,13 +18,9 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { } } -const mapDispatch = ( - dispatch: MapDispatch, - ownProps: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: MapDispatch, ownProps: OwnProps): MapDispatchProps => ({ onClick: () => dispatch(bulkPickUnpickStart(ownProps.item)), - onCounterClick: (item: Item) => - dispatch(openModal('FavoritesModal', { itemId: item.id })) + onCounterClick: (item: Item) => dispatch(openModal('FavoritesModal', { itemId: item.id })) }) export default connect(mapState, mapDispatch)(FavoritesCounter) diff --git a/webapp/src/components/FavoritesCounter/FavoritesCounter.spec.tsx b/webapp/src/components/FavoritesCounter/FavoritesCounter.spec.tsx index c87b2492e1..565c783ab2 100644 --- a/webapp/src/components/FavoritesCounter/FavoritesCounter.spec.tsx +++ b/webapp/src/components/FavoritesCounter/FavoritesCounter.spec.tsx @@ -8,9 +8,7 @@ import { Props as FavoritesCounterProps } from './FavoritesCounter.types' import { bulkPickUnpickStart } from '../../modules/favorites/actions' jest.mock('decentraland-dapps/dist/modules/analytics/utils') -const getAnalyticsMock = (getAnalytics as unknown) as jest.MockedFunction< - typeof getAnalytics -> +const getAnalyticsMock = getAnalytics as unknown as jest.MockedFunction<typeof getAnalytics> const FAVORITES_COUNTER_TEST_ID = 'favorites-counter-bubble' const FAVORITES_COUNTER_NUMBER_TEST_ID = 'favorites-counter-number' @@ -69,9 +67,7 @@ describe('FavoritesCounter', () => { isPickedByUser: false, item: item }) - expect( - getByLabelText(t('favorites_counter.pick_label')) - ).toBeInTheDocument() + expect(getByLabelText(t('favorites_counter.pick_label'))).toBeInTheDocument() }) }) @@ -82,9 +78,7 @@ describe('FavoritesCounter', () => { isPickedByUser: true, item: item }) - expect( - getByLabelText(t('favorites_counter.unpick_label')) - ).toBeInTheDocument() + expect(getByLabelText(t('favorites_counter.unpick_label'))).toBeInTheDocument() }) }) @@ -144,9 +138,7 @@ describe('FavoritesCounter', () => { }) describe('when the user clicks the component', () => { - let onClick: jest.MockedFunction<() => ReturnType< - typeof bulkPickUnpickStart - >> + let onClick: jest.MockedFunction<() => ReturnType<typeof bulkPickUnpickStart>> beforeEach(() => { onClick = jest.fn() @@ -190,9 +182,7 @@ describe('FavoritesCounter', () => { count: 0, isCollapsed: true }) - expect(getByTestId(FAVORITES_COUNTER_NUMBER_TEST_ID)).toHaveClass( - 'nonClickable' - ) + expect(getByTestId(FAVORITES_COUNTER_NUMBER_TEST_ID)).toHaveClass('nonClickable') }) it('should not call the onCounterClick prop method', async () => { @@ -213,9 +203,7 @@ describe('FavoritesCounter', () => { count: 1000, isCollapsed: true }) - expect(getByTestId(FAVORITES_COUNTER_NUMBER_TEST_ID)).not.toHaveClass( - 'nonClickable' - ) + expect(getByTestId(FAVORITES_COUNTER_NUMBER_TEST_ID)).not.toHaveClass('nonClickable') }) it('should call the onCounterClick prop method', async () => { @@ -237,9 +225,7 @@ describe('FavoritesCounter', () => { isCollapsed: true, isLoading: true }) - expect(getByTestId(FAVORITES_COUNTER_NUMBER_TEST_ID)).toHaveClass( - 'nonClickable' - ) + expect(getByTestId(FAVORITES_COUNTER_NUMBER_TEST_ID)).toHaveClass('nonClickable') }) it('should not call the onCounterClick prop method', async () => { diff --git a/webapp/src/components/FavoritesCounter/FavoritesCounter.tsx b/webapp/src/components/FavoritesCounter/FavoritesCounter.tsx index 04013fbb83..33ad75466a 100644 --- a/webapp/src/components/FavoritesCounter/FavoritesCounter.tsx +++ b/webapp/src/components/FavoritesCounter/FavoritesCounter.tsx @@ -10,16 +10,7 @@ import styles from './FavoritesCounter.module.css' const formatter = Intl.NumberFormat('en', { notation: 'compact' }) const FavoritesCounter = (props: Props) => { - const { - className, - count, - isPickedByUser, - isCollapsed = false, - item, - isLoading, - onClick, - onCounterClick - } = props + const { className, count, isPickedByUser, isCollapsed = false, item, isLoading, onClick, onCounterClick } = props const handleOnCounterClick = useCallback(() => { getAnalytics().track(events.OPEN_FAVORITES_MODAL, { @@ -58,34 +49,18 @@ const FavoritesCounter = (props: Props) => { return ( <div - className={classNames( - styles.FavoritesCounter, - className, - isCollapsed && styles.Collapsed - )} - aria-label={ - isPickedByUser - ? t('favorites_counter.unpick_label') - : t('favorites_counter.pick_label') - } + className={classNames(styles.FavoritesCounter, className, isCollapsed && styles.Collapsed)} + aria-label={isPickedByUser ? t('favorites_counter.unpick_label') : t('favorites_counter.pick_label')} role="button" data-testid="favorites-counter" > {isCollapsed ? counter : null} - <div - className={styles.bubble} - onClick={handleClick} - data-testid="favorites-counter-bubble" - > + <div className={styles.bubble} onClick={handleClick} data-testid="favorites-counter-bubble"> <span className={styles.iconContainer}> {isLoading ? ( <Loader active inline size="tiny" className={styles.loader} /> ) : ( - <Icon - size="large" - fitted={isCollapsed} - name={isPickedByUser ? 'bookmark' : 'bookmark outline'} - /> + <Icon size="large" fitted={isCollapsed} name={isPickedByUser ? 'bookmark' : 'bookmark outline'} /> )} </span> {!isCollapsed ? counter : null} diff --git a/webapp/src/components/FavoritesCounter/FavoritesCounter.types.ts b/webapp/src/components/FavoritesCounter/FavoritesCounter.types.ts index 9ef383adb8..aec3cc7f5d 100644 --- a/webapp/src/components/FavoritesCounter/FavoritesCounter.types.ts +++ b/webapp/src/components/FavoritesCounter/FavoritesCounter.types.ts @@ -1,13 +1,7 @@ import { Dispatch } from 'redux' import { Item } from '@dcl/schemas' -import { - openModal, - OpenModalAction -} from 'decentraland-dapps/dist/modules/modal/actions' -import { - bulkPickUnpickStart, - BulkPickUnpickStartAction -} from '../../modules/favorites/actions' +import { openModal, OpenModalAction } from 'decentraland-dapps/dist/modules/modal/actions' +import { bulkPickUnpickStart, BulkPickUnpickStartAction } from '../../modules/favorites/actions' export type Props = { className?: string @@ -20,10 +14,7 @@ export type Props = { onClick: () => ReturnType<typeof bulkPickUnpickStart> } -export type MapStateProps = Pick< - Props, - 'isPickedByUser' | 'count' | 'isLoading' -> +export type MapStateProps = Pick<Props, 'isPickedByUser' | 'count' | 'isLoading'> export type MapDispatchProps = Pick<Props, 'onCounterClick' | 'onClick'> export type MapDispatch = Dispatch<BulkPickUnpickStartAction | OpenModalAction> diff --git a/webapp/src/components/Footer/Footer.tsx b/webapp/src/components/Footer/Footer.tsx index f1f66d507f..954914f747 100644 --- a/webapp/src/components/Footer/Footer.tsx +++ b/webapp/src/components/Footer/Footer.tsx @@ -5,8 +5,6 @@ import * as tranlsations from '../../modules/translation/locales' const locales = Object.keys(tranlsations) -const Footer = (props: FooterProps) => ( - <BaseFooter locales={locales} {...props} /> -) +const Footer = (props: FooterProps) => <BaseFooter locales={locales} {...props} /> export default React.memo(Footer) diff --git a/webapp/src/components/GenderBadge/GenderBadge.tsx b/webapp/src/components/GenderBadge/GenderBadge.tsx index 1434a38a16..ec6408fb1f 100644 --- a/webapp/src/components/GenderBadge/GenderBadge.tsx +++ b/webapp/src/components/GenderBadge/GenderBadge.tsx @@ -20,8 +20,8 @@ const GenderBadge = ({ bodyShapes, withText, assetType, section }: Props) => { wearableGenders: isUnisex ? [WearableGender.MALE, WearableGender.FEMALE] : isGenderBodyShape - ? [WearableGender.MALE] - : [WearableGender.FEMALE] + ? [WearableGender.MALE] + : [WearableGender.FEMALE] }), [assetType, section, isUnisex, isGenderBodyShape] ) @@ -31,13 +31,7 @@ const GenderBadge = ({ bodyShapes, withText, assetType, section }: Props) => { return withText ? ( <IconBadge icon={icon} - text={ - isUnisex - ? t('body_shape.unisex') - : isGenderBodyShape - ? t('body_shape.male') - : t('body_shape.female') - } + text={isUnisex ? t('body_shape.unisex') : isGenderBodyShape ? t('body_shape.male') : t('body_shape.female')} href={href} /> ) : ( diff --git a/webapp/src/components/HomePage/HomePage.container.ts b/webapp/src/components/HomePage/HomePage.container.ts index 48c52e215f..cecef06986 100644 --- a/webapp/src/components/HomePage/HomePage.container.ts +++ b/webapp/src/components/HomePage/HomePage.container.ts @@ -2,10 +2,7 @@ import { connect } from 'react-redux' import { push } from 'connected-react-router' import { RootState } from '../../modules/reducer' import { fetchAssetsFromRoute } from '../../modules/routing/actions' -import { - getHomepage, - getHomepageLoading -} from '../../modules/ui/asset/homepage/selectors' +import { getHomepage, getHomepageLoading } from '../../modules/ui/asset/homepage/selectors' import { MapStateProps, MapDispatchProps, MapDispatch } from './HomePage.types' import HomePage from './HomePage' import { getIsCampaignHomepageBannerEnabled } from '../../modules/features/selectors' diff --git a/webapp/src/components/HomePage/HomePage.tsx b/webapp/src/components/HomePage/HomePage.tsx index 925018b5a7..5733803d35 100644 --- a/webapp/src/components/HomePage/HomePage.tsx +++ b/webapp/src/components/HomePage/HomePage.tsx @@ -26,13 +26,7 @@ import { Props } from './HomePage.types' import './HomePage.css' const HomePage = (props: Props) => { - const { - homepage, - homepageLoading, - onNavigate, - onFetchAssetsFromRoute, - isCampaignHomepageBannerEnabled - } = props + const { homepage, homepageLoading, onNavigate, onFetchAssetsFromRoute, isCampaignHomepageBannerEnabled } = props const vendor = VendorName.DECENTRALAND @@ -119,9 +113,7 @@ const HomePage = (props: Props) => { } if (trackMessage && browseOptions) { - getAnalytics().track( - fromEmptyState ? `${trackMessage} '(from empty state)'` : trackMessage - ) + getAnalytics().track(fromEmptyState ? `${trackMessage} '(from empty state)'` : trackMessage) onNavigate(locations.browse(browseOptions)) } }, @@ -144,28 +136,19 @@ const HomePage = (props: Props) => { const sectionsEmptyMessages: Partial<Record<View, string>> = useMemo( () => ({ - [View.HOME_TRENDING_ITEMS]: t( - 'home_page.home_trending_items_empty_message', - { - br: <br />, - try_again_link: ( - <div - className="empty-state-action-button" - onClick={() => fetchAssetsForView(View.HOME_TRENDING_ITEMS)} - > - {t('home_page.home_trending_items_try_again')} - </div> - ), - explore_all_link: ( - <div - className="empty-state-action-button" - onClick={() => handleViewAll(View.HOME_TRENDING_ITEMS)} - > - {t('home_page.home_trending_items_explore_all_wearables')} - </div> - ) - } - ) + [View.HOME_TRENDING_ITEMS]: t('home_page.home_trending_items_empty_message', { + br: <br />, + try_again_link: ( + <div className="empty-state-action-button" onClick={() => fetchAssetsForView(View.HOME_TRENDING_ITEMS)}> + {t('home_page.home_trending_items_try_again')} + </div> + ), + explore_all_link: ( + <div className="empty-state-action-button" onClick={() => handleViewAll(View.HOME_TRENDING_ITEMS)}> + {t('home_page.home_trending_items_explore_all_wearables')} + </div> + ) + }) }), [fetchAssetsForView, handleViewAll] ) @@ -187,8 +170,7 @@ const HomePage = (props: Props) => { }, [fetchAssetsForView]) const renderSlideshow = (view: HomepageView) => { - const hasItemsSection = - view === View.HOME_NEW_ITEMS || view === View.HOME_WEARABLES + const hasItemsSection = view === View.HOME_NEW_ITEMS || view === View.HOME_WEARABLES return ( <Slideshow @@ -202,21 +184,14 @@ const HomePage = (props: Props) => { hasItemsSection={hasItemsSection} isLoading={homepageLoading[view]} onViewAll={() => handleViewAll(view)} - onChangeItemSection={ - hasItemsSection ? handleOnChangeItemSection : undefined - } + onChangeItemSection={hasItemsSection ? handleOnChangeItemSection : undefined} /> ) } - const homepageWithoutLatestSales = Object.keys(homepage).filter( - view => view !== View.HOME_SOLD_ITEMS - ) + const homepageWithoutLatestSales = Object.keys(homepage).filter(view => view !== View.HOME_SOLD_ITEMS) // trending and newest sections - const firstViewsSection = homepageWithoutLatestSales.splice( - 0, - 2 - ) as HomepageView[] + const firstViewsSection = homepageWithoutLatestSales.splice(0, 2) as HomepageView[] // rest of the sections const secondViewsSection = homepageWithoutLatestSales as HomepageView[] diff --git a/webapp/src/components/HomePage/HomePage.types.ts b/webapp/src/components/HomePage/HomePage.types.ts index fad3a85d1d..7f1ba73812 100644 --- a/webapp/src/components/HomePage/HomePage.types.ts +++ b/webapp/src/components/HomePage/HomePage.types.ts @@ -1,13 +1,7 @@ import { Dispatch } from 'redux' import { CallHistoryMethodAction } from 'connected-react-router' -import { - getHomepage, - getHomepageLoading -} from '../../modules/ui/asset/homepage/selectors' -import { - fetchAssetsFromRoute, - FetchAssetsFromRouteAction -} from '../../modules/routing/actions' +import { getHomepage, getHomepageLoading } from '../../modules/ui/asset/homepage/selectors' +import { fetchAssetsFromRoute, FetchAssetsFromRouteAction } from '../../modules/routing/actions' export type Props = { homepage: ReturnType<typeof getHomepage> @@ -17,14 +11,6 @@ export type Props = { onFetchAssetsFromRoute: typeof fetchAssetsFromRoute } -export type MapStateProps = Pick< - Props, - 'homepage' | 'homepageLoading' | 'isCampaignHomepageBannerEnabled' -> -export type MapDispatchProps = Pick< - Props, - 'onNavigate' | 'onFetchAssetsFromRoute' -> -export type MapDispatch = Dispatch< - CallHistoryMethodAction | FetchAssetsFromRouteAction -> +export type MapStateProps = Pick<Props, 'homepage' | 'homepageLoading' | 'isCampaignHomepageBannerEnabled'> +export type MapDispatchProps = Pick<Props, 'onNavigate' | 'onFetchAssetsFromRoute'> +export type MapDispatch = Dispatch<CallHistoryMethodAction | FetchAssetsFromRouteAction> diff --git a/webapp/src/components/HomePage/Slideshow/ItemsSection.tsx b/webapp/src/components/HomePage/Slideshow/ItemsSection.tsx index 83bc828657..1a76ea3ecf 100644 --- a/webapp/src/components/HomePage/Slideshow/ItemsSection.tsx +++ b/webapp/src/components/HomePage/Slideshow/ItemsSection.tsx @@ -1,14 +1,6 @@ import React, { useState } from 'react' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - Dropdown, - DropdownProps, - EmoteIcon, - Mobile, - NotMobile, - Tabs, - WearableIcon -} from 'decentraland-ui' +import { Dropdown, DropdownProps, EmoteIcon, Mobile, NotMobile, Tabs, WearableIcon } from 'decentraland-ui' import { HomepageView } from '../../../modules/ui/asset/homepage/types' import { Section } from '../../../modules/vendor/decentraland/routing/types' @@ -18,9 +10,7 @@ const ItemsSection = (props: { onChangeItemSection: (view: HomepageView, section: Section) => void }) => { const { view, viewAllButton, onChangeItemSection } = props - const [currentItemSection, setCurrentItemSection] = useState<Section>( - Section.WEARABLES - ) + const [currentItemSection, setCurrentItemSection] = useState<Section>(Section.WEARABLES) const handleOnChangeItemSection = (view: HomepageView, section: Section) => { setCurrentItemSection(section) @@ -29,19 +19,13 @@ const ItemsSection = (props: { const renderTabs = () => ( <Tabs> - <Tabs.Tab - active={currentItemSection === Section.WEARABLES} - onClick={() => handleOnChangeItemSection(view, Section.WEARABLES)} - > + <Tabs.Tab active={currentItemSection === Section.WEARABLES} onClick={() => handleOnChangeItemSection(view, Section.WEARABLES)}> <div id={Section.WEARABLES}> <WearableIcon /> {t(`menu.${Section.WEARABLES}`)} </div> </Tabs.Tab> - <Tabs.Tab - active={currentItemSection === Section.EMOTES} - onClick={() => handleOnChangeItemSection(view, Section.EMOTES)} - > + <Tabs.Tab active={currentItemSection === Section.EMOTES} onClick={() => handleOnChangeItemSection(view, Section.EMOTES)}> <div id={Section.EMOTES}> <EmoteIcon /> {t(`menu.${Section.EMOTES}`)} @@ -62,10 +46,9 @@ const ItemsSection = (props: { value: section, text: t(`menu.${section}`) }))} - onChange={( - _event: React.SyntheticEvent<HTMLElement, Event>, - { value }: DropdownProps - ) => handleOnChangeItemSection(view, value as Section)} + onChange={(_event: React.SyntheticEvent<HTMLElement, Event>, { value }: DropdownProps) => + handleOnChangeItemSection(view, value as Section) + } /> ) diff --git a/webapp/src/components/HomePage/Slideshow/Slideshow.tsx b/webapp/src/components/HomePage/Slideshow/Slideshow.tsx index 89c3e382c1..4873193678 100644 --- a/webapp/src/components/HomePage/Slideshow/Slideshow.tsx +++ b/webapp/src/components/HomePage/Slideshow/Slideshow.tsx @@ -1,13 +1,6 @@ import React, { useEffect, useState, useCallback, useRef, useMemo } from 'react' import classNames from 'classnames' -import { - HeaderMenu, - Header, - Button, - Loader, - Empty, - useTabletAndBelowMediaQuery -} from 'decentraland-ui' +import { HeaderMenu, Header, Button, Loader, Empty, useTabletAndBelowMediaQuery } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics/utils' import { Asset } from '../../../modules/asset/types' @@ -39,9 +32,7 @@ const Slideshow = (props: Props) => { const pageSize = isMobileOrTablet ? assets.length : DEFAULT_PAGE_SIZE const [showArrows, setShowArrows] = useState(false) const [currentPage, setCurrentPage] = useState(INITIAL_PAGE) - const [assetsToRender, setAssetsToRender] = useState( - isMobileOrTablet ? assets : assets.slice(0, pageSize) - ) + const [assetsToRender, setAssetsToRender] = useState(isMobileOrTablet ? assets : assets.slice(0, pageSize)) const totalPages = useMemo( () => (isMobileOrTablet ? 1 : Math.ceil(assets.length / pageSize)), @@ -70,14 +61,7 @@ const Slideshow = (props: Props) => { ) const renderNfts = useCallback( - () => - assetsToRender.map(asset => ( - <AssetCard - key={asset.id} - asset={asset} - onClick={() => handleOnAssetCardClick(asset)} - /> - )), + () => assetsToRender.map(asset => <AssetCard key={asset.id} asset={asset} onClick={() => handleOnAssetCardClick(asset)} />), [assetsToRender, handleOnAssetCardClick] ) @@ -88,9 +72,7 @@ const Slideshow = (props: Props) => { ) const handleOnNextPage = () => { - setCurrentPage( - currentPage + 1 > totalPages ? INITIAL_PAGE : currentPage + 1 - ) + setCurrentPage(currentPage + 1 > totalPages ? INITIAL_PAGE : currentPage + 1) } const handleOnPreviousPage = () => { @@ -98,17 +80,12 @@ const Slideshow = (props: Props) => { } const onMouseEnter = useCallback(() => setShowArrows(true), []) - const onMouseLeave = useCallback( - (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => { - const contained = - event.relatedTarget instanceof Node && - slideRef.current?.contains(event.relatedTarget as Node) - if (!contained) { - setShowArrows(false) - } - }, - [] - ) + const onMouseLeave = useCallback((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => { + const contained = event.relatedTarget instanceof Node && slideRef.current?.contains(event.relatedTarget) + if (!contained) { + setShowArrows(false) + } + }, []) const viewAllButton = () => ( <Button basic onClick={onViewAll}> @@ -127,22 +104,18 @@ const Slideshow = (props: Props) => { <Header sub={isSubHeader}>{title}</Header> <Header sub>{subtitle}</Header> {hasItemsSection ? ( - <ItemsSection - view={view} - viewAllButton={viewAllButton()} - onChangeItemSection={onChangeItemSection!} - /> + <ItemsSection view={view} viewAllButton={viewAllButton()} onChangeItemSection={onChangeItemSection!} /> ) : null} </div> </HeaderMenu.Left> - {!hasItemsSection ? ( - <HeaderMenu.Right>{viewAllButton()}</HeaderMenu.Right> - ) : null} + {!hasItemsSection ? <HeaderMenu.Right>{viewAllButton()}</HeaderMenu.Right> : null} </HeaderMenu> <div className="assets-container"> - <div className={classNames("assets", { - "full-width": assetsToRender.length === pageSize - })}> + <div + className={classNames('assets', { + 'full-width': assetsToRender.length === pageSize + })} + > {isLoading ? ( assets.length === 0 ? ( <Loader active size="massive" /> @@ -155,32 +128,16 @@ const Slideshow = (props: Props) => { renderEmptyState() )} </div> - <div - className="arrow-container arrow-container-left" - {...showArrowsHandlers} - > - {showArrows && totalPages > 1 && ( - <Button - circular - secondary - className="arrow-back" - onClick={handleOnPreviousPage} - > + <div className="arrow-container arrow-container-left" {...showArrowsHandlers}> + {showArrows && totalPages > 1 && ( + <Button circular secondary className="arrow-back" onClick={handleOnPreviousPage}> <i className="caret back" /> </Button> )} </div> - <div - className="arrow-container arrow-container-right" - {...showArrowsHandlers} - > + <div className="arrow-container arrow-container-right" {...showArrowsHandlers}> {showArrows && totalPages > 1 && ( - <Button - circular - secondary - className="arrow-forward" - onClick={handleOnNextPage} - > + <Button circular secondary className="arrow-forward" onClick={handleOnNextPage}> <i className="caret" /> </Button> )} @@ -189,16 +146,8 @@ const Slideshow = (props: Props) => { {totalPages > 1 ? ( <div className="page-indicators-container"> {Array.from({ length: totalPages }).map((_, index) => ( - <div - key={index} - className="page-indicator-container" - onClick={() => setCurrentPage(index + 1)} - > - <div - className={`page-indicator ${ - currentPage === index + 1 ? 'active' : '' - }`} - /> + <div key={index} className="page-indicator-container" onClick={() => setCurrentPage(index + 1)}> + <div className={`page-indicator ${currentPage === index + 1 ? 'active' : ''}`} /> </div> ))} </div> diff --git a/webapp/src/components/InfiniteScroll/InfiniteScroll.spec.tsx b/webapp/src/components/InfiniteScroll/InfiniteScroll.spec.tsx index 6b14eaf731..d9d6dcdf75 100644 --- a/webapp/src/components/InfiniteScroll/InfiniteScroll.spec.tsx +++ b/webapp/src/components/InfiniteScroll/InfiniteScroll.spec.tsx @@ -6,13 +6,7 @@ import { Props } from './InfiniteScroll.types' function renderInfiniteScroll(props: Partial<Props>) { return render( - <InfiniteScroll - maxScrollPages={0} - hasMorePages - onLoadMore={jest.fn()} - page={0} - {...props} - > + <InfiniteScroll maxScrollPages={0} hasMorePages onLoadMore={jest.fn()} page={0} {...props}> <span>My container</span> </InfiniteScroll> ) @@ -22,9 +16,7 @@ describe('when maxScrollPages is 0', () => { describe('and hasMorePages is true', () => { it('should show load button from the start', () => { const screen = renderInfiniteScroll({ maxScrollPages: 0 }) - expect( - screen.getByRole('button', { name: t('global.load_more') }) - ).toBeInTheDocument() + expect(screen.getByRole('button', { name: t('global.load_more') })).toBeInTheDocument() }) describe('and load more button is clicked', () => { @@ -34,9 +26,7 @@ describe('when maxScrollPages is 0', () => { maxScrollPages: 0, onLoadMore: loadMoreMock }) - await userEvent.click( - screen.getByRole('button', { name: t('global.load_more') }) - ) + await userEvent.click(screen.getByRole('button', { name: t('global.load_more') })) expect(loadMoreMock).toHaveBeenCalledWith(1) }) }) @@ -48,9 +38,7 @@ describe('when maxScrollPages is 0', () => { maxScrollPages: 0, hasMorePages: false }) - expect( - screen.queryByRole('button', { name: t('global.load_more') }) - ).not.toBeInTheDocument() + expect(screen.queryByRole('button', { name: t('global.load_more') })).not.toBeInTheDocument() }) }) }) diff --git a/webapp/src/components/InfiniteScroll/InfiniteScroll.tsx b/webapp/src/components/InfiniteScroll/InfiniteScroll.tsx index c87ee0dedd..19a083c472 100644 --- a/webapp/src/components/InfiniteScroll/InfiniteScroll.tsx +++ b/webapp/src/components/InfiniteScroll/InfiniteScroll.tsx @@ -3,29 +3,15 @@ import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { Button } from 'decentraland-ui' import { Props } from './InfiniteScroll.types' -export function InfiniteScroll({ - page, - hasMorePages, - isLoading, - children, - maxScrollPages, - onLoadMore -}: Props) { +export function InfiniteScroll({ page, hasMorePages, isLoading, children, maxScrollPages, onLoadMore }: Props) { const [scrollPage, setScrollPage] = useState(0) - const [showLoadMoreButton, setShowLoadMoreButton] = useState( - maxScrollPages === 0 - ) + const [showLoadMoreButton, setShowLoadMoreButton] = useState(maxScrollPages === 0) const onScroll = useCallback(() => { const scrollTop = document.documentElement.scrollTop const scrollHeight = document.documentElement.scrollHeight const clientHeight = document.documentElement.clientHeight - if ( - !isLoading && - scrollTop + clientHeight >= scrollHeight && - hasMorePages && - (!maxScrollPages || scrollPage < maxScrollPages) - ) { + if (!isLoading && scrollTop + clientHeight >= scrollHeight && hasMorePages && (!maxScrollPages || scrollPage < maxScrollPages)) { setScrollPage(scrollPage + 1) onLoadMore(page + 1) } diff --git a/webapp/src/components/InfiniteScroll/InfiniteScroll.types.ts b/webapp/src/components/InfiniteScroll/InfiniteScroll.types.ts index 61e54f31a6..908186a3c0 100644 --- a/webapp/src/components/InfiniteScroll/InfiniteScroll.types.ts +++ b/webapp/src/components/InfiniteScroll/InfiniteScroll.types.ts @@ -1,8 +1,8 @@ -export type Props = { - page: number, - hasMorePages: boolean, - isLoading?: boolean, - maxScrollPages?: number, - children: JSX.Element | null, +export type Props = { + page: number + hasMorePages: boolean + isLoading?: boolean + maxScrollPages?: number + children: JSX.Element | null onLoadMore: (page: number) => void } diff --git a/webapp/src/components/InfoTooltip/InfoTooltip.tsx b/webapp/src/components/InfoTooltip/InfoTooltip.tsx index 3692ce25da..7a3bb1c05e 100644 --- a/webapp/src/components/InfoTooltip/InfoTooltip.tsx +++ b/webapp/src/components/InfoTooltip/InfoTooltip.tsx @@ -5,15 +5,7 @@ import './InfoTooltip.css' const InfoTooltip = (props: Props) => { const { content, className } = props - return ( - <Popup - className={className} - content={content} - position="top center" - trigger={<div className="InfoTooltip" />} - on="hover" - /> - ) + return <Popup className={className} content={content} position="top center" trigger={<div className="InfoTooltip" />} on="hover" /> } export default React.memo(InfoTooltip) diff --git a/webapp/src/components/LandsPage/LandsPage.tsx b/webapp/src/components/LandsPage/LandsPage.tsx index ed5eef30a2..931204d272 100644 --- a/webapp/src/components/LandsPage/LandsPage.tsx +++ b/webapp/src/components/LandsPage/LandsPage.tsx @@ -16,11 +16,7 @@ const LandsPage = (props: Props) => { <> <Navbar /> <Navigation activeTab={NavigationTab.LANDS} /> - <AssetBrowse - vendor={VendorName.DECENTRALAND} - view={View.MARKET} - sections={[Section.LAND]} - /> + <AssetBrowse vendor={VendorName.DECENTRALAND} view={View.MARKET} sections={[Section.LAND]} /> <Footer isFullscreen={isFullscreen} /> </> ) diff --git a/webapp/src/components/LinkedProfile/LinkedProfile.tsx b/webapp/src/components/LinkedProfile/LinkedProfile.tsx index 7f6803dbd3..1430fd2a9c 100644 --- a/webapp/src/components/LinkedProfile/LinkedProfile.tsx +++ b/webapp/src/components/LinkedProfile/LinkedProfile.tsx @@ -4,7 +4,5 @@ import { Props } from './LinkedProfile.types' export const LinkedProfile = ({ isProfileEnabled, ...props }: Props) => { const { address } = props - return ( - <Profile {...props} as="a" href={`${profileUrl}/accounts/${address}`} /> - ) + return <Profile {...props} as="a" href={`${profileUrl}/accounts/${address}`} /> } diff --git a/webapp/src/components/ListPage/ListPage.container.ts b/webapp/src/components/ListPage/ListPage.container.ts index 780ee95d59..06a1b17809 100644 --- a/webapp/src/components/ListPage/ListPage.container.ts +++ b/webapp/src/components/ListPage/ListPage.container.ts @@ -3,25 +3,12 @@ import { connect } from 'react-redux' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { isConnecting } from 'decentraland-dapps/dist/modules/wallet/selectors' -import { - getError, - getList, - getLoading -} from '../../modules/favorites/selectors' -import { - GET_LIST_REQUEST, - deleteListStart, - getListRequest -} from '../../modules/favorites/actions' +import { getError, getList, getLoading } from '../../modules/favorites/selectors' +import { GET_LIST_REQUEST, deleteListStart, getListRequest } from '../../modules/favorites/actions' import { RootState } from '../../modules/reducer' import { getWallet } from '../../modules/wallet/selectors' import { locations } from '../../modules/routing/locations' -import { - MapStateProps, - MapDispatch, - MapDispatchProps, - OwnProps -} from './ListPage.types' +import { MapStateProps, MapDispatch, MapDispatchProps, OwnProps } from './ListPage.types' import ListPage from './ListPage' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { diff --git a/webapp/src/components/ListPage/ListPage.spec.tsx b/webapp/src/components/ListPage/ListPage.spec.tsx index 2c68fccb7d..c4f0be22a6 100644 --- a/webapp/src/components/ListPage/ListPage.spec.tsx +++ b/webapp/src/components/ListPage/ListPage.spec.tsx @@ -31,7 +31,7 @@ jest.mock('../LinkedProfile', () => { }) const listId = 'aListId' -let list: List = { +const list: List = { id: listId, name: 'aListName', description: 'aListDescription', @@ -104,9 +104,7 @@ describe('when rendering the ListPage with a loaded list', () => { }) it('should transform the date into something like: "dd time ago"', () => { - expect(renderedPage.getByTestId(UPDATED_AT_TEST_ID)).toHaveTextContent( - '1 day ago' - ) + expect(renderedPage.getByTestId(UPDATED_AT_TEST_ID)).toHaveTextContent('1 day ago') }) }) @@ -116,9 +114,7 @@ describe('when rendering the ListPage with a loaded list', () => { }) it('should show the private badge', () => { - expect( - renderedPage.getByTestId(PRIVATE_BADGE_TEST_ID) - ).toBeInTheDocument() + expect(renderedPage.getByTestId(PRIVATE_BADGE_TEST_ID)).toBeInTheDocument() }) it('should disable the share list button', () => { @@ -137,27 +133,19 @@ describe('when rendering the ListPage with a loaded list', () => { }) it('should enable the share list button', () => { - expect( - renderedPage.getByTestId(SHARE_LIST_BUTTON_TEST_ID) - ).toBeEnabled() + expect(renderedPage.getByTestId(SHARE_LIST_BUTTON_TEST_ID)).toBeEnabled() }) it('should show the go back button', () => { - expect( - renderedPage.getByTestId(GO_BACK_BUTTON_TEST_ID) - ).toBeInTheDocument() + expect(renderedPage.getByTestId(GO_BACK_BUTTON_TEST_ID)).toBeInTheDocument() }) it('should show the edit button', () => { - expect( - renderedPage.getByTestId(EDIT_LIST_BUTTON_TEST_ID) - ).toBeInTheDocument() + expect(renderedPage.getByTestId(EDIT_LIST_BUTTON_TEST_ID)).toBeInTheDocument() }) it('should show the delete button', () => { - expect( - renderedPage.getByTestId(DELETE_LIST_BUTTON_TEST_ID) - ).toBeInTheDocument() + expect(renderedPage.getByTestId(DELETE_LIST_BUTTON_TEST_ID)).toBeInTheDocument() }) }) @@ -199,21 +187,15 @@ describe('when rendering the ListPage with a loaded list', () => { }) it('should disable the dropdown to edit and delete the list', () => { - expect( - renderedPage.getByTestId(MORE_OPTIONS_DROPDOWN_TEST_ID) - ).toHaveClass('disabled') + expect(renderedPage.getByTestId(MORE_OPTIONS_DROPDOWN_TEST_ID)).toHaveClass('disabled') }) it('should disable the dropdown item to edit the list', () => { - expect(renderedPage.getByTestId(EDIT_LIST_BUTTON_TEST_ID)).toHaveClass( - 'disabled' - ) + expect(renderedPage.getByTestId(EDIT_LIST_BUTTON_TEST_ID)).toHaveClass('disabled') }) it('should disable the dropdown item to delete the list', () => { - expect(renderedPage.getByTestId(DELETE_LIST_BUTTON_TEST_ID)).toHaveClass( - 'disabled' - ) + expect(renderedPage.getByTestId(DELETE_LIST_BUTTON_TEST_ID)).toHaveClass('disabled') }) }) }) @@ -233,15 +215,9 @@ describe('when rendering the ListPage with an empty list', () => { it('should render the empty list message', () => { expect(renderedPage.getByTestId(EMPTY_LIST_TEST_ID)).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.empty.owner.title')) - ).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.empty.owner.subtitle')) - ).toBeInTheDocument() - expect( - renderedPage.getByTestId(EMPTY_LIST_ACTION_TEST_ID) - ).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.empty.owner.title'))).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.empty.owner.subtitle'))).toBeInTheDocument() + expect(renderedPage.getByTestId(EMPTY_LIST_ACTION_TEST_ID)).toBeInTheDocument() }) }) @@ -259,12 +235,8 @@ describe('when rendering the ListPage with an empty list', () => { it('should render the empty list message', () => { expect(renderedPage.getByTestId(EMPTY_LIST_TEST_ID)).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.empty.public.title')) - ).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.empty.public.subtitle')) - ).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.empty.public.title'))).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.empty.public.subtitle'))).toBeInTheDocument() expect(renderedPage.queryByTestId(EMPTY_LIST_ACTION_TEST_ID)).toBeNull() }) }) @@ -283,12 +255,8 @@ describe('when rendering the ListPage with an empty list', () => { it('should render the empty list message', () => { expect(renderedPage.getByTestId(EMPTY_LIST_TEST_ID)).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.empty.public.title')) - ).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.empty.public.subtitle')) - ).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.empty.public.title'))).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.empty.public.subtitle'))).toBeInTheDocument() expect(renderedPage.queryByTestId(EMPTY_LIST_ACTION_TEST_ID)).toBeNull() }) }) @@ -307,15 +275,9 @@ describe('when rendering the ListPage with an empty list', () => { it('should render the correct empty list message with the action button', () => { expect(renderedPage.getByTestId(EMPTY_LIST_TEST_ID)).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.empty.owner.title')) - ).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.empty.owner.subtitle')) - ).toBeInTheDocument() - expect( - renderedPage.getByTestId(EMPTY_LIST_ACTION_TEST_ID) - ).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.empty.owner.title'))).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.empty.owner.subtitle'))).toBeInTheDocument() + expect(renderedPage.getByTestId(EMPTY_LIST_ACTION_TEST_ID)).toBeInTheDocument() }) }) }) @@ -381,16 +343,10 @@ describe("when the list doesn't exist", () => { }) it('should show the error message', () => { - expect( - renderedPage.getByTestId(ERROR_CONTAINER_TEST_ID) - ).toBeInTheDocument() - - expect( - renderedPage.getByText(t('list_page.error.not_found.title')) - ).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.error.not_found.subtitle')) - ).toBeInTheDocument() + expect(renderedPage.getByTestId(ERROR_CONTAINER_TEST_ID)).toBeInTheDocument() + + expect(renderedPage.getByText(t('list_page.error.not_found.title'))).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.error.not_found.subtitle'))).toBeInTheDocument() }) }) @@ -401,19 +357,11 @@ describe('when the list retrieval fails', () => { error: 'Could not retrieve the list from the server.' }) - expect( - renderedPage.getByTestId(ERROR_CONTAINER_TEST_ID) - ).toBeInTheDocument() - - expect( - renderedPage.getByText(t('list_page.error.could_not_load.title')) - ).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.error.could_not_load.subtitle')) - ).toBeInTheDocument() - expect( - renderedPage.getByText(t('list_page.error.could_not_load.action')) - ).toBeInTheDocument() + expect(renderedPage.getByTestId(ERROR_CONTAINER_TEST_ID)).toBeInTheDocument() + + expect(renderedPage.getByText(t('list_page.error.could_not_load.title'))).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.error.could_not_load.subtitle'))).toBeInTheDocument() + expect(renderedPage.getByText(t('list_page.error.could_not_load.action'))).toBeInTheDocument() }) describe('when clicking the action button', () => { @@ -429,9 +377,7 @@ describe('when the list retrieval fails', () => { }) it('should call the onFetchList prop callback', () => { - fireEvent.click( - renderedPage.getByTestId(COULD_NOT_LOAD_LIST_ACTION_TEST_ID) - ) + fireEvent.click(renderedPage.getByTestId(COULD_NOT_LOAD_LIST_ACTION_TEST_ID)) expect(onFetchList).toHaveBeenCalledWith(listId) }) }) diff --git a/webapp/src/components/ListPage/ListPage.tsx b/webapp/src/components/ListPage/ListPage.tsx index 026c07389e..026eb3b738 100644 --- a/webapp/src/components/ListPage/ListPage.tsx +++ b/webapp/src/components/ListPage/ListPage.tsx @@ -1,15 +1,7 @@ import React, { useCallback, useEffect, useMemo, useRef } from 'react' import { Link, Redirect, useLocation } from 'react-router-dom' import classNames from 'classnames' -import { - Back, - Button, - Dropdown, - Header, - Icon, - Loader, - Popup -} from 'decentraland-ui' +import { Back, Button, Dropdown, Header, Icon, Loader, Popup } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics/utils' import { formatDistanceToNow } from '../../lib/date' @@ -46,19 +38,7 @@ import { const LIST_NOT_FOUND = 'list was not found' const ListPage = (props: Props) => { - const { - isConnecting, - wallet, - listId, - list, - isLoading, - error, - onFetchList, - onBack, - onEditList, - onDeleteList, - onShareList - } = props + const { isConnecting, wallet, listId, list, isLoading, error, onFetchList, onBack, onEditList, onDeleteList, onShareList } = props const hasFetchedOnce = useRef(false) const { pathname, search } = useLocation() @@ -81,11 +61,7 @@ const ListPage = (props: Props) => { ) const isPublicView = useMemo( - () => - !wallet || - (list && - wallet.address !== list.userAddress && - list.id !== DEFAULT_FAVORITES_LIST_ID), + () => !wallet || (list && wallet.address !== list.userAddress && list.id !== DEFAULT_FAVORITES_LIST_ID), [wallet, list] ) @@ -104,28 +80,12 @@ const ListPage = (props: Props) => { const isNotFound = error?.includes(LIST_NOT_FOUND) const errorType = isNotFound ? 'not_found' : 'could_not_load' return ( - <div - className={styles.errorContainer} - data-testid={ERROR_CONTAINER_TEST_ID} - > - <div - className={classNames( - styles.errorImage, - isNotFound ? styles.notFoundImage : styles.couldNotLoadImage - )} - ></div> - <h1 className={styles.errorTitle}> - {t(`list_page.error.${errorType}.title`)} - </h1> - <p className={styles.errorSubtitle}> - {t(`list_page.error.${errorType}.subtitle`)} - </p> + <div className={styles.errorContainer} data-testid={ERROR_CONTAINER_TEST_ID}> + <div className={classNames(styles.errorImage, isNotFound ? styles.notFoundImage : styles.couldNotLoadImage)}></div> + <h1 className={styles.errorTitle}>{t(`list_page.error.${errorType}.title`)}</h1> + <p className={styles.errorSubtitle}>{t(`list_page.error.${errorType}.subtitle`)}</p> {!isNotFound && ( - <Button - primary - data-testid={COULD_NOT_LOAD_LIST_ACTION_TEST_ID} - onClick={handleFetchList} - > + <Button primary data-testid={COULD_NOT_LOAD_LIST_ACTION_TEST_ID} onClick={handleFetchList}> {t(`list_page.error.${errorType}.action`)} </Button> )} @@ -147,9 +107,7 @@ const ListPage = (props: Props) => { return ( <PageLayout activeTab={isPublicView ? undefined : NavigationTab.MY_LISTS}> - {isLoading || isConnecting ? ( - <Loader active size="massive" data-testid={LOADER_TEST_ID} /> - ) : null} + {isLoading || isConnecting ? <Loader active size="massive" data-testid={LOADER_TEST_ID} /> : null} {!isLoading && !isConnecting && listId && list && !error ? ( <div data-testid={LIST_CONTAINER_TEST_ID} className={styles.container}> <Header className={styles.header} size="large"> @@ -160,12 +118,7 @@ const ListPage = (props: Props) => { ) : null} <div className={styles.nameContainer}> {list.name} - {list.isPrivate && ( - <PrivateTag - data-testid={PRIVATE_BADGE_TEST_ID} - className={styles.privateBadge} - /> - )} + {list.isPrivate && <PrivateTag data-testid={PRIVATE_BADGE_TEST_ID} className={styles.privateBadge} />} </div> {!isPublicView ? ( <div className={styles.actions}> @@ -175,10 +128,7 @@ const ListPage = (props: Props) => { trigger={ <span> <Button - className={classNames( - styles.iconContainer, - styles.share - )} + className={classNames(styles.iconContainer, styles.share)} inverted compact onClick={handleShareList} @@ -233,12 +183,7 @@ const ListPage = (props: Props) => { <div className={styles.subHeaderLeft}> <span className={styles.description}>{list.description}</span> {isPublicView && list.userAddress && ( - <LinkedProfile - data-testid={'linked-profile'} - size="large" - address={list.userAddress} - className={styles.owner} - /> + <LinkedProfile data-testid={'linked-profile'} size="large" address={list.userAddress} className={styles.owner} /> )} </div> {list.updatedAt ? ( @@ -251,16 +196,9 @@ const ListPage = (props: Props) => { </div> ) : null} </Header> - <div - data-testid={ASSET_BROWSE_TEST_ID} - className={styles.assetBrowseContainer} - > + <div data-testid={ASSET_BROWSE_TEST_ID} className={styles.assetBrowseContainer}> {list.itemsCount ? ( - <AssetBrowse - view={View.LISTS} - section={Section.LISTS} - vendor={VendorName.DECENTRALAND} - /> + <AssetBrowse view={View.LISTS} section={Section.LISTS} vendor={VendorName.DECENTRALAND} /> ) : ( <div className={styles.empty} data-testid={EMPTY_LIST_TEST_ID}> <div className={styles.emptyLogo}></div> @@ -268,12 +206,7 @@ const ListPage = (props: Props) => { <p>{t(`list_page.empty.${privacyView}.subtitle`)}</p> {!isPublicView && ( <div className={styles.emptyActions}> - <Button - primary - as={Link} - to={locations.browse()} - data-testid={EMPTY_LIST_ACTION_TEST_ID} - > + <Button primary as={Link} to={locations.browse()} data-testid={EMPTY_LIST_ACTION_TEST_ID}> {t(`list_page.empty.${privacyView}.action`)} </Button> </div> diff --git a/webapp/src/components/ListPage/ListPage.types.ts b/webapp/src/components/ListPage/ListPage.types.ts index b6fc67b06d..94c59f3eee 100644 --- a/webapp/src/components/ListPage/ListPage.types.ts +++ b/webapp/src/components/ListPage/ListPage.types.ts @@ -2,18 +2,10 @@ import { Dispatch } from 'redux' import { CallHistoryMethodAction } from 'connected-react-router' import { RouteComponentProps } from 'react-router-dom' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' -import { - OpenModalAction, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' +import { OpenModalAction, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { GoBackAction } from '../../modules/routing/actions' import { List } from '../../modules/favorites/types' -import { - DeleteListStartAction, - GetListRequestAction, - deleteListStart, - getListRequest -} from '../../modules/favorites/actions' +import { DeleteListStartAction, GetListRequestAction, deleteListStart, getListRequest } from '../../modules/favorites/actions' type Params = { listId?: string } @@ -31,20 +23,8 @@ export type Props = { onShareList?: (list: List) => ReturnType<typeof openModal> } & RouteComponentProps<Params> -export type MapStateProps = Pick< - Props, - 'isConnecting' | 'wallet' | 'listId' | 'list' | 'isLoading' | 'error' -> +export type MapStateProps = Pick<Props, 'isConnecting' | 'wallet' | 'listId' | 'list' | 'isLoading' | 'error'> -export type MapDispatchProps = Pick< - Props, - 'onBack' | 'onFetchList' | 'onEditList' | 'onDeleteList' | 'onShareList' -> -export type MapDispatch = Dispatch< - | CallHistoryMethodAction - | GoBackAction - | GetListRequestAction - | OpenModalAction - | DeleteListStartAction -> +export type MapDispatchProps = Pick<Props, 'onBack' | 'onFetchList' | 'onEditList' | 'onDeleteList' | 'onShareList'> +export type MapDispatch = Dispatch<CallHistoryMethodAction | GoBackAction | GetListRequestAction | OpenModalAction | DeleteListStartAction> export type OwnProps = RouteComponentProps<Params> diff --git a/webapp/src/components/ListedBadge/ListedBadge.tsx b/webapp/src/components/ListedBadge/ListedBadge.tsx index 8ef246d5cb..f1640db084 100644 --- a/webapp/src/components/ListedBadge/ListedBadge.tsx +++ b/webapp/src/components/ListedBadge/ListedBadge.tsx @@ -7,10 +7,7 @@ type Props = { } const ListedBadge = ({ className }: Props) => ( - <Badge - className={classNames(styles.badge, className)} - color={Color.SUMMER_RED} - > + <Badge className={classNames(styles.badge, className)} color={Color.SUMMER_RED}> <Icon className={styles.icon} name="tag" /> </Badge> ) diff --git a/webapp/src/components/ListsPage/ListCard/ListCard.container.ts b/webapp/src/components/ListsPage/ListCard/ListCard.container.ts index 8c1e7b3ef2..b128d0e9e2 100644 --- a/webapp/src/components/ListsPage/ListCard/ListCard.container.ts +++ b/webapp/src/components/ListsPage/ListCard/ListCard.container.ts @@ -4,12 +4,7 @@ import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { getPreviewListItems } from '../../../modules/favorites/selectors' import { deleteListStart } from '../../../modules/favorites/actions' import { RootState } from '../../../modules/reducer' -import { - MapStateProps, - MapDispatch, - MapDispatchProps, - OwnProps -} from './ListCard.types' +import { MapStateProps, MapDispatch, MapDispatchProps, OwnProps } from './ListCard.types' import ListCard from './ListCard' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { @@ -18,14 +13,10 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { } } -const mapDispatch = ( - dispatch: MapDispatch, - ownProps: OwnProps -): MapDispatchProps => +const mapDispatch = (dispatch: MapDispatch, ownProps: OwnProps): MapDispatchProps => bindActionCreators( { - onEditList: () => - openModal('CreateOrEditListModal', { list: ownProps.list }), + onEditList: () => openModal('CreateOrEditListModal', { list: ownProps.list }), onDeleteList: () => deleteListStart(ownProps.list) }, dispatch diff --git a/webapp/src/components/ListsPage/ListCard/ListCard.spec.tsx b/webapp/src/components/ListsPage/ListCard/ListCard.spec.tsx index 86cf487242..676108c3f6 100644 --- a/webapp/src/components/ListsPage/ListCard/ListCard.spec.tsx +++ b/webapp/src/components/ListsPage/ListCard/ListCard.spec.tsx @@ -58,43 +58,32 @@ describe('when rendering the ListCard with a list with no items', () => { }) it('should show the "no items" preview', () => { - expect( - renderedModal.getByTestId(EMPTY_PREVIEW_DATA_TEST_ID) - ).toBeInTheDocument() + expect(renderedModal.getByTestId(EMPTY_PREVIEW_DATA_TEST_ID)).toBeInTheDocument() }) }) -describe.each([1, 2, 3, 4])( - 'when rendering the ListCard with %i items', - count => { - beforeEach(() => { - renderedModal = renderListCard({ - items: Array.from({ length: count }, (_v, i) => ({ - ...item, - id: `item-${i}` - })) - }) +describe.each([1, 2, 3, 4])('when rendering the ListCard with %i items', count => { + beforeEach(() => { + renderedModal = renderListCard({ + items: Array.from({ length: count }, (_v, i) => ({ + ...item, + id: `item-${i}` + })) }) + }) - it(`should show the grid preview with the grid class "grid-${count}"`, () => { - expect(renderedModal.getByTestId(GRID_PREVIEW_DATA_TEST_ID)).toHaveClass( - `grid-${count}` - ) - }) + it(`should show the grid preview with the grid class "grid-${count}"`, () => { + expect(renderedModal.getByTestId(GRID_PREVIEW_DATA_TEST_ID)).toHaveClass(`grid-${count}`) + }) - it('should render an image for each item', () => { - expect( - renderedModal.getByTestId(GRID_PREVIEW_DATA_TEST_ID).childElementCount - ).toBe(count) - }) + it('should render an image for each item', () => { + expect(renderedModal.getByTestId(GRID_PREVIEW_DATA_TEST_ID).childElementCount).toBe(count) + }) - it('should not show the "no items" preview', () => { - expect( - renderedModal.queryByTestId(EMPTY_PREVIEW_DATA_TEST_ID) - ).not.toBeInTheDocument() - }) - } -) + it('should not show the "no items" preview', () => { + expect(renderedModal.queryByTestId(EMPTY_PREVIEW_DATA_TEST_ID)).not.toBeInTheDocument() + }) +}) describe('when rendering the ListCard', () => { let list: List @@ -108,15 +97,11 @@ describe('when rendering the ListCard', () => { }) it('should render the list name', () => { - expect(renderedModal.getByTestId(LIST_NAME_DATA_TEST_ID)).toHaveTextContent( - list.name - ) + expect(renderedModal.getByTestId(LIST_NAME_DATA_TEST_ID)).toHaveTextContent(list.name) }) it('should render the amount of items', () => { - expect( - renderedModal.getByTestId(ITEM_COUNT_DATA_TEST_ID) - ).toHaveTextContent(`${list.itemsCount} items`) + expect(renderedModal.getByTestId(ITEM_COUNT_DATA_TEST_ID)).toHaveTextContent(`${list.itemsCount} items`) }) }) @@ -150,9 +135,7 @@ describe('when rendering the ListCard with a public list', () => { }) it('should not render the private tag', () => { - expect( - renderedModal.queryByTestId(PRIVATE_DATA_TEST_ID) - ).not.toBeInTheDocument() + expect(renderedModal.queryByTestId(PRIVATE_DATA_TEST_ID)).not.toBeInTheDocument() }) }) @@ -207,9 +190,7 @@ describe('when the list being rendered is the wishlist', () => { }) it('should not show the dropdown with the actions', () => { - expect( - renderedModal.queryByTestId(ACTIONS_DATA_TEST_ID) - ).not.toBeInTheDocument() + expect(renderedModal.queryByTestId(ACTIONS_DATA_TEST_ID)).not.toBeInTheDocument() }) }) @@ -227,9 +208,7 @@ describe('when rendering the ListCard', () => { }) it('should render the actions', () => { - expect( - renderedModal.getByTestId(EDIT_LIST_DATA_TEST_ID) - ).toBeInTheDocument() + expect(renderedModal.getByTestId(EDIT_LIST_DATA_TEST_ID)).toBeInTheDocument() }) }) @@ -276,9 +255,7 @@ describe('when rendering the ListCard', () => { }) it('should render the actions', () => { - expect( - renderedModal.getByTestId(EDIT_LIST_DATA_TEST_ID) - ).toBeInTheDocument() + expect(renderedModal.getByTestId(EDIT_LIST_DATA_TEST_ID)).toBeInTheDocument() }) }) }) diff --git a/webapp/src/components/ListsPage/ListCard/ListCard.tsx b/webapp/src/components/ListsPage/ListCard/ListCard.tsx index 90c8cc2ac9..05ff650775 100644 --- a/webapp/src/components/ListsPage/ListCard/ListCard.tsx +++ b/webapp/src/components/ListsPage/ListCard/ListCard.tsx @@ -28,10 +28,7 @@ import { const ListCard = (props: Props) => { const { list, items, onDeleteList, onEditList, viewOnly = false } = props - const isViewOnly = useMemo( - () => list.id === DEFAULT_FAVORITES_LIST_ID || viewOnly, - [list, viewOnly] - ) + const isViewOnly = useMemo(() => list.id === DEFAULT_FAVORITES_LIST_ID || viewOnly, [list, viewOnly]) return ( <Card @@ -47,27 +44,16 @@ const ListCard = (props: Props) => { className={classnames(styles.ListCard, isViewOnly && styles.viewOnly)} > <div className={styles.image}> - {list.isPrivate ? ( - <PrivateTag - data-testid={PRIVATE_DATA_TEST_ID} - className={styles.private} - /> - ) : null} + {list.isPrivate ? <PrivateTag data-testid={PRIVATE_DATA_TEST_ID} className={styles.private} /> : null} {items.length > 0 ? ( - <div - className={styles[`grid-${items.length}`]} - data-testid={GRID_PREVIEW_DATA_TEST_ID} - > + <div className={styles[`grid-${items.length}`]} data-testid={GRID_PREVIEW_DATA_TEST_ID}> {items.map(item => ( <AssetImage key={item.id} asset={item} /> ))} </div> ) : null} {items.length === 0 ? ( - <div - className={styles.empty} - data-testid={EMPTY_PREVIEW_DATA_TEST_ID} - > + <div className={styles.empty} data-testid={EMPTY_PREVIEW_DATA_TEST_ID}> <span className={styles.icon}></span> <span>{t('list_card.no_items')}</span> </div> @@ -91,16 +77,8 @@ const ListCard = (props: Props) => { direction="left" > <Dropdown.Menu> - <Dropdown.Item - data-testid={EDIT_LIST_DATA_TEST_ID} - onClick={onEditList} - text={t('list_card.edit_list')} - /> - <Dropdown.Item - data-testid={DELETE_LIST_DATA_TEST_ID} - onClick={onDeleteList} - text={t('list_card.delete_list')} - /> + <Dropdown.Item data-testid={EDIT_LIST_DATA_TEST_ID} onClick={onEditList} text={t('list_card.edit_list')} /> + <Dropdown.Item data-testid={DELETE_LIST_DATA_TEST_ID} onClick={onDeleteList} text={t('list_card.delete_list')} /> </Dropdown.Menu> </Dropdown> ) : null} diff --git a/webapp/src/components/ListsPage/ListsPage.spec.tsx b/webapp/src/components/ListsPage/ListsPage.spec.tsx index bca8c0b6a8..d2b8b53a0b 100644 --- a/webapp/src/components/ListsPage/ListsPage.spec.tsx +++ b/webapp/src/components/ListsPage/ListsPage.spec.tsx @@ -8,15 +8,7 @@ import { Props } from './ListsPage.types' function renderListsPage(props: Partial<Props> = {}) { return renderWithProviders( - <ListsPage - isLoading={false} - lists={[]} - count={0} - error={null} - onFetchLists={jest.fn()} - onCreateList={jest.fn()} - {...props} - /> + <ListsPage isLoading={false} lists={[]} count={0} error={null} onFetchLists={jest.fn()} onCreateList={jest.fn()} {...props} /> ) } @@ -32,7 +24,7 @@ beforeEach(() => { name: 'aListName', itemsCount: 1, previewOfItemIds: [] - } as List) + }) as List ) }) @@ -80,8 +72,6 @@ describe('when rendering the ListsPage with 5 lists', () => { }) it('should show the list of lists', () => { - expect( - renderedPage.getByText(t('lists_page.subtitle', { count })) - ).toBeInTheDocument() + expect(renderedPage.getByText(t('lists_page.subtitle', { count }))).toBeInTheDocument() }) }) diff --git a/webapp/src/components/ListsPage/ListsPage.tsx b/webapp/src/components/ListsPage/ListsPage.tsx index 50aaf60358..0e60bcc2ef 100644 --- a/webapp/src/components/ListsPage/ListsPage.tsx +++ b/webapp/src/components/ListsPage/ListsPage.tsx @@ -13,22 +13,10 @@ import { Props } from './ListsPage.types' import styles from './ListsPage.module.css' import { LOADER_TEST_ID, ERROR_TEST_ID, CREATE_LIST_TEST_ID } from './constants' -const ListsPage = ({ - count, - lists, - isLoading, - error, - onFetchLists, - onCreateList -}: Props) => { +const ListsPage = ({ count, lists, isLoading, error, onFetchLists, onCreateList }: Props) => { const { page, first, sortBy, goToNextPage, changeSorting } = usePagination() const selectedSortBy = useMemo( - () => - getParameter<ListsBrowseSortBy>( - Object.values(ListsBrowseSortBy), - sortBy, - ListsBrowseSortBy.RECENTLY_UPDATED - ), + () => getParameter<ListsBrowseSortBy>(Object.values(ListsBrowseSortBy), sortBy, ListsBrowseSortBy.RECENTLY_UPDATED), [sortBy] ) @@ -65,10 +53,7 @@ const ListsPage = ({ fetchLists() }, [fetchLists]) - const handleSortChange = useCallback( - (_e, data) => changeSorting(data.value), - [changeSorting] - ) + const handleSortChange = useCallback((_e, data) => changeSorting(data.value), [changeSorting]) const hasMorePages = lists.length < (count ?? 0) @@ -81,9 +66,7 @@ const ListsPage = ({ {!error && ( <> <div className={styles.subHeader}> - <div className={styles.left}> - {count ? t('lists_page.subtitle', { count }) : null} - </div> + <div className={styles.left}>{count ? t('lists_page.subtitle', { count }) : null}</div> <div className={styles.right}> <span className={styles.sortBy}>{t('filters.sort_by')}</span> <Dropdown @@ -113,13 +96,7 @@ const ListsPage = ({ onChange={handleSortChange} className={styles.customDropdown} /> - <Button - size="small" - primary - className={styles.createList} - onClick={onCreateList} - data-testid={CREATE_LIST_TEST_ID} - > + <Button size="small" primary className={styles.createList} onClick={onCreateList} data-testid={CREATE_LIST_TEST_ID}> <Icon name="plus" className={styles.icon} /> {t('lists_page.create_list')} </Button> @@ -129,12 +106,7 @@ const ListsPage = ({ <> <div className={styles.overlay} /> <div className={styles.transparentOverlay}> - <Loader - active - className={styles.loader} - data-testid={LOADER_TEST_ID} - size="massive" - /> + <Loader active className={styles.loader} data-testid={LOADER_TEST_ID} size="massive" /> </div> </> ) : ( @@ -144,13 +116,7 @@ const ListsPage = ({ <ListCard key={`${list.id}-${index}`} list={list} /> ))} </div> - <InfiniteScroll - page={page} - hasMorePages={hasMorePages} - onLoadMore={goToNextPage} - isLoading={isLoading} - maxScrollPages={3} - > + <InfiniteScroll page={page} hasMorePages={hasMorePages} onLoadMore={goToNextPage} isLoading={isLoading} maxScrollPages={3}> {null} </InfiniteScroll> </> diff --git a/webapp/src/components/ListsPage/ListsPage.types.ts b/webapp/src/components/ListsPage/ListsPage.types.ts index 93f8b348c7..dc4319e53a 100644 --- a/webapp/src/components/ListsPage/ListsPage.types.ts +++ b/webapp/src/components/ListsPage/ListsPage.types.ts @@ -1,10 +1,7 @@ import { Dispatch } from 'redux' import { OpenModalAction } from 'decentraland-dapps/dist/modules/modal/actions' import { List } from '../../modules/favorites/types' -import { - FetchListsRequestAction, - fetchListsRequest -} from '../../modules/favorites/actions' +import { FetchListsRequestAction, fetchListsRequest } from '../../modules/favorites/actions' export type Props = { isLoading: boolean @@ -15,9 +12,6 @@ export type Props = { onCreateList: () => void } -export type MapStateProps = Pick< - Props, - 'isLoading' | 'count' | 'lists' | 'error' -> +export type MapStateProps = Pick<Props, 'isLoading' | 'count' | 'lists' | 'error'> export type MapDispatchProps = Pick<Props, 'onFetchLists' | 'onCreateList'> export type MapDispatch = Dispatch<FetchListsRequestAction | OpenModalAction> diff --git a/webapp/src/components/Mana/Mana.tsx b/webapp/src/components/Mana/Mana.tsx index c33d305355..f87b99a31f 100644 --- a/webapp/src/components/Mana/Mana.tsx +++ b/webapp/src/components/Mana/Mana.tsx @@ -8,17 +8,13 @@ const Mana = (props: Props) => { const { withTooltip, ...manaProps } = props if (withTooltip && !manaProps.network) { - throw new Error( - "You need to specify the MANA network if you're going to show a tooltip" - ) + throw new Error("You need to specify the MANA network if you're going to show a tooltip") } return ( <Popup content={t('mana.running_on', { - network: t( - `networks.${(manaProps.network || Network.ETHEREUM).toLowerCase()}` - ) + network: t(`networks.${(manaProps.network || Network.ETHEREUM).toLowerCase()}`) })} disabled={!withTooltip} position="top center" diff --git a/webapp/src/components/ManaToFiat/ManaToFiat.tsx b/webapp/src/components/ManaToFiat/ManaToFiat.tsx index 61ba1f8347..e8ac0b7b22 100644 --- a/webapp/src/components/ManaToFiat/ManaToFiat.tsx +++ b/webapp/src/components/ManaToFiat/ManaToFiat.tsx @@ -22,18 +22,15 @@ const ManaToFiat = (props: Props) => { usd > ONE_TRILLION.value ? ONE_TRILLION : usd > ONE_BILLION.value - ? ONE_BILLION - : usd > ONE_MILLION.value - ? ONE_MILLION - : { value: 1, displayValue: '' } + ? ONE_BILLION + : usd > ONE_MILLION.value + ? ONE_MILLION + : { value: 1, displayValue: '' } if (cancel) return setFiatValue( - `$${(+(+usd / divider.value).toFixed(digits)).toLocaleString( - undefined, - { - maximumFractionDigits: digits - } - )}${divider.displayValue}` + `$${(+(+usd / divider.value).toFixed(digits)).toLocaleString(undefined, { + maximumFractionDigits: digits + })}${divider.displayValue}` ) }) .catch() diff --git a/webapp/src/components/ManageAssetPage/Highlights/Highlights.tsx b/webapp/src/components/ManageAssetPage/Highlights/Highlights.tsx index a681296fe9..260c5eaeb2 100644 --- a/webapp/src/components/ManageAssetPage/Highlights/Highlights.tsx +++ b/webapp/src/components/ManageAssetPage/Highlights/Highlights.tsx @@ -18,24 +18,16 @@ export const Highlights = (props: Props) => { district: t('manage_asset_page.highlights.district') } - const highlightTypes = - proximity && (Object.keys(proximity) as (keyof Proximity)[]) + const highlightTypes = proximity && (Object.keys(proximity) as (keyof Proximity)[]) return highlightTypes ? ( - <Box - header={t('manage_asset_page.highlights.title')} - className={classNames(className)} - > + <Box header={t('manage_asset_page.highlights.title')} className={classNames(className)}> {highlightTypes.map((highlightType, index) => ( <div key={index} className={styles.highlight}> <div className={classNames(styles[highlightType], styles.icon)}></div> <div className={styles.title}> {proximityTitle[highlightType]} - {proximity && proximity[highlightType] !== undefined && ( - <InfoTooltip - content={getDistanceText(proximity[highlightType]!)} - /> - )} + {proximity && proximity[highlightType] !== undefined && <InfoTooltip content={getDistanceText(proximity[highlightType]!)} />} </div> </div> ))} diff --git a/webapp/src/components/ManageAssetPage/IconButton/IconButton.tsx b/webapp/src/components/ManageAssetPage/IconButton/IconButton.tsx index 88c95f65c9..5769d23a23 100644 --- a/webapp/src/components/ManageAssetPage/IconButton/IconButton.tsx +++ b/webapp/src/components/ManageAssetPage/IconButton/IconButton.tsx @@ -7,11 +7,7 @@ export const IconButton = (props: Props) => { const { onClick, className, iconName, disabled = false } = props return ( - <Button - className={classNames(className, styles.button)} - onClick={onClick} - disabled={disabled} - > + <Button className={classNames(className, styles.button)} onClick={onClick} disabled={disabled}> <Icon className={styles.icon} name={iconName} /> </Button> ) diff --git a/webapp/src/components/ManageAssetPage/ManageAssetPage.tsx b/webapp/src/components/ManageAssetPage/ManageAssetPage.tsx index 0dfe7619bf..f92eae0ee9 100644 --- a/webapp/src/components/ManageAssetPage/ManageAssetPage.tsx +++ b/webapp/src/components/ManageAssetPage/ManageAssetPage.tsx @@ -1,16 +1,6 @@ import { useCallback, useMemo } from 'react' import { Link } from 'react-router-dom' -import { - Back, - Button, - Footer, - Loader, - Mobile, - Narrow, - NotMobile, - Page, - Section -} from 'decentraland-ui' +import { Back, Button, Footer, Loader, Mobile, Narrow, NotMobile, Page, Section } from 'decentraland-ui' import { NFTCategory, RentalStatus } from '@dcl/schemas' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { AssetType } from '../../modules/asset/types' @@ -57,18 +47,11 @@ export const ManageAssetPage = (props: Props) => { const handleOpenInBuilder = useCallback((asset: NFT) => { window.location.replace( - `${builderUrl}/land/${ - asset.category === NFTCategory.ESTATE - ? `${asset.tokenId}` - : `${asset.data.parcel?.x},${asset.data.parcel?.y}` - }` + `${builderUrl}/land/${asset.category === NFTCategory.ESTATE ? `${asset.tokenId}` : `${asset.data.parcel?.x},${asset.data.parcel?.y}`}` ) }, []) - const rentalStatus = useMemo( - () => [RentalStatus.EXECUTED, RentalStatus.OPEN, RentalStatus.CANCELLED], - [] - ) + const rentalStatus = useMemo(() => [RentalStatus.EXECUTED, RentalStatus.OPEN, RentalStatus.CANCELLED], []) return ( <> @@ -83,10 +66,7 @@ export const ManageAssetPage = (props: Props) => { <Back className="back" absolute onClick={() => onBack()} /> {isLoading ? <Loading /> : null} {!isLoading && !asset ? <NotFound /> : null} - {!isLoading && - asset && - wallet && - isOwnedBy(asset, wallet, rental ?? undefined) ? ( + {!isLoading && asset && wallet && isOwnedBy(asset, wallet, rental ?? undefined) ? ( <> <Narrow className={styles.mainRow}> <NotMobile> @@ -94,36 +74,18 @@ export const ManageAssetPage = (props: Props) => { {asset && !isLoading ? ( <> <Map asset={asset} /> - <LandLockedPopup - asset={asset} - rental={rental} - userAddress={wallet.address} - > + <LandLockedPopup asset={asset} rental={rental} userAddress={wallet.address}> <Button className={styles.builderButton} primary - disabled={ - rental !== null && - isLandLocked( - wallet.address, - rental, - asset - ) - } + disabled={rental !== null && isLandLocked(wallet.address, rental, asset)} onClick={() => handleOpenInBuilder(asset)} > {t('manage_asset_page.open_in_builder')} </Button> </LandLockedPopup> - <Highlights - className={styles.highlights} - nft={asset as NFT} - /> - <DetailsBox - asset={asset as NFT} - rental={rental} - className={styles.details} - /> + <Highlights className={styles.highlights} nft={asset} /> + <DetailsBox asset={asset} rental={rental} className={styles.details} /> </> ) : null} </Column> @@ -131,37 +93,15 @@ export const ManageAssetPage = (props: Props) => { {asset && !isLoading ? ( <> <section className={styles.assetDescription}> - <div - className={styles.assetDescriptionHeader} - > - <h1 - className={styles.assetDescriptionTitle} - > - {asset?.name} - </h1> - <div - className={styles.assetDescriptionOptions} - > - <LandLockedPopup - asset={asset} - rental={rental} - userAddress={wallet.address} - > + <div className={styles.assetDescriptionHeader}> + <h1 className={styles.assetDescriptionTitle}>{asset?.name}</h1> + <div className={styles.assetDescriptionOptions}> + <LandLockedPopup asset={asset} rental={rental} userAddress={wallet.address}> <Button className={styles.transfer} as={Link} - disabled={ - rental !== null && - isLandLocked( - wallet.address, - rental, - asset - ) - } - to={locations.transfer( - asset.contractAddress, - asset.tokenId - )} + disabled={rental !== null && isLandLocked(wallet.address, rental, asset)} + to={locations.transfer(asset.contractAddress, asset.tokenId)} fluid > {t('manage_asset_page.transfer')} @@ -170,16 +110,10 @@ export const ManageAssetPage = (props: Props) => { </div> </div> <p className={styles.assetDescriptionContent}> - {asset?.data.estate?.description || - asset?.data.parcel?.description} + {asset?.data.estate?.description || asset?.data.parcel?.description} </p> </section> - <Sell - nft={asset} - rental={rental} - order={order} - userAddress={wallet.address} - /> + <Sell nft={asset} rental={rental} order={order} userAddress={wallet.address} /> <Rent nft={asset} rental={rental} /> </> ) : null} @@ -190,72 +124,32 @@ export const ManageAssetPage = (props: Props) => { {asset && !isLoading ? ( <> <Map asset={asset} /> - <LandLockedPopup - asset={asset} - rental={rental} - userAddress={wallet.address} - > + <LandLockedPopup asset={asset} rental={rental} userAddress={wallet.address}> <Button className={styles.builderButton} primary - disabled={ - rental !== null && - isLandLocked( - wallet.address, - rental, - asset - ) - } + disabled={rental !== null && isLandLocked(wallet.address, rental, asset)} onClick={() => handleOpenInBuilder(asset)} > {t('manage_asset_page.open_in_builder')} </Button> </LandLockedPopup> - <Highlights - className={styles.highlights} - nft={asset as NFT} - /> - <DetailsBox - asset={asset as NFT} - rental={rental} - className={styles.details} - /> + <Highlights className={styles.highlights} nft={asset} /> + <DetailsBox asset={asset} rental={rental} className={styles.details} /> </> ) : null} {asset && !isLoading ? ( <> <section className={styles.assetDescription}> - <div - className={styles.assetDescriptionHeader} - > - <h1 - className={styles.assetDescriptionTitle} - > - {asset?.name} - </h1> - <div - className={styles.assetDescriptionOptions} - > - <LandLockedPopup - asset={asset} - rental={rental} - userAddress={wallet.address} - > + <div className={styles.assetDescriptionHeader}> + <h1 className={styles.assetDescriptionTitle}>{asset?.name}</h1> + <div className={styles.assetDescriptionOptions}> + <LandLockedPopup asset={asset} rental={rental} userAddress={wallet.address}> <Button className={styles.transfer} as={Link} - disabled={ - rental !== null && - isLandLocked( - wallet.address, - rental, - asset - ) - } - to={locations.transfer( - asset.contractAddress, - asset.tokenId - )} + disabled={rental !== null && isLandLocked(wallet.address, rental, asset)} + to={locations.transfer(asset.contractAddress, asset.tokenId)} fluid > {t('manage_asset_page.transfer')} @@ -264,16 +158,10 @@ export const ManageAssetPage = (props: Props) => { </div> </div> <p className={styles.assetDescriptionContent}> - {asset?.data.estate?.description || - asset?.data.parcel?.description} + {asset?.data.estate?.description || asset?.data.parcel?.description} </p> </section> - <Sell - nft={asset} - rental={rental} - order={order} - userAddress={wallet.address} - /> + <Sell nft={asset} rental={rental} order={order} userAddress={wallet.address} /> <Rent nft={asset} rental={rental} /> </> ) : null} diff --git a/webapp/src/components/ManageAssetPage/Rent/Rent.container.ts b/webapp/src/components/ManageAssetPage/Rent/Rent.container.ts index 193c9cdd15..7713d729c7 100644 --- a/webapp/src/components/ManageAssetPage/Rent/Rent.container.ts +++ b/webapp/src/components/ManageAssetPage/Rent/Rent.container.ts @@ -3,10 +3,7 @@ import { Dispatch } from 'redux' import { RentalListing } from '@dcl/schemas' import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { RootState } from '../../../modules/reducer' -import { - isClaimingBackLandTransactionPending, - getLastTransactionForClaimingBackLand -} from '../../../modules/ui/browse/selectors' +import { isClaimingBackLandTransactionPending, getLastTransactionForClaimingBackLand } from '../../../modules/ui/browse/selectors' import { getWallet } from '../../../modules/wallet/selectors' import { MapStateProps, MapDispatchProps, OwnProps } from './Rent.types' import { RentalModalMetadata } from '../../Modals/RentalListingModal/RentalListingModal.types' @@ -16,20 +13,11 @@ import { Rent } from './Rent' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => ({ wallet: getWallet(state), - isClaimingBackLandTransactionPending: isClaimingBackLandTransactionPending( - state, - ownProps.nft - ), - claimingBackLandTransaction: getLastTransactionForClaimingBackLand( - state, - ownProps.nft - ) + isClaimingBackLandTransactionPending: isClaimingBackLandTransactionPending(state, ownProps.nft), + claimingBackLandTransaction: getLastTransactionForClaimingBackLand(state, ownProps.nft) }) -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => ({ onClaimLand: () => dispatch( openModal('ClaimLandModal', { diff --git a/webapp/src/components/ManageAssetPage/Rent/Rent.tsx b/webapp/src/components/ManageAssetPage/Rent/Rent.tsx index 89c3e091eb..93ae4ad9ad 100644 --- a/webapp/src/components/ManageAssetPage/Rent/Rent.tsx +++ b/webapp/src/components/ManageAssetPage/Rent/Rent.tsx @@ -48,25 +48,17 @@ export const Rent = (props: Props) => { } = props const assetText = isParcel(nft) ? t('global.parcel') : t('global.estate') - const handleOnCreateOrEdit = useCallback( - () => onCreateOrEditRent(nft, rental), - [nft, onCreateOrEditRent, rental] - ) + const handleOnCreateOrEdit = useCallback(() => onCreateOrEditRent(nft, rental), [nft, onCreateOrEditRent, rental]) const claimingBackLandTransactionLink = claimingBackLandTransaction ? getTransactionHref( { - txHash: - claimingBackLandTransaction.replacedBy || - claimingBackLandTransaction.hash + txHash: claimingBackLandTransaction.replacedBy || claimingBackLandTransaction.hash }, claimingBackLandTransaction.chainId ) : '' - const rentalEndDate: Date | null = useMemo( - () => (rental && rental.startedAt ? getRentalEndDate(rental) : null), - [rental] - ) + const rentalEndDate: Date | null = useMemo(() => (rental && rental.startedAt ? getRentalEndDate(rental) : null), [rental]) const rentalEnded = useMemo(() => rental && hasRentalEnded(rental), [rental]) @@ -80,16 +72,12 @@ export const Rent = (props: Props) => { : null, [rental] ) - const canBeClaimedBack = - wallet && rental && canBeClaimed(wallet.address, rental, nft) + const canBeClaimedBack = wallet && rental && canBeClaimed(wallet.address, rental, nft) const rentButton = useMemo(() => { if (!rental || (isRentalListingCancelled(rental) && !canBeClaimedBack)) { return ( - <Button - className={styles.actionButtonRounded} - onClick={handleOnCreateOrEdit} - > + <Button className={styles.actionButtonRounded} onClick={handleOnCreateOrEdit}> {t('manage_asset_page.rent.list_for_rent')} </Button> ) @@ -108,11 +96,7 @@ export const Rent = (props: Props) => { : t('manage_asset_page.rent.rent_title')} </h1> {rental && isRentalListingOpen(rental) ? ( - <Button - className={styles.actionButton} - as={Link} - to={locations.nft(nft.contractAddress, nft.tokenId)} - > + <Button className={styles.actionButton} as={Link} to={locations.nft(nft.contractAddress, nft.tokenId)}> {t('manage_asset_page.rent.view_listing')} </Button> ) : null} @@ -136,12 +120,7 @@ export const Rent = (props: Props) => { month: 'long', day: 'numeric' }), - tenant: ( - <LinkedProfile - className={styles.rentedBy} - address={rental.tenant!} - /> - ) + tenant: <LinkedProfile className={styles.rentedBy} address={rental.tenant!} /> }} /> </div> @@ -175,38 +154,25 @@ export const Rent = (props: Props) => { <T id="manage_asset_page.rent.rent_end" values={{ - tenant: ( - <LinkedProfile - className={styles.rentedBy} - address={rental.tenant} - /> - ), + tenant: <LinkedProfile className={styles.rentedBy} address={rental.tenant} />, asset: assetText }} /> ) : ( t('manage_asset_page.rent.unclaimed_message', { - asset: isLand(nft) - ? t('global.the_parcel') - : t('global.the_estate') + asset: isLand(nft) ? t('global.the_parcel') : t('global.the_estate') }) )} </div> <div className={styles.activeRentActions}> <div> - <Button - className={styles.actionButton} - onClick={onClaimLand} - > + <Button className={styles.actionButton} onClick={onClaimLand}> {t('manage_asset_page.rent.claim_asset', { asset: assetText })} </Button> {!isRentalListingOpen(rental) && ( - <Button - className={styles.actionButton} - onClick={handleOnCreateOrEdit} - > + <Button className={styles.actionButton} onClick={handleOnCreateOrEdit}> {t('manage_asset_page.rent.list_for_rent_again')} </Button> )} @@ -217,27 +183,12 @@ export const Rent = (props: Props) => { </div> ) : null} {!isClaimingBackLandTransactionPending && - (isRentalListingOpen(rental) || - (!canBeClaimedBack && !isRentalListingCancelled(rental))) ? ( + (isRentalListingOpen(rental) || (!canBeClaimedBack && !isRentalListingCancelled(rental))) ? ( <div className={styles.summary}> - <div - className={classNames( - styles.column, - styles.notShrink, - styles.priceColumn - )} - > - <div className={styles.columnHeader}> - {t('manage_asset_page.rent.price')} - </div> + <div className={classNames(styles.column, styles.notShrink, styles.priceColumn)}> + <div className={styles.columnHeader}>{t('manage_asset_page.rent.price')}</div> <div className={styles.columnContent}> - <Mana - showTooltip - withTooltip - size={'medium'} - className={styles.price} - network={rental.network} - > + <Mana showTooltip withTooltip size={'medium'} className={styles.price} network={rental.network}> {formatWeiMANA(getMaxPriceOfPeriods(rental))} </Mana> <span>/{t('global.day')}</span> @@ -246,61 +197,33 @@ export const Rent = (props: Props) => { {isRentalListingOpen(rental) ? ( <> <div className={classNames(styles.column, styles.notShrink)}> - <div className={styles.columnHeader}> - {t('manage_asset_page.rent.expiration_date')} - </div> - <div className={styles.columnContent}> - {intlFormat(rental.expiration)} - </div> + <div className={styles.columnHeader}>{t('manage_asset_page.rent.expiration_date')}</div> + <div className={styles.columnContent}>{intlFormat(rental.expiration)}</div> </div> <div className={styles.column}> - <div className={styles.columnHeader}> - {t('manage_asset_page.rent.rent_periods')} - </div> + <div className={styles.columnHeader}>{t('manage_asset_page.rent.rent_periods')}</div> <div className={styles.columnContent}>{rentalPeriods}</div> </div> </> ) : isRentalListingExecuted(rental) ? ( <> - <div - className={classNames( - styles.column, - styles.shrinkAndExpand - )} - > - <div className={styles.columnHeader}> - {t('manage_asset_page.rent.start_date')} - </div> + <div className={classNames(styles.column, styles.shrinkAndExpand)}> + <div className={styles.columnHeader}>{t('manage_asset_page.rent.start_date')}</div> <div className={styles.columnContent}> {formatDistance(rental.startedAt!, new Date(), { addSuffix: true })} </div> - <div - className={classNames(styles.columnContent, styles.date)} - > - ({intlFormat(rental.startedAt!)}) - </div> + <div className={classNames(styles.columnContent, styles.date)}>({intlFormat(rental.startedAt!)})</div> </div> - <div - className={classNames( - styles.column, - styles.shrinkAndExpand - )} - > - <div className={styles.columnHeader}> - {t('manage_asset_page.rent.end_date')} - </div> + <div className={classNames(styles.column, styles.shrinkAndExpand)}> + <div className={styles.columnHeader}>{t('manage_asset_page.rent.end_date')}</div> <div className={styles.columnContent}> {formatDistance(rentalEndDate!, new Date(), { addSuffix: true })} </div> - <div - className={classNames(styles.columnContent, styles.date)} - > - ({intlFormat(rentalEndDate!)}) - </div> + <div className={classNames(styles.columnContent, styles.date)}>({intlFormat(rentalEndDate!)})</div> </div> </> ) : null} diff --git a/webapp/src/components/ManageAssetPage/Rent/Rent.types.ts b/webapp/src/components/ManageAssetPage/Rent/Rent.types.ts index 422487e1ef..a731c94c21 100644 --- a/webapp/src/components/ManageAssetPage/Rent/Rent.types.ts +++ b/webapp/src/components/ManageAssetPage/Rent/Rent.types.ts @@ -10,21 +10,13 @@ export type Props = { nft: NFT rental: RentalListing | null onClaimLand: () => void - onCreateOrEditRent: ( - nft: NFT<VendorName>, - rental: RentalListing | null - ) => void + onCreateOrEditRent: (nft: NFT<VendorName>, rental: RentalListing | null) => void isClaimingBackLandTransactionPending: boolean claimingBackLandTransaction: Transaction | null } export type OwnProps = Pick<Props, 'nft' | 'rental'> -export type MapStateProps = Pick< - Props, - | 'wallet' - | 'isClaimingBackLandTransactionPending' - | 'claimingBackLandTransaction' -> +export type MapStateProps = Pick<Props, 'wallet' | 'isClaimingBackLandTransactionPending' | 'claimingBackLandTransaction'> export type MapDispatchProps = Pick<Props, 'onClaimLand' | 'onCreateOrEditRent'> diff --git a/webapp/src/components/ManageAssetPage/Sell/Sell.container.ts b/webapp/src/components/ManageAssetPage/Sell/Sell.container.ts index c788158142..74f59ad005 100644 --- a/webapp/src/components/ManageAssetPage/Sell/Sell.container.ts +++ b/webapp/src/components/ManageAssetPage/Sell/Sell.container.ts @@ -8,10 +8,7 @@ import Sell from './Sell' const mapState = (_state: RootState): MapStateProps => ({}) -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => ({ // TODO: @Rentals, add the mapDispatch that opens the sell modal once implemented onEditOrder: () => dispatch( diff --git a/webapp/src/components/ManageAssetPage/Sell/Sell.tsx b/webapp/src/components/ManageAssetPage/Sell/Sell.tsx index 6efe72fac0..236e5b0505 100644 --- a/webapp/src/components/ManageAssetPage/Sell/Sell.tsx +++ b/webapp/src/components/ManageAssetPage/Sell/Sell.tsx @@ -12,48 +12,22 @@ import { Props } from './Sell.types' import styles from './Sell.module.css' const Sell = (props: Props) => { - const { - className, - rental, - order, - nft, - onEditOrder, - userAddress, - onListForSale - } = props + const { className, rental, order, nft, onEditOrder, userAddress, onListForSale } = props - const areActionsLocked = - rental !== null && isLandLocked(userAddress, rental, nft) + const areActionsLocked = rental !== null && isLandLocked(userAddress, rental, nft) return ( <section className={classNames(styles.box, className)}> <div className={styles.header}> - <h1 className={styles.title}> - {order - ? t('manage_asset_page.sell.selling_title') - : t('manage_asset_page.sell.sell_title')} - </h1> + <h1 className={styles.title}>{order ? t('manage_asset_page.sell.selling_title') : t('manage_asset_page.sell.sell_title')}</h1> <div className={styles.action}> {order ? ( <> - <IconButton - iconName="pencil" - disabled={areActionsLocked} - onClick={onEditOrder} - /> + <IconButton iconName="pencil" disabled={areActionsLocked} onClick={onEditOrder} /> </> ) : ( - <LandLockedPopup - asset={nft} - rental={rental} - userAddress={userAddress} - > - <Button - className={styles.sellButton} - disabled={areActionsLocked} - onClick={onListForSale} - fluid - > + <LandLockedPopup asset={nft} rental={rental} userAddress={userAddress}> + <Button className={styles.sellButton} disabled={areActionsLocked} onClick={onListForSale} fluid> {t('manage_asset_page.sell.list_for_sale')} </Button> </LandLockedPopup> @@ -67,24 +41,15 @@ const Sell = (props: Props) => { })} > <div className={styles.column}> - <div className={styles.columnHeader}> - {t('manage_asset_page.sell.price')} - </div> + <div className={styles.columnHeader}>{t('manage_asset_page.sell.price')}</div> <div className={styles.columnContent}> - <Mana - showTooltip - withTooltip - size={'medium'} - network={order.network} - > + <Mana showTooltip withTooltip size={'medium'} network={order.network}> {formatWeiMANA(order.price)} </Mana> </div> </div> <div className={styles.column}> - <div className={styles.columnHeader}> - {t('manage_asset_page.sell.expiration_date')} - </div> + <div className={styles.columnHeader}>{t('manage_asset_page.sell.expiration_date')}</div> <div className={styles.columnContent}> {intlFormat( order.expiresAt * diff --git a/webapp/src/components/Menu/DropdownMenu/DropdownMenu.tsx b/webapp/src/components/Menu/DropdownMenu/DropdownMenu.tsx index d661fc2de0..75cfd73d84 100644 --- a/webapp/src/components/Menu/DropdownMenu/DropdownMenu.tsx +++ b/webapp/src/components/Menu/DropdownMenu/DropdownMenu.tsx @@ -8,13 +8,16 @@ const DropdownMenu = <T extends unknown>(props: Props<T>) => { const { values, currentValue, onMenuItemClick } = props const [isDropdownOpen, setIsDropdownOpen] = useState(currentValue && values.includes(currentValue)) - const handleMenuItemClick = useCallback((value: T) => { - if (value === values[0]) { - setIsDropdownOpen(!isDropdownOpen); - } + const handleMenuItemClick = useCallback( + (value: T) => { + if (value === values[0]) { + setIsDropdownOpen(!isDropdownOpen) + } - onMenuItemClick(value); - }, [values, isDropdownOpen, onMenuItemClick]) + onMenuItemClick(value) + }, + [values, isDropdownOpen, onMenuItemClick] + ) useEffect(() => { if (!currentValue || !values.includes(currentValue)) { @@ -33,17 +36,11 @@ const DropdownMenu = <T extends unknown>(props: Props<T>) => { className={classNames({ open: isDropdownOpen })} /> <ul className="submenu"> - {values.includes(currentValue!) && isDropdownOpen + {values.includes(currentValue) && isDropdownOpen ? values .slice(1) .map((value, index) => ( - <MenuItem<T> - key={index} - value={value} - currentValue={currentValue} - onClick={handleMenuItemClick} - nestedLevel={2} - /> + <MenuItem<T> key={index} value={value} currentValue={currentValue} onClick={handleMenuItemClick} nestedLevel={2} /> )) : null} </ul> diff --git a/webapp/src/components/Menu/MenuItem/MenuItem.tsx b/webapp/src/components/Menu/MenuItem/MenuItem.tsx index fc67b03ca6..901766c90e 100644 --- a/webapp/src/components/Menu/MenuItem/MenuItem.tsx +++ b/webapp/src/components/Menu/MenuItem/MenuItem.tsx @@ -7,16 +7,7 @@ import { Props } from './MenuItem.types' import './MenuItem.css' const MenuItem = <T extends unknown>(props: Props<T>) => { - const { - className = '', - value, - currentValue, - subtitle, - image, - nestedLevel, - withCaret, - onClick - } = props + const { className = '', value, currentValue, subtitle, image, nestedLevel, withCaret, onClick } = props const handleOnClick = useCallback(() => { onClick(value) @@ -37,12 +28,7 @@ const MenuItem = <T extends unknown>(props: Props<T>) => { }) return ( - <li - className={containerClass} - onClick={handleOnClick} - tabIndex={0} - onKeyDown={handleOnKeyDown} - > + <li className={containerClass} onClick={handleOnClick} tabIndex={0} onKeyDown={handleOnKeyDown}> {image && <Image alt={image} src={image} width="25" circular />} <div className="content"> diff --git a/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.container.ts b/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.container.ts index 3e3292b18e..9c7b6cd77c 100644 --- a/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.container.ts +++ b/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.container.ts @@ -1,18 +1,10 @@ import { connect } from 'react-redux' import { RootState } from '../../../modules/reducer' import { browse } from '../../../modules/routing/actions' -import { - getAssetType, - getCurrentBrowseOptions, - hasFiltersEnabled -} from '../../../modules/routing/selectors' +import { getAssetType, getCurrentBrowseOptions, hasFiltersEnabled } from '../../../modules/routing/selectors' import { BrowseOptions } from '../../../modules/routing/types' import { getView } from '../../../modules/ui/browse/selectors' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './AssetFiltersModal.types' +import { MapStateProps, MapDispatchProps, MapDispatch } from './AssetFiltersModal.types' import AssetFiltersModal from './AssetFiltersModal' const mapState = (state: RootState): MapStateProps => ({ @@ -23,7 +15,7 @@ const mapState = (state: RootState): MapStateProps => ({ }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onBrowse: (options: BrowseOptions) => dispatch(browse(options)), + onBrowse: (options: BrowseOptions) => dispatch(browse(options)) }) export default connect(mapState, mapDispatch)(AssetFiltersModal) diff --git a/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.tsx b/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.tsx index b3a0b18a7a..6a12678325 100644 --- a/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.tsx +++ b/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.tsx @@ -48,36 +48,19 @@ const AssetFiltersModal = (props: Props) => { return ( <Modal open className={styles.assetFiltersModal}> <Modal.Header className={styles.modalHeader}> - <Button - basic - className="clear-filters-modal" - onClick={handleClearFilters} - > + <Button basic className="clear-filters-modal" onClick={handleClearFilters}> {t('filters.reset')} </Button> <h3 className={styles.modalTitle}>Filters</h3> - <Button - basic - className={styles.closeButton} - onClick={evt => onClose && onClose(evt, {})} - /> + <Button basic className={styles.closeButton} onClick={evt => onClose && onClose(evt, {})} /> </Modal.Header> <Modal.Content> - {view === View.ACCOUNT ? ( - <AssetTypeFilter - onChange={handleAssetTypeChange} - assetType={filters.assetType || assetType} - /> - ) : null} + {view === View.ACCOUNT ? <AssetTypeFilter onChange={handleAssetTypeChange} assetType={filters.assetType || assetType} /> : null} <CategoryFilter onChange={handleSectionChange} values={filters} /> <AssetFilters onFilterChange={handleFilterChange} values={filters} /> </Modal.Content> <Modal.Actions className={styles.modalFooter}> - <Button - className={styles.applyFilters} - primary - onClick={handleApplyFilters} - > + <Button className={styles.applyFilters} primary onClick={handleApplyFilters}> {t('filters.apply')} </Button> </Modal.Actions> diff --git a/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.types.ts b/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.types.ts index 0e66937820..e94cfb7962 100644 --- a/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.types.ts +++ b/webapp/src/components/Modals/AssetFiltersModal/AssetFiltersModal.types.ts @@ -1,9 +1,6 @@ import { Dispatch } from 'redux' import { ModalProps } from 'decentraland-ui/dist/components/Modal/Modal' -import { - BrowseAction, - ClearFiltersAction -} from '../../../modules/routing/actions' +import { BrowseAction, ClearFiltersAction } from '../../../modules/routing/actions' import { BrowseOptions } from '../../../modules/routing/types' import { View } from '../../../modules/ui/types' import { AssetType } from '../../../modules/asset/types' @@ -16,13 +13,7 @@ export type Props = ModalProps & { onBrowse: (options: BrowseOptions) => void } -export type MapStateProps = Pick< - Props, - | 'hasFiltersEnabled' - | 'view' - | 'assetType' - | 'browseOptions' -> +export type MapStateProps = Pick<Props, 'hasFiltersEnabled' | 'view' | 'assetType' | 'browseOptions'> export type MapDispatchProps = Pick<Props, 'onBrowse'> export type MapDispatch = Dispatch<ClearFiltersAction | BrowseAction> diff --git a/webapp/src/components/Modals/AssetFiltersModal/AssetTypeFilter/AssetTypeFilter.tsx b/webapp/src/components/Modals/AssetFiltersModal/AssetTypeFilter/AssetTypeFilter.tsx index 590ae87eda..6fcd6379fd 100644 --- a/webapp/src/components/Modals/AssetFiltersModal/AssetTypeFilter/AssetTypeFilter.tsx +++ b/webapp/src/components/Modals/AssetFiltersModal/AssetTypeFilter/AssetTypeFilter.tsx @@ -25,9 +25,12 @@ export const AssetTypeFilter = ({ assetType, onChange }: Props): JSX.Element => ] }, []) - const handleAssetTypeChange = useCallback((type: string) => { - onChange(type as AssetType) - }, [onChange]) + const handleAssetTypeChange = useCallback( + (type: string) => { + onChange(type as AssetType) + }, + [onChange] + ) const header = useMemo( () => @@ -43,18 +46,8 @@ export const AssetTypeFilter = ({ assetType, onChange }: Props): JSX.Element => ) return ( - <Box - header={header} - className="filters-sidebar-box asset-type-filter" - collapsible - defaultCollapsed={true} - > - <SelectFilter - name="" - value={assetType || ''} - options={assetTypeOptions} - onChange={handleAssetTypeChange} - /> + <Box header={header} className="filters-sidebar-box asset-type-filter" collapsible defaultCollapsed={true}> + <SelectFilter name="" value={assetType || ''} options={assetTypeOptions} onChange={handleAssetTypeChange} /> </Box> ) } diff --git a/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/CategoryFilter.container.ts b/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/CategoryFilter.container.ts index 14234b464e..71cfec0558 100644 --- a/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/CategoryFilter.container.ts +++ b/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/CategoryFilter.container.ts @@ -1,15 +1,15 @@ import { connect } from 'react-redux' import { RootState } from '../../../../modules/reducer' -import { getView } from '../../../../modules/ui/browse/selectors'; -import { getAssetType, getSection } from '../../../../modules/routing/selectors'; -import { Section } from '../../../../modules/vendor/routing/types'; -import { MapStateProps, OwnProps } from './CategoryFilter.types'; +import { getView } from '../../../../modules/ui/browse/selectors' +import { getAssetType, getSection } from '../../../../modules/routing/selectors' +import { Section } from '../../../../modules/vendor/routing/types' +import { MapStateProps, OwnProps } from './CategoryFilter.types' import { CategoryFilter } from './CategoryFilter' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { - const { values } = ownProps; + const { values } = ownProps return { - section: 'section' in values ? values.section as Section : getSection(state), + section: 'section' in values ? (values.section as Section) : getSection(state), assetType: 'assetType' in values ? values.assetType : getAssetType(state), view: getView(state) } diff --git a/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/CategoryFilter.tsx b/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/CategoryFilter.tsx index a56182ca59..096bfd3959 100644 --- a/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/CategoryFilter.tsx +++ b/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/CategoryFilter.tsx @@ -23,18 +23,9 @@ export const CategoryFilter = ({ section, view, assetType, onChange }: Props): J ) return ( - <Box - header={header} - className="filters-sidebar-box category-filter" - collapsible - defaultCollapsed={true} - > + <Box header={header} className="filters-sidebar-box category-filter" collapsible defaultCollapsed={true}> <ul className="Menu box-menu"> - <NFTSectionsMenuItems - section={section} - sections={getAvailableSections(view, section, assetType)} - onSectionClick={onChange} - /> + <NFTSectionsMenuItems section={section} sections={getAvailableSections(view, section, assetType)} onSectionClick={onChange} /> </ul> </Box> ) diff --git a/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/utils.ts b/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/utils.ts index d30603fc4c..f1ba19b0c0 100644 --- a/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/utils.ts +++ b/webapp/src/components/Modals/AssetFiltersModal/CategoryFilter/utils.ts @@ -1,7 +1,7 @@ -import { AssetType } from "../../../../modules/asset/types"; -import { View } from "../../../../modules/ui/types"; -import { isLandSection } from "../../../../modules/ui/utils"; -import { Section, Sections } from "../../../../modules/vendor/routing/types"; +import { AssetType } from '../../../../modules/asset/types' +import { View } from '../../../../modules/ui/types' +import { isLandSection } from '../../../../modules/ui/utils' +import { Section, Sections } from '../../../../modules/vendor/routing/types' export function getAvailableSections(view?: View, section?: Section, assetType?: AssetType) { if (view === View.ACCOUNT && assetType === AssetType.ITEM) { diff --git a/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.container.ts b/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.container.ts index 4bf93c0478..4c330f22d3 100644 --- a/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.container.ts +++ b/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.container.ts @@ -1,8 +1,5 @@ import { connect } from 'react-redux' -import { - MapDispatch, - MapDispatchProps -} from './BuyWithCardExplanationModal.types' +import { MapDispatch, MapDispatchProps } from './BuyWithCardExplanationModal.types' import BuyWithCardExplanationModal from './BuyWithCardExplanationModal' import { openTransak } from '../../../modules/transak/actions' import { Asset } from '../../../modules/asset/types' diff --git a/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.tsx b/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.tsx index 31e7890107..92b9483b11 100644 --- a/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.tsx +++ b/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.tsx @@ -6,11 +6,7 @@ import * as events from '../../../utils/events' import styles from './BuyWithCardExplanationModal.module.css' import { Props } from './BuyWithCardExplanationModal.types' -const BuyWithCardExplanationModal = ({ - metadata: { asset }, - onContinue, - onClose -}: Props) => { +const BuyWithCardExplanationModal = ({ metadata: { asset }, onContinue, onClose }: Props) => { const analytics = getAnalytics() const handleContinue = useCallback(() => { @@ -25,32 +21,20 @@ const BuyWithCardExplanationModal = ({ return ( <Modal open className={styles.buyWithCardExplanationModal}> - <ModalNavigation - title={t('buy_with_card_explanation_modal.title')} - onClose={onClose} - /> + <ModalNavigation title={t('buy_with_card_explanation_modal.title')} onClose={onClose} /> <Modal.Content className={styles.content}> <div className={styles.explanation}> <p> {t('buy_with_card_explanation_modal.explanation', { link_to_transak: ( - <a - href="https://transak.com/" - target="_blank" - rel="noopener noreferrer" - > + <a href="https://transak.com/" target="_blank" rel="noopener noreferrer"> Transak </a> ) })} </p> <p className={styles.learnMore}> - <a - className="learn-more" - href="https://transak.com/nft-checkout" - target="_blank" - rel="noopener noreferrer" - > + <a className="learn-more" href="https://transak.com/nft-checkout" target="_blank" rel="noopener noreferrer"> {t('buy_with_card_explanation_modal.learn_more')} </a> </p> diff --git a/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.types.ts b/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.types.ts index 2aababd173..fb6b0a36a1 100644 --- a/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.types.ts +++ b/webapp/src/components/Modals/BuyWithCardExplanationModal/BuyWithCardExplanationModal.types.ts @@ -1,9 +1,6 @@ import { Dispatch } from 'redux' import { ModalProps } from 'decentraland-dapps/dist/providers/ModalProvider/ModalProvider.types' -import { - openTransak, - OpenTransakAction -} from '../../../modules/transak/actions' +import { openTransak, OpenTransakAction } from '../../../modules/transak/actions' import { Asset } from '../../../modules/asset/types' export type Metadata = { diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.container.ts b/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.container.ts index f2328d147f..584aae4f5d 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.container.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.container.ts @@ -9,16 +9,8 @@ import { getContract } from '../../../../modules/contract/selectors' import { getLoading as getItemsLoading } from '../../../../modules/item/selectors' import { getLoading as getLoadingOrders } from '../../../../modules/order/selectors' import type { Contract } from '../../../../modules/vendor/services' -import { - EXECUTE_ORDER_REQUEST, - executeOrderRequest, - executeOrderWithCardRequest -} from '../../../../modules/order/actions' -import type { - MapDispatchProps, - MapStateProps, - OwnProps -} from './BuyNftWithCryptoModal.types' +import { EXECUTE_ORDER_REQUEST, executeOrderRequest, executeOrderWithCardRequest } from '../../../../modules/order/actions' +import type { MapDispatchProps, MapStateProps, OwnProps } from './BuyNftWithCryptoModal.types' import { BuyNftWithCryptoModal } from './BuyNftWithCryptoModal' const mapState = (state: RootState): MapStateProps => { @@ -29,19 +21,12 @@ const mapState = (state: RootState): MapStateProps => { } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => bindActionCreators( { onExecuteOrder: executeOrderRequest, onExecuteOrderCrossChain: (route: Route) => - buyItemCrossChainRequest( - (ownProps.metadata.nft as unknown) as Item, - route, - ownProps.metadata.order - ), + buyItemCrossChainRequest(ownProps.metadata.nft as unknown as Item, route, ownProps.metadata.order), onExecuteOrderWithCard: executeOrderWithCardRequest }, dispatch diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.tsx index 2cb8afb550..f2879546e2 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.tsx @@ -49,8 +49,7 @@ const BuyNftWithCryptoModalHOC = (props: Props) => { targetContract: mana as Contract, authorizedContractLabel: marketplace.label || marketplace.name, requiredAllowanceInWei: order.price, - onAuthorized: (alreadyAuthorized: boolean) => - onExecuteOrder(order, nft, undefined, !alreadyAuthorized) // undefined as fingerprint + onAuthorized: (alreadyAuthorized: boolean) => onExecuteOrder(order, nft, undefined, !alreadyAuthorized) // undefined as fingerprint }) }, [nft, order, getContract, onAuthorizedAction, onExecuteOrder]) @@ -60,27 +59,12 @@ const BuyNftWithCryptoModalHOC = (props: Props) => { }, [nft]) const onGetCrossChainRoute: OnGetCrossChainRoute = useCallback( - ( - selectedToken, - selectedChain, - providerTokens, - crossChainProvider, - wallet - ) => - useCrossChainBuyNftRoute( - order, - order.chainId, - selectedToken, - selectedChain, - providerTokens, - crossChainProvider, - wallet - ), + (selectedToken, selectedChain, providerTokens, crossChainProvider, wallet) => + useCrossChainBuyNftRoute(order, order.chainId, selectedToken, selectedChain, providerTokens, crossChainProvider, wallet), [order] ) const onGetGasCost: OnGetGasCost = useCallback( - (selectedToken, chainNativeToken, wallet) => - useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet), + (selectedToken, chainNativeToken, wallet) => useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet), [nft, order] ) diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.types.ts b/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.types.ts index fceabf30c1..7bf7beacc0 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.types.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.types.ts @@ -1,25 +1,23 @@ -import type { WithAuthorizedActionProps } from "decentraland-dapps/dist/containers/withAuthorizedAction" -import type { ModalProps } from "decentraland-dapps/dist/providers/ModalProvider/ModalProvider.types" -import type { Order } from "@dcl/schemas" -import type { Route } from "decentraland-transactions/crossChain" -import type { NFT } from "../../../../modules/nft/types" +import type { WithAuthorizedActionProps } from 'decentraland-dapps/dist/containers/withAuthorizedAction' +import type { ModalProps } from 'decentraland-dapps/dist/providers/ModalProvider/ModalProvider.types' +import type { Order } from '@dcl/schemas' +import type { Route } from 'decentraland-transactions/crossChain' +import type { NFT } from '../../../../modules/nft/types' import type { Contract } from '../../../../modules/vendor/services' -import type { executeOrderRequest, executeOrderWithCardRequest } from "../../../../modules/order/actions" +import type { executeOrderRequest, executeOrderWithCardRequest } from '../../../../modules/order/actions' import type { getContract } from '../../../../modules/contract/selectors' -export type Props = WithAuthorizedActionProps & Omit<ModalProps, 'metadata'> & { - metadata: { nft: NFT, order: Order } - isExecutingOrder: boolean - isExecutingOrderCrossChain: boolean - getContract: (query: Partial<Contract>) => ReturnType<typeof getContract> - onExecuteOrder: typeof executeOrderRequest - onExecuteOrderCrossChain: (route: Route) => unknown - onExecuteOrderWithCard: typeof executeOrderWithCardRequest -} +export type Props = WithAuthorizedActionProps & + Omit<ModalProps, 'metadata'> & { + metadata: { nft: NFT; order: Order } + isExecutingOrder: boolean + isExecutingOrderCrossChain: boolean + getContract: (query: Partial<Contract>) => ReturnType<typeof getContract> + onExecuteOrder: typeof executeOrderRequest + onExecuteOrderCrossChain: (route: Route) => unknown + onExecuteOrderWithCard: typeof executeOrderWithCardRequest + } export type MapStateProps = Pick<Props, 'getContract' | 'isExecutingOrder' | 'isExecutingOrderCrossChain'> -export type MapDispatchProps = Pick< -Props, -'onExecuteOrder' | 'onExecuteOrderCrossChain' | 'onExecuteOrderWithCard' -> +export type MapDispatchProps = Pick<Props, 'onExecuteOrder' | 'onExecuteOrderCrossChain' | 'onExecuteOrderWithCard'> export type OwnProps = Pick<Props, 'metadata'> diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.spec.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.spec.tsx index 06e8b49f4c..b7e225ce7a 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.spec.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.spec.tsx @@ -2,21 +2,9 @@ import { BigNumber } from 'ethers' import { Context as ResponsiveContext } from 'react-responsive' import { fireEvent, waitFor } from '@testing-library/react' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' -import { - BodyShape, - ChainId, - Item, - NFTCategory, - Network, - Rarity, - WearableCategory -} from '@dcl/schemas' +import { BodyShape, ChainId, Item, NFTCategory, Network, Rarity, WearableCategory } from '@dcl/schemas' import { renderWithProviders } from '../../../utils/test' -import { - CrossChainProvider, - Route, - AxelarProvider -} from 'decentraland-transactions/crossChain' +import { CrossChainProvider, Route, AxelarProvider } from 'decentraland-transactions/crossChain' import { getMinSaleValueInWei } from '../../BuyPage/utils' import { marketplaceAPI } from '../../../modules/vendor/decentraland/marketplace/api' import { @@ -27,31 +15,17 @@ import { BuyWithCryptoModal, PRICE_TOO_LOW_TEST_ID } from './BuyWithCryptoModal' -import { - OnGetCrossChainRoute, - OnGetGasCost, - Props -} from './BuyWithCryptoModal.types' +import { OnGetCrossChainRoute, OnGetGasCost, Props } from './BuyWithCryptoModal.types' import { DEFAULT_CHAINS, TESTNET_DEFAULT_CHAINS } from './utils' -import { - CHAIN_SELECTOR_DATA_TEST_ID, - PAY_WITH_DATA_TEST_ID, - TOKEN_SELECTOR_DATA_TEST_ID -} from './PaymentSelector' +import { CHAIN_SELECTOR_DATA_TEST_ID, PAY_WITH_DATA_TEST_ID, TOKEN_SELECTOR_DATA_TEST_ID } from './PaymentSelector' import { useTokenBalance } from './hooks' import { FREE_TX_COVERED_TEST_ID } from './PurchaseTotal' import { Asset } from '../../../modules/asset/types' const mockConfigIs = jest.fn() -const mockUseTokenBalance = ( - isFetchingBalance: boolean, - tokenBalance: BigNumber -) => { - const useTokenBalanceMock = useTokenBalance as jest.Mock< - ReturnType<typeof useTokenBalance>, - Parameters<typeof useTokenBalance> - > +const mockUseTokenBalance = (isFetchingBalance: boolean, tokenBalance: BigNumber) => { + const useTokenBalanceMock = useTokenBalance as jest.Mock<ReturnType<typeof useTokenBalance>, Parameters<typeof useTokenBalance>> useTokenBalanceMock.mockReset() useTokenBalanceMock.mockReturnValue({ isFetchingBalance, @@ -109,14 +83,8 @@ const MOCKED_ROUTE = { fee: 0.0497, liquidity: 79263097000000, poolId: '0x9CEff2F5138fC59eB925d270b8A7A9C02a1810f2', - tokenAddresses: [ - '0xc2132d05d31c914a87c6611c10748aeb04b58e8f', - '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619' - ], - path: [ - '0xc2132d05d31c914a87c6611c10748aeb04b58e8f', - '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619' - ], + tokenAddresses: ['0xc2132d05d31c914a87c6611c10748aeb04b58e8f', '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'], + path: ['0xc2132d05d31c914a87c6611c10748aeb04b58e8f', '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619'], slippage: 0.03, custom: { poolFees: [438] @@ -132,8 +100,7 @@ const MOCKED_ROUTE = { name: 'Tether USD', symbol: 'USDT', decimals: 6, - logoURI: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdt.svg', + logoURI: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdt.svg', coingeckoId: 'tether', usdPrice: 1 }, @@ -144,8 +111,7 @@ const MOCKED_ROUTE = { name: 'Wrapped Ether', symbol: 'WETH', decimals: 18, - logoURI: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/weth.svg', + logoURI: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/weth.svg', coingeckoId: 'weth', usdPrice: 1988.98 }, @@ -168,14 +134,8 @@ const MOCKED_ROUTE = { fee: 0.3, liquidity: 7411681011700, poolId: '0xc48AE82ca34C63887b975F20ABA91a38f2a900B8', - tokenAddresses: [ - '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', - '0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4' - ], - path: [ - '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', - '0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4' - ], + tokenAddresses: ['0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', '0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4'], + path: ['0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', '0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4'], slippage: 0.05, target: '0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506' }, @@ -188,8 +148,7 @@ const MOCKED_ROUTE = { name: 'Wrapped Ether', symbol: 'WETH', decimals: 18, - logoURI: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/weth.svg', + logoURI: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/weth.svg', coingeckoId: 'weth', usdPrice: 1988.98 }, @@ -200,8 +159,7 @@ const MOCKED_ROUTE = { symbol: 'MANA', decimals: 18, chainId: '137', - logoURI: - 'https://assets.coingecko.com/coins/images/878/small/decentraland-mana.png?1550108745', + logoURI: 'https://assets.coingecko.com/coins/images/878/small/decentraland-mana.png?1550108745', coingeckoId: 'decentraland', usdPrice: 0.409929 }, @@ -230,8 +188,7 @@ const MOCKED_ROUTE = { name: 'Tether USD', symbol: 'USDT', decimals: 6, - logoURI: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdt.svg', + logoURI: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdt.svg', coingeckoId: 'tether' }, toToken: { @@ -241,8 +198,7 @@ const MOCKED_ROUTE = { symbol: 'MANA', decimals: 18, chainId: '137', - logoURI: - 'https://assets.coingecko.com/coins/images/878/small/decentraland-mana.png?1550108745', + logoURI: 'https://assets.coingecko.com/coins/images/878/small/decentraland-mana.png?1550108745', coingeckoId: 'decentraland' }, isBoostSupported: false, @@ -257,8 +213,7 @@ const MOCKED_ROUTE = { name: 'MATIC', symbol: 'MATIC', decimals: 18, - logoURI: - 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/polygon.svg', + logoURI: 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/polygon.svg', coingeckoId: 'matic-network', subGraphId: 'wmatic-wei', usdPrice: 0.786562 @@ -346,8 +301,7 @@ const MOCKED_PROVIDER_TOKENS = [ name: 'Decentraland', symbol: 'MANA', decimals: 18, - logoURI: - 'https://assets.coingecko.com/coins/images/878/thumb/decentraland-mana.png?1550108745', + logoURI: 'https://assets.coingecko.com/coins/images/878/thumb/decentraland-mana.png?1550108745', coingeckoId: 'decentraland', volatility: 3, usdPrice: 0.432695 @@ -359,8 +313,7 @@ const MOCKED_PROVIDER_TOKENS = [ symbol: 'MANA', decimals: 18, chainId: '137', - logoURI: - 'https://assets.coingecko.com/coins/images/878/small/decentraland-mana.png?1550108745', + logoURI: 'https://assets.coingecko.com/coins/images/878/small/decentraland-mana.png?1550108745', coingeckoId: 'decentraland', volatility: 3, usdPrice: 0.43206 @@ -372,8 +325,7 @@ const MOCKED_PROVIDER_TOKENS = [ name: 'USD Coin', symbol: 'USDC', decimals: 6, - logoURI: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdc.svg', + logoURI: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdc.svg', coingeckoId: 'usd-coin', volatility: 0, usdPrice: 1 @@ -385,8 +337,7 @@ const MOCKED_PROVIDER_TOKENS = [ name: 'USDCoin', symbol: 'USDC', decimals: 6, - logoURI: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdc.svg', + logoURI: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdc.svg', coingeckoId: 'usd-coin', axelarNetworkSymbol: 'USDC', subGraphId: 'uusdc', @@ -432,8 +383,7 @@ const MOCKED_ITEM: Asset = { minListingPrice: null, listings: 0, owners: null, - urn: - 'urn:decentraland:matic:collections-v2:0xffce00acc0d17eb01c3d2f9c3fcb3ab26519c562:0', + urn: 'urn:decentraland:matic:collections-v2:0xffce00acc0d17eb01c3d2f9c3fcb3ab26519c562:0', picks: { count: 0 } @@ -449,16 +399,14 @@ async function renderBuyWithCryptoModal(props: Partial<Props> = {}) { isLoadingAuthorization: false, isSwitchingNetwork: false, isBuyWithCardPage: false, - onGetCrossChainRoute: jest - .fn<ReturnType<OnGetCrossChainRoute>, Parameters<OnGetCrossChainRoute>>() - .mockReturnValue({ - route: undefined, - fromAmount: undefined, - routeFeeCost: undefined, - routeTotalUSDCost: undefined, - isFetchingRoute: false, - routeFailed: false - }), + onGetCrossChainRoute: jest.fn<ReturnType<OnGetCrossChainRoute>, Parameters<OnGetCrossChainRoute>>().mockReturnValue({ + route: undefined, + fromAmount: undefined, + routeFeeCost: undefined, + routeTotalUSDCost: undefined, + isFetchingRoute: false, + routeFailed: false + }), onGetGasCost: jest .fn<ReturnType<OnGetGasCost>, Parameters<OnGetGasCost>>() .mockReturnValue({ gasCost: undefined, isFetchingGasCost: false }), @@ -480,55 +428,48 @@ async function renderBuyWithCryptoModal(props: Partial<Props> = {}) { return rendered } -const createOnGetCrossChainRouteMockForUSDC = ( - route: Route, - chainId: ChainId, - fromAmount: string -) => { - return jest - .fn<ReturnType<OnGetCrossChainRoute>, Parameters<OnGetCrossChainRoute>>() - .mockReturnValue({ - route, - fromAmount, - routeFeeCost: { - token: { - type: 'evm' as any, - chainId: chainId.toString(), - address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174', - name: 'USD Coin', - symbol: 'USDC', - decimals: 6, - logoURI: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdc.svg', - coingeckoId: 'usd-coin', - volatility: 0, - usdPrice: 1 - }, - gasCostWei: BigNumber.from(0), - gasCost: '0', - feeCost: '0', - feeCostWei: BigNumber.from(0), - totalCost: '0' +const createOnGetCrossChainRouteMockForUSDC = (route: Route, chainId: ChainId, fromAmount: string) => { + return jest.fn<ReturnType<OnGetCrossChainRoute>, Parameters<OnGetCrossChainRoute>>().mockReturnValue({ + route, + fromAmount, + routeFeeCost: { + token: { + type: 'evm' as any, + chainId: chainId.toString(), + address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174', + name: 'USD Coin', + symbol: 'USDC', + decimals: 6, + logoURI: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/usdc.svg', + coingeckoId: 'usd-coin', + volatility: 0, + usdPrice: 1 }, - routeTotalUSDCost: 1000, - isFetchingRoute: false, - routeFailed: false - }) + gasCostWei: BigNumber.from(0), + gasCost: '0', + feeCost: '0', + feeCostWei: BigNumber.from(0), + totalCost: '0' + }, + routeTotalUSDCost: 1000, + isFetchingRoute: false, + routeFailed: false + }) } describe('BuyWithCryptoModal', () => { let modalProps: Partial<Props> let crossChainProvider: CrossChainProvider beforeEach(() => { - crossChainProvider = ({ + crossChainProvider = { init: jest.fn(), initialized: true, isLibInitialized: () => true, getSupportedChains: () => MOCK_SUPPORTED_CHAIN, getSupportedTokens: () => MOCKED_PROVIDER_TOKENS - } as unknown) as AxelarProvider + } as unknown as AxelarProvider ;(AxelarProvider as unknown as jest.Mock).mockImplementation(() => crossChainProvider) - ;(mockConfigIs as jest.Mock).mockReturnValue(false) // so it returns prod values + mockConfigIs.mockReturnValue(false) // so it returns prod values marketplaceAPI.fetchWalletTokenBalances = jest.fn().mockResolvedValue([]) modalProps = { onBuyNatively: jest.fn(), @@ -628,14 +569,10 @@ describe('BuyWithCryptoModal', () => { describe('and tries to pay with another Ethereum token', () => { let route: Route beforeEach(() => { - route = ({ + route = { route: MOCKED_ROUTE - } as unknown) as Route - modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC( - route, - ChainId.ETHEREUM_MAINNET, - '0.438482' - ) + } as unknown as Route + modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC(route, ChainId.ETHEREUM_MAINNET, '0.438482') }) describe('and has enough balance to buy it', () => { @@ -644,11 +581,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the buy now button and call the onBuyCrossChain on the click', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const tokenSelector = getByTestId(TOKEN_SELECTOR_DATA_TEST_ID) fireEvent.click(tokenSelector) @@ -660,9 +593,7 @@ describe('BuyWithCryptoModal', () => { expect(buyNowButton).toBeInTheDocument() fireEvent.click(buyNowButton) - await waitFor(() => - expect(modalProps.onBuyCrossChain).toHaveBeenCalledWith(route) - ) + await waitFor(() => expect(modalProps.onBuyCrossChain).toHaveBeenCalledWith(route)) }) }) @@ -672,11 +603,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the get mana and buy with card buttons', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const tokenSelector = getByTestId(TOKEN_SELECTOR_DATA_TEST_ID) fireEvent.click(tokenSelector) @@ -684,12 +611,8 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(GET_MANA_BUTTON_TEST_ID) - ).toBeInTheDocument() - expect( - await findByTestId(BUY_WITH_CARD_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(GET_MANA_BUTTON_TEST_ID)).toBeInTheDocument() + expect(await findByTestId(BUY_WITH_CARD_TEST_ID)).toBeInTheDocument() }) }) }) @@ -697,14 +620,10 @@ describe('BuyWithCryptoModal', () => { describe('and tries to pay with another chain token', () => { let route: Route beforeEach(() => { - route = ({ + route = { route: MOCKED_ROUTE - } as unknown) as Route - modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC( - route, - ChainId.MATIC_MAINNET, - '0.438482' - ) + } as unknown as Route + modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC(route, ChainId.MATIC_MAINNET, '0.438482') }) describe('and has enough balance to buy it', () => { @@ -713,11 +632,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the switch network button to send the tx', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const chainSelector = getByTestId(CHAIN_SELECTOR_DATA_TEST_ID) fireEvent.click(chainSelector) @@ -731,9 +646,7 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(SWITCH_NETWORK_BUTTON_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(SWITCH_NETWORK_BUTTON_TEST_ID)).toBeInTheDocument() }) }) @@ -742,11 +655,7 @@ describe('BuyWithCryptoModal', () => { mockUseTokenBalance(false, BigNumber.from('200000')) // user has 0.2 USDC in wei }) it('should render the get MANA and buy with card buttons', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const chainSelector = getByTestId(CHAIN_SELECTOR_DATA_TEST_ID) fireEvent.click(chainSelector) @@ -760,12 +669,8 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(GET_MANA_BUTTON_TEST_ID) - ).toBeInTheDocument() - expect( - await findByTestId(BUY_WITH_CARD_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(GET_MANA_BUTTON_TEST_ID)).toBeInTheDocument() + expect(await findByTestId(BUY_WITH_CARD_TEST_ID)).toBeInTheDocument() }) }) }) @@ -785,9 +690,7 @@ describe('BuyWithCryptoModal', () => { describe('and wants to pay with MANA', () => { describe('and it is an asset suitable for a meta tx', () => { beforeEach(() => { - modalProps.price = BigNumber.from(getMinSaleValueInWei()) - .add(1) - .toString() + modalProps.price = BigNumber.from(getMinSaleValueInWei()).add(1).toString() }) describe('and has enough balance to buy it with MANA', () => { @@ -817,9 +720,7 @@ describe('BuyWithCryptoModal', () => { fireEvent.click(buyNowButton) - await waitFor(() => - expect(modalProps.onBuyNatively).toHaveBeenCalled() - ) + await waitFor(() => expect(modalProps.onBuyNatively).toHaveBeenCalled()) }) }) @@ -848,9 +749,7 @@ describe('BuyWithCryptoModal', () => { describe('and it is an item not suitable for a meta tx', () => { beforeEach(() => { - modalProps.price = BigNumber.from(getMinSaleValueInWei()) - .sub(1) - .toString() + modalProps.price = BigNumber.from(getMinSaleValueInWei()).sub(1).toString() }) describe('and has enough balance to buy it with MANA', () => { @@ -868,18 +767,14 @@ describe('BuyWithCryptoModal', () => { it('should render the switch network button and label saying it not free due to the low price and call on onSwitchNetwork on the click', async () => { const { getByTestId } = await renderBuyWithCryptoModal(modalProps) - const switchNetworkButton = getByTestId( - SWITCH_NETWORK_BUTTON_TEST_ID - ) + const switchNetworkButton = getByTestId(SWITCH_NETWORK_BUTTON_TEST_ID) expect(switchNetworkButton).toBeInTheDocument() expect(getByTestId(PRICE_TOO_LOW_TEST_ID)).toBeInTheDocument() fireEvent.click(switchNetworkButton) - await waitFor(() => - expect(modalProps.onSwitchNetwork).toHaveBeenCalled() - ) + await waitFor(() => expect(modalProps.onSwitchNetwork).toHaveBeenCalled()) }) }) @@ -907,14 +802,10 @@ describe('BuyWithCryptoModal', () => { describe('and wants to pay with another Ethereum token', () => { let route: Route beforeEach(() => { - route = ({ + route = { route: MOCKED_ROUTE - } as unknown) as Route - modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC( - route, - ChainId.ETHEREUM_MAINNET, - '0.438482' - ) + } as unknown as Route + modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC(route, ChainId.ETHEREUM_MAINNET, '0.438482') }) describe('and has enough token balance to buy it', () => { @@ -923,11 +814,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render buy now button and call the onBuyCrossChain', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const chainSelector = getByTestId(CHAIN_SELECTOR_DATA_TEST_ID) fireEvent.click(chainSelector) @@ -956,11 +843,7 @@ describe('BuyWithCryptoModal', () => { mockUseTokenBalance(false, BigNumber.from('200000')) // user has 0.2 USDC in wei }) it('should render the get mana and buy with card buttons', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const chainSelector = getByTestId(CHAIN_SELECTOR_DATA_TEST_ID) fireEvent.click(chainSelector) @@ -974,13 +857,9 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(GET_MANA_BUTTON_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(GET_MANA_BUTTON_TEST_ID)).toBeInTheDocument() - expect( - await findByTestId(BUY_WITH_CARD_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(BUY_WITH_CARD_TEST_ID)).toBeInTheDocument() }) }) }) @@ -988,14 +867,10 @@ describe('BuyWithCryptoModal', () => { describe('and wants to pay with another Polygon token', () => { let route: Route beforeEach(() => { - route = ({ + route = { route: MOCKED_ROUTE - } as unknown) as Route - modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC( - route, - ChainId.MATIC_MAINNET, - '0.438482' - ) + } as unknown as Route + modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC(route, ChainId.MATIC_MAINNET, '0.438482') }) describe('and has enough token balance to buy it', () => { @@ -1005,11 +880,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the switch network button and call the onSwitchNetwork fn on click', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const tokenSelector = getByTestId(TOKEN_SELECTOR_DATA_TEST_ID) fireEvent.click(tokenSelector) @@ -1017,17 +888,13 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - const switchNetworkButton = await findByTestId( - SWITCH_NETWORK_BUTTON_TEST_ID - ) + const switchNetworkButton = await findByTestId(SWITCH_NETWORK_BUTTON_TEST_ID) expect(switchNetworkButton).toBeInTheDocument() fireEvent.click(switchNetworkButton) - await waitFor(() => - expect(modalProps.onSwitchNetwork).toHaveBeenCalled() - ) + await waitFor(() => expect(modalProps.onSwitchNetwork).toHaveBeenCalled()) }) }) @@ -1037,11 +904,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the get mana and buy with card buttons', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const chainSelector = getByTestId(CHAIN_SELECTOR_DATA_TEST_ID) fireEvent.click(chainSelector) @@ -1055,13 +918,9 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(GET_MANA_BUTTON_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(GET_MANA_BUTTON_TEST_ID)).toBeInTheDocument() - expect( - await findByTestId(BUY_WITH_CARD_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(BUY_WITH_CARD_TEST_ID)).toBeInTheDocument() }) }) }) @@ -1100,15 +959,11 @@ describe('BuyWithCryptoModal', () => { it('should render the switch network button and call the onSwitchNetwork callback on the click', async () => { const { getByTestId } = await renderBuyWithCryptoModal(modalProps) - const switchNetworkButton = getByTestId( - SWITCH_NETWORK_BUTTON_TEST_ID - ) + const switchNetworkButton = getByTestId(SWITCH_NETWORK_BUTTON_TEST_ID) expect(switchNetworkButton).toBeInTheDocument() fireEvent.click(switchNetworkButton) - expect(modalProps.onSwitchNetwork).toHaveBeenCalledWith( - ChainId.ETHEREUM_MAINNET - ) + expect(modalProps.onSwitchNetwork).toHaveBeenCalledWith(ChainId.ETHEREUM_MAINNET) }) }) @@ -1136,14 +991,10 @@ describe('BuyWithCryptoModal', () => { describe('and tries to pay with another Ethereum token', () => { let route: Route beforeEach(() => { - route = ({ + route = { route: MOCKED_ROUTE - } as unknown) as Route - modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC( - route, - ChainId.ETHEREUM_MAINNET, - '0.438482' - ) + } as unknown as Route + modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC(route, ChainId.ETHEREUM_MAINNET, '0.438482') modalProps.onSwitchNetwork = jest.fn() }) @@ -1153,11 +1004,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the switch network button and call the onSwitchNetwork on the click', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const tokenSelector = getByTestId(TOKEN_SELECTOR_DATA_TEST_ID) fireEvent.click(tokenSelector) @@ -1165,19 +1012,13 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - const switchNetworkButton = await findByTestId( - SWITCH_NETWORK_BUTTON_TEST_ID - ) + const switchNetworkButton = await findByTestId(SWITCH_NETWORK_BUTTON_TEST_ID) expect(switchNetworkButton).toBeInTheDocument() fireEvent.click(switchNetworkButton) - await waitFor(() => - expect(modalProps.onSwitchNetwork).toHaveBeenCalledWith( - ChainId.ETHEREUM_MAINNET - ) - ) + await waitFor(() => expect(modalProps.onSwitchNetwork).toHaveBeenCalledWith(ChainId.ETHEREUM_MAINNET)) }) }) @@ -1187,11 +1028,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the get mana and buy with card buttons', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const tokenSelector = getByTestId(TOKEN_SELECTOR_DATA_TEST_ID) fireEvent.click(tokenSelector) @@ -1199,12 +1036,8 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(GET_MANA_BUTTON_TEST_ID) - ).toBeInTheDocument() - expect( - await findByTestId(BUY_WITH_CARD_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(GET_MANA_BUTTON_TEST_ID)).toBeInTheDocument() + expect(await findByTestId(BUY_WITH_CARD_TEST_ID)).toBeInTheDocument() }) }) }) @@ -1212,14 +1045,10 @@ describe('BuyWithCryptoModal', () => { describe('and tries to pay with another chain token', () => { let route: Route beforeEach(() => { - route = ({ + route = { route: MOCKED_ROUTE - } as unknown) as Route - modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC( - route, - ChainId.ETHEREUM_MAINNET, - '0.438482' - ) + } as unknown as Route + modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC(route, ChainId.ETHEREUM_MAINNET, '0.438482') }) describe('and has enough balance to buy it', () => { @@ -1227,11 +1056,7 @@ describe('BuyWithCryptoModal', () => { mockUseTokenBalance(false, BigNumber.from('2000000')) // user has 2 USDC in wei }) it('should render the switch network button to send the tx', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const tokenSelector = getByTestId(TOKEN_SELECTOR_DATA_TEST_ID) fireEvent.click(tokenSelector) @@ -1239,9 +1064,7 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(SWITCH_NETWORK_BUTTON_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(SWITCH_NETWORK_BUTTON_TEST_ID)).toBeInTheDocument() }) }) @@ -1251,11 +1074,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the get MANA and buy with card buttons', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const tokenSelector = getByTestId(TOKEN_SELECTOR_DATA_TEST_ID) fireEvent.click(tokenSelector) @@ -1263,12 +1082,8 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(GET_MANA_BUTTON_TEST_ID) - ).toBeInTheDocument() - expect( - await findByTestId(BUY_WITH_CARD_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(GET_MANA_BUTTON_TEST_ID)).toBeInTheDocument() + expect(await findByTestId(BUY_WITH_CARD_TEST_ID)).toBeInTheDocument() }) }) }) @@ -1301,22 +1116,15 @@ describe('BuyWithCryptoModal', () => { }) it('should render the buy now button and call on onBuyNatively on the click', async () => { - const { - queryByTestId, - getByTestId - } = await renderBuyWithCryptoModal(modalProps) + const { queryByTestId, getByTestId } = await renderBuyWithCryptoModal(modalProps) const buyNowButton = getByTestId(BUY_NOW_BUTTON_TEST_ID) expect(buyNowButton).toBeInTheDocument() - expect( - queryByTestId(FREE_TX_COVERED_TEST_ID) - ).not.toBeInTheDocument() // do not show the free tx covered label + expect(queryByTestId(FREE_TX_COVERED_TEST_ID)).not.toBeInTheDocument() // do not show the free tx covered label fireEvent.click(buyNowButton) - await waitFor(() => - expect(modalProps.onBuyNatively).toHaveBeenCalled() - ) + await waitFor(() => expect(modalProps.onBuyNatively).toHaveBeenCalled()) }) }) @@ -1346,14 +1154,10 @@ describe('BuyWithCryptoModal', () => { describe('and wants to pay with another Ethereum token', () => { let route: Route beforeEach(() => { - route = ({ + route = { route: MOCKED_ROUTE - } as unknown) as Route - modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC( - route, - ChainId.ETHEREUM_MAINNET, - '0.438482' - ) + } as unknown as Route + modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC(route, ChainId.ETHEREUM_MAINNET, '0.438482') modalProps.onSwitchNetwork = jest.fn() }) @@ -1363,11 +1167,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render switch network button and call the onSwitchNetwork', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const chainSelector = getByTestId(CHAIN_SELECTOR_DATA_TEST_ID) fireEvent.click(chainSelector) @@ -1381,18 +1181,12 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - const switchNetworkButton = await findByTestId( - SWITCH_NETWORK_BUTTON_TEST_ID - ) + const switchNetworkButton = await findByTestId(SWITCH_NETWORK_BUTTON_TEST_ID) expect(switchNetworkButton).toBeInTheDocument() fireEvent.click(switchNetworkButton) - await waitFor(() => - expect(modalProps.onSwitchNetwork).toHaveBeenCalledWith( - ChainId.ETHEREUM_MAINNET - ) - ) + await waitFor(() => expect(modalProps.onSwitchNetwork).toHaveBeenCalledWith(ChainId.ETHEREUM_MAINNET)) }) }) @@ -1402,11 +1196,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the get mana and buy with card buttons', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const chainSelector = getByTestId(CHAIN_SELECTOR_DATA_TEST_ID) fireEvent.click(chainSelector) @@ -1420,13 +1210,9 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(GET_MANA_BUTTON_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(GET_MANA_BUTTON_TEST_ID)).toBeInTheDocument() - expect( - await findByTestId(BUY_WITH_CARD_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(BUY_WITH_CARD_TEST_ID)).toBeInTheDocument() }) }) }) @@ -1434,14 +1220,10 @@ describe('BuyWithCryptoModal', () => { describe('and wants to pay with another Polygon token', () => { let route: Route beforeEach(() => { - route = ({ + route = { route: MOCKED_ROUTE - } as unknown) as Route - modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC( - route, - ChainId.MATIC_MAINNET, - '0.438482' - ) + } as unknown as Route + modalProps.onGetCrossChainRoute = createOnGetCrossChainRouteMockForUSDC(route, ChainId.MATIC_MAINNET, '0.438482') }) describe('and has enough token balance to buy it', () => { @@ -1450,11 +1232,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the buy now button and call the onBuyCrossChain fn on click', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const tokenSelector = getByTestId(TOKEN_SELECTOR_DATA_TEST_ID) fireEvent.click(tokenSelector) @@ -1467,9 +1245,7 @@ describe('BuyWithCryptoModal', () => { expect(buyNowButton).toBeInTheDocument() fireEvent.click(buyNowButton) - await waitFor(() => - expect(modalProps.onBuyCrossChain).toHaveBeenCalledWith(route) - ) + await waitFor(() => expect(modalProps.onBuyCrossChain).toHaveBeenCalledWith(route)) }) }) @@ -1479,11 +1255,7 @@ describe('BuyWithCryptoModal', () => { }) it('should render the get mana and buy with card buttons', async () => { - const { - getByTestId, - findByTestId, - findByText - } = await renderBuyWithCryptoModal(modalProps) + const { getByTestId, findByTestId, findByText } = await renderBuyWithCryptoModal(modalProps) const chainSelector = getByTestId(CHAIN_SELECTOR_DATA_TEST_ID) fireEvent.click(chainSelector) @@ -1497,13 +1269,9 @@ describe('BuyWithCryptoModal', () => { const usdcTokenOption = await findByText('USDC') fireEvent.click(usdcTokenOption) - expect( - await findByTestId(GET_MANA_BUTTON_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(GET_MANA_BUTTON_TEST_ID)).toBeInTheDocument() - expect( - await findByTestId(BUY_WITH_CARD_TEST_ID) - ).toBeInTheDocument() + expect(await findByTestId(BUY_WITH_CARD_TEST_ID)).toBeInTheDocument() }) }) }) diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.tsx index 9684210b3f..50da0bc1ab 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.tsx @@ -22,12 +22,7 @@ import { CardPaymentsExplanation } from '../../BuyPage/CardPaymentsExplanation' import { ManaToFiat } from '../../ManaToFiat' import { config } from '../../../config' import ChainAndTokenSelector from './ChainAndTokenSelector/ChainAndTokenSelector' -import { - getDefaultChains, - getMANAToken, - getShouldUseMetaTx, - isToken -} from './utils' +import { getDefaultChains, getMANAToken, getShouldUseMetaTx, isToken } from './utils' import { Props } from './BuyWithCryptoModal.types' import styles from './BuyWithCryptoModal.module.css' import { useShouldUseCrossChainProvider, useTokenBalance } from './hooks' @@ -68,71 +63,37 @@ export const BuyWithCryptoModal = (props: Props) => { const crossChainSupportedChains = useRef<ChainId[]>([]) const analytics = getAnalytics() - const manaAddressOnAssetChain = getContract( - ContractName.MANAToken, - asset.chainId - ).address + const manaAddressOnAssetChain = getContract(ContractName.MANAToken, asset.chainId).address const abortControllerRef = useRef(new AbortController()) // useStates - const [providerChains, setProviderChains] = useState<ChainData[]>( - getDefaultChains() - ) + const [providerChains, setProviderChains] = useState<ChainData[]>(getDefaultChains()) const [providerTokens, setProviderTokens] = useState<Token[]>([]) const [selectedChain, setSelectedChain] = useState(asset.chainId) - const [selectedToken, setSelectedToken] = useState<Token>( - getMANAToken(asset.chainId) - ) + const [selectedToken, setSelectedToken] = useState<Token>(getMANAToken(asset.chainId)) const [canBuyAsset, setCanBuyAsset] = useState<boolean | undefined>() - const [insufficientToken, setInsufficientToken] = useState< - Token | undefined - >() + const [insufficientToken, setInsufficientToken] = useState<Token | undefined>() const [showChainSelector, setShowChainSelector] = useState(false) const [showTokenSelector, setShowTokenSelector] = useState(false) - const [crossChainProvider, setCrossChainProvider] = useState< - CrossChainProvider - >() + const [crossChainProvider, setCrossChainProvider] = useState<CrossChainProvider>() const manaTokenOnSelectedChain: Token | undefined = useMemo(() => { - return providerTokens.find( - t => t.symbol === 'MANA' && t.chainId === selectedChain.toString() - ) + return providerTokens.find(t => t.symbol === 'MANA' && t.chainId === selectedChain.toString()) }, [providerTokens, selectedChain]) const manaTokenOnAssetChain: Token | undefined = useMemo(() => { - return providerTokens.find( - t => - t.address.toLocaleLowerCase() === - manaAddressOnAssetChain.toLocaleLowerCase() - ) + return providerTokens.find(t => t.address.toLocaleLowerCase() === manaAddressOnAssetChain.toLocaleLowerCase()) }, [providerTokens, manaAddressOnAssetChain]) const selectedProviderChain = useMemo(() => { - return providerChains.find( - c => c.chainId.toString() === selectedChain.toString() - ) + return providerChains.find(c => c.chainId.toString() === selectedChain.toString()) }, [providerChains, selectedChain]) const chainNativeToken = useMemo(() => { - return providerTokens.find( - t => - +t.chainId === selectedChain && - t.symbol === selectedProviderChain?.nativeCurrency.symbol - ) + return providerTokens.find(t => +t.chainId === selectedChain && t.symbol === selectedProviderChain?.nativeCurrency.symbol) }, [selectedChain, selectedProviderChain, providerTokens]) - const { gasCost, isFetchingGasCost } = onGetGasCost( - selectedToken, - chainNativeToken, - wallet - ) + const { gasCost, isFetchingGasCost } = onGetGasCost(selectedToken, chainNativeToken, wallet) - const { - route, - fromAmount, - routeFeeCost, - routeTotalUSDCost, - isFetchingRoute, - routeFailed - } = onGetCrossChainRoute( + const { route, fromAmount, routeFeeCost, routeTotalUSDCost, isFetchingRoute, routeFailed } = onGetCrossChainRoute( selectedToken, selectedChain, providerTokens, @@ -152,29 +113,17 @@ export const BuyWithCryptoModal = (props: Props) => { initializeCrossChainProvider() }, []) - const { - isFetchingBalance, - tokenBalance: selectedTokenBalance - } = useTokenBalance(selectedToken, selectedChain, wallet?.address) + const { isFetchingBalance, tokenBalance: selectedTokenBalance } = useTokenBalance(selectedToken, selectedChain, wallet?.address) // if the tx should be done through the provider - const shouldUseCrossChainProvider = useShouldUseCrossChainProvider( - selectedToken, - asset.network - ) + const shouldUseCrossChainProvider = useShouldUseCrossChainProvider(selectedToken, asset.network) // Compute if the process should use a meta tx (connected in ETH and buying a L2 NFT) const useMetaTx = useMemo(() => { return ( !!selectedToken && !!wallet && - getShouldUseMetaTx( - asset.chainId, - selectedChain, - selectedToken.address, - manaAddressOnAssetChain, - wallet.network - ) + getShouldUseMetaTx(asset.chainId, selectedChain, selectedToken.address, manaAddressOnAssetChain, wallet.network) ) }, [asset, manaAddressOnAssetChain, selectedChain, selectedToken, wallet]) @@ -196,22 +145,14 @@ export const BuyWithCryptoModal = (props: Props) => { const supportedTokens = crossChainProvider.getSupportedTokens() const supportedChains = [ ...defaultChains, - ...crossChainProvider - .getSupportedChains() - .filter(c => defaultChains.every(dc => dc.chainId !== c.chainId)) + ...crossChainProvider.getSupportedChains().filter(c => defaultChains.every(dc => dc.chainId !== c.chainId)) ] // keep the defaults since we support MANA on them natively setProviderChains( supportedChains.filter( - c => - crossChainSupportedChains.current.includes(+c.chainId) && - defaultChains.find(t => t.chainId === c.chainId) - ) - ) - setProviderTokens( - supportedTokens.filter(t => - crossChainSupportedChains.current.includes(+t.chainId) + c => crossChainSupportedChains.current.includes(+c.chainId) && defaultChains.find(t => t.chainId === c.chainId) ) ) + setProviderTokens(supportedTokens.filter(t => crossChainSupportedChains.current.includes(+t.chainId))) } } catch (error) { console.log('error: ', error) @@ -227,23 +168,13 @@ export const BuyWithCryptoModal = (props: Props) => { (selectedToken && selectedChain.toString() !== selectedToken.chainId)) // or if selectedToken is not from the selectedChain ) { try { - setSelectedToken( - manaTokenOnSelectedChain || getMANAToken(selectedChain) - ) // if it's not in the providerTokens, create the object manually with the right conectract address + setSelectedToken(manaTokenOnSelectedChain || getMANAToken(selectedChain)) // if it's not in the providerTokens, create the object manually with the right conectract address } catch (error) { - const selectedChainTokens = providerTokens.filter( - t => t.chainId === selectedChain.toString() - ) + const selectedChainTokens = providerTokens.filter(t => t.chainId === selectedChain.toString()) setSelectedToken(selectedChainTokens[0]) } } - }, [ - crossChainProvider, - providerTokens.length, - manaTokenOnSelectedChain, - selectedChain, - selectedToken - ]) + }, [crossChainProvider, providerTokens.length, manaTokenOnSelectedChain, selectedChain, selectedToken]) // computes if the user can buy the item with the selected token useEffect(() => { @@ -257,57 +188,29 @@ export const BuyWithCryptoModal = (props: Props) => { let canBuy if (selectedToken.symbol === 'MANA' && wallet) { // wants to buy a L2 item with ETH MANA (through the provider) - if ( - asset.network === Network.MATIC && - getNetwork(selectedChain) === Network.ETHEREUM - ) { - canBuy = - wallet.networks[Network.ETHEREUM].mana >= - +ethers.utils.formatEther(price) + if (asset.network === Network.MATIC && getNetwork(selectedChain) === Network.ETHEREUM) { + canBuy = wallet.networks[Network.ETHEREUM].mana >= +ethers.utils.formatEther(price) } else { - canBuy = - wallet.networks[asset.network].mana >= - +ethers.utils.formatEther(price) + canBuy = wallet.networks[asset.network].mana >= +ethers.utils.formatEther(price) } } else if (selectedTokenBalance && routeFeeCost) { - const balance = parseFloat( - ethers.utils.formatUnits( - selectedTokenBalance, - selectedToken.decimals - ) - ) + const balance = parseFloat(ethers.utils.formatUnits(selectedTokenBalance, selectedToken.decimals)) - if ( - manaTokenOnAssetChain && - selectedToken && - crossChainProvider && - wallet - ) { + if (manaTokenOnAssetChain && selectedToken && crossChainProvider && wallet) { // fee is paid with same token selected if (selectedToken.symbol === routeFeeCost.token.symbol) { - canBuy = - balance > Number(fromAmount) + Number(routeFeeCost.totalCost) + canBuy = balance > Number(fromAmount) + Number(routeFeeCost.totalCost) if (!canBuy) { setInsufficientToken(selectedToken) } } else { - const networkProvider = await getNetworkProvider( - Number(routeFeeCost.token.chainId) - ) - const provider = new ethers.providers.Web3Provider( - networkProvider - ) - const balanceNativeTokenWei = await provider.getBalance( - wallet.address - ) - const canPayForGas = balanceNativeTokenWei.gte( - ethers.utils.parseEther(routeFeeCost.totalCost) - ) + const networkProvider = await getNetworkProvider(Number(routeFeeCost.token.chainId)) + const provider = new ethers.providers.Web3Provider(networkProvider) + const balanceNativeTokenWei = await provider.getBalance(wallet.address) + const canPayForGas = balanceNativeTokenWei.gte(ethers.utils.parseEther(routeFeeCost.totalCost)) canBuy = canPayForGas && balance > Number(fromAmount) if (!canBuy) { - setInsufficientToken( - !canPayForGas ? routeFeeCost.token : selectedToken - ) + setInsufficientToken(!canPayForGas ? routeFeeCost.token : selectedToken) } } } @@ -356,12 +259,7 @@ export const BuyWithCryptoModal = (props: Props) => { )} </Button> ) - }, [ - isSwitchingNetwork, - onSwitchNetwork, - selectedProviderChain, - selectedChain - ]) + }, [isSwitchingNetwork, onSwitchNetwork, selectedProviderChain, selectedChain]) const handleBuyWithCard = useCallback(() => { if (onBuyWithCard) { @@ -399,23 +297,12 @@ export const BuyWithCryptoModal = (props: Props) => { )} </> ) - }, [ - isFetchingBalance, - isBuyingAsset, - asset.chainId, - isLoadingAuthorization, - onBuyWithCard, - handleBuyWithCard, - onGetMana, - onClose - ]) + }, [isFetchingBalance, isBuyingAsset, asset.chainId, isLoadingAuthorization, onBuyWithCard, handleBuyWithCard, onGetMana, onClose]) const renderBuyNowButton = useCallback(() => { // if L1 asset and paying with ETH MANA // or if L2 asset and paying with MATIC MANA => native buy - const onClick = shouldUseCrossChainProvider - ? handleCrossChainBuy - : onBuyNatively + const onClick = shouldUseCrossChainProvider ? handleCrossChainBuy : onBuyNatively return ( <> @@ -423,19 +310,12 @@ export const BuyWithCryptoModal = (props: Props) => { fluid primary data-testid={BUY_NOW_BUTTON_TEST_ID} - disabled={ - (selectedToken?.symbol !== 'MANA' && !route) || - isFetchingRoute || - isBuyingAsset || - isLoadingAuthorization - } + disabled={(selectedToken?.symbol !== 'MANA' && !route) || isFetchingRoute || isBuyingAsset || isLoadingAuthorization} loading={isFetchingBalance || isLoadingAuthorization} onClick={onClick} > <> - {isBuyingAsset || isFetchingRoute ? ( - <Loader inline active size="tiny" /> - ) : null} + {isBuyingAsset || isFetchingRoute ? <Loader inline active size="tiny" /> : null} {!isFetchingRoute // if fetching route, just render the Loader ? isBuyingAsset ? t('buy_with_crypto_modal.confirm_transaction') @@ -467,17 +347,13 @@ export const BuyWithCryptoModal = (props: Props) => { // for any token other than MANA, it user needs to be connected on the origin chain if (selectedToken.symbol !== 'MANA') { - return selectedChain === wallet.chainId - ? renderBuyNowButton() - : renderSwitchNetworkButton() + return selectedChain === wallet.chainId ? renderBuyNowButton() : renderSwitchNetworkButton() } // for L1 NFTs if (asset.network === Network.ETHEREUM) { // if tries to buy with ETH MANA and connected to other network, should switch to ETH network to pay directly - return selectedToken.symbol === 'MANA' && - wallet.network !== Network.ETHEREUM && - getNetwork(selectedChain) === Network.ETHEREUM + return selectedToken.symbol === 'MANA' && wallet.network !== Network.ETHEREUM && getNetwork(selectedChain) === Network.ETHEREUM ? renderSwitchNetworkButton() : renderBuyNowButton() } @@ -489,8 +365,8 @@ export const BuyWithCryptoModal = (props: Props) => { return wallet.network === Network.MATIC ? renderBuyNowButton() : isPriceTooLow(price) - ? renderSwitchNetworkButton() // switch to MATIC to pay for the gas - : renderBuyNowButton() + ? renderSwitchNetworkButton() // switch to MATIC to pay for the gas + : renderBuyNowButton() } // can buy it with MANA from other chain through the provider @@ -522,9 +398,7 @@ export const BuyWithCryptoModal = (props: Props) => { abortControllerRef.current.abort() const selectedToken = providerTokens.find( - t => - t.address === selectedOption.address && - t.chainId === selectedChain.toString() + t => t.address === selectedOption.address && t.chainId === selectedChain.toString() ) as Token // reset all fields setSelectedToken(selectedToken) @@ -535,13 +409,9 @@ export const BuyWithCryptoModal = (props: Props) => { }) } else { setSelectedChain(Number(selectedOption.chainId) as ChainId) - const manaDestinyChain = providerTokens.find( - t => t.symbol === 'MANA' && t.chainId === selectedOption.chainId - ) + const manaDestinyChain = providerTokens.find(t => t.symbol === 'MANA' && t.chainId === selectedOption.chainId) // set the selected token on the new chain selected to MANA or the first one found - const selectedToken = providerTokens.find( - t => t.chainId === selectedOption.chainId - ) + const selectedToken = providerTokens.find(t => t.chainId === selectedOption.chainId) const token = manaDestinyChain || selectedToken if (token) { setSelectedToken(token) @@ -559,11 +429,7 @@ export const BuyWithCryptoModal = (props: Props) => { if (showChainSelector || showTokenSelector) { return ( <ModalNavigation - title={t( - `buy_with_crypto_modal.token_and_chain_selector.select_${ - showChainSelector ? 'chain' : 'token' - }` - )} + title={t(`buy_with_crypto_modal.token_and_chain_selector.select_${showChainSelector ? 'chain' : 'token'}`)} onBack={() => { setShowChainSelector(false) setShowTokenSelector(false) @@ -585,11 +451,7 @@ export const BuyWithCryptoModal = (props: Props) => { const translationPageDescriptorId = compact([ 'mint', - isWearableOrEmote(asset) - ? isBuyWithCardPage - ? 'with_card' - : 'with_mana' - : null, + isWearableOrEmote(asset) ? (isBuyWithCardPage ? 'with_card' : 'with_mana') : null, 'page' ]).join('_') @@ -641,11 +503,7 @@ export const BuyWithCryptoModal = (props: Props) => { }, [asset]) return ( - <Modal - size="tiny" - onClose={handleOnClose} - className={styles.buyWithCryptoModal} - > + <Modal size="tiny" onClose={handleOnClose} className={styles.buyWithCryptoModal}> {renderModalNavigation()} <Modal.Content> <> @@ -674,9 +532,7 @@ export const BuyWithCryptoModal = (props: Props) => { <AssetImage asset={asset} isSmall /> <div className={styles.assetDetails}> <span className={styles.assetName}>{assetName}</span> - <span className={styles.assetDescription}> - {assetDescription} - </span> + <span className={styles.assetDescription}>{assetDescription}</span> </div> <div className={styles.priceContainer}> <Mana network={asset.network} inline withTooltip> @@ -716,11 +572,7 @@ export const BuyWithCryptoModal = (props: Props) => { route={route} routeFeeCost={routeFeeCost} fromAmount={fromAmount} - isLoading={ - isFetchingRoute || - isFetchingGasCost || - (shouldUseCrossChainProvider && !route) - } + isLoading={isFetchingRoute || isFetchingGasCost || (shouldUseCrossChainProvider && !route)} gasCost={gasCost} manaTokenOnSelectedChain={manaTokenOnAssetChain} routeTotalUSDCost={routeTotalUSDCost} @@ -730,10 +582,7 @@ export const BuyWithCryptoModal = (props: Props) => { <div className={styles.durationAndExchangeContainer}> <div> <span> - <Icon name="clock outline" />{' '} - {t( - 'buy_with_crypto_modal.durations.transaction_duration' - )}{' '} + <Icon name="clock outline" /> {t('buy_with_crypto_modal.durations.transaction_duration')}{' '} </span> {route ? ( t( @@ -741,17 +590,12 @@ export const BuyWithCryptoModal = (props: Props) => { route.route.estimate.estimatedRouteDuration === 0 ? 'fast' : route.route.estimate.estimatedRouteDuration === 20 - ? 'normal' - : 'slow' + ? 'normal' + : 'slow' }` ) ) : ( - <span - className={classNames( - styles.skeleton, - styles.fromAmountUSDSkeleton - )} - /> + <span className={classNames(styles.skeleton, styles.fromAmountUSDSkeleton)} /> )} </div> <div className={styles.exchangeContainer}> @@ -761,16 +605,10 @@ export const BuyWithCryptoModal = (props: Props) => { </div> {route && selectedToken ? ( <> - 1 {selectedToken.symbol} ={' '} - {route.route.estimate.exchangeRate?.slice(0, 7)} MANA + 1 {selectedToken.symbol} = {route.route.estimate.exchangeRate?.slice(0, 7)} MANA </> ) : ( - <span - className={classNames( - styles.skeleton, - styles.fromAmountUSDSkeleton - )} - /> + <span className={classNames(styles.skeleton, styles.fromAmountUSDSkeleton)} /> )} </div> </div> @@ -782,20 +620,13 @@ export const BuyWithCryptoModal = (props: Props) => { !isPriceTooLow(price) ? ( <span className={styles.rememberFreeTxs}> {t('buy_with_crypto_modal.remember_transaction_fee_covered', { - covered: ( - <span className={styles.feeCoveredFree}> - {t('buy_with_crypto_modal.covered_for_you_by_dao')} - </span> - ) + covered: <span className={styles.feeCoveredFree}>{t('buy_with_crypto_modal.covered_for_you_by_dao')}</span> })} </span> ) : null} {hasLowPriceForMetaTx && !isBuyWithCardPage && useMetaTx ? ( - <span - className={styles.warning} - data-testid={PRICE_TOO_LOW_TEST_ID} - > + <span className={styles.warning} data-testid={PRICE_TOO_LOW_TEST_ID}> {' '} {t('buy_with_crypto_modal.price_too_low', { learn_more: ( @@ -811,9 +642,7 @@ export const BuyWithCryptoModal = (props: Props) => { })} </span> ) : null} - {canBuyAsset === false && - !isFetchingBalance && - !isFetchingRoute ? ( + {canBuyAsset === false && !isFetchingBalance && !isFetchingRoute ? ( <span className={styles.warning}> {t('buy_with_crypto_modal.insufficient_funds', { token: insufficientToken?.symbol || 'MANA' @@ -834,18 +663,9 @@ export const BuyWithCryptoModal = (props: Props) => { </Modal.Content> {showChainSelector || showTokenSelector ? null : ( <Modal.Actions> - <div - className={classNames( - styles.buttons, - isWearableOrEmote(asset) && 'with-mana' - )} - > - {renderMainActionButton()} - </div> + <div className={classNames(styles.buttons, isWearableOrEmote(asset) && 'with-mana')}>{renderMainActionButton()}</div> {isWearableOrEmote(asset) && isBuyWithCardPage ? ( - <CardPaymentsExplanation - translationPageDescriptorId={translationPageDescriptorId} - /> + <CardPaymentsExplanation translationPageDescriptorId={translationPageDescriptorId} /> ) : null} </Modal.Actions> )} diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.types.ts b/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.types.ts index 0c11ccd04f..b9c304d7b5 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.types.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.types.ts @@ -8,18 +8,9 @@ import { ModalProps } from 'decentraland-dapps/dist/providers/ModalProvider/Moda import { Asset } from '../../../modules/asset/types' import { CrossChainRoute, GasCost } from './hooks' -export type MapStateProps = Pick< - Props, - | 'wallet' - | 'isBuyWithCardPage' - | 'isSwitchingNetwork' -> +export type MapStateProps = Pick<Props, 'wallet' | 'isBuyWithCardPage' | 'isSwitchingNetwork'> export type MapDispatchProps = Pick<Props, 'onGetMana' | 'onSwitchNetwork'> -export type OnGetGasCost = ( - selectedToken: Token, - nativeChainToken: Token | undefined, - wallet: Wallet | null -) => GasCost +export type OnGetGasCost = (selectedToken: Token, nativeChainToken: Token | undefined, wallet: Wallet | null) => GasCost export type OnGetCrossChainRoute = ( selectedToken: Token, selectedChain: ChainId, @@ -28,11 +19,12 @@ export type OnGetCrossChainRoute = ( wallet: Wallet | null ) => CrossChainRoute -export type Props = Pick<WithAuthorizedActionProps, 'isLoadingAuthorization'> & Omit<ModalProps, 'metadata'> & { - price: string, +export type Props = Pick<WithAuthorizedActionProps, 'isLoadingAuthorization'> & + Omit<ModalProps, 'metadata'> & { + price: string wallet: Wallet | null metadata: { asset: Asset } - isBuyingAsset: boolean, + isBuyingAsset: boolean isSwitchingNetwork: boolean isBuyWithCardPage: boolean onGetCrossChainRoute: OnGetCrossChainRoute @@ -48,13 +40,5 @@ export type Props = Pick<WithAuthorizedActionProps, 'isLoadingAuthorization'> & export type OwnProps = Pick< Props, - | 'price' - | 'isBuyingAsset' - | 'metadata' - | 'onBuyNatively' - | 'onBuyWithCard' - | 'onBuyCrossChain' - | 'onClose' - | 'onGetGasCost' - | 'onGoBack' + 'price' | 'isBuyingAsset' | 'metadata' | 'onBuyNatively' | 'onBuyWithCard' | 'onBuyCrossChain' | 'onClose' | 'onGetGasCost' | 'onGoBack' > diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/ChainAndTokenSelector/ChainAndTokenSelector.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/ChainAndTokenSelector/ChainAndTokenSelector.tsx index 20b7529edb..7a56b7a1f1 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/ChainAndTokenSelector/ChainAndTokenSelector.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/ChainAndTokenSelector/ChainAndTokenSelector.tsx @@ -25,26 +25,19 @@ const ChainAndTokenSelector = (props: Props) => { const { currentChain, chains, tokens, onSelect, wallet } = props const title = useMemo( () => - t( - `buy_with_crypto_modal.token_and_chain_selector.available_${ - !!chains ? 'chains' : 'tokens' - }`, - { - chain: ( - <> - {' '} - <b> {getNetwork(currentChain)}</b> - </> - ) - } - ), + t(`buy_with_crypto_modal.token_and_chain_selector.available_${chains ? 'chains' : 'tokens'}`, { + chain: ( + <> + {' '} + <b> {getNetwork(currentChain)}</b> + </> + ) + }), [chains, currentChain] ) const filteredChains = useMemo(() => { - return chains?.filter(chain => - chain.networkName.toLowerCase().includes(search.toLowerCase()) - ) + return chains?.filter(chain => chain.networkName.toLowerCase().includes(search.toLowerCase())) }, [chains, search]) const [balances, setBalances] = useState<Record<string, Balance>>({}) @@ -53,16 +46,16 @@ const ChainAndTokenSelector = (props: Props) => { useEffect(() => { const fetchBalances = async () => { try { - const balances = await marketplaceAPI.fetchWalletTokenBalances( - currentChain, - wallet.address - ) + const balances = await marketplaceAPI.fetchWalletTokenBalances(currentChain, wallet.address) setIsFetchingBalances(false) setBalances( - balances.reduce((acc, balance) => { - acc[balance.contract_ticker_symbol] = balance - return acc - }, {} as Record<string, Balance>) + balances.reduce( + (acc, balance) => { + acc[balance.contract_ticker_symbol] = balance + return acc + }, + {} as Record<string, Balance> + ) ) } catch (error) { setIsFetchingBalances(false) @@ -73,9 +66,7 @@ const ChainAndTokenSelector = (props: Props) => { const filteredTokens = useMemo(() => { const filtered = tokens?.filter( - token => - token.symbol.toLowerCase().includes(search.toLowerCase()) && - token.chainId === currentChain.toString() + token => token.symbol.toLowerCase().includes(search.toLowerCase()) && token.chainId === currentChain.toString() ) // this sortes the tokens by USD balance filtered?.sort((a, b) => { @@ -88,18 +79,10 @@ const ChainAndTokenSelector = (props: Props) => { }, [tokens, search, currentChain, balances]) return ( - <div - className={styles.chainAndTokenSelector} - data-testid={CHAIN_AND_TOKEN_SELECTOR_DATA_TEST_ID} - > + <div className={styles.chainAndTokenSelector} data-testid={CHAIN_AND_TOKEN_SELECTOR_DATA_TEST_ID}> <div className={styles.searchContainer}> <Icon name="search" className={styles.searchIcon} /> - <input - className={styles.searchInput} - value={search} - onChange={e => setSearch(e.target.value)} - placeholder={t('global.search')} - /> + <input className={styles.searchInput} value={search} onChange={e => setSearch(e.target.value)} placeholder={t('global.search')} /> {search ? <Close onClick={() => setSearch('')} /> : null} </div> <span className={styles.title}>{title}</span> @@ -108,22 +91,14 @@ const ChainAndTokenSelector = (props: Props) => { ) : ( <div className={styles.listContainer}> {filteredChains?.map(chain => ( - <div - key={chain.chainId} - className={styles.rowItem} - onClick={() => onSelect(chain)} - > + <div key={chain.chainId} className={styles.rowItem} onClick={() => onSelect(chain)}> <img src={chain.nativeCurrency.icon} alt={chain.networkName} /> <span>{chain.networkName}</span> </div> ))} {filteredTokens?.map(token => { return ( - <div - key={`${token.symbol}-${token.address}`} - className={styles.rowItem} - onClick={() => onSelect(token)} - > + <div key={`${token.symbol}-${token.address}`} className={styles.rowItem} onClick={() => onSelect(token)}> <div className={styles.tokenDataContainer}> <img src={token.logoURI} alt={token.symbol} /> <div className={styles.tokenNameAndSymbolContainer}> @@ -132,21 +107,13 @@ const ChainAndTokenSelector = (props: Props) => { </div> </div> <span className={styles.balance}> - {!!balances[token.symbol] ? ( + {balances[token.symbol] ? ( <> {Number( - ethers.utils.formatUnits( - balances[token.symbol] - .balance as string, - balances[token.symbol] - .contract_decimals - ) + ethers.utils.formatUnits(balances[token.symbol].balance as string, balances[token.symbol].contract_decimals) ).toFixed(5)}{' '} {balances[token.symbol].quote ? ( - <span className={styles.tokenName}> - $ - {balances[token.symbol].quote.toLocaleString()} - </span> + <span className={styles.tokenName}>${balances[token.symbol].quote.toLocaleString()}</span> ) : null} </> ) : ( diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.container.ts b/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.container.ts index 57b900e464..bd07b1132c 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.container.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.container.ts @@ -15,39 +15,25 @@ import { claimNameCrossChainRequest, claimNameRequest } from '../../../../modules/ens/actions' -import type { - MapDispatchProps, - MapStateProps, - OwnProps -} from './MintNameWithCryptoModal.types' +import type { MapDispatchProps, MapStateProps, OwnProps } from './MintNameWithCryptoModal.types' import { MintNameWithCryptoModal } from './MintNameWithCryptoModal' const mapState = (state: RootState): MapStateProps => { return { isMintingName: isLoadingType(getLoading(state), CLAIM_NAME_REQUEST), - isMintingNameCrossChain: isLoadingType( - getLoading(state), - CLAIM_NAME_CROSS_CHAIN_REQUEST - ), + isMintingNameCrossChain: isLoadingType(getLoading(state), CLAIM_NAME_CROSS_CHAIN_REQUEST), getContract: (query: Partial<Contract>) => getContract(state, query) } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => bindActionCreators( { onCloseFatFingerModal: () => closeModal('ClaimNameFatFingerModal'), onOpenFatFingerModal: () => openModal('ClaimNameFatFingerModal', { name: ownProps.metadata.name }), onClaimName: claimNameRequest, onClaimNameCrossChain: (route: Route) => - claimNameCrossChainRequest( - ownProps.metadata.name, - getChainIdByNetwork(Network.ETHEREUM), - route - ) + claimNameCrossChainRequest(ownProps.metadata.name, getChainIdByNetwork(Network.ETHEREUM), route) }, dispatch ) diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.tsx index 08b68a8f6d..9af84185a9 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.tsx @@ -7,23 +7,16 @@ import { getChainIdByNetwork } from 'decentraland-dapps/dist/lib' import { AuthorizedAction } from 'decentraland-dapps/dist/containers/withAuthorizedAction/AuthorizationModal' import { PRICE_IN_WEI } from '../../../../modules/ens/utils' import { Contract as DCLContract } from '../../../../modules/vendor/services' -import { getContractNames } from '../../../../modules/vendor' -import { - getClaimNameStatus, - getErrorMessage -} from '../../../../modules/ens/selectors' +import { getContractNames, VendorName } from '../../../../modules/vendor' +import { getClaimNameStatus, getErrorMessage } from '../../../../modules/ens/selectors' import { config } from '../../../../config' -import { VendorName } from '../../../../modules/vendor' import { NFT } from '../../../../modules/nft/types' import { useCrossChainNameMintingRoute, useNameMintingGasCost } from '../hooks' import BuyWithCryptoModal from '../BuyWithCryptoModal.container' import { OnGetCrossChainRoute, OnGetGasCost } from '../BuyWithCryptoModal.types' import { Props } from './MintNameWithCryptoModal.types' -export const CONTROLLER_V2_ADDRESS = config.get( - 'CONTROLLER_V2_CONTRACT_ADDRESS', - '' -) +export const CONTROLLER_V2_ADDRESS = config.get('CONTROLLER_V2_CONTRACT_ADDRESS', '') const MintNameWithCryptoModalHOC = (props: Props) => { const { @@ -69,13 +62,7 @@ const MintNameWithCryptoModalHOC = (props: Props) => { }, [name, getContract, onAuthorizedAction, onClaimName]) const onGetCrossChainRoute: OnGetCrossChainRoute = useCallback( - ( - selectedToken, - selectedChain, - providerTokens, - crossChainProvider, - wallet - ) => + (selectedToken, selectedChain, providerTokens, crossChainProvider, wallet) => useCrossChainNameMintingRoute( name, PRICE_IN_WEI, @@ -90,8 +77,7 @@ const MintNameWithCryptoModalHOC = (props: Props) => { ) const onGetGasCost: OnGetGasCost = useCallback( - (selectedToken, chainNativeToken, wallet) => - useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet), + (selectedToken, chainNativeToken, wallet) => useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet), [name] ) @@ -157,8 +143,7 @@ export const MintNameWithCryptoModal = React.memo( AuthorizedAction.CLAIM_NAME, { action: 'names_page.claim_name_fat_finger_modal.authorization.action', - title_action: - 'names_page.claim_name_fat_finger_modal.authorization.title_action' + title_action: 'names_page.claim_name_fat_finger_modal.authorization.title_action' }, getClaimNameStatus, getErrorMessage diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.types.ts b/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.types.ts index fc8a20bb2d..4004c775f9 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.types.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/MintNameWithCryptoModal/MintNameWithCryptoModal.types.ts @@ -5,20 +5,18 @@ import { Contract } from '../../../../modules/vendor/services' import { getContract } from '../../../../modules/contract/selectors' import { claimNameRequest } from '../../../../modules/ens/actions' -export type Props = WithAuthorizedActionProps & Omit<ModalProps, 'metadata'> & { - metadata: { name: string } - isMintingName: boolean - isMintingNameCrossChain: boolean - getContract: (query: Partial<Contract>) => ReturnType<typeof getContract> - onClaimName: typeof claimNameRequest - onOpenFatFingerModal: () => unknown - onCloseFatFingerModal: () => unknown - onClaimNameCrossChain: (route: Route) => unknown -} +export type Props = WithAuthorizedActionProps & + Omit<ModalProps, 'metadata'> & { + metadata: { name: string } + isMintingName: boolean + isMintingNameCrossChain: boolean + getContract: (query: Partial<Contract>) => ReturnType<typeof getContract> + onClaimName: typeof claimNameRequest + onOpenFatFingerModal: () => unknown + onCloseFatFingerModal: () => unknown + onClaimNameCrossChain: (route: Route) => unknown + } export type MapStateProps = Pick<Props, 'getContract' | 'isMintingName' | 'isMintingNameCrossChain'> -export type MapDispatchProps = Pick< - Props, - 'onClaimName' | 'onClaimNameCrossChain' | 'onOpenFatFingerModal' | 'onCloseFatFingerModal' -> +export type MapDispatchProps = Pick<Props, 'onClaimName' | 'onClaimNameCrossChain' | 'onOpenFatFingerModal' | 'onCloseFatFingerModal'> export type OwnProps = Pick<Props, 'metadata'> diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.container.ts b/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.container.ts index 7dfa0f1616..f852319937 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.container.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.container.ts @@ -13,36 +13,22 @@ import { import { getContract } from '../../../../modules/contract/selectors' import { Contract } from '../../../../modules/vendor/services' import { getLoading as getItemsLoading } from '../../../../modules/item/selectors' -import { - MapDispatchProps, - MapStateProps, - OwnProps -} from './MintNftWithCryptoModal.types' +import { MapDispatchProps, MapStateProps, OwnProps } from './MintNftWithCryptoModal.types' import { MintNftWithCryptoModal } from './MintNftWithCryptoModal' const mapState = (state: RootState): MapStateProps => { return { - isBuyingItemNatively: isLoadingType( - getItemsLoading(state), - BUY_ITEM_REQUEST - ), - isBuyingItemCrossChain: isLoadingType( - getItemsLoading(state), - BUY_ITEM_CROSS_CHAIN_REQUEST - ), + isBuyingItemNatively: isLoadingType(getItemsLoading(state), BUY_ITEM_REQUEST), + isBuyingItemCrossChain: isLoadingType(getItemsLoading(state), BUY_ITEM_CROSS_CHAIN_REQUEST), getContract: (query: Partial<Contract>) => getContract(state, query) } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => bindActionCreators( { onBuyItem: buyItemRequest, - onBuyItemCrossChain: (route: Route) => - buyItemCrossChainRequest(ownProps.metadata.item, route), + onBuyItemCrossChain: (route: Route) => buyItemCrossChainRequest(ownProps.metadata.item, route), onBuyWithCard: buyItemWithCardRequest }, dispatch diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.tsx index 426ca00918..ba20d64570 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.tsx @@ -59,27 +59,12 @@ const MintNftWithCryptoModalHOC = (props: Props) => { }, [item]) const onGetCrossChainRoute: OnGetCrossChainRoute = useCallback( - ( - selectedToken, - selectedChain, - providerTokens, - crossChainProvider, - wallet - ) => - useCrossChainMintNftRoute( - item, - item.chainId, - selectedToken, - selectedChain, - providerTokens, - crossChainProvider, - wallet - ), + (selectedToken, selectedChain, providerTokens, crossChainProvider, wallet) => + useCrossChainMintNftRoute(item, item.chainId, selectedToken, selectedChain, providerTokens, crossChainProvider, wallet), [item] ) const onGetGasCost: OnGetGasCost = useCallback( - (selectedToken, chainNativeToken, wallet) => - useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet), + (selectedToken, chainNativeToken, wallet) => useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet), [item] ) diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.types.ts b/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.types.ts index 155929a01f..bebf24bedd 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.types.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/MintNftWithCryptoModal/MintNftWithCryptoModal.types.ts @@ -4,24 +4,19 @@ import { ModalProps } from 'decentraland-dapps/dist/providers/ModalProvider/Moda import type { Route } from 'decentraland-transactions/crossChain' import { Contract } from '../../../../modules/vendor/services' import { getContract } from '../../../../modules/contract/selectors' -import { - buyItemRequest, - buyItemWithCardRequest -} from '../../../../modules/item/actions' +import { buyItemRequest, buyItemWithCardRequest } from '../../../../modules/item/actions' -export type Props = WithAuthorizedActionProps & Omit<ModalProps, 'metadata'> & { - metadata: { item: Item } - isBuyingItemNatively: boolean - isBuyingItemCrossChain: boolean - getContract: (query: Partial<Contract>) => ReturnType<typeof getContract> - onBuyItem: typeof buyItemRequest - onBuyItemCrossChain: (route: Route) => unknown - onBuyWithCard: typeof buyItemWithCardRequest -} +export type Props = WithAuthorizedActionProps & + Omit<ModalProps, 'metadata'> & { + metadata: { item: Item } + isBuyingItemNatively: boolean + isBuyingItemCrossChain: boolean + getContract: (query: Partial<Contract>) => ReturnType<typeof getContract> + onBuyItem: typeof buyItemRequest + onBuyItemCrossChain: (route: Route) => unknown + onBuyWithCard: typeof buyItemWithCardRequest + } export type MapStateProps = Pick<Props, 'getContract' | 'isBuyingItemNatively' | 'isBuyingItemCrossChain'> -export type MapDispatchProps = Pick< - Props, - 'onBuyItem' | 'onBuyItemCrossChain' | 'onBuyWithCard' -> +export type MapDispatchProps = Pick<Props, 'onBuyItem' | 'onBuyItemCrossChain' | 'onBuyWithCard'> export type OwnProps = Pick<Props, 'metadata'> diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/PaymentSelector/PaymentSelector.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/PaymentSelector/PaymentSelector.tsx index 37dcac37fb..0901529813 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/PaymentSelector/PaymentSelector.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/PaymentSelector/PaymentSelector.tsx @@ -11,11 +11,7 @@ import { ManaToFiat } from '../../../ManaToFiat' import { formatPrice } from '../utils' import { TokenIcon } from '../TokenIcon' import { GasCostValues, RouteFeeCost } from '../hooks' -import { - CHAIN_SELECTOR_DATA_TEST_ID, - PAY_WITH_DATA_TEST_ID, - TOKEN_SELECTOR_DATA_TEST_ID -} from './constants' +import { CHAIN_SELECTOR_DATA_TEST_ID, PAY_WITH_DATA_TEST_ID, TOKEN_SELECTOR_DATA_TEST_ID } from './constants' import styles from './PaymentSelector.module.css' type Props = { @@ -66,54 +62,27 @@ const PaymentSelector = (props: Props) => { const renderTokenBalance = useCallback(() => { let balance if (selectedToken && selectedToken.symbol === 'MANA') { - balance = - wallet?.networks[ - (getNetwork(selectedChain) as Network.ETHEREUM) || Network.MATIC - ]?.mana.toFixed(2) ?? 0 + balance = wallet?.networks[(getNetwork(selectedChain) as Network.ETHEREUM) || Network.MATIC]?.mana.toFixed(2) ?? 0 } else if (selectedToken && selectedTokenBalance) { - balance = Number( - ethers.utils.formatUnits(selectedTokenBalance, selectedToken.decimals) - ).toFixed(4) + balance = Number(ethers.utils.formatUnits(selectedTokenBalance, selectedToken.decimals)).toFixed(4) } - return !isFetchingBalance ? ( - <span className={styles.balance}>{balance}</span> - ) : ( - <div className={styles.balanceSkeleton} /> - ) - }, [ - wallet, - isFetchingBalance, - selectedChain, - selectedToken, - selectedTokenBalance - ]) + return !isFetchingBalance ? <span className={styles.balance}>{balance}</span> : <div className={styles.balanceSkeleton} /> + }, [wallet, isFetchingBalance, selectedChain, selectedToken, selectedTokenBalance]) return ( - <div - className={styles.payWithContainer} - data-testid={PAY_WITH_DATA_TEST_ID} - > + <div className={styles.payWithContainer} data-testid={PAY_WITH_DATA_TEST_ID}> {canSelectChainAndToken ? ( <div className={styles.dropdownContainer}> <div> <span>{t('buy_with_crypto_modal.pay_with')}</span> <div - className={classNames( - styles.tokenAndChainSelector, - isBuyingAsset ? styles.dropdownDisabled : styles.dropdownEnabled - )} + className={classNames(styles.tokenAndChainSelector, isBuyingAsset ? styles.dropdownDisabled : styles.dropdownEnabled)} data-testid={CHAIN_SELECTOR_DATA_TEST_ID} onClick={!isBuyingAsset ? onShowChainSelector : undefined} > - <img - src={selectedProviderChain?.nativeCurrency.icon} - alt={selectedProviderChain?.nativeCurrency.name} - /> - <span className={styles.tokenAndChainSelectorName}> - {' '} - {selectedProviderChain?.networkName}{' '} - </span> + <img src={selectedProviderChain?.nativeCurrency.icon} alt={selectedProviderChain?.nativeCurrency.name} /> + <span className={styles.tokenAndChainSelectorName}> {selectedProviderChain?.networkName} </span> {!isBuyingAsset && <Icon name="chevron down" />} </div> </div> @@ -128,9 +97,7 @@ const PaymentSelector = (props: Props) => { onClick={!isBuyingAsset ? onShowTokenSelector : undefined} > <img src={selectedToken.logoURI} alt={selectedToken.name} /> - <span className={styles.tokenAndChainSelectorName}> - {selectedToken.symbol}{' '} - </span> + <span className={styles.tokenAndChainSelectorName}>{selectedToken.symbol} </span> <div className={styles.balanceContainer}> {t('buy_with_crypto_modal.balance')}: {renderTokenBalance()} </div> @@ -140,43 +107,27 @@ const PaymentSelector = (props: Props) => { </div> ) : null} <div className={styles.costContainer}> - {!!selectedToken ? ( + {selectedToken ? ( <> <div className={styles.itemCost}> <> - <div className={styles.itemCostLabels}> - {t('buy_with_crypto_modal.item_cost')} - </div> + <div className={styles.itemCostLabels}>{t('buy_with_crypto_modal.item_cost')}</div> <div className={styles.fromAmountContainer}> <div className={styles.fromAmountTokenContainer}> - <TokenIcon - src={selectedToken.logoURI} - name={selectedToken.name} - /> + <TokenIcon src={selectedToken.logoURI} name={selectedToken.name} /> {selectedToken.symbol === 'MANA' ? ( ethers.utils.formatEther(price) - ) : !!amountInSelectedToken ? ( + ) : amountInSelectedToken ? ( amountInSelectedToken ) : ( - <span - className={classNames( - styles.skeleton, - styles.estimatedFeeSkeleton - )} - /> + <span className={classNames(styles.skeleton, styles.estimatedFeeSkeleton)} /> )} </div> {amountInSelectedToken || selectedToken.symbol === 'MANA' ? ( <span className={styles.fromAmountUSD}> ≈{' '} {!!route && selectedToken.usdPrice ? ( - <> - $ - {( - Number(amountInSelectedToken) * - selectedToken.usdPrice - ).toFixed(4)} - </> + <>${(Number(amountInSelectedToken) * selectedToken.usdPrice).toFixed(4)}</> ) : ( <ManaToFiat mana={price} digits={4} /> )} @@ -192,8 +143,7 @@ const PaymentSelector = (props: Props) => { {t('buy_with_crypto_modal.fee_cost')} <InfoTooltip content={t( - shouldUseCrossChainProvider && - getNetwork(selectedChain) !== Network.MATIC + shouldUseCrossChainProvider && getNetwork(selectedChain) !== Network.MATIC ? 'buy_with_crypto_modal.tooltip.cross_chain' : 'buy_with_crypto_modal.tooltip.same_network' )} @@ -204,44 +154,25 @@ const PaymentSelector = (props: Props) => { <div className={styles.fromAmountContainer}> {gasCost && gasCost.token ? ( <div className={styles.fromAmountTokenContainer}> - <TokenIcon - src={gasCost.token.logoURI} - name={gasCost.token.name} - /> + <TokenIcon src={gasCost.token.logoURI} name={gasCost.token.name} /> {formatPrice(gasCost.total, gasCost.token)} </div> ) : !!route && routeFeeCost ? ( <div className={styles.fromAmountTokenContainer}> - <TokenIcon - src={route.route.estimate.gasCosts[0].token.logoURI} - name={route.route.estimate.gasCosts[0].token.name} - /> + <TokenIcon src={route.route.estimate.gasCosts[0].token.logoURI} name={route.route.estimate.gasCosts[0].token.name} /> {routeFeeCost.totalCost} </div> ) : ( - <div - className={classNames( - styles.skeleton, - styles.estimatedFeeSkeleton - )} - /> + <div className={classNames(styles.skeleton, styles.estimatedFeeSkeleton)} /> )} {gasCost && gasCost.totalUSDPrice ? ( - <span className={styles.fromAmountUSD}> - ≈ ${gasCost.totalUSDPrice.toFixed(4)} - </span> - ) : !!routeFeeCost && - providerTokens.find( - t => t.symbol === routeFeeCost.token.symbol - )?.usdPrice ? ( + <span className={styles.fromAmountUSD}>≈ ${gasCost.totalUSDPrice.toFixed(4)}</span> + ) : !!routeFeeCost && providerTokens.find(t => t.symbol === routeFeeCost.token.symbol)?.usdPrice ? ( <span className={styles.fromAmountUSD}> ≈ $ {( - (Number(routeFeeCost.feeCost) + - Number(routeFeeCost.gasCost)) * - providerTokens.find( - t => t.symbol === routeFeeCost.token.symbol - )?.usdPrice! + (Number(routeFeeCost.feeCost) + Number(routeFeeCost.gasCost)) * + providerTokens.find(t => t.symbol === routeFeeCost.token.symbol)?.usdPrice! ).toFixed(4)} </span> ) : null} diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/PurchaseTotal/PurchaseTotal.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/PurchaseTotal/PurchaseTotal.tsx index adc2488f0f..7584e8cd67 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/PurchaseTotal/PurchaseTotal.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/PurchaseTotal/PurchaseTotal.tsx @@ -44,52 +44,31 @@ const PurchaseTotal = (props: Props) => { <div> <span className={styles.total}>{t('buy_with_crypto_modal.total')}</span> {useMetaTx && !isPriceTooLow(price) ? ( - <span - className={styles.feeCovered} - data-testid={FREE_TX_COVERED_TEST_ID} - > + <span className={styles.feeCovered} data-testid={FREE_TX_COVERED_TEST_ID}> {t('buy_with_crypto_modal.transaction_fee_covered', { - covered: ( - <span className={styles.feeCoveredFree}> - {t('buy_with_crypto_modal.covered_by_dao')} - </span> - ) + covered: <span className={styles.feeCoveredFree}>{t('buy_with_crypto_modal.covered_by_dao')}</span> })} </span> ) : null} </div> <div className={styles.totalPrice}> {isLoading ? ( - <span - className={classNames(styles.skeleton, styles.estimatedFeeSkeleton)} - /> + <span className={classNames(styles.skeleton, styles.estimatedFeeSkeleton)} /> ) : ( <div> {shouldUseCrossChainProvider ? ( !!route && routeFeeCost ? ( <> - <TokenIcon - src={selectedToken.logoURI} - name={selectedToken.name} - /> - {routeFeeCost?.token.symbol !== selectedToken.symbol && - fromAmount ? ( + <TokenIcon src={selectedToken.logoURI} name={selectedToken.name} /> + {routeFeeCost?.token.symbol !== selectedToken.symbol && fromAmount ? ( <> {formatPrice(fromAmount, selectedToken)} <span> + </span> - <TokenIcon - src={routeFeeCost.token.logoURI} - name={routeFeeCost.token.name} - /> + <TokenIcon src={routeFeeCost.token.logoURI} name={routeFeeCost.token.name} /> {routeFeeCost.totalCost} </> ) : ( - <> - {formatPrice( - Number(fromAmount) + Number(routeFeeCost.totalCost), - selectedToken - )} - </> + <>{formatPrice(Number(fromAmount) + Number(routeFeeCost.totalCost), selectedToken)}</> )} </> ) : null @@ -97,18 +76,12 @@ const PurchaseTotal = (props: Props) => { <> {!!gasCost && gasCost.token ? ( <> - <TokenIcon - src={gasCost.token.logoURI} - name={gasCost.token.name} - /> + <TokenIcon src={gasCost.token.logoURI} name={gasCost.token.name} /> {formatPrice(Number(gasCost.total), gasCost.token)} <span> + </span> </> ) : null} - <TokenIcon - src={selectedToken.logoURI} - name={selectedToken.name} - /> + <TokenIcon src={selectedToken.logoURI} name={selectedToken.name} /> {ethers.utils.formatEther(price)} </> )} @@ -116,36 +89,19 @@ const PurchaseTotal = (props: Props) => { )} <div> {isLoading ? ( - <span - className={classNames( - styles.skeleton, - styles.estimatedFeeSkeleton, - styles.fromAmountUSD - )} - /> + <span className={classNames(styles.skeleton, styles.estimatedFeeSkeleton, styles.fromAmountUSD)} /> ) : ( <span className={styles.fromAmountUSD}> - {!!gasCost && - gasCost.totalUSDPrice && - manaTokenOnSelectedChain ? ( + {!!gasCost && gasCost.totalUSDPrice && manaTokenOnSelectedChain ? ( <> {' '} $ {manaTokenOnSelectedChain.usdPrice - ? ( - gasCost.totalUSDPrice + - manaTokenOnSelectedChain.usdPrice! * - Number(ethers.utils.formatEther(price)) - ).toFixed(4) + ? (gasCost.totalUSDPrice + manaTokenOnSelectedChain.usdPrice * Number(ethers.utils.formatEther(price))).toFixed(4) : 'Unknown'}{' '} </> ) : shouldUseCrossChainProvider ? ( - <> - {' '} - {!!route && routeTotalUSDCost - ? `$${routeTotalUSDCost?.toFixed(6)}` - : null}{' '} - </> + <> {!!route && routeTotalUSDCost ? `$${routeTotalUSDCost?.toFixed(6)}` : null} </> ) : ( <ManaToFiat mana={price} digits={4} /> )} diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/TokenIcon/TokenIcon.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/TokenIcon/TokenIcon.tsx index e33486b6d1..0290598140 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/TokenIcon/TokenIcon.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/TokenIcon/TokenIcon.tsx @@ -11,9 +11,7 @@ export const TokenIcon = (props: Props) => { style={{ zIndex: 3001 }} on="hover" position="top center" - trigger={ - <img height={24} width={24} src={src ?? noTokenImage} alt={name} /> - } + trigger={<img height={24} width={24} src={src ?? noTokenImage} alt={name} />} /> ) } diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/hooks.spec.ts b/webapp/src/components/Modals/BuyWithCryptoModal/hooks.spec.ts index 6b1fd4cff8..2f5b231d42 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/hooks.spec.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/hooks.spec.ts @@ -3,18 +3,8 @@ import { BigNumber, ethers } from 'ethers' import { renderHook } from '@testing-library/react-hooks' import { NATIVE_TOKEN, Token } from 'decentraland-transactions/crossChain' import { Wallet } from 'decentraland-dapps/dist/modules/wallet' -import { - useShouldUseCrossChainProvider, - useNameMintingGasCost, - useTokenBalance, - useBuyNftGasCost, - useMintingNftGasCost -} from './hooks' -import { - estimateBuyNftGas, - estimateMintNftGas, - estimateNameMintingGas -} from './utils' +import { useShouldUseCrossChainProvider, useNameMintingGasCost, useTokenBalance, useBuyNftGasCost, useMintingNftGasCost } from './hooks' +import { estimateBuyNftGas, estimateMintNftGas, estimateNameMintingGas } from './utils' import { waitFor } from '@testing-library/react' import { NFT } from '../../../modules/nft/types' @@ -22,7 +12,7 @@ jest.mock('ethers', () => ({ ...jest.requireActual('ethers'), ethers: { ...jest.requireActual('ethers').ethers, - Contract: function(address: string, abi: string[], provider: any) { + Contract: function (address: string, abi: string[], provider: any) { return { address, abi, @@ -31,13 +21,10 @@ jest.mock('ethers', () => ({ } }, providers: { - Web3Provider: function() { + Web3Provider: function () { return { getGasPrice: () => Promise.resolve(BigNumber.from(4)), - send: (method: string) => - method === 'eth_getBalance' - ? Promise.resolve(BigNumber.from(3231)) - : Promise.resolve(undefined) + send: (method: string) => (method === 'eth_getBalance' ? Promise.resolve(BigNumber.from(3231)) : Promise.resolve(undefined)) } } } @@ -72,9 +59,7 @@ describe('when using the should use cross chain provider hook', () => { }) it('should return true', () => { - const { result } = renderHook(() => - useShouldUseCrossChainProvider(selectedToken, Network.ETHEREUM) - ) + const { result } = renderHook(() => useShouldUseCrossChainProvider(selectedToken, Network.ETHEREUM)) expect(result.current).toBe(true) }) }) @@ -92,9 +77,7 @@ describe('when using the should use cross chain provider hook', () => { }) it('should return true', () => { - const { result } = renderHook(() => - useShouldUseCrossChainProvider(selectedToken, assetNetwork) - ) + const { result } = renderHook(() => useShouldUseCrossChainProvider(selectedToken, assetNetwork)) expect(result.current).toBe(true) }) }) @@ -105,9 +88,7 @@ describe('when using the should use cross chain provider hook', () => { }) it('should return true', () => { - const { result } = renderHook(() => - useShouldUseCrossChainProvider(selectedToken, assetNetwork) - ) + const { result } = renderHook(() => useShouldUseCrossChainProvider(selectedToken, assetNetwork)) expect(result.current).toBe(true) }) }) @@ -126,9 +107,7 @@ describe('when using the should use cross chain provider hook', () => { }) it('should return true', () => { - const { result } = renderHook(() => - useShouldUseCrossChainProvider(selectedToken, assetNetwork) - ) + const { result } = renderHook(() => useShouldUseCrossChainProvider(selectedToken, assetNetwork)) expect(result.current).toBe(true) }) }) @@ -142,9 +121,7 @@ describe('when using the should use cross chain provider hook', () => { }) it('should return false', () => { - const { result } = renderHook(() => - useShouldUseCrossChainProvider(selectedToken, assetNetwork) - ) + const { result } = renderHook(() => useShouldUseCrossChainProvider(selectedToken, assetNetwork)) expect(result.current).toBe(false) }) }) @@ -164,9 +141,7 @@ describe('when using the should use cross chain provider hook', () => { }) it('should return true', () => { - const { result } = renderHook(() => - useShouldUseCrossChainProvider(selectedToken, assetNetwork) - ) + const { result } = renderHook(() => useShouldUseCrossChainProvider(selectedToken, assetNetwork)) expect(result.current).toBe(true) }) }) @@ -180,9 +155,7 @@ describe('when using the should use cross chain provider hook', () => { }) it('should return false', () => { - const { result } = renderHook(() => - useShouldUseCrossChainProvider(selectedToken, assetNetwork) - ) + const { result } = renderHook(() => useShouldUseCrossChainProvider(selectedToken, assetNetwork)) expect(result.current).toBe(false) }) }) @@ -217,9 +190,7 @@ describe('when using the name minting gas cost hook', () => { }) it('should return an undefined cost and the loading flag as false', () => { - const { result } = renderHook(() => - useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet)) expect(result.current.gasCost).toBe(undefined) expect(result.current.isFetchingGasCost).toBe(false) }) @@ -239,9 +210,7 @@ describe('when using the name minting gas cost hook', () => { }) it('should return an undefined cost and the loading flag as false', () => { - const { result } = renderHook(() => - useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet)) expect(result.current.gasCost).toBe(undefined) expect(result.current.isFetchingGasCost).toBe(false) }) @@ -261,9 +230,7 @@ describe('when using the name minting gas cost hook', () => { }) it('should return an undefined cost and the loading flag as false', () => { - const { result } = renderHook(() => - useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet)) expect(result.current.gasCost).toBe(undefined) expect(result.current.isFetchingGasCost).toBe(false) }) @@ -286,16 +253,13 @@ describe('when using the name minting gas cost hook', () => { describe('and the transactions gas estimation fails', () => { beforeEach(() => { - ;(estimateNameMintingGas as jest.Mock< - ReturnType<typeof estimateNameMintingGas>, - Parameters<typeof estimateNameMintingGas> - >).mockRejectedValueOnce(undefined) + ;( + estimateNameMintingGas as jest.Mock<ReturnType<typeof estimateNameMintingGas>, Parameters<typeof estimateNameMintingGas>> + ).mockRejectedValueOnce(undefined) }) it('should return an undefined cost and the loading flag as false', async () => { - const { result } = renderHook(() => - useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet)) await waitFor(() => { expect(result.current.isFetchingGasCost).toBe(false) }) @@ -305,23 +269,18 @@ describe('when using the name minting gas cost hook', () => { describe('and the transactions gas estimation is successful', () => { beforeEach(() => { - ;(estimateNameMintingGas as jest.Mock< - ReturnType<typeof estimateNameMintingGas>, - Parameters<typeof estimateNameMintingGas> - >).mockResolvedValueOnce(BigNumber.from('4000000000000000000')) + ;( + estimateNameMintingGas as jest.Mock<ReturnType<typeof estimateNameMintingGas>, Parameters<typeof estimateNameMintingGas>> + ).mockResolvedValueOnce(BigNumber.from('4000000000000000000')) }) it('should return a total gas cost of 16, a USD gas cost of 160, the native token and the loading flag as false', async () => { - const { result } = renderHook(() => - useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useNameMintingGasCost(name, selectedToken, chainNativeToken, wallet)) await waitFor(() => { expect(result.current.isFetchingGasCost).toBe(false) }) - expect(result.current.gasCost?.total).toEqual( - ethers.utils.formatEther(BigNumber.from('16000000000000000000')) - ) + expect(result.current.gasCost?.total).toEqual(ethers.utils.formatEther(BigNumber.from('16000000000000000000'))) expect(result.current.gasCost?.token).toEqual(chainNativeToken) expect(result.current.gasCost?.totalUSDPrice).toEqual(160) }) @@ -366,9 +325,7 @@ describe('when using the buy nft gas cost hook', () => { }) it('should return an undefined cost and the loading flag as false', () => { - const { result } = renderHook(() => - useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet)) expect(result.current.gasCost).toBe(undefined) expect(result.current.isFetchingGasCost).toBe(false) }) @@ -388,9 +345,7 @@ describe('when using the buy nft gas cost hook', () => { }) it('should return an undefined cost and the loading flag as false', () => { - const { result } = renderHook(() => - useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet)) expect(result.current.gasCost).toBe(undefined) expect(result.current.isFetchingGasCost).toBe(false) }) @@ -410,9 +365,7 @@ describe('when using the buy nft gas cost hook', () => { }) it('should return an undefined cost and the loading flag as false', () => { - const { result } = renderHook(() => - useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet)) expect(result.current.gasCost).toBe(undefined) expect(result.current.isFetchingGasCost).toBe(false) }) @@ -435,16 +388,13 @@ describe('when using the buy nft gas cost hook', () => { describe('and the transactions gas estimation fails', () => { beforeEach(() => { - ;(estimateBuyNftGas as jest.Mock< - ReturnType<typeof estimateBuyNftGas>, - Parameters<typeof estimateBuyNftGas> - >).mockRejectedValueOnce(undefined) + ;(estimateBuyNftGas as jest.Mock<ReturnType<typeof estimateBuyNftGas>, Parameters<typeof estimateBuyNftGas>>).mockRejectedValueOnce( + undefined + ) }) it('should return an undefined cost and the loading flag as false', async () => { - const { result } = renderHook(() => - useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet)) await waitFor(() => { expect(result.current.isFetchingGasCost).toBe(false) }) @@ -454,23 +404,18 @@ describe('when using the buy nft gas cost hook', () => { describe('and the transactions gas estimation is successful', () => { beforeEach(() => { - ;(estimateBuyNftGas as jest.Mock< - ReturnType<typeof estimateBuyNftGas>, - Parameters<typeof estimateBuyNftGas> - >).mockResolvedValueOnce(BigNumber.from('4000000000000000000')) + ;(estimateBuyNftGas as jest.Mock<ReturnType<typeof estimateBuyNftGas>, Parameters<typeof estimateBuyNftGas>>).mockResolvedValueOnce( + BigNumber.from('4000000000000000000') + ) }) it('should return a total gas cost of 16, a USD gas cost of 160, the native token and the loading flag as false', async () => { - const { result } = renderHook(() => - useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useBuyNftGasCost(nft, order, selectedToken, chainNativeToken, wallet)) await waitFor(() => { expect(result.current.isFetchingGasCost).toBe(false) }) - expect(result.current.gasCost?.total).toEqual( - ethers.utils.formatEther(BigNumber.from('16000000000000000000')) - ) + expect(result.current.gasCost?.total).toEqual(ethers.utils.formatEther(BigNumber.from('16000000000000000000'))) expect(result.current.gasCost?.token).toEqual(chainNativeToken) expect(result.current.gasCost?.totalUSDPrice).toEqual(160) }) @@ -511,9 +456,7 @@ describe('when using the minting nft gas cost hook', () => { }) it('should return an undefined cost and the loading flag as false', () => { - const { result } = renderHook(() => - useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet)) expect(result.current.gasCost).toBe(undefined) expect(result.current.isFetchingGasCost).toBe(false) }) @@ -533,9 +476,7 @@ describe('when using the minting nft gas cost hook', () => { }) it('should return an undefined cost and the loading flag as false', () => { - const { result } = renderHook(() => - useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet)) expect(result.current.gasCost).toBe(undefined) expect(result.current.isFetchingGasCost).toBe(false) }) @@ -555,9 +496,7 @@ describe('when using the minting nft gas cost hook', () => { }) it('should return an undefined cost and the loading flag as false', () => { - const { result } = renderHook(() => - useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet)) expect(result.current.gasCost).toBe(undefined) expect(result.current.isFetchingGasCost).toBe(false) }) @@ -580,16 +519,13 @@ describe('when using the minting nft gas cost hook', () => { describe('and the transactions gas estimation fails', () => { beforeEach(() => { - ;(estimateMintNftGas as jest.Mock< - ReturnType<typeof estimateMintNftGas>, - Parameters<typeof estimateMintNftGas> - >).mockRejectedValueOnce(undefined) + ;( + estimateMintNftGas as jest.Mock<ReturnType<typeof estimateMintNftGas>, Parameters<typeof estimateMintNftGas>> + ).mockRejectedValueOnce(undefined) }) it('should return an undefined cost and the loading flag as false', async () => { - const { result } = renderHook(() => - useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet)) await waitFor(() => { expect(result.current.isFetchingGasCost).toBe(false) }) @@ -599,23 +535,18 @@ describe('when using the minting nft gas cost hook', () => { describe('and the transactions gas estimation is successful', () => { beforeEach(() => { - ;(estimateMintNftGas as jest.Mock< - ReturnType<typeof estimateMintNftGas>, - Parameters<typeof estimateMintNftGas> - >).mockResolvedValueOnce(BigNumber.from('4000000000000000000')) + ;( + estimateMintNftGas as jest.Mock<ReturnType<typeof estimateMintNftGas>, Parameters<typeof estimateMintNftGas>> + ).mockResolvedValueOnce(BigNumber.from('4000000000000000000')) }) it('should return a total gas cost of 16, a USD gas cost of 160, the native token and the loading flag as false', async () => { - const { result } = renderHook(() => - useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet) - ) + const { result } = renderHook(() => useMintingNftGasCost(item, selectedToken, chainNativeToken, wallet)) await waitFor(() => { expect(result.current.isFetchingGasCost).toBe(false) }) - expect(result.current.gasCost?.total).toEqual( - ethers.utils.formatEther(BigNumber.from('16000000000000000000')) - ) + expect(result.current.gasCost?.total).toEqual(ethers.utils.formatEther(BigNumber.from('16000000000000000000'))) expect(result.current.gasCost?.token).toEqual(chainNativeToken) expect(result.current.gasCost?.totalUSDPrice).toEqual(160) }) @@ -639,9 +570,7 @@ describe('when using the use token balance hook', () => { }) it('should return an undefined token balance and the loading flag as false', async () => { - const { result } = renderHook(() => - useTokenBalance(selectedToken, selectedChainId, address) - ) + const { result } = renderHook(() => useTokenBalance(selectedToken, selectedChainId, address)) await waitFor(() => { expect(result.current.isFetchingBalance).toBe(false) }) @@ -661,9 +590,7 @@ describe('when using the use token balance hook', () => { }) it('should return an undefined balance and the loading flag as false', async () => { - const { result } = renderHook(() => - useTokenBalance(selectedToken, selectedChainId, address) - ) + const { result } = renderHook(() => useTokenBalance(selectedToken, selectedChainId, address)) await waitFor(() => { expect(result.current.isFetchingBalance).toBe(false) }) @@ -683,9 +610,7 @@ describe('when using the use token balance hook', () => { }) it('should return the balance of the native token and the loading flag as false', async () => { - const { result } = renderHook(() => - useTokenBalance(selectedToken, selectedChainId, address) - ) + const { result } = renderHook(() => useTokenBalance(selectedToken, selectedChainId, address)) await waitFor(() => { expect(result.current.isFetchingBalance).toBe(false) @@ -706,9 +631,7 @@ describe('when using the use token balance hook', () => { }) it('should return the balance of the selected token and the loading flag as false', async () => { - const { result } = renderHook(() => - useTokenBalance(selectedToken, selectedChainId, address) - ) + const { result } = renderHook(() => useTokenBalance(selectedToken, selectedChainId, address)) await waitFor(() => { expect(result.current.isFetchingBalance).toBe(false) diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/hooks.ts b/webapp/src/components/Modals/BuyWithCryptoModal/hooks.ts index f9267d25cd..dfafdb132a 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/hooks.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/hooks.ts @@ -6,39 +6,23 @@ import { getNetworkProvider } from 'decentraland-dapps/dist/lib' import { getNetwork } from '@dcl/schemas/dist/dapps/chain-id' import { Wallet } from 'decentraland-dapps/dist/modules/wallet' import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics' -import type { - CrossChainProvider, - Route, - RouteResponse, - Token -} from 'decentraland-transactions/crossChain' +import type { CrossChainProvider, Route, RouteResponse, Token } from 'decentraland-transactions/crossChain' import { NFT } from '../../../modules/nft/types' import * as events from '../../../utils/events' -import { - estimateBuyNftGas, - estimateMintNftGas, - estimateNameMintingGas, - formatPrice, - getShouldUseMetaTx -} from './utils' +import { estimateBuyNftGas, estimateMintNftGas, estimateNameMintingGas, formatPrice, getShouldUseMetaTx } from './utils' export const NATIVE_TOKEN = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' const ROUTE_FETCH_INTERVAL = 10000000 // 10 secs -export const useShouldUseCrossChainProvider = ( - selectedToken: Token, - assetNetwork: Network -) => { +export const useShouldUseCrossChainProvider = (selectedToken: Token, assetNetwork: Network) => { return useMemo( () => !( (selectedToken.symbol === 'MANA' && - getNetwork(parseInt(selectedToken.chainId) as ChainId) === - Network.MATIC && + getNetwork(parseInt(selectedToken.chainId) as ChainId) === Network.MATIC && assetNetwork === Network.MATIC) || // MANA selected and it's sending the tx from MATIC (selectedToken.symbol === 'MANA' && - getNetwork(parseInt(selectedToken.chainId) as ChainId) === - Network.ETHEREUM && + getNetwork(parseInt(selectedToken.chainId) as ChainId) === Network.ETHEREUM && assetNetwork === Network.ETHEREUM) ), // MANA selected and it's connected to ETH and buying a L1 NFT [assetNetwork, selectedToken] @@ -51,11 +35,7 @@ export type TokenBalance = { } // Retrieves the token balance for the selected token in the selected chain for the user's address -export const useTokenBalance = ( - selectedToken: Token, - selectedChain: ChainId, - address: string | undefined | null -): TokenBalance => { +export const useTokenBalance = (selectedToken: Token, selectedChain: ChainId, address: string | undefined | null): TokenBalance => { const [isFetchingBalance, setIsFetchingBalance] = useState(false) const [selectedTokenBalance, setSelectedTokenBalance] = useState<BigNumber>() @@ -74,10 +54,7 @@ export const useTokenBalance = ( // if native token if (selectedToken.address === NATIVE_TOKEN) { - const balanceWei = await provider.send('eth_getBalance', [ - address, - 'latest' - ]) + const balanceWei = await provider.send('eth_getBalance', [address, 'latest']) if (!cancel) { setSelectedTokenBalance(balanceWei) @@ -145,9 +122,7 @@ const useGasCost = ( if (estimation) { const total = estimation.mul(gasPrice) - const totalUSDPrice = nativeChainToken?.usdPrice - ? nativeChainToken.usdPrice * +ethers.utils.formatEther(total) - : undefined + const totalUSDPrice = nativeChainToken?.usdPrice ? nativeChainToken.usdPrice * +ethers.utils.formatEther(total) : undefined setGasCost({ token: nativeChainToken, @@ -161,24 +136,12 @@ const useGasCost = ( } } - if ( - !shouldUseCrossChainProvider && - wallet && - nativeChainToken && - getNetwork(wallet.chainId) === assetNetwork - ) { + if (!shouldUseCrossChainProvider && wallet && nativeChainToken && getNetwork(wallet.chainId) === assetNetwork) { calculateGas() } else { setGasCost(undefined) } - }, [ - assetNetwork, - estimateTransactionGas, - nativeChainToken, - selectedChain, - shouldUseCrossChainProvider, - wallet - ]) + }, [assetNetwork, estimateTransactionGas, nativeChainToken, selectedChain, shouldUseCrossChainProvider, wallet]) return { gasCost, isFetchingGasCost } } @@ -192,25 +155,12 @@ export const useMintingNftGasCost = ( const chainId = parseInt(selectedToken.chainId) as ChainId const estimateGas = useCallback( - () => - wallet - ? estimateMintNftGas(chainId, wallet, item) - : Promise.resolve(undefined), + () => (wallet ? estimateMintNftGas(chainId, wallet, item) : Promise.resolve(undefined)), [chainId, wallet, item] ) - const shouldUseCrossChainProvider = useShouldUseCrossChainProvider( - selectedToken, - item.network - ) + const shouldUseCrossChainProvider = useShouldUseCrossChainProvider(selectedToken, item.network) - return useGasCost( - item.network, - chainNativeToken, - chainId, - shouldUseCrossChainProvider, - wallet, - estimateGas - ) + return useGasCost(item.network, chainNativeToken, chainId, shouldUseCrossChainProvider, wallet, estimateGas) } export const useBuyNftGasCost = ( @@ -223,56 +173,25 @@ export const useBuyNftGasCost = ( const chainId = parseInt(selectedToken.chainId) as ChainId const estimateGas = useCallback( - () => - wallet - ? estimateBuyNftGas(chainId, wallet, nft, order) - : Promise.resolve(undefined), + () => (wallet ? estimateBuyNftGas(chainId, wallet, nft, order) : Promise.resolve(undefined)), [chainId, wallet, order] ) - const shouldUseCrossChainProvider = useShouldUseCrossChainProvider( - selectedToken, - order.network - ) + const shouldUseCrossChainProvider = useShouldUseCrossChainProvider(selectedToken, order.network) - return useGasCost( - order.network, - chainNativeToken, - chainId, - shouldUseCrossChainProvider, - wallet, - estimateGas - ) + return useGasCost(order.network, chainNativeToken, chainId, shouldUseCrossChainProvider, wallet, estimateGas) } -export const useNameMintingGasCost = ( - name: string, - selectedToken: Token, - chainNativeToken: Token | undefined, - wallet: Wallet | null -) => { +export const useNameMintingGasCost = (name: string, selectedToken: Token, chainNativeToken: Token | undefined, wallet: Wallet | null) => { const chainId = parseInt(selectedToken.chainId) as ChainId const estimateGas = useCallback( - () => - wallet?.address - ? estimateNameMintingGas(name, chainId, wallet?.address) - : Promise.resolve(undefined), + () => (wallet?.address ? estimateNameMintingGas(name, chainId, wallet?.address) : Promise.resolve(undefined)), [name, chainId, wallet?.address] ) - const shouldUseCrossChainProvider = useShouldUseCrossChainProvider( - selectedToken, - Network.ETHEREUM - ) + const shouldUseCrossChainProvider = useShouldUseCrossChainProvider(selectedToken, Network.ETHEREUM) - return useGasCost( - Network.ETHEREUM, - chainNativeToken, - chainId, - shouldUseCrossChainProvider, - wallet, - estimateGas - ) + return useGasCost(Network.ETHEREUM, chainNativeToken, chainId, shouldUseCrossChainProvider, wallet, estimateGas) } export const useCrossChainMintNftRoute = ( @@ -376,16 +295,7 @@ export const useCrossChainNameMintingRoute = ( }), [name, assetChainId, price] ) - return useCrossChainRoute( - price, - assetChainId, - selectedToken, - selectedChain, - providerTokens, - crossChain, - wallet, - getMintingNameRoute - ) + return useCrossChainRoute(price, assetChainId, selectedToken, selectedChain, providerTokens, crossChain, wallet, getMintingNameRoute) } export type RouteFeeCost = { @@ -427,26 +337,14 @@ const useCrossChainRoute = ( const [fromAmount, setFromAmount] = useState<string>() const [route, setRoute] = useState<Route>() const abortControllerRef = useRef(new AbortController()) - const destinationChainMANAContractAddress = useMemo( - () => getContract(ContractName.MANAToken, assetChainId).address, - [assetChainId] - ) + const destinationChainMANAContractAddress = useMemo(() => getContract(ContractName.MANAToken, assetChainId).address, [assetChainId]) const calculateRoute = useCallback(async () => { abortControllerRef.current = new AbortController() const abortController = abortControllerRef.current const signal = abortController.signal - const providerMANA = providerTokens.find( - t => - t.address.toLocaleLowerCase() === - destinationChainMANAContractAddress.toLocaleLowerCase() - ) - if ( - !crossChainProvider || - !crossChainProvider.isLibInitialized() || - !wallet || - !providerMANA - ) { + const providerMANA = providerTokens.find(t => t.address.toLocaleLowerCase() === destinationChainMANAContractAddress.toLocaleLowerCase()) + if (!crossChainProvider || !crossChainProvider.isLibInitialized() || !wallet || !providerMANA) { return } try { @@ -458,14 +356,10 @@ const useCrossChainRoute = ( toAmount: ethers.utils.formatEther(price), toToken: providerMANA } - const fromAmount = Number( - await crossChainProvider.getFromAmount(fromAmountParams) - ).toFixed(6) + const fromAmount = Number(await crossChainProvider.getFromAmount(fromAmountParams)).toFixed(6) setFromAmount(fromAmount) - const fromAmountWei = ethers.utils - .parseUnits(fromAmount.toString(), selectedToken.decimals) - .toString() + const fromAmountWei = ethers.utils.parseUnits(fromAmount.toString(), selectedToken.decimals).toString() const route: RouteResponse | undefined = await getRoute( wallet.address, @@ -489,32 +383,14 @@ const useCrossChainRoute = ( } finally { setIsFetchingRoute(false) } - }, [ - crossChainProvider, - price, - providerTokens, - selectedChain, - selectedToken, - wallet - ]) + }, [crossChainProvider, price, providerTokens, selectedChain, selectedToken, wallet]) const useMetaTx = useMemo(() => { return ( !!wallet && - getShouldUseMetaTx( - assetChainId, - selectedChain, - selectedToken.address, - destinationChainMANAContractAddress, - wallet.network - ) + getShouldUseMetaTx(assetChainId, selectedChain, selectedToken.address, destinationChainMANAContractAddress, wallet.network) ) - }, [ - destinationChainMANAContractAddress, - selectedChain, - selectedToken, - wallet - ]) + }, [destinationChainMANAContractAddress, selectedChain, selectedToken, wallet]) // Refresh the route every ROUTE_FETCH_INTERVAL useEffect(() => { @@ -548,15 +424,9 @@ const useCrossChainRoute = ( selectedToken.symbol !== 'MANA' const isPayingWithOtherTokenThanMANA = selectedToken.symbol !== 'MANA' - const isPayingWithMANAButFromOtherChain = - selectedToken.symbol === 'MANA' && - selectedToken.chainId !== assetChainId.toString() - - if ( - isBuyingL1WithOtherTokenThanEthereumMANA || - isPayingWithOtherTokenThanMANA || - isPayingWithMANAButFromOtherChain - ) { + const isPayingWithMANAButFromOtherChain = selectedToken.symbol === 'MANA' && selectedToken.chainId !== assetChainId.toString() + + if (isBuyingL1WithOtherTokenThanEthereumMANA || isPayingWithOtherTokenThanMANA || isPayingWithMANAButFromOtherChain) { calculateRoute() } } @@ -569,37 +439,22 @@ const useCrossChainRoute = ( estimate: { gasCosts, feeCosts } } } = route - const totalGasCost = gasCosts - .map(c => BigNumber.from(c.amount)) - .reduce((a, b) => a.add(b), BigNumber.from(0)) - const totalFeeCost = feeCosts - .map(c => BigNumber.from(c.amount)) - .reduce((a, b) => a.add(b), BigNumber.from(0)) + const totalGasCost = gasCosts.map(c => BigNumber.from(c.amount)).reduce((a, b) => a.add(b), BigNumber.from(0)) + const totalFeeCost = feeCosts.map(c => BigNumber.from(c.amount)).reduce((a, b) => a.add(b), BigNumber.from(0)) const token = gasCosts[0].token return { token, gasCostWei: totalGasCost, gasCost: formatPrice( - ethers.utils.formatUnits( - totalGasCost, - route.route.estimate.gasCosts[0].token.decimals - ), + ethers.utils.formatUnits(totalGasCost, route.route.estimate.gasCosts[0].token.decimals), route.route.estimate.gasCosts[0].token ).toString(), feeCost: formatPrice( - ethers.utils.formatUnits( - totalFeeCost, - route.route.estimate.gasCosts[0].token.decimals - ), + ethers.utils.formatUnits(totalFeeCost, route.route.estimate.gasCosts[0].token.decimals), route.route.estimate.gasCosts[0].token ).toString(), feeCostWei: totalFeeCost, - totalCost: parseFloat( - ethers.utils.formatUnits( - totalGasCost.add(totalFeeCost), - token.decimals - ) - ).toFixed(6) + totalCost: parseFloat(ethers.utils.formatUnits(totalGasCost.add(totalFeeCost), token.decimals)).toFixed(6) } } }, [route]) @@ -607,12 +462,9 @@ const useCrossChainRoute = ( const routeTotalUSDCost = useMemo(() => { if (route && routeFeeCost && fromAmount && selectedToken?.usdPrice) { const { feeCost, gasCost } = routeFeeCost - const feeTokenUSDPrice = providerTokens.find( - t => t.symbol === routeFeeCost.token.symbol - )?.usdPrice + const feeTokenUSDPrice = providerTokens.find(t => t.symbol === routeFeeCost.token.symbol)?.usdPrice return feeTokenUSDPrice - ? feeTokenUSDPrice * (Number(gasCost) + Number(feeCost)) + - selectedToken.usdPrice * Number(fromAmount) + ? feeTokenUSDPrice * (Number(gasCost) + Number(feeCost)) + selectedToken.usdPrice * Number(fromAmount) : undefined } }, [fromAmount, providerTokens, route, routeFeeCost, selectedToken.usdPrice]) diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/utils.ts b/webapp/src/components/Modals/BuyWithCryptoModal/utils.ts index b4bfe5a062..85e1139114 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/utils.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/utils.ts @@ -3,11 +3,7 @@ import { BigNumber, ethers } from 'ethers' import { Env } from '@dcl/ui-env' import type { ChainData, Token } from 'decentraland-transactions/crossChain' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' -import { - ContractName, - getContract, - getContractName -} from 'decentraland-transactions' +import { ContractName, getContract, getContractName } from 'decentraland-transactions' import { getNetwork } from '@dcl/schemas/dist/dapps/chain-id' import { getNetworkProvider } from 'decentraland-dapps/dist/lib/eth' import { config } from '../../../config' @@ -45,8 +41,7 @@ export function getMANAToken(chainId: ChainId) { name: MANAContract.name, symbol: 'MANA', decimals: 18, - logoURI: - 'https://assets.coingecko.com/coins/images/878/small/decentraland-mana.png', + logoURI: 'https://assets.coingecko.com/coins/images/878/small/decentraland-mana.png', coingeckoId: '', // not necessary subGraphId: '', // won't be used since we'll send the metatx or transaction directly subGraphOnly: false, @@ -79,10 +74,7 @@ export function formatPrice(price: string | number, token: Token): number { } // Format the price using toFixed to round and limit the number of decimals - const formattedPrice = truncateToDecimals( - typeof price === 'string' ? Number(price) : price, - decimalsToShow - ) + const formattedPrice = truncateToDecimals(typeof price === 'string' ? Number(price) : price, decimalsToShow) return formattedPrice } @@ -97,8 +89,7 @@ export const DEFAULT_CHAINS = [ name: 'MATIC', symbol: 'MATIC', decimals: 18, - icon: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/matic.svg' + icon: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/matic.svg' } }, { @@ -108,8 +99,7 @@ export const DEFAULT_CHAINS = [ name: 'Ethereum', symbol: 'ETH', decimals: 18, - icon: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/eth.svg' + icon: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/eth.svg' } }, { @@ -119,8 +109,7 @@ export const DEFAULT_CHAINS = [ name: 'Optimism', symbol: 'ETH', decimals: 18, - icon: - 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/optimism.svg' + icon: 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/optimism.svg' } }, { @@ -130,8 +119,7 @@ export const DEFAULT_CHAINS = [ name: 'Arbitrum', symbol: 'ETH', decimals: 18, - icon: - 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/arbitrum.svg' + icon: 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/arbitrum.svg' } }, { @@ -141,8 +129,7 @@ export const DEFAULT_CHAINS = [ name: 'Avalanche', symbol: 'AVAX', decimals: 18, - icon: - 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/avalanche.svg' + icon: 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/avalanche.svg' } }, { @@ -152,8 +139,7 @@ export const DEFAULT_CHAINS = [ name: 'BNB', symbol: 'BNB', decimals: 18, - icon: - 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/binance.svg' + icon: 'https://raw.githubusercontent.com/axelarnetwork/axelar-docs/main/public/images/chains/binance.svg' } }, { @@ -163,8 +149,7 @@ export const DEFAULT_CHAINS = [ name: 'FTM', symbol: 'FTM', decimals: 18, - icon: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/ftm.svg' + icon: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/ftm.svg' } } ] as ChainData[] @@ -177,8 +162,7 @@ export const TESTNET_DEFAULT_CHAINS = [ name: 'MATIC', symbol: 'MATIC', decimals: 18, - icon: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/matic.svg' + icon: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/matic.svg' } }, { @@ -188,8 +172,7 @@ export const TESTNET_DEFAULT_CHAINS = [ name: 'Ethereum', symbol: 'ETH', decimals: 18, - icon: - 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/eth.svg' + icon: 'https://raw.githubusercontent.com/0xsquid/assets/main/images/tokens/eth.svg' } } ] as ChainData[] @@ -201,47 +184,26 @@ export const getDefaultChains = () => { return DEFAULT_CHAINS } -export const estimateMintNftGas = async ( - selectedChain: ChainId, - wallet: Wallet, - asset: Item -): Promise<BigNumber> => { +export const estimateMintNftGas = async (selectedChain: ChainId, wallet: Wallet, asset: Item): Promise<BigNumber> => { const networkProvider = await getNetworkProvider(selectedChain) const provider = new ethers.providers.Web3Provider(networkProvider) const contract = getContract(ContractName.CollectionStore, asset.chainId) const c = new ethers.Contract(contract.address, contract.abi, provider) - return c.estimateGas.buy( - [[asset.contractAddress, [asset.itemId], [asset.price], [wallet.address]]], - { from: wallet.address } - ) + return c.estimateGas.buy([[asset.contractAddress, [asset.itemId], [asset.price], [wallet.address]]], { from: wallet.address }) } -export const estimateBuyNftGas = async ( - selectedChain: ChainId, - wallet: Wallet, - asset: NFT, - order: Order -): Promise<BigNumber> => { +export const estimateBuyNftGas = async (selectedChain: ChainId, wallet: Wallet, asset: NFT, order: Order): Promise<BigNumber> => { const networkProvider = await getNetworkProvider(selectedChain) const provider = new ethers.providers.Web3Provider(networkProvider) const contractName = getContractName(order.marketplaceAddress) const contract = getContract(contractName, order.chainId) const c = new ethers.Contract(contract.address, contract.abi, provider) - return c.estimateGas.executeOrder( - asset.contractAddress, - asset.tokenId, - order.price, - { from: wallet.address } - ) + return c.estimateGas.executeOrder(asset.contractAddress, asset.tokenId, order.price, { from: wallet.address }) } -export const estimateNameMintingGas = async ( - name: string, - selectedChain: ChainId, - ownerAddress: string -): Promise<BigNumber> => { +export const estimateNameMintingGas = async (name: string, selectedChain: ChainId, ownerAddress: string): Promise<BigNumber> => { const networkProvider = await getNetworkProvider(selectedChain) const provider = new ethers.providers.Web3Provider(networkProvider) const contract = getContract(ContractName.DCLControllerV2, selectedChain) diff --git a/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.container.ts b/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.container.ts index db65c7b5f7..cc10c45de7 100644 --- a/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.container.ts +++ b/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.container.ts @@ -2,16 +2,8 @@ import { connect } from 'react-redux' import { Dispatch } from 'redux' import { RootState } from '../../../modules/reducer' import { claimAssetRequest } from '../../../modules/rental/actions' -import { - isClaimingAsset, - isSubmittingTransaction, - getError -} from '../../../modules/rental/selectors' -import { - MapDispatchProps, - MapStateProps, - OwnProps -} from './ClaimLandModal.types' +import { isClaimingAsset, isSubmittingTransaction, getError } from '../../../modules/rental/selectors' +import { MapDispatchProps, MapStateProps, OwnProps } from './ClaimLandModal.types' import ClaimLandModal from './ClaimLandModal' const mapState = (state: RootState): MapStateProps => { @@ -22,15 +14,9 @@ const mapState = (state: RootState): MapStateProps => { } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => { +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => { return { - onSubmitTransaction: () => - dispatch( - claimAssetRequest(ownProps.metadata.nft, ownProps.metadata.rental) - ) + onSubmitTransaction: () => dispatch(claimAssetRequest(ownProps.metadata.nft, ownProps.metadata.rental)) } } diff --git a/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.tsx b/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.tsx index a1e4308c7a..df1d85fbb9 100644 --- a/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.tsx +++ b/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.tsx @@ -6,9 +6,7 @@ import styles from './ClaimLandModal.module.css' import { SubmitTransactionModal } from '../SubmitTransactionModal' const ClaimLandModal = ({ ...props }: Props) => { - const assetText = isParcel(props.metadata.nft) - ? t('global.parcel') - : t('global.estate') + const assetText = isParcel(props.metadata.nft) ? t('global.parcel') : t('global.estate') return ( <SubmitTransactionModal title={t('claim_land_modal.title', { diff --git a/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.types.ts b/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.types.ts index 7ae814dab0..c889a5657b 100644 --- a/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.types.ts +++ b/webapp/src/components/Modals/ClaimLandModal/ClaimLandModal.types.ts @@ -16,8 +16,5 @@ export type Props = Omit<ModalProps, 'metadata'> & { } export type OwnProps = Pick<Props, 'metadata'> -export type MapStateProps = Pick< - Props, - 'isTransactionBeingConfirmed' | 'isSubmittingTransaction' | 'error' -> +export type MapStateProps = Pick<Props, 'isTransactionBeingConfirmed' | 'isSubmittingTransaction' | 'error'> export type MapDispatchProps = Pick<Props, 'onSubmitTransaction'> diff --git a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.container.ts b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.container.ts index 3781e91e8d..855078b9f3 100644 --- a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.container.ts +++ b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.container.ts @@ -2,20 +2,12 @@ import { connect } from 'react-redux' import { ChainId } from '@dcl/schemas' import { openFiatGatewayWidgetRequest } from 'decentraland-dapps/dist/modules/gateway/actions' import { openModal } from 'decentraland-dapps/dist/modules/modal' -import { - FiatGateway, - FiatGatewayOptions, - FiatGatewayListeners -} from 'decentraland-dapps/dist/modules/gateway/types' +import { FiatGateway, FiatGatewayOptions, FiatGatewayListeners } from 'decentraland-dapps/dist/modules/gateway/types' import { RootState } from '../../../modules/reducer' import { isWaitingTxClaimName } from '../../../modules/ens/selectors' import { claimNameTransactionSubmitted } from '../../../modules/ens/actions' import { getWallet } from '../../../modules/wallet/selectors' -import { - MapDispatch, - MapDispatchProps, - MapState -} from './ClaimNameFatFingerModal.types' +import { MapDispatch, MapDispatchProps, MapState } from './ClaimNameFatFingerModal.types' import ClaimNameFatFingerModal from './ClaimNameFatFingerModal' const mapState = (state: RootState): MapState => ({ @@ -24,19 +16,10 @@ const mapState = (state: RootState): MapState => ({ }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onBuyWithCrypto: (name: string) => - dispatch(openModal('MintNameWithCryptoModal', { name })), - onOpenFiatGateway: ( - gateway: FiatGateway, - options: FiatGatewayOptions, - listeners?: FiatGatewayListeners - ) => dispatch(openFiatGatewayWidgetRequest(gateway, options, listeners)), - onClaimTxSubmitted: ( - subdomain: string, - address: string, - chainId: ChainId, - txHash: string - ) => + onBuyWithCrypto: (name: string) => dispatch(openModal('MintNameWithCryptoModal', { name })), + onOpenFiatGateway: (gateway: FiatGateway, options: FiatGatewayOptions, listeners?: FiatGatewayListeners) => + dispatch(openFiatGatewayWidgetRequest(gateway, options, listeners)), + onClaimTxSubmitted: (subdomain: string, address: string, chainId: ChainId, txHash: string) => dispatch(claimNameTransactionSubmitted(subdomain, address, chainId, txHash)) }) diff --git a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.spec.tsx b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.spec.tsx index fe6f134305..4566f875c5 100644 --- a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.spec.tsx +++ b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.spec.tsx @@ -6,10 +6,7 @@ import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { DCLController__factory } from '../../../contracts/factories/DCLController__factory' import { renderWithProviders } from '../../../utils/test' -import ClaimNameFatFingerModal, { - CRYPTO_PAYMENT_METHOD_DATA_TESTID, - FIAT_PAYMENT_METHOD_DATA_TESTID -} from './ClaimNameFatFingerModal' +import ClaimNameFatFingerModal, { CRYPTO_PAYMENT_METHOD_DATA_TESTID, FIAT_PAYMENT_METHOD_DATA_TESTID } from './ClaimNameFatFingerModal' import { Props } from './ClaimNameFatFingerModal.types' jest.mock('../../../modules/vendor/decentraland/marketplace/api') @@ -65,9 +62,7 @@ describe('ClaimNameFatFingerModal', () => { expect(getByTestId(CRYPTO_PAYMENT_METHOD_DATA_TESTID)).toBeDisabled() expect(getByTestId(FIAT_PAYMENT_METHOD_DATA_TESTID)).toBeDisabled() - const errorMessage = getByText( - t('names_page.claim_name_fat_finger_modal.names_different') - ) + const errorMessage = getByText(t('names_page.claim_name_fat_finger_modal.names_different')) expect(errorMessage).toBeInTheDocument() }) }) @@ -114,9 +109,7 @@ describe('ClaimNameFatFingerModal', () => { beforeEach(() => { encodeFunctionMock = jest.fn() - getSignerMock.mockResolvedValueOnce( - (signerMock as unknown) as ethers.providers.JsonRpcSigner - ) + getSignerMock.mockResolvedValueOnce(signerMock as unknown as ethers.providers.JsonRpcSigner) ;(DCLController__factory.connect as jest.Mock).mockResolvedValueOnce({ interface: { encodeFunctionData: encodeFunctionMock @@ -132,10 +125,7 @@ describe('ClaimNameFatFingerModal', () => { }) it('should perform the buy operation with the chosen name and wallet address', () => { - expect(encodeFunctionMock).toHaveBeenCalledWith('register', [ - name, - address - ]) + expect(encodeFunctionMock).toHaveBeenCalledWith('register', [name, address]) }) describe('when the buy operation is pending', () => { @@ -148,12 +138,7 @@ describe('ClaimNameFatFingerModal', () => { }) it('should call the onClaimTxSubmitted method prop with the transaction data', () => { - expect(onClaimTxSubmitted).toHaveBeenCalledWith( - name, - address, - ChainId.ETHEREUM_SEPOLIA, - txId - ) + expect(onClaimTxSubmitted).toHaveBeenCalledWith(name, address, ChainId.ETHEREUM_SEPOLIA, txId) }) }) }) diff --git a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.tsx b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.tsx index 9a25b6842e..ccfe14552b 100644 --- a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.tsx +++ b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.tsx @@ -18,10 +18,7 @@ import { DCLController__factory } from '../../../contracts/factories/DCLControll import { Props } from './ClaimNameFatFingerModal.types' import './ClaimNameFatFingerModal.css' -export const CONTROLLER_V2_ADDRESS = config.get( - 'CONTROLLER_V2_CONTRACT_ADDRESS', - '' -) +export const CONTROLLER_V2_ADDRESS = config.get('CONTROLLER_V2_CONTRACT_ADDRESS', '') export const CRYPTO_PAYMENT_METHOD_DATA_TESTID = 'crypto-payment-method' export const FIAT_PAYMENT_METHOD_DATA_TESTID = 'fiat-payment-method' @@ -60,25 +57,15 @@ const ClaimNameFatFingerModal = ({ const wertURL = config.get('WERT_URL') if (wallet) { const signer = await getSigner() - const factory = await DCLController__factory.connect( - CONTROLLER_V2_ADDRESS, - signer - ) + const factory = await DCLController__factory.connect(CONTROLLER_V2_ADDRESS, signer) - const sc_input_data = factory.interface.encodeFunctionData('register', [ - ENSName, - wallet.address - ]) + const sc_input_data = factory.interface.encodeFunctionData('register', [ENSName, wallet.address]) const data = { address: wallet.address, commodity: isDev ? 'TTS' : 'MANA', commodity_amount: Number(PRICE), - sc_address: config.get( - isDev - ? 'CONTROLLER_V2_CONTRACT_ADDRESS_FIAT' - : 'CONTROLLER_V2_CONTRACT_ADDRESS' - ), + sc_address: config.get(isDev ? 'CONTROLLER_V2_CONTRACT_ADDRESS_FIAT' : 'CONTROLLER_V2_CONTRACT_ADDRESS'), sc_input_data } @@ -110,12 +97,7 @@ const ClaimNameFatFingerModal = ({ }, onPending: options => { if ('data' in options && 'tx_id' in options.data) { - onClaimTxSubmitted( - ENSName, - wallet.address, - isDev ? ChainId.ETHEREUM_SEPOLIA : ChainId.ETHEREUM_MAINNET, - options.data.tx_id as string - ) + onClaimTxSubmitted(ENSName, wallet.address, isDev ? ChainId.ETHEREUM_SEPOLIA : ChainId.ETHEREUM_MAINNET, options.data.tx_id) } }, onSuccess: options => { @@ -151,36 +133,18 @@ const ClaimNameFatFingerModal = ({ return ( <Modal name={modalName} onClose={isLoading ? undefined : onClose}> - <ModalNavigation - title={t('names_page.claim_name_fat_finger_modal.title')} - onClose={isLoading ? undefined : onClose} - /> + <ModalNavigation title={t('names_page.claim_name_fat_finger_modal.title')} onClose={isLoading ? undefined : onClose} /> <Modal.Content> <div className="details"> - <T - id="names_page.claim_name_fat_finger_modal.description" - values={{ name: <strong>{ENSName}</strong>, br: <br /> }} - /> + <T id="names_page.claim_name_fat_finger_modal.description" values={{ name: <strong>{ENSName}</strong>, br: <br /> }} /> </div> <Field - placeholder={t( - 'names_page.claim_name_fat_finger_modal.name_placeholder' - )} + placeholder={t('names_page.claim_name_fat_finger_modal.name_placeholder')} value={currentName} error={hasError} disabled={isLoading} - message={ - hasError - ? t('names_page.claim_name_fat_finger_modal.names_different') - : '' - } - children={ - <input - ref={inputRef} - value={currentName} - onChange={handleChangeName} - /> - } + message={hasError ? t('names_page.claim_name_fat_finger_modal.names_different') : ''} + children={<input ref={inputRef} value={currentName} onChange={handleChangeName} />} /> <div className="capsWarning"> <Icon name="info circle" /> diff --git a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.types.ts b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.types.ts index bbbc4725e9..f62261c0ce 100644 --- a/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.types.ts +++ b/webapp/src/components/Modals/ClaimNameFatFingerModal/ClaimNameFatFingerModal.types.ts @@ -1,19 +1,9 @@ import { Dispatch } from 'redux' import { ModalProps } from 'decentraland-dapps/dist/providers/ModalProvider/ModalProvider.types' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' -import { - OpenFiatGatewayWidgetRequestAction, - openFiatGatewayWidgetRequest -} from 'decentraland-dapps/dist/modules/gateway/actions' -import { - OpenModalAction, - openModal -} from 'decentraland-dapps/dist/modules/modal' -import { - ClaimNameRequestAction, - ClaimNameTransactionSubmittedAction, - claimNameTransactionSubmitted -} from '../../../modules/ens/actions' +import { OpenFiatGatewayWidgetRequestAction, openFiatGatewayWidgetRequest } from 'decentraland-dapps/dist/modules/gateway/actions' +import { OpenModalAction, openModal } from 'decentraland-dapps/dist/modules/modal' +import { ClaimNameRequestAction, ClaimNameTransactionSubmittedAction, claimNameTransactionSubmitted } from '../../../modules/ens/actions' export type Props = Omit<ModalProps, 'metadata'> & { wallet: Wallet | null @@ -28,13 +18,7 @@ export type Props = Omit<ModalProps, 'metadata'> & { } export type MapState = Pick<Props, 'isClaimingName' | 'wallet'> -export type MapDispatchProps = Pick< - Props, - 'onClaimTxSubmitted' | 'onOpenFiatGateway' | 'onBuyWithCrypto' -> +export type MapDispatchProps = Pick<Props, 'onClaimTxSubmitted' | 'onOpenFiatGateway' | 'onBuyWithCrypto'> export type MapDispatch = Dispatch< - | ClaimNameRequestAction - | ClaimNameTransactionSubmittedAction - | OpenFiatGatewayWidgetRequestAction - | OpenModalAction + ClaimNameRequestAction | ClaimNameTransactionSubmittedAction | OpenFiatGatewayWidgetRequestAction | OpenModalAction > diff --git a/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.container.ts b/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.container.ts index d28ae1747f..9b94e29461 100644 --- a/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.container.ts +++ b/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.container.ts @@ -3,11 +3,7 @@ import { Dispatch, bindActionCreators } from 'redux' import { RootState } from '../../../modules/reducer' import { deleteListRequest } from '../../../modules/favorites/actions' import { isLoadingDeleteList } from '../../../modules/favorites/selectors' -import { - MapDispatchProps, - MapStateProps, - OwnProps -} from './ConfirmDeleteListModal.types' +import { MapDispatchProps, MapStateProps, OwnProps } from './ConfirmDeleteListModal.types' import ConfirmDeleteListModal from './ConfirmDeleteListModal' const mapState = (state: RootState): MapStateProps => { @@ -16,10 +12,7 @@ const mapState = (state: RootState): MapStateProps => { } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => bindActionCreators( { onConfirm: () => deleteListRequest(ownProps.metadata.list) diff --git a/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.spec.tsx b/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.spec.tsx index fa35887606..ed0043e442 100644 --- a/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.spec.tsx +++ b/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.spec.tsx @@ -1,9 +1,6 @@ import { fireEvent } from '@testing-library/react' import { renderWithProviders } from '../../../utils/test' -import ConfirmDeleteListModal, { - CANCEL_DATA_TEST_ID, - CONFIRM_DATA_TEST_ID -} from './ConfirmDeleteListModal' +import ConfirmDeleteListModal, { CANCEL_DATA_TEST_ID, CONFIRM_DATA_TEST_ID } from './ConfirmDeleteListModal' import { Props } from './ConfirmDeleteListModal.types' function renderConfirmListModal(props: Partial<Props> = {}) { diff --git a/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.tsx b/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.tsx index 78edd994ee..2981cbc578 100644 --- a/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.tsx +++ b/webapp/src/components/Modals/ConfirmDeleteListModal/ConfirmDeleteListModal.tsx @@ -11,10 +11,7 @@ const ConfirmDeleteListModal = (props: Props) => { const { isLoading, onConfirm, onClose, metadata } = props const { list } = metadata - const handleClose = useMemo(() => (!isLoading ? onClose : undefined), [ - isLoading, - onClose - ]) + const handleClose = useMemo(() => (!isLoading ? onClose : undefined), [isLoading, onClose]) return ( <Modal size="tiny" onClose={handleClose}> @@ -27,20 +24,10 @@ const ConfirmDeleteListModal = (props: Props) => { /> <Modal.Content>{t('confirm_delete_list_modal.message')}</Modal.Content> <Modal.Actions> - <Button - data-testid={CANCEL_DATA_TEST_ID} - disabled={isLoading} - onClick={onClose} - > + <Button data-testid={CANCEL_DATA_TEST_ID} disabled={isLoading} onClick={onClose}> {t('global.cancel')} </Button> - <Button - primary - data-testid={CONFIRM_DATA_TEST_ID} - loading={isLoading} - disabled={isLoading} - onClick={onConfirm} - > + <Button primary data-testid={CONFIRM_DATA_TEST_ID} loading={isLoading} disabled={isLoading} onClick={onConfirm}> <Icon name="trash alternate outline" /> {t('confirm_delete_list_modal.confirm')} </Button> diff --git a/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.container.ts b/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.container.ts index 90ac9fe3c0..47f36a1dff 100644 --- a/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.container.ts +++ b/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.container.ts @@ -4,17 +4,9 @@ import { Contract } from '@dcl/schemas' import { RootState } from '../../../modules/reducer' import { acceptRentalListingRequest, clearRentalErrors } from '../../../modules/rental/actions' import { getWallet } from '../../../modules/wallet/selectors' -import { - isSubmittingTransaction, - getError, - isAcceptingRental -} from '../../../modules/rental/selectors' +import { isSubmittingTransaction, getError, isAcceptingRental } from '../../../modules/rental/selectors' import { getContract } from '../../../modules/contract/selectors' -import { - MapDispatchProps, - MapStateProps, - OwnProps -} from './ConfirmRentModal.types' +import { MapDispatchProps, MapStateProps, OwnProps } from './ConfirmRentModal.types' import ConfirmRentModal from './ConfirmRentModal' const mapState = (state: RootState): MapStateProps => { @@ -27,19 +19,11 @@ const mapState = (state: RootState): MapStateProps => { } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => { +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => { return { onSubmitTransaction: (addressOperator: string) => dispatch( - acceptRentalListingRequest( - ownProps.metadata.nft, - ownProps.metadata.rental, - ownProps.metadata.selectedPeriodIndex, - addressOperator - ) + acceptRentalListingRequest(ownProps.metadata.nft, ownProps.metadata.rental, ownProps.metadata.selectedPeriodIndex, addressOperator) ), onClearRentalErrors: () => dispatch(clearRentalErrors()) } diff --git a/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.tsx b/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.tsx index 0de80a076a..624ac1e060 100644 --- a/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.tsx +++ b/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.tsx @@ -4,14 +4,7 @@ import { Contract } from '@dcl/schemas' import { isAddress } from 'ethers/lib/utils' import add from 'date-fns/add' import format from 'date-fns/format' -import { - ModalNavigation, - Message, - Loader, - Button, - Field, - Checkbox -} from 'decentraland-ui' +import { ModalNavigation, Message, Loader, Button, Field, Checkbox } from 'decentraland-ui' import { T, t } from 'decentraland-dapps/dist/modules/translation/utils' import { Modal, withAuthorizedAction } from 'decentraland-dapps/dist/containers' import { ContractName } from 'decentraland-transactions' @@ -19,10 +12,7 @@ import { AuthorizationType } from 'decentraland-dapps/dist/modules/authorization import { AuthorizedAction } from 'decentraland-dapps/dist/containers/withAuthorizedAction/AuthorizationModal' import { formatWeiMANA } from '../../../lib/mana' import { getContractNames } from '../../../modules/vendor' -import { - getRentConfirmationStatus, - getError -} from '../../../modules/rental/selectors' +import { getRentConfirmationStatus, getError } from '../../../modules/rental/selectors' import { Mana } from '../../Mana' import { ManaField } from '../../ManaField' import { Props } from './ConfirmRentModal.types' @@ -43,17 +33,12 @@ const ConfirmRentModal = ({ }: Props) => { const [operatorAddress, setOperatorAddress] = useState(wallet?.address) const [isUserTheOperatorAddress, setIsUserTheOperatorAddress] = useState(true) - const isLoading = - isTransactionBeingConfirmed || - isSubmittingTransaction || - isLoadingAuthorization + const isLoading = isTransactionBeingConfirmed || isSubmittingTransaction || isLoadingAuthorization const [price, setPrice] = useState<string>() const startDate = new Date() const period = rental.periods[selectedPeriodIndex] const endDate = add(startDate, { days: period.maxDays }) - const pricePerRent = ethers.BigNumber.from(period.pricePerDay) - .mul(period.maxDays) - .toString() + const pricePerRent = ethers.BigNumber.from(period.pricePerDay).mul(period.maxDays).toString() const pricePerRentInEther = Number(ethers.utils.formatEther(pricePerRent)) const formattedPricePerRent = formatWeiMANA(pricePerRent) @@ -77,9 +62,7 @@ const ConfirmRentModal = ({ }, [isUserTheOperatorAddress, wallet, setIsUserTheOperatorAddress]) const hasAnInvalidOperator = - !operatorAddress || - (!!operatorAddress && !isAddress(operatorAddress)) || - operatorAddress === ethers.constants.AddressZero + !operatorAddress || (!!operatorAddress && !isAddress(operatorAddress)) || operatorAddress === ethers.constants.AddressZero const handleSubmit = useCallback(() => { if (operatorAddress && mana && rentals) { @@ -93,16 +76,8 @@ const ConfirmRentModal = ({ authorizedContractLabel: rentals.label || rentals.name, onAuthorized: () => onSubmitTransaction(operatorAddress) }) - } - }, [ - operatorAddress, - pricePerRent, - rentals, - mana, - onAuthorizedAction, - onSubmitTransaction, - onClearRentalErrors - ]) + } + }, [operatorAddress, pricePerRent, rentals, mana, onAuthorizedAction, onSubmitTransaction, onClearRentalErrors]) return ( <Modal @@ -111,10 +86,7 @@ const ConfirmRentModal = ({ name={t('rental_modal.confirm_rent_step.title')} onClose={!isLoading ? onClose : undefined} > - <ModalNavigation - title={t('rental_modal.confirm_rent_step.title')} - onClose={!isLoading ? onClose : undefined} - /> + <ModalNavigation title={t('rental_modal.confirm_rent_step.title')} onClose={!isLoading ? onClose : undefined} /> <Modal.Content> <span> <T @@ -151,61 +123,32 @@ const ConfirmRentModal = ({ setOperatorAddress(props.value) }} error={hasAnInvalidOperator} - message={ - hasAnInvalidOperator - ? t('rental_modal.confirm_rent_step.wrong_operator') - : undefined - } + message={hasAnInvalidOperator ? t('rental_modal.confirm_rent_step.wrong_operator') : undefined} /> <div className={styles.operatorCheckboxContainer}> - <Checkbox - checked={isUserTheOperatorAddress} - disabled={isLoading} - onChange={handleOperatorToggle} - /> - <span className={styles.operatorFieldNotice}> - {t('rental_modal.confirm_rent_step.operator_notice')} - </span> + <Checkbox checked={isUserTheOperatorAddress} disabled={isLoading} onChange={handleOperatorToggle} /> + <span className={styles.operatorFieldNotice}>{t('rental_modal.confirm_rent_step.operator_notice')}</span> </div> </div> - {error ? ( - <Message - error - size="tiny" - visible - content={error} - header={t('global.error')} - /> - ) : null} + {error ? <Message error size="tiny" visible content={error} header={t('global.error')} /> : null} </Modal.Content> <Modal.Actions className={styles.actions}> - <Button - className={styles.cancel} - secondary - disabled={isLoading} - onClick={onClose} - > + <Button className={styles.cancel} secondary disabled={isLoading} onClick={onClose}> {t('global.cancel')} </Button> {isLoading ? ( <div className={styles.loader}> <Loader inline size="small" /> {isSubmittingTransaction ? ( - <span className={styles.signMessage}> - {t('rental_modal.confirm_rent_step.confirm_transaction')} - </span> + <span className={styles.signMessage}>{t('rental_modal.confirm_rent_step.confirm_transaction')}</span> ) : null} </div> ) : ( <Button className={styles.cancel} primary - disabled={ - Number(price) !== pricePerRentInEther || - hasAnInvalidOperator || - isLoading - } + disabled={Number(price) !== pricePerRentInEther || hasAnInvalidOperator || isLoading} onClick={handleSubmit} > {t('global.confirm')} diff --git a/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.types.ts b/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.types.ts index 4852790a46..a1a98928a4 100644 --- a/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.types.ts +++ b/webapp/src/components/Modals/ConfirmRentModal/ConfirmRentModal.types.ts @@ -24,12 +24,5 @@ export type Props = Omit<ModalProps, 'metadata'> & { } & WithAuthorizedActionProps export type OwnProps = Pick<Props, 'metadata'> -export type MapStateProps = Pick< - Props, - | 'wallet' - | 'isTransactionBeingConfirmed' - | 'isSubmittingTransaction' - | 'error' - | 'getContract' -> +export type MapStateProps = Pick<Props, 'wallet' | 'isTransactionBeingConfirmed' | 'isSubmittingTransaction' | 'error' | 'getContract'> export type MapDispatchProps = Pick<Props, 'onSubmitTransaction' | 'onClearRentalErrors'> diff --git a/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditList.spec.tsx b/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditList.spec.tsx index b60e958f9a..19dcda269b 100644 --- a/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditList.spec.tsx +++ b/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditList.spec.tsx @@ -36,41 +36,29 @@ describe('when the create list procedure is loading', () => { beforeEach(() => { renderedModal = renderCreateListModal({ isLoading: true }) // Write something into the field so the accept button doesn't get disabled - fireEvent.change( - renderedModal.getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID) - .children[0], - { - target: { value: 'aValue' } - } - ) + fireEvent.change(renderedModal.getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0], { + target: { value: 'aValue' } + }) }) it('should render the name input as disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0] - ).toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0]).toHaveAttribute('disabled') }) it('should render the description input as disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID) - ).toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID)).toHaveAttribute('disabled') }) it('should render the checkbox input as disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID).children[0] - ).toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID).children[0]).toHaveAttribute('disabled') }) it('should render the accept button as disabled and loading', () => { const { getByTestId } = renderedModal - const acceptButton = getByTestId( - CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID - ) + const acceptButton = getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID) expect(acceptButton).toHaveAttribute('disabled') expect(acceptButton).toHaveClass('loading') @@ -78,9 +66,7 @@ describe('when the create list procedure is loading', () => { it('should render the cancel button as disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_CANCEL_BUTTON_DATA_TEST_ID) - ).toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_CANCEL_BUTTON_DATA_TEST_ID)).toHaveAttribute('disabled') }) }) @@ -90,41 +76,29 @@ describe('when the create list procedure is not loading', () => { beforeEach(() => { renderedModal = renderCreateListModal({ isLoading: false }) // Write something into the field so the accept button doesn't get disabled - fireEvent.change( - renderedModal.getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID) - .children[0], - { - target: { value: 'aValue' } - } - ) + fireEvent.change(renderedModal.getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0], { + target: { value: 'aValue' } + }) }) it('should render the name input as not disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0] - ).not.toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0]).not.toHaveAttribute('disabled') }) it('should render the description input as not disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID) - ).not.toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID)).not.toHaveAttribute('disabled') }) it('should render the checkbox input as not disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID).children[0] - ).not.toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID).children[0]).not.toHaveAttribute('disabled') }) it('should render the accept button as not disabled nor loading', () => { const { getByTestId } = renderedModal - const acceptButton = getByTestId( - CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID - ) + const acceptButton = getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID) expect(acceptButton).not.toHaveClass('loading') expect(acceptButton).not.toHaveAttribute('disabled') @@ -132,9 +106,7 @@ describe('when the create list procedure is not loading', () => { it('should render the cancel button as not disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_CANCEL_BUTTON_DATA_TEST_ID) - ).not.toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_CANCEL_BUTTON_DATA_TEST_ID)).not.toHaveAttribute('disabled') }) }) @@ -186,15 +158,10 @@ describe('when clicking the accept button', () => { metadata: { list } }) const { getByTestId } = renderedModal - fireEvent.change( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0], - { - target: { value: 'anotherListName' } - } - ) - fireEvent.click( - getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID) - ) + fireEvent.change(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0], { + target: { value: 'anotherListName' } + }) + fireEvent.click(getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID)) }) it('should call the onEditList prop function with the input values', () => { @@ -210,24 +177,14 @@ describe('when clicking the accept button', () => { beforeEach(() => { renderedModal = renderCreateListModal({ onCreateList, onEditList }) const { getByTestId } = renderedModal - fireEvent.change( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0], - { - target: { value: name } - } - ) - fireEvent.change( - getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID), - { - target: { value: description } - } - ) - fireEvent.click( - getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID).children[0] - ) - fireEvent.click( - getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID) - ) + fireEvent.change(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0], { + target: { value: name } + }) + fireEvent.change(getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID), { + target: { value: description } + }) + fireEvent.click(getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID).children[0]) + fireEvent.click(getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID)) }) it('should call the onCreateList prop function with the input values', () => { @@ -249,9 +206,7 @@ describe('when the name input is empty', () => { it('should render the accept button as disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID) - ).toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID)).toHaveAttribute('disabled') }) }) @@ -264,12 +219,8 @@ describe('when the name input is focused', () => { it('should render the max length info message', () => { const { getByTestId } = renderedModal - fireEvent.focusIn( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0] - ) - expect( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).nextSibling - ).toHaveTextContent('List names can contain up to 32 characters') + fireEvent.focusIn(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0]) + expect(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).nextSibling).toHaveTextContent('List names can contain up to 32 characters') }) }) @@ -282,15 +233,11 @@ describe('when the name input is blurred', () => { it('should not render the max length info message', () => { const { getByTestId } = renderedModal - fireEvent.focusIn( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0] + fireEvent.focusIn(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0]) + fireEvent.focusOut(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0]) + expect(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).nextSibling).not.toHaveTextContent( + 'List names can contain up to 32 characters' ) - fireEvent.focusOut( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0] - ) - expect( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).nextSibling - ).not.toHaveTextContent('List names can contain up to 32 characters') }) }) @@ -304,9 +251,9 @@ describe('when the description input is focused', () => { it('should render the max length info message', () => { const { getByTestId } = renderedModal fireEvent.focusIn(getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID)) - expect( - getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID).nextSibling - ).toHaveTextContent('List descriptions can contain up to 100 characters') + expect(getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID).nextSibling).toHaveTextContent( + 'List descriptions can contain up to 100 characters' + ) }) }) @@ -320,12 +267,8 @@ describe('when the description input is blurred', () => { it('should not render the max length info message', () => { const { getByTestId } = renderedModal fireEvent.focusIn(getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID)) - fireEvent.focusOut( - getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID) - ) - expect( - getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID).nextSibling - ).not.toHaveTextContent( + fireEvent.focusOut(getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID)) + expect(getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID).nextSibling).not.toHaveTextContent( 'List descriptions can contain up to 100 characters' ) }) @@ -342,9 +285,7 @@ describe('when error is a duplicated name error', () => { it('should render the name input with an error message', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).nextSibling - ).toHaveTextContent( + expect(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).nextSibling).toHaveTextContent( 'This name is already in use for another of your lists. Choose a different name.' ) }) @@ -358,9 +299,7 @@ describe('when the list name is not set', () => { it('should render the accept button disabled', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID) - ).toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID)).toHaveAttribute('disabled') }) }) @@ -385,43 +324,31 @@ describe('when the component is rendered with a list', () => { it('should populate the name input with the list name', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0] - ).toHaveValue(list.name) + expect(getByTestId(CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID).children[0]).toHaveValue(list.name) }) it('should populate the description input with the list description', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID) - ).toHaveTextContent(list.description ?? '') + expect(getByTestId(CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID)).toHaveTextContent(list.description ?? '') }) it('should populate the checkbox input with the list isPrivate value', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID).children[0] - ).toHaveAttribute('checked') + expect(getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID).children[0]).toHaveAttribute('checked') }) it('should render the confirm button as "Save"', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID) - ).toHaveTextContent('Save') + expect(getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID)).toHaveTextContent('Save') }) it('should render the checkbox label with the edit message', () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID) - ).toHaveTextContent(t('create_or_edit_list_modal.edit.private')) + expect(getByTestId(CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID)).toHaveTextContent(t('create_or_edit_list_modal.edit.private')) }) it("should render the accept button disabled as the list's properties didn't change", () => { const { getByTestId } = renderedModal - expect( - getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID) - ).toHaveAttribute('disabled') + expect(getByTestId(CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID)).toHaveAttribute('disabled') }) }) diff --git a/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.container.ts b/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.container.ts index 044561c9a7..33986e8b21 100644 --- a/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.container.ts +++ b/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.container.ts @@ -1,44 +1,25 @@ import { connect } from 'react-redux' import { Dispatch, bindActionCreators } from 'redux' import { RootState } from '../../../modules/reducer' -import { - createListClear, - createListRequest, - updateListRequest -} from '../../../modules/favorites/actions' -import { - isLoadingCreateList, - getError, - isLoadingUpdateList -} from '../../../modules/favorites/selectors' +import { createListClear, createListRequest, updateListRequest } from '../../../modules/favorites/actions' +import { isLoadingCreateList, getError, isLoadingUpdateList } from '../../../modules/favorites/selectors' import { CreateListParameters } from '../../../modules/favorites/types' -import { - MapDispatchProps, - MapStateProps, - OwnProps -} from './CreateOrEditListModal.types' +import { MapDispatchProps, MapStateProps, OwnProps } from './CreateOrEditListModal.types' import CreateListModal from './CreateOrEditListModal' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { return { - isLoading: - ownProps.metadata?.isLoading ?? - (isLoadingCreateList(state) || isLoadingUpdateList(state)), + isLoading: ownProps.metadata?.isLoading ?? (isLoadingCreateList(state) || isLoadingUpdateList(state)), error: ownProps.metadata?.error ?? getError(state) } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => ({ onClose: () => { dispatch(createListClear()) return ownProps.onClose() }, - onCreateList: - ownProps.metadata?.onCreateList ?? - ((params: CreateListParameters) => dispatch(createListRequest(params))), + onCreateList: ownProps.metadata?.onCreateList ?? ((params: CreateListParameters) => dispatch(createListRequest(params))), ...bindActionCreators({ onEditList: updateListRequest }, dispatch) }) diff --git a/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.tsx b/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.tsx index 893476c798..b90fbf786e 100644 --- a/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.tsx +++ b/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.tsx @@ -1,14 +1,7 @@ import React, { useCallback, useState } from 'react' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { Modal } from 'decentraland-dapps/dist/containers' -import { - Button, - Checkbox, - Field, - Message, - ModalNavigation, - TextAreaField -} from 'decentraland-ui' +import { Button, Checkbox, Field, Message, ModalNavigation, TextAreaField } from 'decentraland-ui' import { InfoTooltip } from '../../InfoTooltip' import styles from './CreateOrEditListModal.module.css' import { Props } from './CreateOrEditListModal.types' @@ -17,67 +10,31 @@ const MAX_NAME_LENGTH = 32 const MAX_DESCRIPTION_LENGTH = 100 const DUPLICATED_ERROR = 'There is already a list with the same name' export const CREATE_OR_EDIT_LIST_NAME_DATA_TEST_ID = 'create-or-edit-list-name' -export const CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID = - 'create-or-edit-list-description' -export const CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID = - 'create-or-edit-list-private' -export const CREATE_OR_EDIT_LIST_CANCEL_BUTTON_DATA_TEST_ID = - 'create-or-edit-list-cancel-button' -export const CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID = - 'create-or-edit-list-accept-button' +export const CREATE_OR_EDIT_LIST_DESCRIPTION_DATA_TEST_ID = 'create-or-edit-list-description' +export const CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID = 'create-or-edit-list-private' +export const CREATE_OR_EDIT_LIST_CANCEL_BUTTON_DATA_TEST_ID = 'create-or-edit-list-cancel-button' +export const CREATE_OR_EDIT_LIST_ACCEPT_BUTTON_DATA_TEST_ID = 'create-or-edit-list-accept-button' -const CreateOrEditListModal = ({ - onClose, - isLoading, - onCreateList, - onEditList, - metadata, - error -}: Props) => { +const CreateOrEditListModal = ({ onClose, isLoading, onCreateList, onEditList, metadata, error }: Props) => { const list = metadata?.list const [name, setName] = useState(list?.name ?? '') const [description, setDescription] = useState(list?.description ?? '') const [isPrivate, setIsPrivate] = useState(list?.isPrivate ?? false) const [showMaxLengthNameInfo, setShowMaxLengthNameInfo] = useState(false) - const [ - showMaxLengthDescriptionInfo, - setShowMaxLengthDescriptionInfo - ] = useState(false) + const [showMaxLengthDescriptionInfo, setShowMaxLengthDescriptionInfo] = useState(false) const handleCreateOrEditList = useCallback( - () => - list - ? onEditList(list.id, { name, description, isPrivate }) - : onCreateList({ name, description, isPrivate }), + () => (list ? onEditList(list.id, { name, description, isPrivate }) : onCreateList({ name, description, isPrivate })), [list, onEditList, name, description, isPrivate, onCreateList] ) - const handleNameChange = useCallback( - (_event, props) => setName(props.value), - [setName] - ) - const handleDescriptionChange = useCallback( - (_event, props) => setDescription(props.value), - [setDescription] - ) - const handleIsOPrivateChange = useCallback( - (_event, props) => setIsPrivate(props.checked), - [setIsPrivate] - ) - const handleNameFocus = useCallback(() => setShowMaxLengthNameInfo(true), [ - setShowMaxLengthNameInfo - ]) - const handleNameBlur = useCallback(() => setShowMaxLengthNameInfo(false), [ - setShowMaxLengthNameInfo - ]) - const handleDescriptionFocus = useCallback( - () => setShowMaxLengthDescriptionInfo(true), - [setShowMaxLengthDescriptionInfo] - ) - const handleDescriptionBlur = useCallback( - () => setShowMaxLengthDescriptionInfo(false), - [setShowMaxLengthDescriptionInfo] - ) + const handleNameChange = useCallback((_event, props) => setName(props.value), [setName]) + const handleDescriptionChange = useCallback((_event, props) => setDescription(props.value), [setDescription]) + const handleIsOPrivateChange = useCallback((_event, props) => setIsPrivate(props.checked), [setIsPrivate]) + const handleNameFocus = useCallback(() => setShowMaxLengthNameInfo(true), [setShowMaxLengthNameInfo]) + const handleNameBlur = useCallback(() => setShowMaxLengthNameInfo(false), [setShowMaxLengthNameInfo]) + const handleDescriptionFocus = useCallback(() => setShowMaxLengthDescriptionInfo(true), [setShowMaxLengthDescriptionInfo]) + const handleDescriptionBlur = useCallback(() => setShowMaxLengthDescriptionInfo(false), [setShowMaxLengthDescriptionInfo]) const handleClose = useCallback(() => { if (!isLoading) { onClose() @@ -85,20 +42,12 @@ const CreateOrEditListModal = ({ }, [isLoading, onClose]) const isNameDuplicatedError = error?.includes(DUPLICATED_ERROR) - const listChanged = list - ? name !== list.name || - description !== list.description || - isPrivate !== list.isPrivate - : false + const listChanged = list ? name !== list.name || description !== list.description || isPrivate !== list.isPrivate : false return ( <Modal size="tiny" className={styles.modal} onClose={handleClose}> <ModalNavigation - title={ - list - ? t('create_or_edit_list_modal.edit.title') - : t('create_or_edit_list_modal.create.title') - } + title={list ? t('create_or_edit_list_modal.edit.title') : t('create_or_edit_list_modal.create.title')} onClose={handleClose} /> <Modal.Content className={styles.content}> @@ -151,13 +100,8 @@ const CreateOrEditListModal = ({ checked={isPrivate} label={ <label> - {list - ? t('create_or_edit_list_modal.edit.private') - : t('create_or_edit_list_modal.create.private')} - <InfoTooltip - className={styles.privatePopup} - content={t('create_or_edit_list_modal.info.private')} - /> + {list ? t('create_or_edit_list_modal.edit.private') : t('create_or_edit_list_modal.create.private')} + <InfoTooltip className={styles.privatePopup} content={t('create_or_edit_list_modal.info.private')} /> </label> } data-testid={CREATE_OR_EDIT_LIST_PRIVATE_DATA_TEST_ID} @@ -165,15 +109,7 @@ const CreateOrEditListModal = ({ className={styles.checkbox} onChange={handleIsOPrivateChange} /> - {error && !isNameDuplicatedError ? ( - <Message - error - size="tiny" - visible - content={error} - header={t('global.error')} - /> - ) : null} + {error && !isNameDuplicatedError ? <Message error size="tiny" visible content={error} header={t('global.error')} /> : null} </Modal.Content> <Modal.Actions> <Button @@ -186,12 +122,7 @@ const CreateOrEditListModal = ({ > {list ? t('global.save') : t('global.create')} </Button> - <Button - onClick={handleClose} - data-testid={CREATE_OR_EDIT_LIST_CANCEL_BUTTON_DATA_TEST_ID} - disabled={isLoading} - fluid - > + <Button onClick={handleClose} data-testid={CREATE_OR_EDIT_LIST_CANCEL_BUTTON_DATA_TEST_ID} disabled={isLoading} fluid> {t('global.cancel')} </Button> </Modal.Actions> diff --git a/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.types.ts b/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.types.ts index 9356831dc2..41946ec413 100644 --- a/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.types.ts +++ b/webapp/src/components/Modals/CreateOrEditListModal/CreateOrEditListModal.types.ts @@ -15,12 +15,7 @@ export type Props = Omit<ModalProps, 'metadata'> & { } export type OwnProps = Pick<Props, 'metadata' | 'onClose'> -export type MapDispatchProps = Pick< - Props, - 'onCreateList' | 'onEditList' | 'onClose' -> +export type MapDispatchProps = Pick<Props, 'onCreateList' | 'onEditList' | 'onClose'> export type MapStateProps = Pick<Props, 'isLoading' | 'error'> -export type OverrideCreateListTypes = Partial< - Pick<Props, 'isLoading' | 'error' | 'onCreateList'> -> +export type OverrideCreateListTypes = Partial<Pick<Props, 'isLoading' | 'error' | 'onCreateList'>> diff --git a/webapp/src/components/Modals/ExpiredListingsModal/ExpiredListingsModal.tsx b/webapp/src/components/Modals/ExpiredListingsModal/ExpiredListingsModal.tsx index 5974d01acb..303c02eb78 100644 --- a/webapp/src/components/Modals/ExpiredListingsModal/ExpiredListingsModal.tsx +++ b/webapp/src/components/Modals/ExpiredListingsModal/ExpiredListingsModal.tsx @@ -1,13 +1,7 @@ import { useCallback, useEffect, useState } from 'react' import { Link } from 'react-router-dom' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - Modal, - Button, - ModalNavigation, - useTabletAndBelowMediaQuery, - Icon -} from 'decentraland-ui' +import { Modal, Button, ModalNavigation, useTabletAndBelowMediaQuery, Icon } from 'decentraland-ui' import * as decentraland from '../../../modules/vendor/decentraland' import { locations } from '../../../modules/routing/locations' import { EXPIRED_LISTINGS_MODAL_KEY } from '../../../modules/ui/utils' @@ -26,9 +20,7 @@ export const ExpiredListingsModal = () => { const isTabletOrBelow = useTabletAndBelowMediaQuery() const [isOpen, setIsOpen] = useState<boolean>(true) useEffect(() => { - setIsOpen( - !localStorage.getItem(EXPIRED_LISTINGS_MODAL_KEY) && !isTabletOrBelow - ) + setIsOpen(!localStorage.getItem(EXPIRED_LISTINGS_MODAL_KEY) && !isTabletOrBelow) }, [isTabletOrBelow]) return ( @@ -39,16 +31,10 @@ export const ExpiredListingsModal = () => { onClose={onClose} dimmer={{ className: styles.dimmerRemover }} > - <ModalNavigation - title={t('expired_listings_modal.title')} - onClose={onClose} - /> + <ModalNavigation title={t('expired_listings_modal.title')} onClose={onClose} /> <Modal.Content className={styles.content}> <div className={styles.warningIconContainer}> - <Icon - name="exclamation triangle" - className={styles.warningExpiration} - /> + <Icon name="exclamation triangle" className={styles.warningExpiration} /> </div> <Modal.Description> <div className={styles.modalDescription}> diff --git a/webapp/src/components/Modals/FTU/SmartWearablesLaunchModal/SmartWearablesLaunchModal.tsx b/webapp/src/components/Modals/FTU/SmartWearablesLaunchModal/SmartWearablesLaunchModal.tsx index 08e024d956..f38afa02ae 100644 --- a/webapp/src/components/Modals/FTU/SmartWearablesLaunchModal/SmartWearablesLaunchModal.tsx +++ b/webapp/src/components/Modals/FTU/SmartWearablesLaunchModal/SmartWearablesLaunchModal.tsx @@ -1,11 +1,6 @@ import { useCallback, useEffect, useState } from 'react' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - Modal, - Button, - ModalNavigation, - useTabletAndBelowMediaQuery -} from 'decentraland-ui' +import { Modal, Button, ModalNavigation, useTabletAndBelowMediaQuery } from 'decentraland-ui' import { Link } from 'react-router-dom' import { Section } from '../../../../modules/vendor/decentraland' import { AssetType } from '../../../../modules/asset/types' @@ -17,10 +12,7 @@ import styles from './SmartWearablesLaunchModal.module.css' const SMARTS_WEARABLES_PROMO_POPUP_KEY = 'smart-wearables-intro-popup-key' -export const SmartWearablesLaunchModal = ({ - isSmartWearablesFTUEnabled, - isLoadingFeatureFlags -}: Props) => { +export const SmartWearablesLaunchModal = ({ isSmartWearablesFTUEnabled, isLoadingFeatureFlags }: Props) => { const [isOpen, setIsOpen] = useState<boolean>(false) const isTabletOrBelow = useTabletAndBelowMediaQuery() @@ -35,11 +27,7 @@ export const SmartWearablesLaunchModal = ({ const onLearnMore = useCallback(() => { markAsSeen() - window.open( - 'https://decentraland.org/blog/announcements/smart-wearables-and-portable-experiences', - '_blank', - 'noopener noreferrer' - ) + window.open('https://decentraland.org/blog/announcements/smart-wearables-and-portable-experiences', '_blank', 'noopener noreferrer') }, [markAsSeen]) useEffect(() => { @@ -61,19 +49,9 @@ export const SmartWearablesLaunchModal = ({ onClose={onClose} dimmer={{ className: styles.dimmerRemover }} > - <ModalNavigation - title={t('smart_wearables_ftu_modal.title')} - onClose={onClose} - /> + <ModalNavigation title={t('smart_wearables_ftu_modal.title')} onClose={onClose} /> <Modal.Content className={styles.content}> - <video - autoPlay - loop - className={styles.video} - src={`${process.env.VITE_BASE_URL}/smart-wearables-ftu.mp4`} - preload="auto" - muted - /> + <video autoPlay loop className={styles.video} src={`${process.env.VITE_BASE_URL}/smart-wearables-ftu.mp4`} preload="auto" muted /> <Modal.Description> <div className={styles.description}> {t('smart_wearables_ftu_modal.description', { diff --git a/webapp/src/components/Modals/FTU/SmartWearablesLaunchModal/SmartWearablesLaunchModal.types.ts b/webapp/src/components/Modals/FTU/SmartWearablesLaunchModal/SmartWearablesLaunchModal.types.ts index 84f8128792..13a6144cc3 100644 --- a/webapp/src/components/Modals/FTU/SmartWearablesLaunchModal/SmartWearablesLaunchModal.types.ts +++ b/webapp/src/components/Modals/FTU/SmartWearablesLaunchModal/SmartWearablesLaunchModal.types.ts @@ -3,7 +3,4 @@ export type Props = { isSmartWearablesFTUEnabled: boolean } -export type MapStateProps = Pick< - Props, - 'isSmartWearablesFTUEnabled' | 'isLoadingFeatureFlags' -> +export type MapStateProps = Pick<Props, 'isSmartWearablesFTUEnabled' | 'isLoadingFeatureFlags'> diff --git a/webapp/src/components/Modals/FavoritesModal/FavoritesModal.spec.tsx b/webapp/src/components/Modals/FavoritesModal/FavoritesModal.spec.tsx index 810983f4a3..a161f57c16 100644 --- a/webapp/src/components/Modals/FavoritesModal/FavoritesModal.spec.tsx +++ b/webapp/src/components/Modals/FavoritesModal/FavoritesModal.spec.tsx @@ -20,20 +20,11 @@ const itemId = 'anItemId' const identity = {} as AuthIdentity function renderFavoritesModal(props: Partial<Props> = {}) { - return renderWithProviders( - <FavoritesModal - name={'A name'} - metadata={{ itemId }} - identity={identity} - onClose={jest.fn()} - {...props} - />, - { - preloadedState: { - modal: {} - } + return renderWithProviders(<FavoritesModal name={'A name'} metadata={{ itemId }} identity={identity} onClose={jest.fn()} {...props} />, { + preloadedState: { + modal: {} } - ) + }) } describe('when loading the component', () => { @@ -41,10 +32,7 @@ describe('when loading the component', () => { addresses: string[] total: number } - let apiFetchPromiseResolve: (value: { - addresses: string[] - total: number - }) => void + let apiFetchPromiseResolve: (value: { addresses: string[]; total: number }) => void let apiFetchPromiseReject: (error: Error) => void beforeEach(() => { @@ -56,9 +44,7 @@ describe('when loading the component', () => { apiFetchPromiseReject = reject }) - jest - .spyOn(FavoritesAPI.prototype, 'getWhoFavoritedAnItem') - .mockReturnValue(apiFetchPromise) + jest.spyOn(FavoritesAPI.prototype, 'getWhoFavoritedAnItem').mockReturnValue(apiFetchPromise) }) describe('and there are favorites for the item id', () => { @@ -69,19 +55,11 @@ describe('when loading the component', () => { it('should fetch the first batch of favorites showing the loader in the process and not show the empty component', async () => { const { getByTestId, queryByText } = renderFavoritesModal() - expect(FavoritesAPI.prototype.getWhoFavoritedAnItem).toHaveBeenCalledWith( - itemId, - 100, - 0 - ) + expect(FavoritesAPI.prototype.getWhoFavoritedAnItem).toHaveBeenCalledWith(itemId, 100, 0) apiFetchPromiseResolve(apiResponse) - await waitForElementToBeRemoved(() => - getByTestId('favorites-modal-loader') - ) - expect( - queryByText('Users have not saved this item') - ).not.toBeInTheDocument() + await waitForElementToBeRemoved(() => getByTestId('favorites-modal-loader')) + expect(queryByText('Users have not saved this item')).not.toBeInTheDocument() }) }) @@ -92,15 +70,9 @@ describe('when loading the component', () => { it('should fetch the first batch of favorites showing the loader in the process and then show the empty component', async () => { const { getByTestId, getByText } = renderFavoritesModal() - expect(FavoritesAPI.prototype.getWhoFavoritedAnItem).toHaveBeenCalledWith( - itemId, - 100, - 0 - ) + expect(FavoritesAPI.prototype.getWhoFavoritedAnItem).toHaveBeenCalledWith(itemId, 100, 0) apiFetchPromiseResolve(apiResponse) - await waitForElementToBeRemoved(() => - getByTestId('favorites-modal-loader') - ) + await waitForElementToBeRemoved(() => getByTestId('favorites-modal-loader')) expect(getByText('Users have not saved this item')).toBeInTheDocument() }) }) @@ -109,9 +81,7 @@ describe('when loading the component', () => { it('should remove the loader and show an error message', async () => { const { getByTestId, getByText } = renderFavoritesModal() apiFetchPromiseReject(new Error('An error')) - await waitForElementToBeRemoved(() => - getByTestId('favorites-modal-loader') - ) + await waitForElementToBeRemoved(() => getByTestId('favorites-modal-loader')) expect(getByText('An error')).toBeInTheDocument() }) }) diff --git a/webapp/src/components/Modals/FavoritesModal/FavoritesModal.tsx b/webapp/src/components/Modals/FavoritesModal/FavoritesModal.tsx index 84d9d49c74..698fd3678b 100644 --- a/webapp/src/components/Modals/FavoritesModal/FavoritesModal.tsx +++ b/webapp/src/components/Modals/FavoritesModal/FavoritesModal.tsx @@ -2,20 +2,11 @@ import React, { useCallback, useState, useEffect, useMemo } from 'react' import { FixedSizeList } from 'react-window' import InfiniteLoader from 'react-window-infinite-loader' import AutoSizer from 'react-virtualized-auto-sizer' -import { - ModalNavigation, - Message, - useMobileMediaQuery, - Empty, - Loader -} from 'decentraland-ui' +import { ModalNavigation, Message, useMobileMediaQuery, Empty, Loader } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { Modal } from 'decentraland-dapps/dist/containers' import { isErrorWithMessage } from '../../../lib/error' -import { - FavoritesAPI, - MARKETPLACE_FAVORITES_SERVER_URL -} from '../../../modules/vendor/decentraland/favorites' +import { FavoritesAPI, MARKETPLACE_FAVORITES_SERVER_URL } from '../../../modules/vendor/decentraland/favorites' import { retryParams } from '../../../modules/vendor/decentraland/utils' import { LinkedProfile } from '../../LinkedProfile' import { Props } from './FavoritesModal.types' @@ -47,20 +38,14 @@ const FavoritesModal = ({ metadata: { itemId }, identity, onClose }: Props) => { async (startIndex: number, stopIndex: number) => { setIsLoading(true) try { - const result = await favoritesAPI.getWhoFavoritedAnItem( - itemId, - stopIndex - startIndex, - startIndex - ) + const result = await favoritesAPI.getWhoFavoritedAnItem(itemId, stopIndex - startIndex, startIndex) setFavorites({ addresses: favorites.addresses.concat(result.addresses), total: result.total }) } catch (error) { - setError( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) + setError(isErrorWithMessage(error) ? error.message : t('global.unknown_error')) } finally { setIsLoading(false) } @@ -100,51 +85,28 @@ const FavoritesModal = ({ metadata: { itemId }, identity, onClose }: Props) => { }, []) // Makes the modal dynamic in size. - const desktopHeight = - favorites.addresses.length * ITEM_HEIGHT > 500 - ? 500 - : favorites.addresses.length * ITEM_HEIGHT + const desktopHeight = favorites.addresses.length * ITEM_HEIGHT > 500 ? 500 : favorites.addresses.length * ITEM_HEIGHT return ( - <Modal - size="small" - className={styles.modal} - onClose={!isLoading ? onClose : undefined} - > - <ModalNavigation - title={t('favorites_modal.title')} - onClose={!isLoading ? onClose : undefined} - data-testid="favorites-modal" - /> + <Modal size="small" className={styles.modal} onClose={!isLoading ? onClose : undefined}> + <ModalNavigation title={t('favorites_modal.title')} onClose={!isLoading ? onClose : undefined} data-testid="favorites-modal" /> <Modal.Content className={styles.content}> <> <div>{t('favorites_modal.disclaimer')}</div> {isLoading && favorites.addresses.length === 0 ? ( - <div - data-testid="favorites-modal-loader" - className={styles.loading} - > + <div data-testid="favorites-modal-loader" className={styles.loading}> <Loader inline size="medium" active /> <span>{t('global.loading')}...</span> </div> ) : null} - {!isLoading && favorites.addresses.length === 0 ? ( - <Empty className={styles.empty}>{t('favorites_modal.empty')}</Empty> - ) : null} + {!isLoading && favorites.addresses.length === 0 ? <Empty className={styles.empty}>{t('favorites_modal.empty')}</Empty> : null} {favorites.addresses.length !== 0 ? ( <> <div className={styles.separator}></div> - <div - className={styles.favoritesList} - style={{ height: !isMobile ? desktopHeight : undefined }} - > + <div className={styles.favoritesList} style={{ height: !isMobile ? desktopHeight : undefined }}> <AutoSizer> {({ height, width }) => ( - <InfiniteLoader - isItemLoaded={isItemLoaded} - itemCount={favorites.total} - loadMoreItems={fetchNextPage} - > + <InfiniteLoader isItemLoaded={isItemLoaded} itemCount={favorites.total} loadMoreItems={fetchNextPage}> {({ onItemsRendered, ref }) => ( <FixedSizeList itemCount={favorites.total} @@ -163,15 +125,7 @@ const FavoritesModal = ({ metadata: { itemId }, identity, onClose }: Props) => { </div> </> ) : null} - {error ? ( - <Message - error - size="tiny" - visible - content={error} - header={t('global.error')} - /> - ) : null} + {error ? <Message error size="tiny" visible content={error} header={t('global.error')} /> : null} </> </Modal.Content> </Modal> diff --git a/webapp/src/components/Modals/LeavingSiteModal/LeavingSiteModal.tsx b/webapp/src/components/Modals/LeavingSiteModal/LeavingSiteModal.tsx index cfa4fd725f..6e97126f64 100644 --- a/webapp/src/components/Modals/LeavingSiteModal/LeavingSiteModal.tsx +++ b/webapp/src/components/Modals/LeavingSiteModal/LeavingSiteModal.tsx @@ -33,14 +33,7 @@ const BuyWithCardExplanationModal = ({ </Modal.Content> <Modal.Actions> <Button onClick={onClose}>{t('global.cancel')}</Button> - <Button - primary - as="a" - href={url} - target="_blank" - rel="noopener noreferrer" - onClick={onClose} - > + <Button primary as="a" href={url} target="_blank" rel="noopener noreferrer" onClick={onClose}> {t('global.proceed')} </Button> </Modal.Actions> diff --git a/webapp/src/components/Modals/LeavingSiteModal/LeavingSiteModal.types.ts b/webapp/src/components/Modals/LeavingSiteModal/LeavingSiteModal.types.ts index 992a970bdc..60548cf5b3 100644 --- a/webapp/src/components/Modals/LeavingSiteModal/LeavingSiteModal.types.ts +++ b/webapp/src/components/Modals/LeavingSiteModal/LeavingSiteModal.types.ts @@ -1,9 +1,6 @@ import { Dispatch } from 'redux' import { ModalProps } from 'decentraland-dapps/dist/providers/ModalProvider/ModalProvider.types' -import { - openTransak, - OpenTransakAction -} from '../../../modules/transak/actions' +import { openTransak, OpenTransakAction } from '../../../modules/transak/actions' import { NFT } from '../../../modules/nft/types' export type Metadata = { diff --git a/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.container.ts b/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.container.ts index ddda20cc6a..dd459707c5 100644 --- a/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.container.ts +++ b/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.container.ts @@ -2,19 +2,13 @@ import { connect } from 'react-redux' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { FETCH_APPLICATION_FEATURES_REQUEST } from 'decentraland-dapps/dist/modules/features/actions' import { RootState } from '../../../modules/reducer' -import { - getIsMarketplaceLaunchPopupEnabled, - isLoadingFeatureFlags -} from '../../../modules/features/selectors' +import { getIsMarketplaceLaunchPopupEnabled, isLoadingFeatureFlags } from '../../../modules/features/selectors' import { MapStateProps } from './ListsLaunchModal.types' import { ListsLaunchModal } from './ListsLaunchModal' const mapState = (state: RootState): MapStateProps => { return { - isLoadingFeatureFlags: isLoadingType( - isLoadingFeatureFlags(state), - FETCH_APPLICATION_FEATURES_REQUEST - ), + isLoadingFeatureFlags: isLoadingType(isLoadingFeatureFlags(state), FETCH_APPLICATION_FEATURES_REQUEST), isListsLaunchPopupEnabled: getIsMarketplaceLaunchPopupEnabled(state) } } diff --git a/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.tsx b/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.tsx index 42fc4d7968..5a68466b34 100644 --- a/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.tsx +++ b/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.tsx @@ -1,11 +1,6 @@ import { useCallback, useEffect, useState } from 'react' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - Modal, - Button, - ModalNavigation, - useTabletAndBelowMediaQuery -} from 'decentraland-ui' +import { Modal, Button, ModalNavigation, useTabletAndBelowMediaQuery } from 'decentraland-ui' import { Link } from 'react-router-dom' import * as decentraland from '../../../modules/vendor/decentraland' import { AssetType } from '../../../modules/asset/types' @@ -17,10 +12,7 @@ import styles from './ListsLaunchModal.module.css' const LISTS_PROMO_POPUP_KEY = 'lists-intro-popup-key' -export const ListsLaunchModal = ({ - isListsLaunchPopupEnabled, - isLoadingFeatureFlags -}: Props) => { +export const ListsLaunchModal = ({ isListsLaunchPopupEnabled, isLoadingFeatureFlags }: Props) => { const onClose = useCallback(() => { localStorage.setItem(LISTS_PROMO_POPUP_KEY, 'true') setIsOpen(false) @@ -36,22 +28,11 @@ export const ListsLaunchModal = ({ const isTabletOrBelow = useTabletAndBelowMediaQuery() const [isOpen, setIsOpen] = useState<boolean>(false) useEffect(() => { - setIsOpen( - !localStorage.getItem(LISTS_PROMO_POPUP_KEY) && - hasLoadedInitialFlags && - isListsLaunchPopupEnabled && - !isTabletOrBelow - ) + setIsOpen(!localStorage.getItem(LISTS_PROMO_POPUP_KEY) && hasLoadedInitialFlags && isListsLaunchPopupEnabled && !isTabletOrBelow) }, [hasLoadedInitialFlags, isListsLaunchPopupEnabled, isTabletOrBelow]) return ( - <Modal - className={styles.ListsLaunchModal} - open={isOpen} - size={'small'} - onClose={onClose} - dimmer={{ className: styles.dimmerRemover }} - > + <Modal className={styles.ListsLaunchModal} open={isOpen} size={'small'} onClose={onClose} dimmer={{ className: styles.dimmerRemover }}> <ModalNavigation title={t('lists_ftu.title')} onClose={onClose} /> <Modal.Content className={styles.content}> <div className={styles.listsLogo}></div> @@ -81,14 +62,7 @@ export const ListsLaunchModal = ({ > {t('lists_ftu.explore_collectibles')} </Button> - <Button - as={Link} - inverted - to={locations.lists()} - onClick={onClose} - fluid - primary - > + <Button as={Link} inverted to={locations.lists()} onClick={onClose} fluid primary> {t('lists_ftu.view_my_lists')} </Button> </Modal.Actions> diff --git a/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.types.ts b/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.types.ts index d66d249a4f..cefe34f7a8 100644 --- a/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.types.ts +++ b/webapp/src/components/Modals/ListsLaunchModal/ListsLaunchModal.types.ts @@ -3,8 +3,5 @@ export type Props = { isLoadingFeatureFlags: boolean } -export type MapStateProps = Pick< - Props, - 'isListsLaunchPopupEnabled' | 'isLoadingFeatureFlags' -> +export type MapStateProps = Pick<Props, 'isListsLaunchPopupEnabled' | 'isLoadingFeatureFlags'> export type MapDispatchProps = {} diff --git a/webapp/src/components/Modals/RemoveRentalModal/RemoveRentalModal.container.ts b/webapp/src/components/Modals/RemoveRentalModal/RemoveRentalModal.container.ts index 742d542577..c4a73d4386 100644 --- a/webapp/src/components/Modals/RemoveRentalModal/RemoveRentalModal.container.ts +++ b/webapp/src/components/Modals/RemoveRentalModal/RemoveRentalModal.container.ts @@ -2,16 +2,8 @@ import { connect } from 'react-redux' import { Dispatch } from 'redux' import { RootState } from '../../../modules/reducer' import { removeRentalRequest } from '../../../modules/rental/actions' -import { - isRemovingRental, - isSubmittingTransaction, - getError -} from '../../../modules/rental/selectors' -import { - MapDispatchProps, - MapStateProps, - OwnProps -} from './RemoveRentalModal.types' +import { isRemovingRental, isSubmittingTransaction, getError } from '../../../modules/rental/selectors' +import { MapDispatchProps, MapStateProps, OwnProps } from './RemoveRentalModal.types' import ClaimLandModal from './RemoveRentalModal' const mapState = (state: RootState): MapStateProps => { @@ -22,13 +14,9 @@ const mapState = (state: RootState): MapStateProps => { } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => { +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => { return { - onSubmitTransaction: () => - dispatch(removeRentalRequest(ownProps.metadata.nft)) + onSubmitTransaction: () => dispatch(removeRentalRequest(ownProps.metadata.nft)) } } diff --git a/webapp/src/components/Modals/RemoveRentalModal/RemoveRentalModal.types.ts b/webapp/src/components/Modals/RemoveRentalModal/RemoveRentalModal.types.ts index 3c75889002..f73bd809a4 100644 --- a/webapp/src/components/Modals/RemoveRentalModal/RemoveRentalModal.types.ts +++ b/webapp/src/components/Modals/RemoveRentalModal/RemoveRentalModal.types.ts @@ -14,8 +14,5 @@ export type Props = Omit<ModalProps, 'metadata'> & { } export type OwnProps = Pick<Props, 'metadata'> -export type MapStateProps = Pick< - Props, - 'isTransactionBeingConfirmed' | 'isSubmittingTransaction' | 'error' -> +export type MapStateProps = Pick<Props, 'isTransactionBeingConfirmed' | 'isSubmittingTransaction' | 'error'> export type MapDispatchProps = Pick<Props, 'onSubmitTransaction'> diff --git a/webapp/src/components/Modals/RentConfirmedModal/CTA/CTA.tsx b/webapp/src/components/Modals/RentConfirmedModal/CTA/CTA.tsx index 8ce5bb117f..314595b5f2 100644 --- a/webapp/src/components/Modals/RentConfirmedModal/CTA/CTA.tsx +++ b/webapp/src/components/Modals/RentConfirmedModal/CTA/CTA.tsx @@ -10,9 +10,7 @@ const CTA = ({ to, name, isDisabledOnMobile }: Props) => { <div className={classNames(styles[name], styles.icon)} /> <div className={styles.ctaTextContainer}> <span>{t(`rental_modal.rent_confirmed_step.${name}.title`)}</span> - <span className={styles.ctaSubtitle}> - {t(`rental_modal.rent_confirmed_step.${name}.subtitle`)} - </span> + <span className={styles.ctaSubtitle}>{t(`rental_modal.rent_confirmed_step.${name}.subtitle`)}</span> {isDisabledOnMobile && ( <span className={styles.ctaSubtitleMobile}> <i className={styles.infoIcon} /> @@ -26,12 +24,7 @@ const CTA = ({ to, name, isDisabledOnMobile }: Props) => { return isDisabledOnMobile ? ( <div className={styles.mobileAvailabilityContainer}>{renderContent()}</div> ) : ( - <a - className={styles.ctaContainer} - href={to} - target="_blank" - rel="noreferrer" - > + <a className={styles.ctaContainer} href={to} target="_blank" rel="noreferrer"> {renderContent()} </a> ) diff --git a/webapp/src/components/Modals/RentConfirmedModal/RentConfirmedModal.tsx b/webapp/src/components/Modals/RentConfirmedModal/RentConfirmedModal.tsx index 84c55508a3..068d3eef7a 100644 --- a/webapp/src/components/Modals/RentConfirmedModal/RentConfirmedModal.tsx +++ b/webapp/src/components/Modals/RentConfirmedModal/RentConfirmedModal.tsx @@ -9,10 +9,7 @@ import { Props } from './RentConfirmedModal.types' import styles from './RentConfirmedModal.module.css' import CTA from './CTA/CTA' -const RentConfirmedModal = ({ - metadata: { rental, periodIndexChosen }, - onClose -}: Props) => { +const RentConfirmedModal = ({ metadata: { rental, periodIndexChosen }, onClose }: Props) => { const period = rental.periods[periodIndexChosen] const startDate = new Date() const endDate = add(startDate, { days: period.maxDays }) @@ -20,37 +17,17 @@ const RentConfirmedModal = ({ const isMobileView = useMobileMediaQuery() return ( - <Modal - size="tiny" - className={styles.modal} - name={t('rental_modal.rent_confirmed_step.title')} - onClose={onClose} - closeIcon={<Close />} - > + <Modal size="tiny" className={styles.modal} name={t('rental_modal.rent_confirmed_step.title')} onClose={onClose} closeIcon={<Close />}> <ModalNavigation title={t('rental_modal.rent_confirmed_step.title')} /> <Modal.Content> <div> <div className={styles.textContainer}> - <T - id="rental_modal.rent_confirmed_step.subtitle" - values={{ end_date: <b>{format(endDate, 'MMM dd')}.</b> }} - /> + <T id="rental_modal.rent_confirmed_step.subtitle" values={{ end_date: <b>{format(endDate, 'MMM dd')}.</b> }} /> </div> <div> - <CTA - to={`${builderUrl}/scenes`} - name="build-more" - isDisabledOnMobile={isMobileView} - /> - <CTA - to="https://docs.decentraland.org/creator/development-guide/coding-scenes/" - name="get-creative" - /> - <CTA - to={`${builderUrl}/land`} - name="manage-land" - isDisabledOnMobile={isMobileView} - /> + <CTA to={`${builderUrl}/scenes`} name="build-more" isDisabledOnMobile={isMobileView} /> + <CTA to="https://docs.decentraland.org/creator/development-guide/coding-scenes/" name="get-creative" /> + <CTA to={`${builderUrl}/land`} name="manage-land" isDisabledOnMobile={isMobileView} /> </div> </div> </Modal.Content> diff --git a/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.container.ts b/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.container.ts index edb788bce4..17e1b94bec 100644 --- a/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.container.ts +++ b/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.container.ts @@ -1,8 +1,7 @@ import { connect } from 'react-redux' import { ContractName, getContract } from 'decentraland-transactions' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' -import { getError } from 'decentraland-dapps/dist/modules/authorization/selectors' -import { getLoading as getAuthorizationLoading } from 'decentraland-dapps/dist/modules/authorization/selectors' +import { getError, getLoading as getAuthorizationLoading } from 'decentraland-dapps/dist/modules/authorization/selectors' import { fetchAuthorizationsRequest, FETCH_AUTHORIZATIONS_REQUEST, @@ -13,12 +12,7 @@ import { RootState } from '../../../../modules/reducer' import { getAddress } from '../../../../modules/wallet/selectors' import { getPendingAuthorizationTransactions } from '../../../../modules/transaction/selectors' import { hasTransactionPending } from '../../../../modules/transaction/utils' -import { - MapStateProps, - MapDispatchProps, - MapDispatch, - OwnProps -} from './AuthorizationStep.types' +import { MapStateProps, MapDispatchProps, MapDispatch, OwnProps } from './AuthorizationStep.types' import AuthorizationStep from './AuthorizationStep' const mapState = (state: RootState, { nft }: OwnProps): MapStateProps => ({ @@ -28,21 +22,14 @@ const mapState = (state: RootState, { nft }: OwnProps): MapStateProps => ({ getContract(ContractName.Rentals, nft.chainId).address, nft.contractAddress ), - isConfirmingAuthorization: isLoadingType( - getAuthorizationLoading(state), - GRANT_TOKEN_REQUEST - ), + isConfirmingAuthorization: isLoadingType(getAuthorizationLoading(state), GRANT_TOKEN_REQUEST), error: getError(state), - isFetchingAuthorizations: isLoadingType( - getAuthorizationLoading(state), - FETCH_AUTHORIZATIONS_REQUEST - ) + isFetchingAuthorizations: isLoadingType(getAuthorizationLoading(state), FETCH_AUTHORIZATIONS_REQUEST) }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ onAuthorize: authorization => dispatch(grantTokenRequest(authorization)), - onFetchAuthorizations: authorizations => - dispatch(fetchAuthorizationsRequest(authorizations)) + onFetchAuthorizations: authorizations => dispatch(fetchAuthorizationsRequest(authorizations)) }) export default connect(mapState, mapDispatch)(AuthorizationStep) diff --git a/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.tsx b/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.tsx index fe0fd050bf..ad4e2c78c4 100644 --- a/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.tsx +++ b/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.tsx @@ -1,15 +1,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react' -import { - Modal, - Button, - ModalNavigation, - Loader, - Message -} from 'decentraland-ui' -import { - Authorization, - AuthorizationType -} from 'decentraland-dapps/dist/modules/authorization/types' +import { Modal, Button, ModalNavigation, Loader, Message } from 'decentraland-ui' +import { Authorization, AuthorizationType } from 'decentraland-dapps/dist/modules/authorization/types' import { ContractName, getContract } from 'decentraland-transactions' import { TransactionLink } from 'decentraland-dapps/dist/containers' import { T, t } from 'decentraland-dapps/dist/modules/translation/utils' @@ -39,7 +30,7 @@ const AuthorizationStep = (props: Props) => { const rentalContractData = getContract(ContractName.Rentals, nft.chainId) const authorization: Authorization = useMemo( () => ({ - address: address!, + address: address, authorizedAddress: rentalContractData.address, contractAddress: nft.contractAddress, contractName: ContractName.ERC721, @@ -60,9 +51,7 @@ const AuthorizationStep = (props: Props) => { }, [setShowError, onCancel]) const handleOnInfo = useCallback(() => { - window.location.href = `${config.get( - 'DOCS_URL' - )}/player/market/rentals/#list-land-for-rent` + window.location.href = `${config.get('DOCS_URL')}/player/market/rentals/#list-land-for-rent` }, []) // Effects @@ -102,11 +91,7 @@ const AuthorizationStep = (props: Props) => { values={{ assetType: t(`global.${nft.category}`), link: ( - <TransactionLink - address={rentalContractData.address} - txHash="" - chainId={rentalContractData.chainId} - > + <TransactionLink address={rentalContractData.address} txHash="" chainId={rentalContractData.chainId}> {t('rental_modal.authorization_step.notice_link')} </TransactionLink> ) @@ -119,26 +104,14 @@ const AuthorizationStep = (props: Props) => { </p> <ul> <li> - <b> - {t( - 'rental_modal.authorization_step.notice_line_two_option_one_title' - )} - </b> + <b>{t('rental_modal.authorization_step.notice_line_two_option_one_title')}</b> :  - {t( - 'rental_modal.authorization_step.notice_line_two_option_one_text' - )} + {t('rental_modal.authorization_step.notice_line_two_option_one_text')} </li> <li> - <b> - {t( - 'rental_modal.authorization_step.notice_line_two_option_two_title' - )} - </b> + <b>{t('rental_modal.authorization_step.notice_line_two_option_two_title')}</b> :  - {t( - 'rental_modal.authorization_step.notice_line_two_option_two_text' - )} + {t('rental_modal.authorization_step.notice_line_two_option_two_text')} </li> </ul> </div> @@ -147,37 +120,18 @@ const AuthorizationStep = (props: Props) => { <Modal.Actions className={styles.actions}> {isConfirmingAuthorization ? ( <div className={styles.confirmTransaction}> - <Loader - active - size="small" - className={styles.confirmTransactionLoader} - /> + <Loader active size="small" className={styles.confirmTransactionLoader} /> <p>{t('rental_modal.authorization_step.confirm')}</p> </div> ) : ( - <Button - primary - fluid - loading={isLoading} - onClick={handleSubmit} - disabled={isLoading} - > + <Button primary fluid loading={isLoading} onClick={handleSubmit} disabled={isLoading}> {t('global.proceed')} </Button> )} <Button fluid onClick={handleCancel} disabled={isLoading}> {t('global.cancel')} </Button> - {showError && ( - <Message - className={styles.errorMessage} - error - size="tiny" - visible - content={error} - header={t('global.error')} - /> - )} + {showError && <Message className={styles.errorMessage} error size="tiny" visible content={error} header={t('global.error')} />} </Modal.Actions> </> )} diff --git a/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.types.ts b/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.types.ts index 47204c9068..5ecf1c9793 100644 --- a/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.types.ts +++ b/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/AuthorizationStep.types.ts @@ -19,19 +19,7 @@ export type Props = { onFetchAuthorizations: typeof fetchAuthorizationsRequest } -export type MapStateProps = Pick< - Props, - | 'address' - | 'isAuthorizing' - | 'isConfirmingAuthorization' - | 'error' - | 'isFetchingAuthorizations' -> -export type MapDispatchProps = Pick< - Props, - 'onAuthorize' | 'onFetchAuthorizations' -> -export type MapDispatch = Dispatch< - GrantTokenRequestAction | FetchAuthorizationsRequestAction -> +export type MapStateProps = Pick<Props, 'address' | 'isAuthorizing' | 'isConfirmingAuthorization' | 'error' | 'isFetchingAuthorizations'> +export type MapDispatchProps = Pick<Props, 'onAuthorize' | 'onFetchAuthorizations'> +export type MapDispatch = Dispatch<GrantTokenRequestAction | FetchAuthorizationsRequestAction> export type OwnProps = Pick<Props, 'nft' | 'onCancel'> diff --git a/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/index.ts b/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/index.ts index 7a184bd523..fda9d2ea32 100644 --- a/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/index.ts +++ b/webapp/src/components/Modals/RentalListingModal/AuthorizationStep/index.ts @@ -1,2 +1,2 @@ import AuthorizationStep from './AuthorizationStep.container' -export { AuthorizationStep } \ No newline at end of file +export { AuthorizationStep } diff --git a/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.container.ts b/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.container.ts index b77dd4563a..ed49adf98d 100644 --- a/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.container.ts +++ b/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.container.ts @@ -1,21 +1,10 @@ import { connect } from 'react-redux' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { RootState } from '../../../../modules/reducer' -import { - clearRentalErrors, - upsertRentalRequest, - UPSERT_RENTAL_REQUEST -} from '../../../../modules/rental/actions' -import { - getLoading as getRentalLoading, - getError -} from '../../../../modules/rental/selectors' +import { clearRentalErrors, upsertRentalRequest, UPSERT_RENTAL_REQUEST } from '../../../../modules/rental/actions' +import { getLoading as getRentalLoading, getError } from '../../../../modules/rental/selectors' import { UpsertRentalOptType } from '../../../../modules/rental/types' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './ConfirmationStep.types' +import { MapStateProps, MapDispatchProps, MapDispatch } from './ConfirmationStep.types' import ConfirmationStep from './ConfirmationStep' const mapState = (state: RootState): MapStateProps => ({ @@ -25,15 +14,7 @@ const mapState = (state: RootState): MapStateProps => ({ const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ onCreate: (nft, pricePerDay, periods, expiresAt) => - dispatch( - upsertRentalRequest( - nft, - pricePerDay, - periods, - expiresAt, - UpsertRentalOptType.INSERT - ) - ), + dispatch(upsertRentalRequest(nft, pricePerDay, periods, expiresAt, UpsertRentalOptType.INSERT)), onClearRentalErros: () => dispatch(clearRentalErrors()) }) diff --git a/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.tsx b/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.tsx index d3c03d4d1f..02b46d9425 100644 --- a/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.tsx +++ b/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.tsx @@ -8,27 +8,10 @@ import { Props } from './ConfirmationStep.types' import styles from './ConfirmationStep.module.css' const ConfirmationStep = (props: Props) => { - const { - onCancel, - isSigning, - nft, - pricePerDay, - periods, - expiresAt, - onCreate, - onClearRentalErros, - error - } = props + const { onCancel, isSigning, nft, pricePerDay, periods, expiresAt, onCreate, onClearRentalErros, error } = props const handleSubmit = useCallback( - () => - onCreate( - nft, - pricePerDay, - periods, - expiresAt, - UpsertRentalOptType.INSERT - ), + () => onCreate(nft, pricePerDay, periods, expiresAt, UpsertRentalOptType.INSERT), [nft, pricePerDay, periods, expiresAt, onCreate] ) @@ -39,10 +22,7 @@ const ConfirmationStep = (props: Props) => { return ( <> - <ModalNavigation - title={t('rental_modal.confirmation_step.title')} - onClose={!isSigning ? onBack : undefined} - /> + <ModalNavigation title={t('rental_modal.confirmation_step.title')} onClose={!isSigning ? onBack : undefined} /> <Modal.Content> <div className={styles.notice}> <p> @@ -51,30 +31,21 @@ const ConfirmationStep = (props: Props) => { </p> <div className={styles.noticeBlock}> <div className={styles.noticeRow}> - <div className={styles.noticeLabel}> - {t('rental_modal.confirmation_step.price_per_day')} - </div> + <div className={styles.noticeLabel}>{t('rental_modal.confirmation_step.price_per_day')}</div> <div className={styles.noticeText}> <Mana inline>{pricePerDay}</Mana>/{t('global.day')} </div> </div> <div className={styles.noticeRow}> - <div className={styles.noticeLabel}> - {t('rental_modal.confirmation_step.periods')} - </div> + <div className={styles.noticeLabel}>{t('rental_modal.confirmation_step.periods')}</div> <div className={styles.noticeText}> {periods.map(period => daysByPeriod[period]).join(' / ')}  {t('global.days')} </div> </div> <div className={styles.noticeRow}> - <div className={styles.noticeLabel}> - {t('rental_modal.confirmation_step.listing_expiration_date')} - </div> - <div - className={styles.noticeText} - title={new Date(expiresAt).toString()} - > + <div className={styles.noticeLabel}>{t('rental_modal.confirmation_step.listing_expiration_date')}</div> + <div className={styles.noticeText} title={new Date(expiresAt).toString()}> {new Date(expiresAt).toLocaleDateString()} </div> </div> @@ -82,13 +53,7 @@ const ConfirmationStep = (props: Props) => { </div> </Modal.Content> <Modal.Actions> - <Button - primary - loading={isSigning} - onClick={handleSubmit} - disabled={isSigning} - fluid - > + <Button primary loading={isSigning} onClick={handleSubmit} disabled={isSigning} fluid> {t('global.confirm')} </Button> <Button fluid onClick={onBack} disabled={isSigning}> @@ -97,13 +62,7 @@ const ConfirmationStep = (props: Props) => { </Modal.Actions> {error && ( <Modal.Content> - <Message - error - size="tiny" - visible - content={error} - header={t('global.error')} - /> + <Message error size="tiny" visible content={error} header={t('global.error')} /> </Modal.Content> )} </> diff --git a/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.types.ts b/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.types.ts index 5f5d54b799..8e934e9e16 100644 --- a/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.types.ts +++ b/webapp/src/components/Modals/RentalListingModal/ConfirmationStep/ConfirmationStep.types.ts @@ -22,7 +22,5 @@ export type Props = { export type MapStateProps = Pick<Props, 'isSigning' | 'error'> export type MapDispatchProps = Pick<Props, 'onCreate' | 'onClearRentalErros'> -export type MapDispatch = Dispatch< - UpsertRentalRequestAction | ClearRentalErrorsAction -> +export type MapDispatch = Dispatch<UpsertRentalRequestAction | ClearRentalErrorsAction> export type OwnProps = Pick<Props, 'nft' | 'onCancel'> diff --git a/webapp/src/components/Modals/RentalListingModal/CreateOrEditListingStep/CreateOrEditListingStep.tsx b/webapp/src/components/Modals/RentalListingModal/CreateOrEditListingStep/CreateOrEditListingStep.tsx index c552edd668..9de0f246b0 100644 --- a/webapp/src/components/Modals/RentalListingModal/CreateOrEditListingStep/CreateOrEditListingStep.tsx +++ b/webapp/src/components/Modals/RentalListingModal/CreateOrEditListingStep/CreateOrEditListingStep.tsx @@ -1,31 +1,12 @@ import React, { useCallback, useMemo, useState } from 'react' import { ethers } from 'ethers' -import { - Modal, - Button, - ModalNavigation, - Field, - Radio, - Header, - Popup, - InputOnChangeData -} from 'decentraland-ui' +import { Modal, Button, ModalNavigation, Field, Radio, Header, Popup, InputOnChangeData } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { toFixedMANAValue } from 'decentraland-dapps/dist/lib/mana' -import { - PeriodOption, - UpsertRentalOptType -} from '../../../../modules/rental/types' +import { PeriodOption, UpsertRentalOptType } from '../../../../modules/rental/types' import { parseMANANumber } from '../../../../lib/mana' -import { - convertDateToDateInputValue, - getDefaultExpirationDate -} from '../../../../modules/order/utils' -import { - daysByPeriod, - getMaxPriceOfPeriods, - periodsByDays -} from '../../../../modules/rental/utils' +import { convertDateToDateInputValue, getDefaultExpirationDate } from '../../../../modules/order/utils' +import { daysByPeriod, getMaxPriceOfPeriods, periodsByDays } from '../../../../modules/rental/utils' import { ManaField } from '../../../ManaField' import { Props } from './CreateOrEditListingStep.types' import styles from './CreateOrEditListingStep.module.css' @@ -33,48 +14,22 @@ import styles from './CreateOrEditListingStep.module.css' const RENTAL_MIN_PRICE = 1 const CreateListingStep = (props: Props) => { - const { - onCancel, - nft, - onCreate, - onRemove, - rental, - isListForRentAgain - } = props + const { onCancel, nft, onCreate, onRemove, rental, isListForRentAgain } = props // Editing properties - const oldPrice = useMemo( - () => - rental ? ethers.utils.formatEther(getMaxPriceOfPeriods(rental)) : null, - [rental] - ) - const oldPeriods = useMemo( - () => - rental - ? rental.periods.map(period => periodsByDays[period.maxDays]) - : null, - [rental] - ) + const oldPrice = useMemo(() => (rental ? ethers.utils.formatEther(getMaxPriceOfPeriods(rental)) : null), [rental]) + const oldPeriods = useMemo(() => (rental ? rental.periods.map(period => periodsByDays[period.maxDays]) : null), [rental]) const oldExpirationDate = useMemo( - () => - rental && !isListForRentAgain - ? convertDateToDateInputValue(new Date(rental.expiration)) - : null, + () => (rental && !isListForRentAgain ? convertDateToDateInputValue(new Date(rental.expiration)) : null), [rental, isListForRentAgain] ) // Form values const [pricePerDayInput, setPricePerDayInput] = useState(oldPrice ?? '') - const [periodOptions, setPeriodOptions] = useState<PeriodOption[]>( - oldPeriods ?? [] - ) - const [expiresAt, setExpiresAt] = useState( - oldExpirationDate ?? getDefaultExpirationDate() - ) + const [periodOptions, setPeriodOptions] = useState<PeriodOption[]>(oldPeriods ?? []) + const [expiresAt, setExpiresAt] = useState(oldExpirationDate ?? getDefaultExpirationDate()) - const fixedPriceInput = useMemo(() => toFixedMANAValue(pricePerDayInput), [ - pricePerDayInput - ]) + const fixedPriceInput = useMemo(() => toFixedMANAValue(pricePerDayInput), [pricePerDayInput]) // Checks if the new and the old price are the same by converting them // and checking their integer and floating point parts. @@ -88,21 +43,12 @@ const CreateListingStep = (props: Props) => { // Converts the number to Wei and then converts it back to ethers to have // the same value as the old price one. const priceInWei = ethers.utils.parseEther(priceAsNumber.toString()) - return ( - ethers.utils.formatEther(priceInWei).toString() === - toFixedMANAValue(oldPrice ?? '') - ) + return ethers.utils.formatEther(priceInWei).toString() === toFixedMANAValue(oldPrice ?? '') }, [oldPrice, fixedPriceInput]) // Handlers const handleSubmit = useCallback(() => { - onCreate( - nft, - parseMANANumber(pricePerDayInput), - periodOptions, - Number(new Date(`${expiresAt} 00:00:00`)), - UpsertRentalOptType.EDIT - ) + onCreate(nft, parseMANANumber(pricePerDayInput), periodOptions, Number(new Date(`${expiresAt} 00:00:00`)), UpsertRentalOptType.EDIT) }, [onCreate, nft, pricePerDayInput, periodOptions, expiresAt]) const handleRemove = useCallback(() => onRemove(nft), [nft, onRemove]) @@ -110,51 +56,31 @@ const CreateListingStep = (props: Props) => { const createOptionHandler = (periodOption: PeriodOption) => () => { const shouldAdd = !periodOptions.includes(periodOption) if (shouldAdd) { - setPeriodOptions( - [...periodOptions, periodOption].sort((a, b) => - daysByPeriod[a] > daysByPeriod[b] ? 1 : -1 - ) - ) + setPeriodOptions([...periodOptions, periodOption].sort((a, b) => (daysByPeriod[a] > daysByPeriod[b] ? 1 : -1))) } else { setPeriodOptions(periodOptions.filter(option => option !== periodOption)) } } // Validations - const parsedPriceInput = useMemo(() => parseMANANumber(pricePerDayInput), [ - pricePerDayInput - ]) + const parsedPriceInput = useMemo(() => parseMANANumber(pricePerDayInput), [pricePerDayInput]) const isInvalidPrice = parsedPriceInput < 0 || Number(pricePerDayInput) < 0 const isLessThanMinPrice = parsedPriceInput < RENTAL_MIN_PRICE - const isInvalidExpirationDate = - new Date(`${expiresAt} 00:00:00`).getTime() < Date.now() - const isInvalid = - isInvalidPrice || - isInvalidExpirationDate || - periodOptions.length === 0 || - isLessThanMinPrice - const showInvalidPriceError = - pricePerDayInput !== '' && (isInvalidPrice || isLessThanMinPrice) + const isInvalidExpirationDate = new Date(`${expiresAt} 00:00:00`).getTime() < Date.now() + const isInvalid = isInvalidPrice || isInvalidExpirationDate || periodOptions.length === 0 || isLessThanMinPrice + const showInvalidPriceError = pricePerDayInput !== '' && (isInvalidPrice || isLessThanMinPrice) const isUpdated = oldExpirationDate !== expiresAt || !isOldNumberTheSameAsTheNewOne || - (oldPeriods && - (oldPeriods.length !== periodOptions.length || - !oldPeriods.every(period => periodOptions.includes(period)))) + (oldPeriods && (oldPeriods.length !== periodOptions.length || !oldPeriods.every(period => periodOptions.includes(period)))) - const handlePriceChange = useCallback( - (_event: React.ChangeEvent<HTMLInputElement>, props: InputOnChangeData) => { - setPricePerDayInput(toFixedMANAValue(props.value)) - }, - [] - ) + const handlePriceChange = useCallback((_event: React.ChangeEvent<HTMLInputElement>, props: InputOnChangeData) => { + setPricePerDayInput(toFixedMANAValue(props.value)) + }, []) - const handleExpirationDateChange = useCallback( - (_event: React.ChangeEvent<HTMLInputElement>, props: InputOnChangeData) => { - setExpiresAt(props.value || getDefaultExpirationDate()) - }, - [] - ) + const handleExpirationDateChange = useCallback((_event: React.ChangeEvent<HTMLInputElement>, props: InputOnChangeData) => { + setExpiresAt(props.value || getDefaultExpirationDate()) + }, []) return ( <> @@ -163,16 +89,14 @@ const CreateListingStep = (props: Props) => { isListForRentAgain ? t('rental_modal.authorization_step_again.title') : rental - ? t('rental_modal.create_listing_step.titles.edit') - : t('rental_modal.create_listing_step.titles.create') + ? t('rental_modal.create_listing_step.titles.edit') + : t('rental_modal.create_listing_step.titles.create') } onClose={onCancel} /> <Modal.Content> {rental && !isListForRentAgain ? ( - <div className={styles.editingCostWarning}> - {t('rental_modal.create_listing_step.editing_cost_warning')} - </div> + <div className={styles.editingCostWarning}>{t('rental_modal.create_listing_step.editing_cost_warning')}</div> ) : null} <div className={styles.pricePerDay}> <ManaField @@ -189,8 +113,8 @@ const CreateListingStep = (props: Props) => { isLessThanMinPrice ? t('rental_modal.create_listing_step.less_than_min_price') : isInvalidPrice - ? t('rental_modal.create_listing_step.invalid_price') - : t('rental_modal.create_listing_step.dao_fee') + ? t('rental_modal.create_listing_step.invalid_price') + : t('rental_modal.create_listing_step.dao_fee') } /> </div> @@ -210,9 +134,7 @@ const CreateListingStep = (props: Props) => { {Object.values(PeriodOption).map(option => ( <Radio key={option} - label={t( - `rental_modal.create_listing_step.period_options.${option}` - )} + label={t(`rental_modal.create_listing_step.period_options.${option}`)} checked={periodOptions.includes(option)} onClick={createOptionHandler(option)} /> @@ -221,31 +143,17 @@ const CreateListingStep = (props: Props) => { </div> <div className={styles.expirationDate}> <Field - label={t( - 'rental_modal.create_listing_step.listing_expiration_date' - )} + label={t('rental_modal.create_listing_step.listing_expiration_date')} type="date" value={expiresAt} onChange={handleExpirationDateChange} error={isInvalidExpirationDate} - message={ - isInvalidExpirationDate - ? t('rental_modal.create_listing_step.invalid_date') - : undefined - } + message={isInvalidExpirationDate ? t('rental_modal.create_listing_step.invalid_date') : undefined} /> <Popup className={styles.periodsTooltip} - content={t( - 'rental_modal.create_listing_step.expiration_date_tooltip' - )} - trigger={ - <i - className={ - rental && !isListForRentAgain ? styles.editInfo : styles.info - } - /> - } + content={t('rental_modal.create_listing_step.expiration_date_tooltip')} + trigger={<i className={rental && !isListForRentAgain ? styles.editInfo : styles.info} />} position="top center" on="hover" ></Popup> @@ -253,36 +161,16 @@ const CreateListingStep = (props: Props) => { </Modal.Content> <Modal.Actions className={styles.actions}> {!rental ? ( - <Button - primary - onClick={handleSubmit} - disabled={isInvalid} - className={styles.actionButton} - > + <Button primary onClick={handleSubmit} disabled={isInvalid} className={styles.actionButton}> {t('rental_modal.create_listing_step.put_for_rent')} </Button> ) : ( <> - <Button - className={styles.actionButton} - primary - onClick={handleSubmit} - disabled={isInvalid || !isUpdated} - fluid - > - {isListForRentAgain - ? t('rental_modal.authorization_step_again.title') - : t('rental_modal.create_listing_step.update_listing')} + <Button className={styles.actionButton} primary onClick={handleSubmit} disabled={isInvalid || !isUpdated} fluid> + {isListForRentAgain ? t('rental_modal.authorization_step_again.title') : t('rental_modal.create_listing_step.update_listing')} </Button> - <Button - fluid - className={styles.actionButton} - secondary - onClick={handleRemove} - > - {isListForRentAgain - ? t('global.cancel') - : t('rental_modal.create_listing_step.remove_listing')} + <Button fluid className={styles.actionButton} secondary onClick={handleRemove}> + {isListForRentAgain ? t('global.cancel') : t('rental_modal.create_listing_step.remove_listing')} </Button> </> )} diff --git a/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.container.ts b/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.container.ts index b2a72b2906..387067dce3 100644 --- a/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.container.ts +++ b/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.container.ts @@ -1,23 +1,9 @@ import { connect } from 'react-redux' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { RootState } from '../../../../modules/reducer' -import { - upsertRentalRequest, - UPSERT_RENTAL_REQUEST, - removeRentalRequest -} from '../../../../modules/rental/actions' -import { - getLoading as getRentalLoading, - getError, - isRemovingRental, - isSubmittingTransaction -} from '../../../../modules/rental/selectors' -import { - MapStateProps, - MapDispatchProps, - MapDispatch, - OwnProps -} from './EditConfirmationStep.types' +import { upsertRentalRequest, UPSERT_RENTAL_REQUEST, removeRentalRequest } from '../../../../modules/rental/actions' +import { getLoading as getRentalLoading, getError, isRemovingRental, isSubmittingTransaction } from '../../../../modules/rental/selectors' +import { MapStateProps, MapDispatchProps, MapDispatch, OwnProps } from './EditConfirmationStep.types' import ConfirmationStep from './EditConfirmationStep' import { UpsertRentalOptType } from '../../../../modules/rental/types' @@ -28,21 +14,10 @@ const mapState = (state: RootState): MapStateProps => ({ error: getError(state) }) -const mapDispatch = ( - dispatch: MapDispatch, - ownProps: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: MapDispatch, ownProps: OwnProps): MapDispatchProps => ({ onRemove: () => dispatch(removeRentalRequest(ownProps.nft)), onEdit: (nft, pricePerDay, periods, expiresAt) => - dispatch( - upsertRentalRequest( - nft, - pricePerDay, - periods, - expiresAt, - UpsertRentalOptType.EDIT - ) - ) + dispatch(upsertRentalRequest(nft, pricePerDay, periods, expiresAt, UpsertRentalOptType.EDIT)) }) export default connect(mapState, mapDispatch)(ConfirmationStep) diff --git a/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.tsx b/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.tsx index 6e244053ac..cf920b5dda 100644 --- a/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.tsx +++ b/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.tsx @@ -22,10 +22,7 @@ const EditConfirmationStep = (props: Props) => { const [hasTriggeredStepOne, setHasTriggeredStepOne] = useState(false) const [isStepOneCompleted, setIsStepOneCompleted] = useState(false) - const isLoading = - isSubmittingRemoveTransaction || - isRemoveTransactionBeingConfirmed || - isSigning + const isLoading = isSubmittingRemoveTransaction || isRemoveTransactionBeingConfirmed || isSigning useEffect(() => { if (isRemoveTransactionBeingConfirmed) { @@ -34,29 +31,15 @@ const EditConfirmationStep = (props: Props) => { }, [isRemoveTransactionBeingConfirmed, isSubmittingRemoveTransaction]) useEffect(() => { - if ( - hasTriggeredStepOne && - !isRemoveTransactionBeingConfirmed && - !isSubmittingRemoveTransaction - ) { + if (hasTriggeredStepOne && !isRemoveTransactionBeingConfirmed && !isSubmittingRemoveTransaction) { setIsStepOneCompleted(true) } - }, [ - hasTriggeredStepOne, - isRemoveTransactionBeingConfirmed, - isSubmittingRemoveTransaction - ]) + }, [hasTriggeredStepOne, isRemoveTransactionBeingConfirmed, isSubmittingRemoveTransaction]) const handleRemove = useCallback(() => onRemove(nft), [nft, onRemove]) const handlePublishNewInfo = useCallback(() => { - onEdit( - nft, - pricePerDay, - periods, - Number(new Date(expiresAt)), - UpsertRentalOptType.EDIT - ) + onEdit(nft, pricePerDay, periods, Number(new Date(expiresAt)), UpsertRentalOptType.EDIT) }, [onEdit, nft, pricePerDay, periods, expiresAt]) return ( @@ -67,22 +50,14 @@ const EditConfirmationStep = (props: Props) => { /> <Modal.Content> <div className={styles.notice}> - <p> - {t('rental_modal.confirmation_edit_step.notice_line_one')}  - </p> + <p>{t('rental_modal.confirmation_edit_step.notice_line_one')} </p> <div className={styles.noticeBlock}> <div className={styles.actionContainer}> <div className={styles.actionContainerText}> <span className={styles.step}>1</span> <div> - <span> - {t('rental_modal.confirmation_edit_step.action_one_title')} - </span> - <span className={styles.stepSubtitle}> - {t( - 'rental_modal.confirmation_edit_step.action_one_subtitle' - )} - </span> + <span>{t('rental_modal.confirmation_edit_step.action_one_title')}</span> + <span className={styles.stepSubtitle}>{t('rental_modal.confirmation_edit_step.action_one_subtitle')}</span> </div> </div> {!isStepOneCompleted ? ( @@ -90,15 +65,8 @@ const EditConfirmationStep = (props: Props) => { primary size="small" onClick={handleRemove} - loading={ - isSubmittingRemoveTransaction || - isRemoveTransactionBeingConfirmed - } - disabled={ - isStepOneCompleted || - isSubmittingRemoveTransaction || - isRemoveTransactionBeingConfirmed - } + loading={isSubmittingRemoveTransaction || isRemoveTransactionBeingConfirmed} + disabled={isStepOneCompleted || isSubmittingRemoveTransaction || isRemoveTransactionBeingConfirmed} > {t('rental_modal.confirmation_edit_step.confirm')} </Button> @@ -115,9 +83,7 @@ const EditConfirmationStep = (props: Props) => { <div className={styles.actionContainerText}> <span className={styles.step}>2</span> <div> - <span> - {t('rental_modal.confirmation_edit_step.action_two_title')} - </span> + <span>{t('rental_modal.confirmation_edit_step.action_two_title')}</span> </div> </div> <Button @@ -135,13 +101,7 @@ const EditConfirmationStep = (props: Props) => { </Modal.Content> {error && ( <Modal.Content> - <Message - error - size="tiny" - visible - content={error} - header={t('global.error')} - /> + <Message error size="tiny" visible content={error} header={t('global.error')} /> </Modal.Content> )} </> diff --git a/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.types.ts b/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.types.ts index c2da30557a..b0f04b796a 100644 --- a/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.types.ts +++ b/webapp/src/components/Modals/RentalListingModal/EditConfirmationStep/EditConfirmationStep.types.ts @@ -24,15 +24,7 @@ export type Props = { error: string | null } -export type MapStateProps = Pick< - Props, - | 'isSigning' - | 'error' - | 'isRemoveTransactionBeingConfirmed' - | 'isSubmittingRemoveTransaction' -> +export type MapStateProps = Pick<Props, 'isSigning' | 'error' | 'isRemoveTransactionBeingConfirmed' | 'isSubmittingRemoveTransaction'> export type MapDispatchProps = Pick<Props, 'onEdit' | 'onRemove'> -export type MapDispatch = Dispatch< - UpsertRentalRequestAction | RemoveRentalRequestAction -> +export type MapDispatch = Dispatch<UpsertRentalRequestAction | RemoveRentalRequestAction> export type OwnProps = Pick<Props, 'nft' | 'rental' | 'onCancel'> diff --git a/webapp/src/components/Modals/RentalListingModal/InformationStep/InformationStep.tsx b/webapp/src/components/Modals/RentalListingModal/InformationStep/InformationStep.tsx index 6903f3c031..2f823d12c9 100644 --- a/webapp/src/components/Modals/RentalListingModal/InformationStep/InformationStep.tsx +++ b/webapp/src/components/Modals/RentalListingModal/InformationStep/InformationStep.tsx @@ -9,10 +9,7 @@ const InformationStep = (props: Props) => { return ( <> - <ModalNavigation - title={t('rental_modal.authorization_step_again.title')} - onClose={onCancel} - /> + <ModalNavigation title={t('rental_modal.authorization_step_again.title')} onClose={onCancel} /> <Modal.Content> <div className={styles.contentContainerRentAgain}> <span> diff --git a/webapp/src/components/Modals/RentalListingModal/RentalListingModal.container.ts b/webapp/src/components/Modals/RentalListingModal/RentalListingModal.container.ts index b5f4473df9..7cb8a17b48 100644 --- a/webapp/src/components/Modals/RentalListingModal/RentalListingModal.container.ts +++ b/webapp/src/components/Modals/RentalListingModal/RentalListingModal.container.ts @@ -3,14 +3,9 @@ import { getData as getAuthorizations } from 'decentraland-dapps/dist/modules/au import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { RootState } from '../../../modules/reducer' -import { getAddress } from '../../../modules/wallet/selectors' +import { getAddress, getWallet } from '../../../modules/wallet/selectors' import { NFT } from '../../../modules/nft/types' -import { getWallet } from '../../../modules/wallet/selectors' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './RentalListingModal.types' +import { MapStateProps, MapDispatchProps, MapDispatch } from './RentalListingModal.types' import RentalModal from './RentalListingModal' const mapState = (state: RootState): MapStateProps => ({ diff --git a/webapp/src/components/Modals/RentalListingModal/RentalListingModal.tsx b/webapp/src/components/Modals/RentalListingModal/RentalListingModal.tsx index 42672ac5d1..a5fa7b5437 100644 --- a/webapp/src/components/Modals/RentalListingModal/RentalListingModal.tsx +++ b/webapp/src/components/Modals/RentalListingModal/RentalListingModal.tsx @@ -1,20 +1,11 @@ import React, { useCallback, useMemo, useState } from 'react' import classNames from 'classnames' -import { - Authorization, - AuthorizationType -} from 'decentraland-dapps/dist/modules/authorization/types' +import { Authorization, AuthorizationType } from 'decentraland-dapps/dist/modules/authorization/types' import { hasAuthorization } from 'decentraland-dapps/dist/modules/authorization/utils' import { Modal } from 'decentraland-dapps/dist/containers' import { ContractName, getContract } from 'decentraland-transactions' -import { - canBeClaimed, - isRentalListingOpen -} from '../../../modules/rental/utils' -import { - upsertRentalRequest, - UpsertRentalRequestAction -} from '../../../modules/rental/actions' +import { canBeClaimed, isRentalListingOpen } from '../../../modules/rental/utils' +import { upsertRentalRequest, UpsertRentalRequestAction } from '../../../modules/rental/actions' import { Props } from './RentalListingModal.types' import { AuthorizationStep } from './AuthorizationStep' import { CreateOrEditListingStep } from './CreateOrEditListingStep' @@ -33,13 +24,9 @@ const RentalListingModal = (props: Props) => { wallet } = props - const [listing, setListing] = useState< - UpsertRentalRequestAction['payload'] | null - >(null) + const [listing, setListing] = useState<UpsertRentalRequestAction['payload'] | null>(null) - const handleSetListing = useCallback< - (...params: Parameters<typeof upsertRentalRequest>) => void - >( + const handleSetListing = useCallback<(...params: Parameters<typeof upsertRentalRequest>) => void>( (nft, pricePerDay, periods, expiresAt, operationType) => { setListing({ nft, pricePerDay, periods, expiresAt, operationType }) }, @@ -67,56 +54,29 @@ const RentalListingModal = (props: Props) => { ) const isAuthorized = hasAuthorization(authorizations, authorization) - const isConfirmingEditingStep = useMemo(() => !!listing && !!rental, [ - listing, - rental - ]) + const isConfirmingEditingStep = useMemo(() => !!listing && !!rental, [listing, rental]) - const isListForRentAgain = - wallet && - rental && - canBeClaimed(wallet.address, rental, nft) && - !isRentalListingOpen(rental) + const isListForRentAgain = wallet && rental && canBeClaimed(wallet.address, rental, nft) && !isRentalListingOpen(rental) - const [ - listForRentAgainAuthorizationStep, - setListForRentAgainAuthorizationStep - ] = useState(isListForRentAgain) + const [listForRentAgainAuthorizationStep, setListForRentAgainAuthorizationStep] = useState(isListForRentAgain) return ( - <Modal - size="tiny" - className={classNames( - styles.modal, - isConfirmingEditingStep && styles.editingModal - )} - onClose={() => undefined} - > + <Modal size="tiny" className={classNames(styles.modal, isConfirmingEditingStep && styles.editingModal)} onClose={() => undefined}> {!isAuthorized ? ( <AuthorizationStep nft={nft} onCancel={onClose} /> ) : listForRentAgainAuthorizationStep ? ( - <InformationStep - nft={nft} - onCancel={onClose} - handleSubmit={() => setListForRentAgainAuthorizationStep(false)} - /> + <InformationStep nft={nft} onCancel={onClose} handleSubmit={() => setListForRentAgainAuthorizationStep(false)} /> ) : !listing ? ( <CreateOrEditListingStep nft={nft} - rental={ - isRentalListingOpen(rental) || isListForRentAgain ? rental : null - } + rental={isRentalListingOpen(rental) || isListForRentAgain ? rental : null} onCreate={handleSetListing} onRemove={isListForRentAgain ? onClose : onRemove} onCancel={onClose} isListForRentAgain={isListForRentAgain} /> ) : rental && isRentalListingOpen(rental) ? ( - <EditConfirmationStep - rental={rental} - onCancel={handleCancel} - {...listing} - /> + <EditConfirmationStep rental={rental} onCancel={handleCancel} {...listing} /> ) : ( <ConfirmationStep onCancel={handleCancel} {...listing} /> )} diff --git a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.container.ts b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.container.ts index 118e22aaec..1ce65a5b63 100644 --- a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.container.ts +++ b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.container.ts @@ -1,20 +1,13 @@ import { connect } from 'react-redux' import { Dispatch } from 'redux' import { AuthIdentity } from 'decentraland-crypto-fetch' -import { - closeModal, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' +import { closeModal, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { RootState } from '../../../modules/reducer' import { bulkPickUnpickRequest } from '../../../modules/favorites/actions' import { isLoadingBulkPicksUnpicks } from '../../../modules/favorites/selectors' import { getCurrentIdentity } from '../../../modules/identity/selectors' import { ListOfLists } from '../../../modules/vendor/decentraland/favorites' -import { - MapDispatchProps, - MapStateProps, - OwnProps -} from './SaveToListModal.types' +import { MapDispatchProps, MapStateProps, OwnProps } from './SaveToListModal.types' import SaveToListModal from './SaveToListModal' import { OverrideCreateListTypes } from '../CreateOrEditListModal/CreateOrEditListModal.types' @@ -25,14 +18,9 @@ const mapState = (state: RootState): MapStateProps => { } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => ({ onSavePicks: (picksFor: ListOfLists[], unpickFrom: ListOfLists[]) => - dispatch( - bulkPickUnpickRequest(ownProps.metadata.item, picksFor, unpickFrom) - ), + dispatch(bulkPickUnpickRequest(ownProps.metadata.item, picksFor, unpickFrom)), onCreateList: (overrideCreateListData: OverrideCreateListTypes) => { dispatch(openModal('CreateOrEditListModal', overrideCreateListData)) }, diff --git a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.spec.tsx b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.spec.tsx index 37968ffd25..754a659c15 100644 --- a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.spec.tsx +++ b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.spec.tsx @@ -55,9 +55,7 @@ describe('when loading the component', () => { describe('and the list fetching fails', () => { beforeEach(async () => { - jest - .spyOn(FavoritesAPI.prototype, 'getLists') - .mockRejectedValueOnce(new Error('An error')) + jest.spyOn(FavoritesAPI.prototype, 'getLists').mockRejectedValueOnce(new Error('An error')) await act(async () => { renderedModal = renderSaveToListModalModal({ metadata: { item } }) }) @@ -121,9 +119,7 @@ describe('when loading the component', () => { it('should show the lists checked if the item is the list', () => { const { getByTestId } = renderedModal expect(getByTestId(LIST_CHECKBOX + lists[0].id).children[0]).toBeChecked() - expect( - getByTestId(LIST_CHECKBOX + lists[1].id).children[0] - ).not.toBeChecked() + expect(getByTestId(LIST_CHECKBOX + lists[1].id).children[0]).not.toBeChecked() }) }) }) diff --git a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.tsx b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.tsx index f1a5969cc2..4621499e2a 100644 --- a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.tsx +++ b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.tsx @@ -2,21 +2,10 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react' import AutoSizer from 'react-virtualized-auto-sizer' import InfiniteLoader from 'react-window-infinite-loader' import { FixedSizeList } from 'react-window' -import { - Button, - Checkbox, - Icon, - Loader, - Message, - ModalNavigation -} from 'decentraland-ui' +import { Button, Checkbox, Icon, Loader, Message, ModalNavigation } from 'decentraland-ui' import Modal from 'decentraland-dapps/dist/containers/Modal' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - FavoritesAPI, - MARKETPLACE_FAVORITES_SERVER_URL, - ListOfLists -} from '../../../modules/vendor/decentraland/favorites' +import { FavoritesAPI, MARKETPLACE_FAVORITES_SERVER_URL, ListOfLists } from '../../../modules/vendor/decentraland/favorites' import { retryParams } from '../../../modules/vendor/decentraland/utils' import { CreateListParameters } from '../../../modules/favorites/types' import * as events from '../../../utils/events' @@ -92,10 +81,7 @@ const SaveToListModal = (props: Props) => { onSavePicks(picks.pickFor, picks.unpickFrom) }, [onSavePicks, picks.pickFor, picks.unpickFrom]) - const handleClose = useCallback( - () => (!isLoadingLists ? onClose() : undefined), - [isLoadingLists, onClose] - ) + const handleClose = useCallback(() => (!isLoadingLists ? onClose() : undefined), [isLoadingLists, onClose]) const addOrRemovePick = useCallback( (list: ListOfLists, type: PickType) => { @@ -148,9 +134,7 @@ const SaveToListModal = (props: Props) => { total: result.total }) } catch (error) { - setError( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) + setError(isErrorWithMessage(error) ? error.message : t('global.unknown_error')) } finally { setIsLoadingLists(false) } @@ -188,9 +172,7 @@ const SaveToListModal = (props: Props) => { onFinishListCreation() }) .catch(error => { - const errorMessage = isErrorWithMessage(error) - ? error.message - : t('global.unknown_error') + const errorMessage = isErrorWithMessage(error) ? error.message : t('global.unknown_error') onCreateList({ isLoading: false, onCreateList: createListFunction, @@ -211,10 +193,8 @@ const SaveToListModal = (props: Props) => { const Row = useCallback( ({ index, style }: { index: number; style: object }) => { const isPicked = - (lists.data[index]?.isItemInList && - !picks.unpickFrom.includes(lists.data[index])) || - (!lists.data[index]?.isItemInList && - picks.pickFor.includes(lists.data[index])) + (lists.data[index]?.isItemInList && !picks.unpickFrom.includes(lists.data[index])) || + (!lists.data[index]?.isItemInList && picks.pickFor.includes(lists.data[index])) return ( <div style={style} tabIndex={0}> {isItemLoaded(index) ? ( @@ -228,10 +208,7 @@ const SaveToListModal = (props: Props) => { onChange={() => handlePickItem(index)} /> <div className={styles.listInfo}> - <div - className={styles.name} - data-testid={LIST_NAME + lists.data[index].id} - > + <div className={styles.name} data-testid={LIST_NAME + lists.data[index].id}> {lists.data[index].name} </div> <div data-testid={LIST_ITEMS_COUNT + lists.data[index].id}> @@ -242,13 +219,7 @@ const SaveToListModal = (props: Props) => { </div> </div> <div className={styles.right}> - {lists.data[index].isPrivate ? ( - <PrivateTag - data-testid={LIST_PRIVATE + lists.data[index].id} - /> - ) : ( - undefined - )} + {lists.data[index].isPrivate ? <PrivateTag data-testid={LIST_PRIVATE + lists.data[index].id} /> : undefined} </div> </div> ) : ( @@ -257,14 +228,7 @@ const SaveToListModal = (props: Props) => { </div> ) }, - [ - lists.data, - picks.unpickFrom, - picks.pickFor, - isItemLoaded, - isSavingPicks, - handlePickItem - ] + [lists.data, picks.unpickFrom, picks.pickFor, isItemLoaded, isSavingPicks, handlePickItem] ) useEffect(() => { @@ -273,23 +237,14 @@ const SaveToListModal = (props: Props) => { }, []) // Makes the modal dynamic in size. - const desktopHeight = - lists.data.length * ITEM_HEIGHT > 500 - ? 500 - : lists.data.length * ITEM_HEIGHT + const desktopHeight = lists.data.length * ITEM_HEIGHT > 500 ? 500 : lists.data.length * ITEM_HEIGHT return ( <Modal size="tiny" onClose={handleClose}> - <ModalNavigation - title={t('save_to_list_modal.title')} - onClose={handleClose} - /> + <ModalNavigation title={t('save_to_list_modal.title')} onClose={handleClose} /> <Modal.Content> {isLoadingLists && lists.data.length === 0 ? ( - <div - data-testid={LISTS_LOADER_DATA_TEST_ID} - className={styles.loading} - > + <div data-testid={LISTS_LOADER_DATA_TEST_ID} className={styles.loading}> <Loader inline size="medium" active /> <span>{t('global.loading')}...</span> </div> @@ -298,17 +253,10 @@ const SaveToListModal = (props: Props) => { {lists.data.length !== 0 ? ( <> <div className={styles.separator}></div> - <div - className={styles.favoritesList} - style={{ height: desktopHeight }} - > + <div className={styles.favoritesList} style={{ height: desktopHeight }}> <AutoSizer> {({ height, width }) => ( - <InfiniteLoader - isItemLoaded={isItemLoaded} - itemCount={lists.total} - loadMoreItems={fetchNextPage} - > + <InfiniteLoader isItemLoaded={isItemLoaded} itemCount={lists.total} loadMoreItems={fetchNextPage}> {({ onItemsRendered, ref }) => ( <FixedSizeList itemCount={lists.total} @@ -327,15 +275,7 @@ const SaveToListModal = (props: Props) => { </div> </> ) : null} - {error ? ( - <Message - error - size="tiny" - visible - content={error} - header={t('global.error')} - /> - ) : null} + {error ? <Message error size="tiny" visible content={error} header={t('global.error')} /> : null} </> </Modal.Content> <Modal.Actions className={styles.actions}> diff --git a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.types.ts b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.types.ts index 233d6d4030..3664629631 100644 --- a/webapp/src/components/Modals/SaveToListModal/SaveToListModal.types.ts +++ b/webapp/src/components/Modals/SaveToListModal/SaveToListModal.types.ts @@ -24,7 +24,4 @@ export type Props = Omit<ModalProps, 'metadata'> & { export type MapStateProps = Pick<Props, 'identity' | 'isSavingPicks'> export type OwnProps = Pick<Props, 'metadata' | 'onClose'> -export type MapDispatchProps = Pick< - Props, - 'onSavePicks' | 'onCreateList' | 'onFinishListCreation' -> +export type MapDispatchProps = Pick<Props, 'onSavePicks' | 'onCreateList' | 'onFinishListCreation'> diff --git a/webapp/src/components/Modals/SellModal/SellModal.container.ts b/webapp/src/components/Modals/SellModal/SellModal.container.ts index f98b2d7933..01e9d97fa4 100644 --- a/webapp/src/components/Modals/SellModal/SellModal.container.ts +++ b/webapp/src/components/Modals/SellModal/SellModal.container.ts @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import { RootState } from '../../../modules/reducer' -import { getData as getAuthorizations } from 'decentraland-dapps/dist/modules/authorization/selectors' +import { getData as getAuthorizations, getLoading } from 'decentraland-dapps/dist/modules/authorization/selectors' import { Authorization } from 'decentraland-dapps/dist/modules/authorization/types' import { fetchAuthorizationsRequest, @@ -8,7 +8,6 @@ import { REVOKE_TOKEN_REQUEST } from 'decentraland-dapps/dist/modules/authorization/actions' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' -import { getLoading } from 'decentraland-dapps/dist/modules/authorization/selectors' import { getLoading as getLoadingOrders } from '../../../modules/order/selectors' import { getWallet } from '../../../modules/wallet/selectors' @@ -17,12 +16,7 @@ import { getContract } from '../../../modules/contract/selectors' import { Contract } from '../../../modules/vendor/services' import { upsertContracts } from '../../../modules/contract/actions' -import { - createOrderRequest, - CREATE_ORDER_REQUEST, - cancelOrderRequest, - CANCEL_ORDER_REQUEST -} from '../../../modules/order/actions' +import { createOrderRequest, CREATE_ORDER_REQUEST, cancelOrderRequest, CANCEL_ORDER_REQUEST } from '../../../modules/order/actions' import { MapDispatch, MapDispatchProps, MapStateProps } from './SellModal.types' import SellModal from './SellModal' @@ -32,24 +26,16 @@ const mapState = (state: RootState): MapStateProps => { error: getError(state), getContract: (query: Partial<Contract>) => getContract(state, query), authorizations: getAuthorizations(state), - isCreatingOrder: isLoadingType( - getLoadingOrders(state), - CREATE_ORDER_REQUEST - ), - isAuthorizing: - isLoadingType(getLoading(state), GRANT_TOKEN_REQUEST) || - isLoadingType(getLoading(state), REVOKE_TOKEN_REQUEST), + isCreatingOrder: isLoadingType(getLoadingOrders(state), CREATE_ORDER_REQUEST), + isAuthorizing: isLoadingType(getLoading(state), GRANT_TOKEN_REQUEST) || isLoadingType(getLoading(state), REVOKE_TOKEN_REQUEST), isCancelling: isLoadingType(getLoading(state), CANCEL_ORDER_REQUEST) } } const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onCreateOrder: (nft, price, expiresAt) => - dispatch(createOrderRequest(nft, price, expiresAt)), - onFetchAuthorizations: (authorizations: Authorization[]) => - dispatch(fetchAuthorizationsRequest(authorizations)), - onUpsertContracts: (contracts: Contract[]) => - dispatch(upsertContracts(contracts)), + onCreateOrder: (nft, price, expiresAt) => dispatch(createOrderRequest(nft, price, expiresAt)), + onFetchAuthorizations: (authorizations: Authorization[]) => dispatch(fetchAuthorizationsRequest(authorizations)), + onUpsertContracts: (contracts: Contract[]) => dispatch(upsertContracts(contracts)), onCancelOrder: (order, nft) => dispatch(cancelOrderRequest(order, nft)) }) diff --git a/webapp/src/components/Modals/SellModal/SellModal.tsx b/webapp/src/components/Modals/SellModal/SellModal.tsx index ab8adf767b..9b36aade93 100644 --- a/webapp/src/components/Modals/SellModal/SellModal.tsx +++ b/webapp/src/components/Modals/SellModal/SellModal.tsx @@ -1,13 +1,6 @@ import React, { useState } from 'react' import { Link } from 'react-router-dom' -import { - Button, - Field, - Loader, - Mana, - Message, - ModalNavigation -} from 'decentraland-ui' +import { Button, Field, Loader, Mana, Message, ModalNavigation } from 'decentraland-ui' import { Network, NFTCategory } from '@dcl/schemas' import { ethers } from 'ethers' import addDays from 'date-fns/addDays' @@ -16,19 +9,13 @@ import isValid from 'date-fns/isValid' import { hasAuthorization } from 'decentraland-dapps/dist/modules/authorization/utils' import { ContractName } from 'decentraland-transactions' import { T, t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - AuthorizationType, - Authorization as Authorizations -} from 'decentraland-dapps/dist/modules/authorization/types' +import { AuthorizationType, Authorization as Authorizations } from 'decentraland-dapps/dist/modules/authorization/types' import { ChainButton, Modal } from 'decentraland-dapps/dist/containers' import { toFixedMANAValue } from 'decentraland-dapps/dist/lib/mana' import { getContractNames, VendorFactory } from '../../../modules/vendor' import { getAssetName, isOwnedBy } from '../../../modules/asset/utils' -import { - getDefaultExpirationDate, - INPUT_FORMAT -} from '../../../modules/order/utils' +import { getDefaultExpirationDate, INPUT_FORMAT } from '../../../modules/order/utils' import { ManaField } from '../../ManaField' import { formatWeiMANA, parseMANANumber } from '../../../lib/mana' import { locations } from '../../../modules/routing/locations' @@ -67,9 +54,7 @@ const SellModal = ({ const isUpdate = order !== null - const [price, setPrice] = useState<string>( - isUpdate ? ethers.utils.formatEther(order!.price) : '' - ) + const [price, setPrice] = useState<string>(isUpdate ? ethers.utils.formatEther(order.price) : '') const [expiresAt, setExpiresAt] = useState(() => { let exp = order?.expiresAt @@ -90,8 +75,7 @@ const SellModal = ({ const parsedValueToConfirm = parseFloat(price).toString() - const isConfirmDisabled = - parsedValueToConfirm !== confirmedInput || isCreatingOrder + const isConfirmDisabled = parsedValueToConfirm !== confirmedInput || isCreatingOrder const contractNames = getContractNames() @@ -105,19 +89,14 @@ const SellModal = ({ authorizedAddress: marketplace!.address, contractAddress: nft.contractAddress, contractName: - (nft.category === NFTCategory.WEARABLE || - nft.category === NFTCategory.EMOTE) && - nft.network === Network.MATIC + (nft.category === NFTCategory.WEARABLE || nft.category === NFTCategory.EMOTE) && nft.network === Network.MATIC ? ContractName.ERC721CollectionV2 : ContractName.ERC721, chainId: nft.chainId, type: AuthorizationType.APPROVAL } - const [isLoadingAuthorizations, isAuthorized] = useAuthorization( - authorization, - onFetchAuthorizations - ) + const [isLoadingAuthorizations, isAuthorized] = useAuthorization(authorization, onFetchAuthorizations) if (!wallet) { return null @@ -139,21 +118,11 @@ const SellModal = ({ } } - const handleCreateOrder = () => - onCreateOrder( - nft, - parseMANANumber(price), - new Date(`${expiresAt} 00:00:00`).getTime() - ) + const handleCreateOrder = () => onCreateOrder(nft, parseMANANumber(price), new Date(`${expiresAt} 00:00:00`).getTime()) const isInvalidDate = new Date(`${expiresAt} 00:00:00`).getTime() < Date.now() - const isInvalidPrice = - parseMANANumber(price) <= 0 || parseFloat(price) !== parseMANANumber(price) - const isDisabledSell = - !orderService.canSell() || - !isOwnedBy(nft, wallet) || - isInvalidPrice || - isInvalidDate + const isInvalidPrice = parseMANANumber(price) <= 0 || parseFloat(price) !== parseMANANumber(price) + const isDisabledSell = !orderService.canSell() || !isOwnedBy(nft, wallet) || isInvalidPrice || isInvalidDate const handleBackOrCancel = () => { if (isUpdate) { @@ -207,9 +176,7 @@ const SellModal = ({ label={t('sell_page.expiration_date')} type="date" value={expiresAt} - onChange={(_event, props) => - setExpiresAt(props.value || getDefaultExpirationDate()) - } + onChange={(_event, props) => setExpiresAt(props.value || getDefaultExpirationDate())} error={isInvalidDate} message={isInvalidDate ? t('sell_page.invalid_date') : undefined} /> @@ -220,12 +187,7 @@ const SellModal = ({ <Button as="div" onClick={handleBackOrCancel}> {isUpdate ? t('cancel_sale_page.title') : t('global.cancel')} </Button> - <ChainButton - onClick={() => setStep(StepperValues.CONFIRM_INPUT)} - primary - disabled={isDisabledSell} - chainId={nft.chainId} - > + <ChainButton onClick={() => setStep(StepperValues.CONFIRM_INPUT)} primary disabled={isDisabledSell} chainId={nft.chainId}> {t(isUpdate ? 'sell_page.update_submit' : 'sell_page.submit')} </ChainButton> </Modal.Actions> @@ -236,11 +198,7 @@ const SellModal = ({ <ModalNavigation title={t('sell_page.confirm.title')} onClose={isCreatingOrder ? undefined : onClose} - onBack={ - isCreatingOrder - ? undefined - : () => setStep(StepperValues.SELL_MODAL) - } + onBack={isCreatingOrder ? undefined : () => setStep(StepperValues.SELL_MODAL)} /> ), description: null, @@ -286,15 +244,7 @@ const SellModal = ({ setConfirmedInput(props.value) }} /> - {error && ( - <Message - error - size="tiny" - visible - content={error} - header={t('global.error')} - /> - )} + {error && <Message error size="tiny" visible content={error} header={t('global.error')} />} </div> ), actions: ( @@ -308,13 +258,7 @@ const SellModal = ({ > {t('global.cancel')} </Button> - <Button - type="submit" - primary - disabled={isConfirmDisabled} - loading={isCreatingOrder} - onClick={handleOnConfirm} - > + <Button type="submit" primary disabled={isConfirmDisabled} loading={isCreatingOrder} onClick={handleOnConfirm}> {t('global.proceed')} </Button> </Modal.Actions> @@ -336,9 +280,7 @@ const SellModal = ({ values={{ contract: contract?.name, token: token?.name, - settings_link: ( - <Link to={locations.settings()}>{t('global.settings')}</Link> - ), + settings_link: <Link to={locations.settings()}>{t('global.settings')}</Link>, br: ( <> <br /> @@ -349,19 +291,10 @@ const SellModal = ({ /> </Modal.Description> ), - content: ( - <Authorization - key={authorization.authorizedAddress} - authorization={authorization} - /> - ), + content: <Authorization key={authorization.authorizedAddress} authorization={authorization} />, actions: ( <Modal.Actions className={styles.AuthorizationModalActions}> - <Button - onClick={onClose} - className={styles.AuthorizationModalButtons} - disabled={isAuthorizing || isCreatingOrder} - > + <Button onClick={onClose} className={styles.AuthorizationModalButtons} disabled={isAuthorizing || isCreatingOrder}> {t('global.cancel')} </Button> <Button @@ -381,9 +314,7 @@ const SellModal = ({ <ModalNavigation title={t('sell_page.confirm.title')} onClose={onClose} - onBack={ - isCancelling ? undefined : () => setStep(StepperValues.SELL_MODAL) - } + onBack={isCancelling ? undefined : () => setStep(StepperValues.SELL_MODAL)} /> ), description: null, @@ -409,13 +340,7 @@ const SellModal = ({ <Button disabled={isCancelling} onClick={onClose}> {t('global.cancel')} </Button> - <Button - type="submit" - primary - disabled={isCancelling} - loading={isCancelling} - onClick={() => onCancelOrder(order!, nft)} - > + <Button type="submit" primary disabled={isCancelling} loading={isCancelling} onClick={() => onCancelOrder(order!, nft)}> {t('global.proceed')} </Button> </Modal.Actions> @@ -424,12 +349,7 @@ const SellModal = ({ } return ( - <Modal - className={styles.modal} - size="small" - name={'SellModal'} - onClose={onClose} - > + <Modal className={styles.modal} size="small" name={'SellModal'} onClose={onClose}> {Stepper[step].navigation} {Stepper[step].description} {Stepper[step].content} diff --git a/webapp/src/components/Modals/SellModal/SellModal.types.ts b/webapp/src/components/Modals/SellModal/SellModal.types.ts index 2719e4077f..26cb1575d4 100644 --- a/webapp/src/components/Modals/SellModal/SellModal.types.ts +++ b/webapp/src/components/Modals/SellModal/SellModal.types.ts @@ -1,25 +1,14 @@ import { Order } from '@dcl/schemas' import { Dispatch } from 'redux' -import { - fetchAuthorizationsRequest, - FetchAuthorizationsRequestAction -} from 'decentraland-dapps/dist/modules/authorization/actions' +import { fetchAuthorizationsRequest, FetchAuthorizationsRequestAction } from 'decentraland-dapps/dist/modules/authorization/actions' import { Authorization } from 'decentraland-dapps/dist/modules/authorization/types' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { ModalProps } from 'decentraland-dapps/dist/providers/ModalProvider/ModalProvider.types' -import { - upsertContracts, - UpsertContractsAction -} from '../../../modules/contract/actions' +import { upsertContracts, UpsertContractsAction } from '../../../modules/contract/actions' import { getContract } from '../../../modules/contract/selectors' import { NFT } from '../../../modules/nft/types' -import { - cancelOrderRequest, - CancelOrderRequestAction, - createOrderRequest, - CreateOrderRequestAction -} from '../../../modules/order/actions' +import { cancelOrderRequest, CancelOrderRequestAction, createOrderRequest, CreateOrderRequestAction } from '../../../modules/order/actions' import { Contract } from '../../../modules/vendor/services' export type Metadata = { @@ -46,26 +35,11 @@ export type OwnProps = Pick<Props, 'metadata'> export type MapStateProps = Pick< Props, - | 'authorizations' - | 'wallet' - | 'isCreatingOrder' - | 'error' - | 'getContract' - | 'isAuthorizing' - | 'isCancelling' + 'authorizations' | 'wallet' | 'isCreatingOrder' | 'error' | 'getContract' | 'isAuthorizing' | 'isCancelling' > -export type MapDispatchProps = Pick< - Props, - | 'onCreateOrder' - | 'onFetchAuthorizations' - | 'onUpsertContracts' - | 'onCancelOrder' -> +export type MapDispatchProps = Pick<Props, 'onCreateOrder' | 'onFetchAuthorizations' | 'onUpsertContracts' | 'onCancelOrder'> export type MapDispatch = Dispatch< - | CreateOrderRequestAction - | FetchAuthorizationsRequestAction - | UpsertContractsAction - | CancelOrderRequestAction + CreateOrderRequestAction | FetchAuthorizationsRequestAction | UpsertContractsAction | CancelOrderRequestAction > diff --git a/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.container.ts b/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.container.ts index 23ee7aa639..ae3ed1b8ca 100644 --- a/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.container.ts +++ b/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.container.ts @@ -1,38 +1,24 @@ import { connect } from 'react-redux' import { getAddress } from 'decentraland-dapps/dist/modules/wallet/selectors' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' -import { - SET_PROFILE_AVATAR_ALIAS_REQUEST, - setProfileAvatarAliasRequest -} from 'decentraland-dapps/dist/modules/profile/actions' -import { - getProfileOfAddress, - getLoading -} from 'decentraland-dapps/dist/modules/profile/selectors' +import { SET_PROFILE_AVATAR_ALIAS_REQUEST, setProfileAvatarAliasRequest } from 'decentraland-dapps/dist/modules/profile/actions' +import { getProfileOfAddress, getLoading } from 'decentraland-dapps/dist/modules/profile/selectors' import { RootState } from '../../../modules/reducer' -import { - MapDispatch, - MapDispatchProps, - MapState -} from './SetNameAsAliasModal.types' +import { MapDispatch, MapDispatchProps, MapState } from './SetNameAsAliasModal.types' import SetNameAsAliasModal from './SetNameAsAliasModal' const mapState = (state: RootState): MapState => { const address = getAddress(state) - const profile = !!address ? getProfileOfAddress(state, address) : undefined + const profile = address ? getProfileOfAddress(state, address) : undefined return { - isLoading: isLoadingType( - getLoading(state), - SET_PROFILE_AVATAR_ALIAS_REQUEST - ), + isLoading: isLoadingType(getLoading(state), SET_PROFILE_AVATAR_ALIAS_REQUEST), address, profile } } const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onSubmit: (address, name) => - dispatch(setProfileAvatarAliasRequest(address, name)) + onSubmit: (address, name) => dispatch(setProfileAvatarAliasRequest(address, name)) }) export default connect(mapState, mapDispatch)(SetNameAsAliasModal) diff --git a/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.spec.tsx b/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.spec.tsx index c0c96d3ec3..72d1e55f41 100644 --- a/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.spec.tsx +++ b/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.spec.tsx @@ -15,9 +15,9 @@ describe('SetNameAsAliasModal', () => { { name: previousName, hasClaimedName: false, - avatar: ({ + avatar: { snapshots: [] - } as unknown) as AvatarInfo + } as unknown as AvatarInfo } ] } as Profile, @@ -44,9 +44,7 @@ describe('SetNameAsAliasModal', () => { it('renders both names showing how it will be changed', () => { const { getByText } = screen expect(getByText(newName)).toBeInTheDocument() - expect( - getByText(`${previousName}#${mockProps.address.slice(-4)}`) - ).toBeInTheDocument() + expect(getByText(`${previousName}#${mockProps.address.slice(-4)}`)).toBeInTheDocument() }) it('renders the correct actions', () => { const { getByText } = screen @@ -57,10 +55,7 @@ describe('SetNameAsAliasModal', () => { const { getByText } = screen const confirmButton = getByText(t('global.confirm')) fireEvent.click(confirmButton) - expect(mockProps.onSubmit).toHaveBeenCalledWith( - mockProps.address, - newName - ) + expect(mockProps.onSubmit).toHaveBeenCalledWith(mockProps.address, newName) }) }) @@ -73,21 +68,17 @@ describe('SetNameAsAliasModal', () => { { name: newName, hasClaimedName: true, - avatar: ({ + avatar: { snapshots: [] - } as unknown) as AvatarInfo + } as unknown as AvatarInfo } ] } as Profile - screen = renderWithProviders( - <SetNameAsAliasModal {...mockProps} profile={updatedProfile} /> - ) + screen = renderWithProviders(<SetNameAsAliasModal {...mockProps} profile={updatedProfile} />) }) it('renders the success title when the alias is set', () => { const { getByText } = screen - expect( - getByText(t('set_name_as_alias_modal.success_title')) - ).toBeInTheDocument() + expect(getByText(t('set_name_as_alias_modal.success_title'))).toBeInTheDocument() }) it('should render the new name and the checked icon', () => { const { getAllByText, getByAltText } = screen @@ -110,9 +101,7 @@ describe('SetNameAsAliasModal', () => { describe('when the user has no profile yet', () => { it('should render the guest name', () => { - const { getByText } = renderWithProviders( - <SetNameAsAliasModal {...mockProps} profile={undefined} /> - ) + const { getByText } = renderWithProviders(<SetNameAsAliasModal {...mockProps} profile={undefined} />) expect(getByText(`${t('global.guest')}#4567`)).toBeInTheDocument() }) }) diff --git a/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.tsx b/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.tsx index ffc9083499..7dbdf77631 100644 --- a/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.tsx +++ b/webapp/src/components/Modals/SetNameAsAliasModal/SetNameAsAliasModal.tsx @@ -7,55 +7,27 @@ import UserIcon from '../../../images/user-circle.svg' import { Props } from './SetNameAsAliasModal.types' import './SetNameAsAliasModal.css' -const SetNameAsAliasModal = ({ - address, - profile, - metadata: { name }, - isLoading, - onSubmit, - onClose -}: Props) => { - const successOnSetAlias = - name === profile?.avatars[0].name && - profile?.avatars[0].hasClaimedName && - !isLoading +const SetNameAsAliasModal = ({ address, profile, metadata: { name }, isLoading, onSubmit, onClose }: Props) => { + const successOnSetAlias = name === profile?.avatars[0].name && profile?.avatars[0].hasClaimedName && !isLoading return ( - <Modal - name={name} - onClose={isLoading ? undefined : onClose} - className="SetNameAsAliasModal" - > + <Modal name={name} onClose={isLoading ? undefined : onClose} className="SetNameAsAliasModal"> <ModalNavigation - title={ - successOnSetAlias - ? t('set_name_as_alias_modal.success_title') - : t('set_name_as_alias_modal.title') - } + title={successOnSetAlias ? t('set_name_as_alias_modal.success_title') : t('set_name_as_alias_modal.title')} onClose={isLoading ? undefined : onClose} /> <Form onSubmit={() => !!address && onSubmit(address, name)}> <Modal.Content> <div className="details"> <T - id={ - successOnSetAlias - ? 'set_name_as_alias_modal.success_description' - : 'set_name_as_alias_modal.description' - } + id={successOnSetAlias ? 'set_name_as_alias_modal.success_description' : 'set_name_as_alias_modal.description'} values={{ name: <strong>{name}</strong> }} /> </div> <div className="card"> {profile && successOnSetAlias && address ? ( <div className="successContainer"> - <Profile - address={address} - avatar={profile.avatars[0]} - inline={false} - size="massive" - imageOnly - /> + <Profile address={address} avatar={profile.avatars[0]} inline={false} size="massive" imageOnly /> <div className="verified"> <span>{profile.avatars[0].name}</span> <img src={VerifiedIcon} alt="verified icon" /> @@ -64,13 +36,7 @@ const SetNameAsAliasModal = ({ ) : null} {!successOnSetAlias ? ( <> - <div - className={classNames( - profile?.avatars[0].hasClaimedName - ? 'verified' - : 'unverified' - )} - > + <div className={classNames(profile?.avatars[0].hasClaimedName ? 'verified' : 'unverified')}> <span> {profile ? profile.avatars[0].hasClaimedName @@ -105,12 +71,7 @@ const SetNameAsAliasModal = ({ </> ) : ( <> - <Button - secondary - onClick={onClose} - disabled={isLoading} - type="button" - > + <Button secondary onClick={onClose} disabled={isLoading} type="button"> {t('global.cancel')} </Button> <Button primary type="submit" loading={isLoading}> diff --git a/webapp/src/components/Modals/ShareListModal/ShareListModal.spec.tsx b/webapp/src/components/Modals/ShareListModal/ShareListModal.spec.tsx index ddba46fa31..8664d6a533 100644 --- a/webapp/src/components/Modals/ShareListModal/ShareListModal.spec.tsx +++ b/webapp/src/components/Modals/ShareListModal/ShareListModal.spec.tsx @@ -11,7 +11,7 @@ jest.mock('decentraland-dapps/dist/modules/analytics/utils') const getAnalyticsMock = getAnalytics as jest.Mock -let list: List = { +const list: List = { id: 'aListId', name: 'aListName', description: 'aListDescription', @@ -49,9 +49,7 @@ describe('when the modal is rendered', () => { const { getByText } = renderedModal expect(getByText(t('share_list_modal.title'))).toBeInTheDocument() expect(getByText(t('share_list_modal.copy_link'))).toBeInTheDocument() - expect( - getByText(t('share_list_modal.share_on_twitter')) - ).toBeInTheDocument() + expect(getByText(t('share_list_modal.share_on_twitter'))).toBeInTheDocument() }) it('should render the lists card', () => { @@ -75,8 +73,7 @@ describe('when the share on twitter button is clicked', () => { it('should open a new page with a twitter message', async () => { jest.spyOn(window, 'open').mockImplementation(() => null) const dclUrl = 'https://decentraland.zone/marketplace' - const locationsUrl = - '/lists/aListId?assetType=item§ion=lists&vendor=decentraland&page=1&sortBy=newest' + const locationsUrl = '/lists/aListId?assetType=item§ion=lists&vendor=decentraland&page=1&sortBy=newest' const twitterURL = `https://twitter.com/intent/tweet?text=${encodeURIComponent( `${t('share_list_modal.twitter_message')}${dclUrl}${locationsUrl}` )}` diff --git a/webapp/src/components/Modals/ShareListModal/ShareListModal.tsx b/webapp/src/components/Modals/ShareListModal/ShareListModal.tsx index 57696a1936..89ced8abf5 100644 --- a/webapp/src/components/Modals/ShareListModal/ShareListModal.tsx +++ b/webapp/src/components/Modals/ShareListModal/ShareListModal.tsx @@ -52,9 +52,7 @@ const ShareListModal = (props: Props) => { const handleShareOnTwitter = useCallback( (e: React.MouseEvent<HTMLButtonElement>) => { - const url = `${twitterLink}${encodeURIComponent( - `${t('share_list_modal.twitter_message')}${MARKETPLACE_URL}${listLink}` - )}` + const url = `${twitterLink}${encodeURIComponent(`${t('share_list_modal.twitter_message')}${MARKETPLACE_URL}${listLink}`)}` getAnalytics().track(events.SHARE_LIST, { list, url, @@ -74,18 +72,13 @@ const ShareListModal = (props: Props) => { return ( <Modal size="tiny" className={styles.modal} onClose={handleClose}> - <ModalNavigation - title={t('share_list_modal.title')} - onClose={handleClose} - /> + <ModalNavigation title={t('share_list_modal.title')} onClose={handleClose} /> <Modal.Content className={styles.content}> <ListCard list={list} viewOnly /> </Modal.Content> <Modal.Actions className={styles.actions}> <Button primary fluid onClick={handleCopyLink}> - {hasCopiedAddress - ? t('share_list_modal.copied') - : t('share_list_modal.copy_link')} + {hasCopiedAddress ? t('share_list_modal.copied') : t('share_list_modal.copy_link')} </Button> <Button fluid inverted onClick={handleShareOnTwitter}> <Icon name="twitter" /> diff --git a/webapp/src/components/Modals/SmartWearableVideoShowcaseModal/SmartWearableVideoShowcaseModal.spec.tsx b/webapp/src/components/Modals/SmartWearableVideoShowcaseModal/SmartWearableVideoShowcaseModal.spec.tsx index ae7c4e1ea2..f62347d8a0 100644 --- a/webapp/src/components/Modals/SmartWearableVideoShowcaseModal/SmartWearableVideoShowcaseModal.spec.tsx +++ b/webapp/src/components/Modals/SmartWearableVideoShowcaseModal/SmartWearableVideoShowcaseModal.spec.tsx @@ -17,12 +17,7 @@ let videoHash: string function renderSmartWearableVideoShowcaseModal(props: Partial<Props> = {}) { return renderWithProviders( - <SmartWearableVideoShowcaseModal - name="SmartWearableVideoShowcaseModal" - metadata={{ videoHash }} - onClose={jest.fn()} - {...props} - /> + <SmartWearableVideoShowcaseModal name="SmartWearableVideoShowcaseModal" metadata={{ videoHash }} onClose={jest.fn()} {...props} /> ) } @@ -36,9 +31,7 @@ describe('when the modal is rendered', () => { it('should render the title and share buttons', () => { const { getByText } = renderedModal - expect( - getByText(t('smart_wearable_video_showcase_modal.title')) - ).toBeInTheDocument() + expect(getByText(t('smart_wearable_video_showcase_modal.title'))).toBeInTheDocument() }) it('should render the video with the src taken from the props', async () => { diff --git a/webapp/src/components/Modals/SmartWearableVideoShowcaseModal/SmartWearableVideoShowcaseModal.tsx b/webapp/src/components/Modals/SmartWearableVideoShowcaseModal/SmartWearableVideoShowcaseModal.tsx index ab800dd402..beb55037b3 100644 --- a/webapp/src/components/Modals/SmartWearableVideoShowcaseModal/SmartWearableVideoShowcaseModal.tsx +++ b/webapp/src/components/Modals/SmartWearableVideoShowcaseModal/SmartWearableVideoShowcaseModal.tsx @@ -15,10 +15,7 @@ const SmartWearableVideoShowcaseModal = (props: Props) => { return ( <Modal size="tiny" className={styles.modal} onClose={onClose} open> - <ModalNavigation - title={t('smart_wearable_video_showcase_modal.title')} - onClose={onClose} - /> + <ModalNavigation title={t('smart_wearable_video_showcase_modal.title')} onClose={onClose} /> <Modal.Content className={styles.content}> {videoHash ? ( <video diff --git a/webapp/src/components/Modals/SubmitTransactionModal/SubmitTransactionModal.tsx b/webapp/src/components/Modals/SubmitTransactionModal/SubmitTransactionModal.tsx index 71b0e4ff97..cd99272faa 100644 --- a/webapp/src/components/Modals/SubmitTransactionModal/SubmitTransactionModal.tsx +++ b/webapp/src/components/Modals/SubmitTransactionModal/SubmitTransactionModal.tsx @@ -22,44 +22,24 @@ const SubmitTransactionModal = ({ return ( <Modal size="tiny" name={name} onClose={!isLoading ? onClose : undefined}> - <ModalNavigation - title={title} - onClose={!isLoading ? onClose : undefined} - /> + <ModalNavigation title={title} onClose={!isLoading ? onClose : undefined} /> <Modal.Content className={className}> {children} - {error ? ( - <Message - error - size="tiny" - visible - content={error} - header={t('global.error')} - /> - ) : null} + {error ? <Message error size="tiny" visible content={error} header={t('global.error')} /> : null} </Modal.Content> <Modal.Actions className={styles.actions}> {isLoading ? ( <div className={styles.loader}> <Loader inline size="small" />{' '} - {isSubmittingTransaction ? ( - <span className={styles.signMessage}> - {confirm_transaction_message} - </span> - ) : null} + {isSubmittingTransaction ? <span className={styles.signMessage}>{confirm_transaction_message}</span> : null} </div> ) : ( <Button primary disabled={isLoading} onClick={onSubmitTransaction}> {action_message} </Button> )} - <Button - secondary - disabled={isLoading} - className={styles.cancel} - onClick={onClose} - > + <Button secondary disabled={isLoading} className={styles.cancel} onClick={onClose}> {t('global.cancel')} </Button> </Modal.Actions> diff --git a/webapp/src/components/Modals/index.ts b/webapp/src/components/Modals/index.ts index a6e9542e85..eb7478e3c2 100644 --- a/webapp/src/components/Modals/index.ts +++ b/webapp/src/components/Modals/index.ts @@ -17,10 +17,6 @@ export { SaveToListModal } from './SaveToListModal' export { ShareListModal } from './ShareListModal' export { SmartWearableVideoShowcaseModal } from './SmartWearableVideoShowcaseModal' export { ExpiredListingsModal } from './ExpiredListingsModal' -export { - BuyNftWithCryptoModal, - MintNftWithCryptoModal, - MintNameWithCryptoModal -} from './BuyWithCryptoModal' +export { BuyNftWithCryptoModal, MintNftWithCryptoModal, MintNameWithCryptoModal } from './BuyWithCryptoModal' export { default as ClaimNameFatFingerModal } from './ClaimNameFatFingerModal' export { default as SetNameAsAliasModal } from './SetNameAsAliasModal' diff --git a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.container.tsx b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.container.tsx index be0d7f5f11..327281c231 100644 --- a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.container.tsx +++ b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.container.tsx @@ -6,11 +6,7 @@ import { getWallet } from '../../../modules/wallet/selectors' import { locations } from '../../../modules/routing/locations' import { Section } from '../../../modules/vendor/decentraland' import { BrowseOptions } from '../../../modules/routing/types' -import { - MapDispatch, - MapDispatchProps, - MapStateProps -} from './ClaimNamePage.types' +import { MapDispatch, MapDispatchProps, MapStateProps } from './ClaimNamePage.types' import { RootState } from '../../../modules/reducer' import ClaimNamePage from './ClaimNamePage' @@ -20,10 +16,8 @@ const mapState = (state: RootState): MapStateProps => ({ }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onBrowse: (options?: BrowseOptions) => - dispatch(push(locations.names({ ...options, section: Section.ENS }))), - onClaim: (name: string) => - dispatch(openModal('ClaimNameFatFingerModal', { name })), + onBrowse: (options?: BrowseOptions) => dispatch(push(locations.names({ ...options, section: Section.ENS }))), + onClaim: (name: string) => dispatch(openModal('ClaimNameFatFingerModal', { name })), onRedirect: path => dispatch(replace(path)) }) diff --git a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.spec.tsx b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.spec.tsx index d8dffa9f08..c2e04a8400 100644 --- a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.spec.tsx +++ b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.spec.tsx @@ -19,18 +19,10 @@ describe('ClaimNamePage', () => { const renderAndTypeText = async (text: string) => { const matchers = renderWithProviders( - <ClaimNamePage - wallet={walletMock} - isConnecting={false} - onClaim={onClaimMock} - onBrowse={onBrowseMock} - onRedirect={onRedirectMock} - /> + <ClaimNamePage wallet={walletMock} isConnecting={false} onClaim={onClaimMock} onBrowse={onBrowseMock} onRedirect={onRedirectMock} /> ) const { getByDisplayValue, getByText } = matchers - const nameInput = getByDisplayValue( - t('names_page.your_name') - ) as HTMLInputElement + const nameInput = getByDisplayValue(t('names_page.your_name')) as HTMLInputElement fireEvent.change(nameInput, { target: { value: text } }) await waitFor(() => { @@ -52,9 +44,7 @@ describe('ClaimNamePage', () => { it('should have the claim name disabled and show the proper warning message', async () => { const { getByText } = await renderAndTypeText(invalidName) - expect( - getByText(t('names_page.invalid_characters')) - ).toBeInTheDocument() + expect(getByText(t('names_page.invalid_characters'))).toBeInTheDocument() }) }) describe('and the name has a space', () => { @@ -109,13 +99,9 @@ describe('ClaimNamePage', () => { it('should have the claim name enabled and call the onClaim when clicking it', async () => { const { getByText } = await renderAndTypeText(validName) const claimButton = getByText(t('names_page.claim_a_name')) - await waitFor(() => - expect(claimButton).not.toHaveAttribute('disabled') - ) + await waitFor(() => expect(claimButton).not.toHaveAttribute('disabled')) fireEvent.click(claimButton) - await waitFor(() => - expect(onClaimMock).toHaveBeenCalledWith(validName) - ) + await waitFor(() => expect(onClaimMock).toHaveBeenCalledWith(validName)) }) }) describe('and does not have enough funds to claim the NAME', () => { @@ -128,9 +114,7 @@ describe('ClaimNamePage', () => { const claimButton = getByText(t('names_page.claim_a_name')) await waitFor(() => expect(claimButton).toHaveAttribute('disabled')) fireEvent.click(claimButton) - await waitFor(() => - expect(onClaimMock).not.toHaveBeenCalledWith(validName) - ) + await waitFor(() => expect(onClaimMock).not.toHaveBeenCalledWith(validName)) }) }) }) @@ -142,11 +126,7 @@ describe('ClaimNamePage', () => { it('should have the claim name disabled', async () => { const { getByText } = await renderAndTypeText(validName) - await waitFor(() => - expect(getByText(t('names_page.claim_a_name'))).toHaveAttribute( - 'disabled' - ) - ) + await waitFor(() => expect(getByText(t('names_page.claim_a_name'))).toHaveAttribute('disabled')) }) }) }) diff --git a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.tsx b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.tsx index 032f87cbf5..5025ddbd10 100644 --- a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.tsx +++ b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.tsx @@ -1,16 +1,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useLocation } from 'react-router-dom' import classNames from 'classnames' -import { - Button, - Close, - Container, - Field, - Icon, - Loader, - Popup, - useTabletAndBelowMediaQuery -} from 'decentraland-ui' +import { Button, Close, Container, Field, Icon, Loader, Popup, useTabletAndBelowMediaQuery } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { config } from '../../../config' import infoIcon from '../../../images/infoIcon.png' @@ -105,12 +96,7 @@ const ClaimNamePage = (props: Props) => { ) useEffect(() => { - if ( - name !== PLACEHOLDER_NAME && - name.length && - hasNameMinLength(name) && - isNameValid(name) - ) { + if (name !== PLACEHOLDER_NAME && name.length && hasNameMinLength(name) && isNameValid(name)) { setIsLoadingStatus(true) } else if (!isNameValid(name)) { // turn off loading if an invalid character is typed @@ -128,15 +114,7 @@ const ClaimNamePage = (props: Props) => { onClaim(name) } - }, [ - isConnecting, - wallet, - onRedirect, - location.pathname, - name, - isAvailable, - onClaim - ]) + }, [isConnecting, wallet, onRedirect, location.pathname, name, isAvailable, onClaim]) const inputRef = useRef<HTMLInputElement>(null) @@ -184,11 +162,7 @@ const ClaimNamePage = (props: Props) => { const renderRemainingCharacters = useCallback(() => { if (name !== PLACEHOLDER_NAME) { - return ( - <span - className={styles.remainingCharacters} - >{`${name.length}/${MAX_NAME_SIZE}`}</span> - ) + return <span className={styles.remainingCharacters}>{`${name.length}/${MAX_NAME_SIZE}`}</span> } }, [PLACEHOLDER_NAME, name]) @@ -230,14 +204,9 @@ const ClaimNamePage = (props: Props) => { image: GovernanceImg, title: t('names_page.why.governance.title'), description: t('names_page.why.governance.description', { - b: (children: React.ReactChildren) => ( - <b className={styles.voting}>{children}</b> - ), + b: (children: React.ReactChildren) => <b className={styles.voting}>{children}</b>, link: ( - <a - href="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao" - className={styles.learnMore} - > + <a href="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao" className={styles.learnMore}> {t('global.learn_more')} </a> ) @@ -247,9 +216,7 @@ const ClaimNamePage = (props: Props) => { image: LandmarkImg, title: t('names_page.why.get_url.title'), description: t('names_page.why.get_url.description', { - b: (children: React.ReactChildren) => ( - <b className={styles.nameLink}>{children}</b> - ) + b: (children: React.ReactChildren) => <b className={styles.nameLink}>{children}</b> }) } ] @@ -262,36 +229,20 @@ const ClaimNamePage = (props: Props) => { <Container className={styles.mainContainer}> <div className={styles.gradient}> <div className={classNames(styles.claimContainer)}> - {isInputFocus ? ( - <Close onClick={() => setIsInputFocus(false)} /> - ) : null} + {isInputFocus ? <Close onClick={() => setIsInputFocus(false)} /> : null} <div className={styles.imageContainer}> <div className={styles.imagePassportContainer}> <img - className={classNames( - !isInputFocus && styles.visible, - styles.passportLogo - )} + className={classNames(!isInputFocus && styles.visible, styles.passportLogo)} src={ClaimNameImage} alt="Claim name" /> - <h2 className={classNames(isInputFocus && styles.fadeOut)}> - {t('names_page.title')} - </h2> + <h2 className={classNames(isInputFocus && styles.fadeOut)}>{t('names_page.title')}</h2> </div> - <img - className={classNames( - styles.banner, - isInputFocus && styles.visible - )} - src={ClaimNameBanner} - alt="Banner" - /> + <img className={classNames(styles.banner, isInputFocus && styles.visible)} src={ClaimNameBanner} alt="Banner" /> </div> - <span className={styles.subtitle}> - {t('names_page.subtitle')} - </span> + <span className={styles.subtitle}>{t('names_page.subtitle')}</span> <div className={styles.claimInput} onClick={onFieldClick}> <Field onClick={onFieldClick} @@ -315,20 +266,10 @@ const ClaimNamePage = (props: Props) => { } /> <div className={styles.remainingCharactersContainer}> - {isLoadingStatus ? ( - <Loader active inline size="tiny" /> - ) : null} + {isLoadingStatus ? <Loader active inline size="tiny" /> : null} {renderRemainingCharacters()} </div> - <Button - primary - onClick={handleClaim} - disabled={ - !isAvailable || - nameInvalidType !== null || - isLoadingStatus - } - > + <Button primary onClick={handleClaim} disabled={!isAvailable || nameInvalidType !== null || isLoadingStatus}> {t('names_page.claim_a_name')} </Button> @@ -370,45 +311,31 @@ const ClaimNamePage = (props: Props) => { </> )} </div> - ) : name && - (!hasNameMinLength(name) || !isNameValid(name)) ? ( + ) : name && (!hasNameMinLength(name) || !isNameValid(name)) ? ( <div className={styles.availableContainer}> <Icon className={styles.warningIcon} - name={ - nameInvalidType === NameInvalidType.TOO_SHORT - ? 'exclamation triangle' - : 'close' - } + name={nameInvalidType === NameInvalidType.TOO_SHORT ? 'exclamation triangle' : 'close'} /> {nameInvalidType === NameInvalidType.TOO_SHORT ? t('names_page.name_too_short') : nameInvalidType === NameInvalidType.TOO_LONG - ? t('names_page.name_too_long') - : nameInvalidType === NameInvalidType.HAS_SPACES - ? t('names_page.has_spaces') - : t('names_page.invalid_characters')} + ? t('names_page.name_too_long') + : nameInvalidType === NameInvalidType.HAS_SPACES + ? t('names_page.has_spaces') + : t('names_page.invalid_characters')} </div> ) : null} </div> - <span - className={classNames( - styles.nameCost, - isInputFocus && styles.fadeOut - )} - > + <span className={classNames(styles.nameCost, isInputFocus && styles.fadeOut)}> {t('names_page.name_cost', { mana: ( <> <Mana inline /> 100 MANA </> ), - network: ( - <span className={styles.nameCostNetwork}> - {t('names_page.ethereum_mainnet_network')} - </span> - ) + network: <span className={styles.nameCostNetwork}>{t('names_page.ethereum_mainnet_network')}</span> })} <Popup content={t('names_page.dao_tooltip', { @@ -425,22 +352,14 @@ const ClaimNamePage = (props: Props) => { position="top center" hoverable mouseLeaveDelay={500} - trigger={ - <img - src={infoIcon} - alt="info" - className={styles.informationTooltip} - /> - } + trigger={<img src={infoIcon} alt="info" className={styles.informationTooltip} />} on="hover" /> <div> {t('names_page.name_cost_fiat', { icon: <Icon name="credit card outline" /> })} - <span className={styles.cardsLabel}> - {t('names_page.debit_and_credit_cards')} - </span> + <span className={styles.cardsLabel}>{t('names_page.debit_and_credit_cards')}</span> </div> </span> </div> @@ -450,12 +369,7 @@ const ClaimNamePage = (props: Props) => { <div className={styles.cardsContainer}> {cards.map((card, index) => ( <div key={index} className={styles.card}> - <div - className={classNames( - styles.whyImgContainer, - card.className - )} - > + <div className={classNames(styles.whyImgContainer, card.className)}> <img src={card.image} alt={card.title} /> </div> <div className={styles.whyTextContainer}> @@ -465,12 +379,7 @@ const ClaimNamePage = (props: Props) => { </div> ))} </div> - <div - className={classNames( - styles.cardsContainer, - styles.bottomContainer - )} - > + <div className={classNames(styles.cardsContainer, styles.bottomContainer)}> <div className={styles.nameTakenCard}> <div className={styles.buttons}> <div> @@ -478,13 +387,8 @@ const ClaimNamePage = (props: Props) => { </div> <div> <h2> {t('names_page.ctas.name_taken.title')}</h2> - <span> - {' '} - {t('names_page.ctas.name_taken.description')} - </span> - <Button onClick={() => onBrowse()}> - {t('names_page.browse_names_being_resold')} - </Button> + <span> {t('names_page.ctas.name_taken.description')}</span> + <Button onClick={() => onBrowse()}>{t('names_page.browse_names_being_resold')}</Button> </div> </div> </div> @@ -496,12 +400,7 @@ const ClaimNamePage = (props: Props) => { </div> <div style={{ justifyContent: 'center' }}> <h2> {t('names_page.ctas.manage.title')}</h2> - <Button - inverted - as={'a'} - target="_blank" - href={`${builderUrl}/names`} - > + <Button inverted as={'a'} target="_blank" href={`${builderUrl}/names`}> {t('names_page.manage_your_names')} </Button> </div> diff --git a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.types.ts b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.types.ts index c0d93fc297..e6bd2d8944 100644 --- a/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.types.ts +++ b/webapp/src/components/NamesPage/ClaimNamePage/ClaimNamePage.types.ts @@ -1,10 +1,7 @@ import { Dispatch } from 'redux' import { CallHistoryMethodAction } from 'connected-react-router' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' -import { - OpenModalAction, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' +import { OpenModalAction, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { BrowseOptions } from '../../../modules/routing/types' export type Props = { @@ -16,8 +13,5 @@ export type Props = { } export type MapStateProps = Pick<Props, 'wallet' | 'isConnecting'> -export type MapDispatchProps = Pick< - Props, - 'onBrowse' | 'onClaim' | 'onRedirect' -> +export type MapDispatchProps = Pick<Props, 'onBrowse' | 'onClaim' | 'onRedirect'> export type MapDispatch = Dispatch<CallHistoryMethodAction | OpenModalAction> diff --git a/webapp/src/components/NamesPage/NamesPage.tsx b/webapp/src/components/NamesPage/NamesPage.tsx index 16663816a9..d63dfd014e 100644 --- a/webapp/src/components/NamesPage/NamesPage.tsx +++ b/webapp/src/components/NamesPage/NamesPage.tsx @@ -9,12 +9,7 @@ import { PageLayout } from '../PageLayout' const NamesPage = () => { return ( <PageLayout activeTab={NavigationTab.NAMES}> - <AssetBrowse - vendor={VendorName.DECENTRALAND} - view={View.MARKET} - section={Section.ENS} - sections={[Section.ENS]} - /> + <AssetBrowse vendor={VendorName.DECENTRALAND} view={View.MARKET} section={Section.ENS} sections={[Section.ENS]} /> </PageLayout> ) } diff --git a/webapp/src/components/Navbar/Navbar.container.ts b/webapp/src/components/Navbar/Navbar.container.ts index b1107d8d37..5df8eb9984 100644 --- a/webapp/src/components/Navbar/Navbar.container.ts +++ b/webapp/src/components/Navbar/Navbar.container.ts @@ -12,9 +12,7 @@ import { getIsChainSelectorEnabled } from '../../modules/features/selectors' const mapState = (state: RootState): MapStateProps => ({ location: getLocation(state), - hasPendingTransactions: getTransactions( - state - ).some((tx: { status: TransactionStatus | null }) => isPending(tx.status)), + hasPendingTransactions: getTransactions(state).some((tx: { status: TransactionStatus | null }) => isPending(tx.status)), identity: getCurrentIdentity(state) || undefined, isChainSelectorEnabled: getIsChainSelectorEnabled(state) }) diff --git a/webapp/src/components/Navbar/Navbar.tsx b/webapp/src/components/Navbar/Navbar.tsx index bdf7ae757a..e8989a79fe 100644 --- a/webapp/src/components/Navbar/Navbar.tsx +++ b/webapp/src/components/Navbar/Navbar.tsx @@ -13,18 +13,10 @@ const Navbar = (props: Props) => { const handleOnSignIn = useCallback(() => { const searchParams = new URLSearchParams(search) const currentRedirectTo = searchParams.get('redirectTo') - const basename = /^decentraland.(zone|org|today)$/.test( - window.location.host - ) - ? '/marketplace' - : '' - const redirectTo = !currentRedirectTo - ? `${basename}${pathname}${search}` - : `${basename}${currentRedirectTo}` + const basename = /^decentraland.(zone|org|today)$/.test(window.location.host) ? '/marketplace' : '' + const redirectTo = !currentRedirectTo ? `${basename}${pathname}${search}` : `${basename}${currentRedirectTo}` - window.location.replace( - `${config.get('AUTH_URL')}/login?redirectTo=${redirectTo}` - ) + window.location.replace(`${config.get('AUTH_URL')}/login?redirectTo=${redirectTo}`) }, [pathname, search]) const handleOnClickAccount = useCallback(() => { diff --git a/webapp/src/components/Navbar/Navbar.types.ts b/webapp/src/components/Navbar/Navbar.types.ts index 9ca8d6dbd1..2b9998af8f 100644 --- a/webapp/src/components/Navbar/Navbar.types.ts +++ b/webapp/src/components/Navbar/Navbar.types.ts @@ -14,9 +14,6 @@ export type Props = Partial<NavbarProps> & { export type OwnProps = Pick<Props, 'enablePartialSupportAlert'> -export type MapStateProps = Pick< - Props, - 'location' | 'hasPendingTransactions' | 'identity' | 'isChainSelectorEnabled' -> +export type MapStateProps = Pick<Props, 'location' | 'hasPendingTransactions' | 'identity' | 'isChainSelectorEnabled'> export type MapDispatchProps = Pick<Props, 'onNavigate'> export type MapDispatch = Dispatch<CallHistoryMethodAction> diff --git a/webapp/src/components/Navigation/Navigation.container.tsx b/webapp/src/components/Navigation/Navigation.container.tsx index e7bb94b755..48a15ce9b5 100644 --- a/webapp/src/components/Navigation/Navigation.container.tsx +++ b/webapp/src/components/Navigation/Navigation.container.tsx @@ -4,11 +4,7 @@ import { getIsCampaignBrowserEnabled } from '../../modules/features/selectors' import { getIsFullscreen } from '../../modules/routing/selectors' import { RootState } from '../../modules/reducer' import { clearFilters } from '../../modules/routing/actions' -import { - MapDispatch, - MapDispatchProps, - MapStateProps -} from './Navigation.types' +import { MapDispatch, MapDispatchProps, MapStateProps } from './Navigation.types' import Navigation from './Navigation' const mapState = (state: RootState): MapStateProps => ({ diff --git a/webapp/src/components/Navigation/Navigation.tsx b/webapp/src/components/Navigation/Navigation.tsx index 5471080873..442bcc81bb 100644 --- a/webapp/src/components/Navigation/Navigation.tsx +++ b/webapp/src/components/Navigation/Navigation.tsx @@ -16,13 +16,7 @@ import { Props, NavigationTab } from './Navigation.types' import './Navigation.css' const Navigation = (props: Props) => { - const { - activeTab, - isFullscreen, - isCampaignBrowserEnabled, - onOpenBuyManaWithFiatModal, - onClearFilters - } = props + const { activeTab, isFullscreen, isCampaignBrowserEnabled, onOpenBuyManaWithFiatModal, onClearFilters } = props const analytics = getAnalytics() const isMobile = useMobileMediaQuery() @@ -44,9 +38,7 @@ const Navigation = (props: Props) => { <Tabs isFullscreen={isFullscreen}> <Tabs.Left> <Link to={locations.root()}> - <Tabs.Tab active={activeTab === NavigationTab.OVERVIEW}> - {t('navigation.overview')} - </Tabs.Tab> + <Tabs.Tab active={activeTab === NavigationTab.OVERVIEW}>{t('navigation.overview')}</Tabs.Tab> </Link> {isCampaignBrowserEnabled ? ( <Link @@ -70,49 +62,30 @@ const Navigation = (props: Props) => { </Tabs.Tab> </Link> ) : null} - <Link - to={locations.browse(browseDefaultOptions)} - onClick={onClearFilters} - > - <Tabs.Tab active={activeTab === NavigationTab.COLLECTIBLES}> - {t('navigation.collectibles')} - </Tabs.Tab> + <Link to={locations.browse(browseDefaultOptions)} onClick={onClearFilters}> + <Tabs.Tab active={activeTab === NavigationTab.COLLECTIBLES}>{t('navigation.collectibles')}</Tabs.Tab> </Link> <Link to={locations.lands()}> - <Tabs.Tab active={activeTab === NavigationTab.LANDS}> - {t('navigation.land')} - </Tabs.Tab> + <Tabs.Tab active={activeTab === NavigationTab.LANDS}>{t('navigation.land')}</Tabs.Tab> </Link> <Link to={locations.claimName()}> - <Tabs.Tab active={activeTab === NavigationTab.NAMES}> - {t('navigation.names')} - </Tabs.Tab> + <Tabs.Tab active={activeTab === NavigationTab.NAMES}>{t('navigation.names')}</Tabs.Tab> </Link> <Link to={locations.defaultCurrentAccount()}> - <Tabs.Tab active={activeTab === NavigationTab.MY_STORE}> - {t('navigation.my_assets')} - </Tabs.Tab> + <Tabs.Tab active={activeTab === NavigationTab.MY_STORE}>{t('navigation.my_assets')}</Tabs.Tab> </Link> <Link to={locations.lists()}> - <Tabs.Tab active={activeTab === NavigationTab.MY_LISTS}> - {t('navigation.my_lists')} - </Tabs.Tab> + <Tabs.Tab active={activeTab === NavigationTab.MY_LISTS}>{t('navigation.my_lists')}</Tabs.Tab> </Link> <Mobile> <Link to={locations.activity()}> - <Tabs.Tab active={activeTab === NavigationTab.ACTIVITY}> - {t('navigation.activity')} - </Tabs.Tab> + <Tabs.Tab active={activeTab === NavigationTab.ACTIVITY}>{t('navigation.activity')}</Tabs.Tab> </Link> </Mobile> </Tabs.Left> {!isMobile ? ( <Tabs.Right> - <Button - inverted - onClick={handleOpenBuyManaWithFiatModal} - size="small" - > + <Button inverted onClick={handleOpenBuyManaWithFiatModal} size="small"> {t('navigation.buy_mana_with_fiat')} </Button> </Tabs.Right> diff --git a/webapp/src/components/Navigation/Navigation.types.ts b/webapp/src/components/Navigation/Navigation.types.ts index b7fba98853..3eeb95abdf 100644 --- a/webapp/src/components/Navigation/Navigation.types.ts +++ b/webapp/src/components/Navigation/Navigation.types.ts @@ -1,8 +1,5 @@ import { Dispatch } from 'redux' -import { - openBuyManaWithFiatModalRequest, - OpenBuyManaWithFiatModalRequestAction -} from 'decentraland-dapps/dist/modules/gateway/actions' +import { openBuyManaWithFiatModalRequest, OpenBuyManaWithFiatModalRequestAction } from 'decentraland-dapps/dist/modules/gateway/actions' import { clearFilters, ClearFiltersAction } from '../../modules/routing/actions' export enum NavigationTab { @@ -22,21 +19,11 @@ export type Props = { isFullScreen?: boolean activeTab?: NavigationTab isFullscreen?: boolean - onOpenBuyManaWithFiatModal: () => ReturnType< - typeof openBuyManaWithFiatModalRequest - > + onOpenBuyManaWithFiatModal: () => ReturnType<typeof openBuyManaWithFiatModalRequest> onClearFilters: typeof clearFilters } -export type MapDispatch = Dispatch< - OpenBuyManaWithFiatModalRequestAction | ClearFiltersAction -> +export type MapDispatch = Dispatch<OpenBuyManaWithFiatModalRequestAction | ClearFiltersAction> -export type MapStateProps = Pick< - Props, - 'isCampaignBrowserEnabled' | 'isFullScreen' -> -export type MapDispatchProps = Pick< - Props, - 'onOpenBuyManaWithFiatModal' | 'onClearFilters' -> +export type MapStateProps = Pick<Props, 'isCampaignBrowserEnabled' | 'isFullScreen'> +export type MapDispatchProps = Pick<Props, 'onOpenBuyManaWithFiatModal' | 'onClearFilters'> diff --git a/webapp/src/components/Network/Network.tsx b/webapp/src/components/Network/Network.tsx index dfbfb81cac..54af347a43 100644 --- a/webapp/src/components/Network/Network.tsx +++ b/webapp/src/components/Network/Network.tsx @@ -7,11 +7,7 @@ import { Props } from './Network.types' const Network = (props: Props) => { const { asset } = props - return ( - <Stats title={t('global.network')}> - {t(`networks.${asset.network.toLowerCase()}`)} - </Stats> - ) + return <Stats title={t('global.network')}>{t(`networks.${asset.network.toLowerCase()}`)}</Stats> } export default React.memo(Network) diff --git a/webapp/src/components/OnSaleOrRentList/AssetCell/AssetCell.tsx b/webapp/src/components/OnSaleOrRentList/AssetCell/AssetCell.tsx index a224eb19e1..5893b6c116 100644 --- a/webapp/src/components/OnSaleOrRentList/AssetCell/AssetCell.tsx +++ b/webapp/src/components/OnSaleOrRentList/AssetCell/AssetCell.tsx @@ -24,8 +24,8 @@ const AssetCell = ({ asset, link: linkProp }: Props) => { const link = linkProp ? linkProp : 'tokenId' in asset - ? locations.nft(asset.contractAddress, asset.tokenId) - : locations.item(asset.contractAddress, asset.itemId!) + ? locations.nft(asset.contractAddress, asset.tokenId) + : locations.item(asset.contractAddress, asset.itemId) return ( <Link to={link}> diff --git a/webapp/src/components/OnSaleOrRentList/OnRentListElement/OnRentListElement.tsx b/webapp/src/components/OnSaleOrRentList/OnRentListElement/OnRentListElement.tsx index b9e164fd51..cb9a4220cf 100644 --- a/webapp/src/components/OnSaleOrRentList/OnRentListElement/OnRentListElement.tsx +++ b/webapp/src/components/OnSaleOrRentList/OnRentListElement/OnRentListElement.tsx @@ -5,10 +5,7 @@ import { RentalStatus } from '@dcl/schemas' import { isParcel } from '../../../modules/nft/utils' import { Icon, Mobile, NotMobile, Table } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - hasRentalEnded, - isRentalListingExecuted -} from '../../../modules/rental/utils' +import { hasRentalEnded, isRentalListingExecuted } from '../../../modules/rental/utils' import { locations } from '../../../modules/routing/locations' import { formatWeiMANA } from '../../../lib/mana' import { Mana } from '../../Mana' @@ -16,24 +13,16 @@ import AssetCell from '../AssetCell' import { Props } from './OnRentListElement.types' import './OnRentListElement.css' -const OnRentListElement = ({ - nft, - rental, - isClaimingBackLandTransactionPending -}: Props) => { - const category = nft!.category +const OnRentListElement = ({ nft, rental, isClaimingBackLandTransactionPending }: Props) => { + const category = nft.category const { startedAt, rentedDays } = rental const startDate = startedAt ? new Date(startedAt) : null - const endDate = - startDate && rentedDays ? add(startDate, { days: rentedDays }) : null + const endDate = startDate && rentedDays ? add(startDate, { days: rentedDays }) : null return ( <> <Mobile> <div className="mobile-row"> - <AssetCell - asset={nft} - link={locations.manage(nft.contractAddress, nft.tokenId)} - /> + <AssetCell asset={nft} link={locations.manage(nft.contractAddress, nft.tokenId)} /> <Mana showTooltip network={nft.network} inline> {formatWeiMANA(rental.periods[0].pricePerDay)} </Mana> @@ -42,10 +31,7 @@ const OnRentListElement = ({ <NotMobile> <Table.Row> <Table.Cell> - <AssetCell - asset={nft} - link={locations.manage(nft.contractAddress, nft.tokenId)} - /> + <AssetCell asset={nft} link={locations.manage(nft.contractAddress, nft.tokenId)} /> </Table.Cell> <Table.Cell>{t(`global.${category}`)}</Table.Cell> <Table.Cell> diff --git a/webapp/src/components/OnSaleOrRentList/OnSaleListElement/OnSaleListElement.tsx b/webapp/src/components/OnSaleOrRentList/OnSaleListElement/OnSaleListElement.tsx index e2999a82c2..6310789dc1 100644 --- a/webapp/src/components/OnSaleOrRentList/OnSaleListElement/OnSaleListElement.tsx +++ b/webapp/src/components/OnSaleOrRentList/OnSaleListElement/OnSaleListElement.tsx @@ -4,24 +4,14 @@ import { Button, Icon, Mobile, NotMobile, Popup, Table } from 'decentraland-ui' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { getIsLegacyOrderExpired, isLegacyOrder } from '../../../lib/orders' import { locations } from '../../../modules/routing/locations' -import { - LEGACY_MARKETPLACE_MAINNET_CONTRACT, - Section -} from '../../../modules/vendor/decentraland' +import { LEGACY_MARKETPLACE_MAINNET_CONTRACT, Section } from '../../../modules/vendor/decentraland' import { Mana } from '../../Mana' import { formatWeiMANA } from '../../../lib/mana' import { Props } from './OnSaleListElement.types' import AssetCell from '../AssetCell' import './OnSaleListElement.css' -const OnSaleListElement = ({ - nft, - item, - order, - isAuthorized, - authorization, - onRevoke -}: Props) => { +const OnSaleListElement = ({ nft, item, order, isAuthorized, authorization, onRevoke }: Props) => { const category = item?.category || nft!.category const cancelOrSellOptions = { @@ -55,11 +45,7 @@ const OnSaleListElement = ({ position="top center" trigger={ <div className="warningExpiration"> - <Icon - name="exclamation triangle" - className={'warningExpiration'} - />{' '} - {t('global.action_required')} + <Icon name="exclamation triangle" className={'warningExpiration'} /> {t('global.action_required')} </div> } on="hover" @@ -68,49 +54,24 @@ const OnSaleListElement = ({ </div> </Table.Cell> <Table.Cell>{t(`global.${category}`)}</Table.Cell> - <Table.Cell> - {t(`global.${item ? 'primary' : 'secondary'}`)} - </Table.Cell> + <Table.Cell>{t(`global.${item ? 'primary' : 'secondary'}`)}</Table.Cell> <Table.Cell> <Mana showTooltip network={item?.network || nft!.network} inline> {formatWeiMANA(item?.price || order!.price)} </Mana> </Table.Cell> <Table.Cell> - {order?.marketplaceAddress === - LEGACY_MARKETPLACE_MAINNET_CONTRACT && - isAuthorized && - authorization ? ( - <Button - onClick={() => authorization && onRevoke?.(authorization)} - primary - > + {order?.marketplaceAddress === LEGACY_MARKETPLACE_MAINNET_CONTRACT && isAuthorized && authorization ? ( + <Button onClick={() => authorization && onRevoke?.(authorization)} primary> {t('account_page.revoke')} </Button> ) : order && nft && isLegacyOrder(order) ? ( getIsLegacyOrderExpired(order.expiresAt) ? ( - <Button - as={Link} - to={locations.cancel( - nft.contractAddress, - nft.tokenId, - cancelOrSellOptions - )} - primary - > + <Button as={Link} to={locations.cancel(nft.contractAddress, nft.tokenId, cancelOrSellOptions)} primary> {t('asset_page.actions.terminate_listing')} </Button> ) : ( - <Button - as={Link} - to={locations.sell( - nft.contractAddress, - nft.tokenId, - cancelOrSellOptions - )} - inverted - fluid - > + <Button as={Link} to={locations.sell(nft.contractAddress, nft.tokenId, cancelOrSellOptions)} inverted fluid> {t('asset_page.actions.update_sale')} </Button> ) diff --git a/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.container.ts b/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.container.ts index fff5259733..4966c69b6e 100644 --- a/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.container.ts +++ b/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.container.ts @@ -2,39 +2,23 @@ import { connect } from 'react-redux' import { Item } from '@dcl/schemas' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { Authorization } from 'decentraland-dapps/dist/modules/authorization/types' -import { - fetchAuthorizationsRequest, - revokeTokenRequest -} from 'decentraland-dapps/dist/modules/authorization/actions' +import { fetchAuthorizationsRequest, revokeTokenRequest } from 'decentraland-dapps/dist/modules/authorization/actions' import { getLoading as getItemsLoading } from '../../modules/item/selectors' import { getLoading as getNFTsLoading } from '../../modules/nft/selectors' import { getWallet } from '../../modules/wallet/selectors' import { RootState } from '../../modules/reducer' import OnSaleList from './OnSaleOrRentList' -import { - MapStateProps, - OnSaleOrRentType, - OwnProps, - MapDispatch, - MapDispatchProps -} from './OnSaleOrRentList.types' +import { MapStateProps, OnSaleOrRentType, OwnProps, MapDispatch, MapDispatchProps } from './OnSaleOrRentList.types' import { FETCH_ITEMS_REQUEST } from '../../modules/item/actions' import { FETCH_NFTS_REQUEST } from '../../modules/nft/actions' -import { - getOnRentNFTsByLessor, - getOnRentNFTsByTenant, - getOnSaleElements -} from '../../modules/ui/browse/selectors' -import { OnRentNFT, OnSaleNFT } from '../../modules/ui/browse/types' -import { OnSaleElement } from '../../modules/ui/browse/types' +import { getOnRentNFTsByLessor, getOnRentNFTsByTenant, getOnSaleElements } from '../../modules/ui/browse/selectors' +import { OnRentNFT, OnSaleNFT, OnSaleElement } from '../../modules/ui/browse/types' import { getLegacyOrders } from '../../modules/order/selectors' import { legacyOrderToOnSaleElement } from '../../modules/ui/browse/utils' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { const { address, isCurrentAccount } = ownProps - const isLoading = - isLoadingType(getItemsLoading(state), FETCH_ITEMS_REQUEST) || - isLoadingType(getNFTsLoading(state), FETCH_NFTS_REQUEST) + const isLoading = isLoadingType(getItemsLoading(state), FETCH_ITEMS_REQUEST) || isLoadingType(getNFTsLoading(state), FETCH_NFTS_REQUEST) const showRents = ownProps.onSaleOrRentType === OnSaleOrRentType.RENT let elements: Array<OnRentNFT | OnSaleElement> @@ -47,10 +31,7 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { } const legacyOrders = getLegacyOrders(state) - elements = [ - ...elements, - ...Object.values(legacyOrders).map(legacyOrderToOnSaleElement) - ] + elements = [...elements, ...Object.values(legacyOrders).map(legacyOrderToOnSaleElement)] return { wallet: getWallet(state), @@ -64,7 +45,7 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { ...(showRents ? { rental: rentOrOrder } : { order: rentOrOrder }) } } else { - const item = element as Item + const item = element return { item } } }), @@ -73,8 +54,7 @@ const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { } const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onFetchAuthorizations: (authorizations: Authorization[]) => - dispatch(fetchAuthorizationsRequest(authorizations)), + onFetchAuthorizations: (authorizations: Authorization[]) => dispatch(fetchAuthorizationsRequest(authorizations)), onRevoke: authorization => dispatch(revokeTokenRequest(authorization)) }) diff --git a/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.tsx b/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.tsx index f86d9ed24b..5da71f42c6 100644 --- a/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.tsx +++ b/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.tsx @@ -1,24 +1,10 @@ import React, { useEffect, useMemo, useRef, useState } from 'react' import { ChainId } from '@dcl/schemas' -import { - Table, - Loader, - TextFilter, - Dropdown, - Pagination, - NotMobile -} from 'decentraland-ui' -import { - AuthorizationType, - Authorization as Authorizations -} from 'decentraland-dapps/dist/modules/authorization/types' +import { Table, Loader, TextFilter, Dropdown, Pagination, NotMobile } from 'decentraland-ui' +import { AuthorizationType, Authorization as Authorizations } from 'decentraland-dapps/dist/modules/authorization/types' import { ContractName } from 'decentraland-transactions' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - OnSaleOrRentType, - Props, - isOnSaleListElementProps -} from './OnSaleOrRentList.types' +import { OnSaleOrRentType, Props, isOnSaleListElementProps } from './OnSaleOrRentList.types' import { SortBy } from '../../modules/routing/types' import { useProcessedElements } from './utils' import OnSaleListElement from './OnSaleListElement' @@ -31,26 +17,15 @@ import { Props as OnRentListElementProps } from './OnRentListElement/OnRentListE const ROWS_PER_PAGE = 12 -const OnSaleOrRentList = ({ - elements, - isLoading, - onSaleOrRentType, - onFetchAuthorizations, - onRevoke, - wallet -}: Props) => { - const [authorization, setAuthorization] = useState<Authorizations | null>( - null - ) +const OnSaleOrRentList = ({ elements, isLoading, onSaleOrRentType, onFetchAuthorizations, onRevoke, wallet }: Props) => { + const [authorization, setAuthorization] = useState<Authorizations | null>(null) useEffect(() => { if (elements && elements.length) { const legacyMarketplaceOrder = (elements as any).find( (el: OnSaleListElementProps | OnRentListElementProps) => - isOnSaleListElementProps(el) && - el.order && - el.order.marketplaceAddress === LEGACY_MARKETPLACE_MAINNET_CONTRACT + isOnSaleListElementProps(el) && el.order && el.order.marketplaceAddress === LEGACY_MARKETPLACE_MAINNET_CONTRACT ) - if (!!legacyMarketplaceOrder) { + if (legacyMarketplaceOrder) { const authorization: Authorizations = { address: wallet?.address || '', authorizedAddress: LEGACY_MARKETPLACE_MAINNET_CONTRACT, @@ -64,10 +39,7 @@ const OnSaleOrRentList = ({ } }, [elements, wallet?.address]) - const [, isAuthorized] = useAuthorization( - authorization, - onFetchAuthorizations - ) + const [, isAuthorized] = useAuthorization(authorization, onFetchAuthorizations) const showRents = onSaleOrRentType === OnSaleOrRentType.RENT const perPage = useRef(ROWS_PER_PAGE) @@ -80,13 +52,7 @@ const OnSaleOrRentList = ({ const [sort, setSort] = useState(SortBy.NEWEST) const [page, setPage] = useState(1) - const processedElements = useProcessedElements( - elements, - search, - sort, - page, - perPage.current - ) + const processedElements = useProcessedElements(elements, search, sort, page, perPage.current) const showPagination = processedElements.total / perPage.current > 1 @@ -108,12 +74,7 @@ const OnSaleOrRentList = ({ <div className="onSaleOrRentTable"> <div className="filters"> <div className="search">{searchNode}</div> - <Dropdown - direction="left" - value={sort} - options={sortOptions.current} - onChange={(_, data) => setSort(data.value as any)} - /> + <Dropdown direction="left" value={sort} options={sortOptions.current} onChange={(_, data) => setSort(data.value as any)} /> </div> {isLoading ? ( <> @@ -133,16 +94,10 @@ const OnSaleOrRentList = ({ <span>{t('global.type')}</span> </Table.HeaderCell> <Table.HeaderCell> - <span> - {showRents ? t('global.status') : t('global.sale_type')} - </span> + <span>{showRents ? t('global.status') : t('global.sale_type')}</span> </Table.HeaderCell> <Table.HeaderCell> - <span> - {showRents - ? t('global.rent_price') - : t('global.sell_price')} - </span> + <span>{showRents ? t('global.rent_price') : t('global.sell_price')}</span> </Table.HeaderCell> <Table.HeaderCell className="actions"> <span>{t('global.actions')}</span> @@ -153,18 +108,10 @@ const OnSaleOrRentList = ({ <Table.Body> {processedElements.paginated.map(element => showRents && element.nft && element.rental ? ( - <OnRentListElement - key={`n-${element.nft.id}`} - nft={element.nft} - rental={element.rental} - /> + <OnRentListElement key={`n-${element.nft.id}`} nft={element.nft} rental={element.rental} /> ) : ( <OnSaleListElement - key={ - element.item - ? `i-${element.item.id}` - : `n-${element.nft!.id}` - } + key={element.item ? `i-${element.item.id}` : `n-${element.nft!.id}`} authorization={authorization} isAuthorized={isAuthorized} onRevoke={onRevoke} @@ -174,15 +121,11 @@ const OnSaleOrRentList = ({ )} </Table.Body> </Table> - {processedElements.total === 0 && ( - <div className="empty">{t('global.no_results')}</div> - )} + {processedElements.total === 0 && <div className="empty">{t('global.no_results')}</div>} {showPagination && ( <div className="pagination"> <Pagination - totalPages={Math.ceil( - processedElements.total / perPage.current - )} + totalPages={Math.ceil(processedElements.total / perPage.current)} activePage={page} onPageChange={(_, data) => setPage(Number(data.activePage))} /> diff --git a/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.types.ts b/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.types.ts index 21ed70ba81..73b660df86 100644 --- a/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.types.ts +++ b/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.types.ts @@ -27,19 +27,12 @@ export type Props = { export type MapStateProps = Pick<Props, 'elements' | 'isLoading' | 'wallet'> -export type OwnProps = Pick< - Props, - 'onSaleOrRentType' | 'address' | 'isCurrentAccount' -> +export type OwnProps = Pick<Props, 'onSaleOrRentType' | 'address' | 'isCurrentAccount'> -export function isOnSaleListElementProps( - element: OnSaleListElementProps | OnRentListElementProps -): element is OnSaleListElementProps { +export function isOnSaleListElementProps(element: OnSaleListElementProps | OnRentListElementProps): element is OnSaleListElementProps { return 'order' in element } export type MapDispatchProps = Pick<Props, 'onFetchAuthorizations' | 'onRevoke'> -export type MapDispatch = Dispatch< - FetchAuthorizationsRequestAction | RevokeTokenRequestAction -> +export type MapDispatch = Dispatch<FetchAuthorizationsRequestAction | RevokeTokenRequestAction> diff --git a/webapp/src/components/OnSaleOrRentList/utils.spec.ts b/webapp/src/components/OnSaleOrRentList/utils.spec.ts index b865758a9a..f60b2b3dfe 100644 --- a/webapp/src/components/OnSaleOrRentList/utils.spec.ts +++ b/webapp/src/components/OnSaleOrRentList/utils.spec.ts @@ -3,10 +3,7 @@ import { filterByName, paginate, sort } from './utils' describe('when filtering elements by name', () => { it('should return elements that include the provided name', () => { - const res = filterByName( - [{ item: { name: 'Foo' } }, { nft: { name: 'Bar' } }] as any, - 'foo' - ) + const res = filterByName([{ item: { name: 'Foo' } }, { nft: { name: 'Bar' } }] as any, 'foo') expect(res.length).toBe(1) expect(res[0].item?.name).toBe('Foo') }) @@ -14,10 +11,7 @@ describe('when filtering elements by name', () => { describe('when sorting elements', () => { it('should return a sorted by name element array', () => { - const res = sort( - [{ item: { name: 'John' } }, { nft: { name: 'Jack' } }] as any, - SortBy.NAME - ) + const res = sort([{ item: { name: 'John' } }, { nft: { name: 'Jack' } }] as any, SortBy.NAME) expect(res.length).toBe(2) expect(res[0].nft!.name).toBe('Jack') expect(res[1].item!.name).toBe('John') diff --git a/webapp/src/components/OnSaleOrRentList/utils.ts b/webapp/src/components/OnSaleOrRentList/utils.ts index 42cebc9527..2747ab6d80 100644 --- a/webapp/src/components/OnSaleOrRentList/utils.ts +++ b/webapp/src/components/OnSaleOrRentList/utils.ts @@ -6,21 +6,11 @@ import { Props as SaleElement } from './OnSaleListElement/OnSaleListElement.type type Element = SaleElement & { rental?: RentalListing } -export const useProcessedElements = ( - elems: Element[], - search: string, - sortBy: SortBy, - page: number, - perPage: number -) => { +export const useProcessedElements = (elems: Element[], search: string, sortBy: SortBy, page: number, perPage: number) => { const filtered = useMemo(() => filterByName(elems, search), [elems, search]) const total = useMemo(() => filtered.length, [filtered]) const sorted = useMemo(() => sort(filtered, sortBy), [filtered, sortBy]) - const paginated = useMemo(() => paginate(sorted, page, perPage), [ - sorted, - page, - perPage - ]) + const paginated = useMemo(() => paginate(sorted, page, perPage), [sorted, page, perPage]) return { paginated, @@ -49,11 +39,7 @@ export const sort = (elements: Element[], sortBy: SortBy) => } }) -export const paginate = ( - elements: Element[], - page: number, - perPage: number -) => { +export const paginate = (elements: Element[], page: number, perPage: number) => { const start = (page - 1) * perPage const end = Math.min(start + perPage, elements.length) return elements.slice(start, end) @@ -77,7 +63,4 @@ const handleElement = <T>( element: Element, handleItem: (item: Item) => T, handleNFT: (nft: NFT, orderOrRental: Order | RentalListing) => T -) => - element.item - ? handleItem(element.item) - : handleNFT(element.nft!, element.order ? element.order : element.rental!) +) => (element.item ? handleItem(element.item) : handleNFT(element.nft!, element.order ? element.order : element.rental!)) diff --git a/webapp/src/components/PartnersSidebar/PartnersSidebar.tsx b/webapp/src/components/PartnersSidebar/PartnersSidebar.tsx index b314c258c3..55c548ba43 100644 --- a/webapp/src/components/PartnersSidebar/PartnersSidebar.tsx +++ b/webapp/src/components/PartnersSidebar/PartnersSidebar.tsx @@ -16,12 +16,7 @@ const PartnersSidebar = (props: Props) => { <Header sub>{t('partners_page.partners')}</Header> <Menu> {getPartners().map(vendor => ( - <MenuItem - key={vendor} - value={vendor} - image={`/${vendor}.png`} - onClick={onMenuItemClick} - /> + <MenuItem key={vendor} value={vendor} image={`/${vendor}.png`} onClick={onMenuItemClick} /> ))} </Menu> </div> diff --git a/webapp/src/components/Price/Price.container.ts b/webapp/src/components/Price/Price.container.ts index 880837883d..80e6e845a8 100644 --- a/webapp/src/components/Price/Price.container.ts +++ b/webapp/src/components/Price/Price.container.ts @@ -9,7 +9,7 @@ const mapState = (state: RootState, { asset }: OwnProps): MapStateProps => { let price: string | undefined if ('price' in asset) { - price = (asset as Item).price + price = asset.price } if ('activeOrderId' in asset) { diff --git a/webapp/src/components/PrivateTag/PrivateTag.tsx b/webapp/src/components/PrivateTag/PrivateTag.tsx index ddffc5cfb9..f6531d6f28 100644 --- a/webapp/src/components/PrivateTag/PrivateTag.tsx +++ b/webapp/src/components/PrivateTag/PrivateTag.tsx @@ -6,10 +6,7 @@ import styles from './PrivateTag.module.css' const PrivateTag = (props: Props) => { return ( - <div - className={classnames(styles.private, props.className)} - data-testid={props['data-testid']} - > + <div className={classnames(styles.private, props.className)} data-testid={props['data-testid']}> <div className={styles.icon}></div> {t('list_card.private')} </div> diff --git a/webapp/src/components/Rankings/TimeframeSelector/TimeframeSelector.tsx b/webapp/src/components/Rankings/TimeframeSelector/TimeframeSelector.tsx index 84de34b40b..834ce08bfd 100644 --- a/webapp/src/components/Rankings/TimeframeSelector/TimeframeSelector.tsx +++ b/webapp/src/components/Rankings/TimeframeSelector/TimeframeSelector.tsx @@ -11,25 +11,13 @@ const TimeframeSelector = (props: Props) => { return ( <div className="TimeframeSelector"> - <Button - className={value === AnalyticsTimeframe.WEEK ? 'active' : ''} - basic - onClick={() => onChange(AnalyticsTimeframe.WEEK)} - > + <Button className={value === AnalyticsTimeframe.WEEK ? 'active' : ''} basic onClick={() => onChange(AnalyticsTimeframe.WEEK)}> {t('home_page.analytics.volume.seven_days')} </Button> - <Button - className={value === AnalyticsTimeframe.MONTH ? 'active' : ''} - basic - onClick={() => onChange(AnalyticsTimeframe.MONTH)} - > + <Button className={value === AnalyticsTimeframe.MONTH ? 'active' : ''} basic onClick={() => onChange(AnalyticsTimeframe.MONTH)}> {t('home_page.analytics.volume.thirty_days')} </Button> - <Button - className={value === AnalyticsTimeframe.ALL ? 'active' : ''} - basic - onClick={() => onChange(AnalyticsTimeframe.ALL)} - > + <Button className={value === AnalyticsTimeframe.ALL ? 'active' : ''} basic onClick={() => onChange(AnalyticsTimeframe.ALL)}> {t('home_page.analytics.volume.all')} </Button> </div> diff --git a/webapp/src/components/RankingsTable/RankingCollectorRow/RankingCollectorRow.tsx b/webapp/src/components/RankingsTable/RankingCollectorRow/RankingCollectorRow.tsx index 785a74b70c..6e494a51bf 100644 --- a/webapp/src/components/RankingsTable/RankingCollectorRow/RankingCollectorRow.tsx +++ b/webapp/src/components/RankingsTable/RankingCollectorRow/RankingCollectorRow.tsx @@ -19,11 +19,7 @@ const RankingCollectorRow = ({ entity }: Props) => { <div> <div className="rankings-collector-data"> <Link to={locations.account(collectorAddress)}> - <LinkedProfile - address={collectorAddress} - inline={false} - size="large" - /> + <LinkedProfile address={collectorAddress} inline={false} size="large" /> </Link> <span className="rankings-collector-items-collected"> {t('home_page.analytics.rankings.collectors.collected_items', { @@ -43,10 +39,7 @@ const RankingCollectorRow = ({ entity }: Props) => { </> )} </span> - <div - className="arrow-container" - onClick={() => setExpanded(!expanded)} - > + <div className="arrow-container" onClick={() => setExpanded(!expanded)}> <span> {t(`global.${expanded ? 'less' : 'more'}`)} </span> <i className={`caret back ${expanded ? 'up' : ''}`} /> </div> @@ -57,19 +50,11 @@ const RankingCollectorRow = ({ entity }: Props) => { <div> <div className="rankings-collector-more-data-container"> <div> - <span> - {t( - 'home_page.analytics.rankings.collectors.unique_items_bought' - )} - </span> + <span>{t('home_page.analytics.rankings.collectors.unique_items_bought')}</span> {entity.uniqueAndMythicItems} </div> <div> - <span> - {t( - 'home_page.analytics.rankings.collectors.creators_supported' - )} - </span> + <span>{t('home_page.analytics.rankings.collectors.creators_supported')}</span> {entity.creatorsSupported} </div> </div> @@ -89,11 +74,7 @@ const RankingCollectorRow = ({ entity }: Props) => { <> <Table.Cell width={4}> <div className="rankings-collector-cell"> - <LinkedProfile - address={collectorAddress} - inline={false} - size="large" - /> + <LinkedProfile address={collectorAddress} inline={false} size="large" /> </div> </Table.Cell> <Table.Cell width={2}>{entity.purchases}</Table.Cell> diff --git a/webapp/src/components/RankingsTable/RankingCreatorRow/RankingCreatorRow.tsx b/webapp/src/components/RankingsTable/RankingCreatorRow/RankingCreatorRow.tsx index 9f614306fa..a3a598b528 100644 --- a/webapp/src/components/RankingsTable/RankingCreatorRow/RankingCreatorRow.tsx +++ b/webapp/src/components/RankingsTable/RankingCreatorRow/RankingCreatorRow.tsx @@ -45,10 +45,7 @@ const RankingCreatorRow = ({ entity }: Props) => { </> )} </span> - <div - className="arrow-container" - onClick={() => setExpanded(!expanded)} - > + <div className="arrow-container" onClick={() => setExpanded(!expanded)}> <span> {t(`global.${expanded ? 'less' : 'more'}`)} </span> <i className={`caret back ${expanded ? 'up' : ''}`} /> </div> @@ -59,15 +56,11 @@ const RankingCreatorRow = ({ entity }: Props) => { <div> <div className="rankings-creator-more-data-container"> <div> - <span> - {t('home_page.analytics.rankings.creators.unique_collectors')} - </span> + <span>{t('home_page.analytics.rankings.creators.unique_collectors')}</span> {entity.uniqueCollectors} </div> <div> - <span> - {t('home_page.analytics.rankings.creators.items_sold')} - </span> + <span>{t('home_page.analytics.rankings.creators.items_sold')}</span> {entity.sales} </div> </div> diff --git a/webapp/src/components/RankingsTable/RankingItemRow/RankingItemRow.tsx b/webapp/src/components/RankingsTable/RankingItemRow/RankingItemRow.tsx index 5afd48d50b..896032f8bf 100644 --- a/webapp/src/components/RankingsTable/RankingItemRow/RankingItemRow.tsx +++ b/webapp/src/components/RankingsTable/RankingItemRow/RankingItemRow.tsx @@ -28,11 +28,7 @@ const RankingItemRow = ({ entity }: Props) => { }) } - const renderMobile = ( - entity: ItemRank, - item: Item | null, - isLoading: boolean - ) => { + const renderMobile = (entity: ItemRank, item: Item | null, isLoading: boolean) => { return ( <div className="RankingItemRow rankings-item-cell"> {isLoading || !item ? ( @@ -41,17 +37,11 @@ const RankingItemRow = ({ entity }: Props) => { <> <div> <div className="rankings-item-data"> - <Link - to={locations.item(item.contractAddress, item.itemId)} - onClick={() => handleOnLinkClick(item.id)} - > + <Link to={locations.item(item.contractAddress, item.itemId)} onClick={() => handleOnLinkClick(item.id)}> <AssetImage asset={item} isSmall /> </Link> <div className="rankings-item-name-container"> - <Link - to={locations.item(item.contractAddress, item.itemId)} - onClick={() => handleOnLinkClick(item.id)} - > + <Link to={locations.item(item.contractAddress, item.itemId)} onClick={() => handleOnLinkClick(item.id)}> {item.name} </Link> <span> @@ -60,11 +50,7 @@ const RankingItemRow = ({ entity }: Props) => { values={{ creator: ( <span className="rankings-item-data-creator"> - <LinkedProfile - address={item.creator} - textOnly - inline={false} - /> + <LinkedProfile address={item.creator} textOnly inline={false} /> </span> ) }} @@ -92,10 +78,7 @@ const RankingItemRow = ({ entity }: Props) => { <span className="rankings-fiat-price"> (<ManaToFiat mana={entity.volume} />) </span> - <div - className="arrow-container" - onClick={() => setExpanded(!expanded)} - > + <div className="arrow-container" onClick={() => setExpanded(!expanded)}> <span> {t(`global.${expanded ? 'less' : 'more'}`)} </span> <i className={`caret back ${expanded ? 'up' : ''}`} /> </div> @@ -111,19 +94,11 @@ const RankingItemRow = ({ entity }: Props) => { <div> <span>{t('global.category')}</span> {item.data.wearable?.category - ? t( - `wearable.category.${item.data.wearable.category}` - ) + ? t(`wearable.category.${item.data.wearable.category}`) : t(`emote.category.${item.data.emote!.category}`)} </div> <div> - <span> - {t( - `home_page.analytics.rankings.${ - item.data.wearable ? 'wearables' : 'emotes' - }.items_sold` - )} - </span> + <span>{t(`home_page.analytics.rankings.${item.data.wearable ? 'wearables' : 'emotes'}.items_sold`)}</span> {entity.sales} </div> </> @@ -137,27 +112,17 @@ const RankingItemRow = ({ entity }: Props) => { ) } - const renderNotMobile = ( - entity: ItemRank, - item: Item | null, - isLoading: boolean - ) => ( + const renderNotMobile = (entity: ItemRank, item: Item | null, isLoading: boolean) => ( <Table.Row> <Table.Cell width={7}> {item ? ( <div className="rankings-item-cell"> - <Link - to={locations.item(item.contractAddress, item.itemId)} - onClick={() => handleOnLinkClick(item.id)} - > + <Link to={locations.item(item.contractAddress, item.itemId)} onClick={() => handleOnLinkClick(item.id)}> <AssetImage asset={item} isSmall /> </Link> <div className="rankings-item-data"> - <Link - to={locations.item(item.contractAddress, item.itemId)} - onClick={() => handleOnLinkClick(item.id)} - > + <Link to={locations.item(item.contractAddress, item.itemId)} onClick={() => handleOnLinkClick(item.id)}> {item.name} </Link> @@ -167,11 +132,7 @@ const RankingItemRow = ({ entity }: Props) => { values={{ creator: ( <span className="rankings-item-data-creator"> - <LinkedProfile - address={item.creator} - textOnly - inline={false} - /> + <LinkedProfile address={item.creator} textOnly inline={false} /> </span> ) }} @@ -192,13 +153,7 @@ const RankingItemRow = ({ entity }: Props) => { </Table.Cell> <Table.Cell width={2}> {item ? ( - <RarityBadge - size="small" - rarity={item.rarity} - assetType={AssetType.NFT} - category={NFTCategory.WEARABLE} - withTooltip={false} - /> + <RarityBadge size="small" rarity={item.rarity} assetType={AssetType.NFT} category={NFTCategory.WEARABLE} withTooltip={false} /> ) : null} </Table.Cell> <Table.Cell width={2}>{item ? entity.sales : null}</Table.Cell> diff --git a/webapp/src/components/RankingsTable/RankingsTable.container.ts b/webapp/src/components/RankingsTable/RankingsTable.container.ts index ae3c2a13e5..24c9311112 100644 --- a/webapp/src/components/RankingsTable/RankingsTable.container.ts +++ b/webapp/src/components/RankingsTable/RankingsTable.container.ts @@ -1,16 +1,9 @@ import { connect } from 'react-redux' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { RootState } from '../../modules/reducer' -import { - MapStateProps, - MapDispatch, - MapDispatchProps -} from './RankingsTable.types' +import { MapStateProps, MapDispatch, MapDispatchProps } from './RankingsTable.types' import { getRankingsData, getLoading } from '../../modules/analytics/selectors' -import { - fetchRankingsRequest, - FETCH_RANKINGS_REQUEST -} from '../../modules/analytics/actions' +import { fetchRankingsRequest, FETCH_RANKINGS_REQUEST } from '../../modules/analytics/actions' import RankingsTable from './RankingsTable' const mapState = (state: RootState): MapStateProps => { @@ -22,8 +15,7 @@ const mapState = (state: RootState): MapStateProps => { } const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onFetchRankings: (entity, timeframe, filters) => - dispatch(fetchRankingsRequest(entity, timeframe, filters)) + onFetchRankings: (entity, timeframe, filters) => dispatch(fetchRankingsRequest(entity, timeframe, filters)) }) export default connect(mapState, mapDispatch)(RankingsTable) diff --git a/webapp/src/components/RankingsTable/RankingsTable.tsx b/webapp/src/components/RankingsTable/RankingsTable.tsx index ca54bb6b52..ff6b17b859 100644 --- a/webapp/src/components/RankingsTable/RankingsTable.tsx +++ b/webapp/src/components/RankingsTable/RankingsTable.tsx @@ -1,16 +1,6 @@ import React, { useEffect, useRef, useState } from 'react' import { useHistory, useLocation } from 'react-router-dom' -import { - HeaderMenu, - Header, - NotMobile, - Table, - Loader, - Tabs, - Dropdown, - DropdownProps, - Mobile -} from 'decentraland-ui' +import { HeaderMenu, Header, NotMobile, Table, Loader, Tabs, Dropdown, DropdownProps, Mobile } from 'decentraland-ui' import { EmoteCategory, Rarity, WearableCategory } from '@dcl/schemas' import { T, t } from 'decentraland-dapps/dist/modules/translation/utils' import { @@ -43,19 +33,11 @@ const RankingsTable = (props: Props) => { const history = useHistory() const location = useLocation() - const parsedURL = location.hash.includes(TABS_PREFIX) - ? parseURLHash(location.hash) - : null + const parsedURL = location.hash.includes(TABS_PREFIX) ? parseURLHash(location.hash) : null - const [currentEntity, setCurrentEntity] = useState( - parsedURL ? parsedURL.entity : RankingEntities.WEARABLES - ) - const [currentTimeframe, setCurrentTimeframe] = useState( - parsedURL ? parsedURL.timeframe : AnalyticsTimeframe.WEEK - ) - const [currentFilters, setCurrentFilters] = useState<RankingsFilters>( - parsedURL ? { sortBy: parsedURL.sortBy } : INITIAL_FILTERS - ) + const [currentEntity, setCurrentEntity] = useState(parsedURL ? parsedURL.entity : RankingEntities.WEARABLES) + const [currentTimeframe, setCurrentTimeframe] = useState(parsedURL ? parsedURL.timeframe : AnalyticsTimeframe.WEEK) + const [currentFilters, setCurrentFilters] = useState<RankingsFilters>(parsedURL ? { sortBy: parsedURL.sortBy } : INITIAL_FILTERS) const rankingsSectionRef = useRef<HTMLDivElement>(null) useScrollSectionIntoView(rankingsSectionRef, TABS_PREFIX) @@ -64,21 +46,20 @@ const RankingsTable = (props: Props) => { onFetchRankings(currentEntity, currentTimeframe, currentFilters) }, [onFetchRankings, currentTimeframe, currentEntity, currentFilters]) - const registerHandleFilterChange = (filterName: keyof RankingsFilters) => ( - _event: React.SyntheticEvent<HTMLElement, Event>, - { value }: DropdownProps - ) => { - setCurrentFilters({ - ...currentFilters, - [filterName]: value !== ALL_FILTER ? value : undefined - }) - if (filterName === 'sortBy') { - history.replace({ - pathname: location.pathname, - hash: `${TABS_PREFIX}${currentEntity}-${currentTimeframe}-${value}` + const registerHandleFilterChange = + (filterName: keyof RankingsFilters) => + (_event: React.SyntheticEvent<HTMLElement, Event>, { value }: DropdownProps) => { + setCurrentFilters({ + ...currentFilters, + [filterName]: value !== ALL_FILTER ? value : undefined }) + if (filterName === 'sortBy') { + history.replace({ + pathname: location.pathname, + hash: `${TABS_PREFIX}${currentEntity}-${currentTimeframe}-${value}` + }) + } } - } const handleTabChange = (entity: RankingEntities) => { setCurrentEntity(entity) @@ -103,20 +84,13 @@ const RankingsTable = (props: Props) => { <Tabs isFullscreen> <Tabs.Left> {Object.values(RankingEntities).map(entity => ( - <Tabs.Tab - key={entity} - active={currentEntity === entity} - onClick={() => handleTabChange(entity)} - > - <div id={entity}> - {t(`home_page.analytics.rankings.${entity}.tab_title`)} - </div> + <Tabs.Tab key={entity} active={currentEntity === entity} onClick={() => handleTabChange(entity)}> + <div id={entity}>{t(`home_page.analytics.rankings.${entity}.tab_title`)}</div> </Tabs.Tab> ))} </Tabs.Left> </Tabs> - {(currentEntity === RankingEntities.WEARABLES || - currentEntity === RankingEntities.EMOTES) && ( + {(currentEntity === RankingEntities.WEARABLES || currentEntity === RankingEntities.EMOTES) && ( <> <Dropdown defaultValue={ALL_FILTER} @@ -124,23 +98,13 @@ const RankingsTable = (props: Props) => { direction="right" options={[ ALL_FILTER, - ...Object.values( - currentEntity === RankingEntities.EMOTES - ? EmoteCategory.schema.enum - : WearableCategory.schema.enum - ) + ...Object.values(currentEntity === RankingEntities.EMOTES ? EmoteCategory.schema.enum : WearableCategory.schema.enum) ].map(category => ({ value: category as string, text: category === ALL_FILTER ? t('home_page.analytics.rankings.all_categories') - : t( - `${ - currentEntity === RankingEntities.EMOTES - ? 'emote' - : 'wearable' - }.category.${category}` - ) + : t(`${currentEntity === RankingEntities.EMOTES ? 'emote' : 'wearable'}.category.${category}`) }))} onChange={registerHandleFilterChange('category')} /> @@ -148,15 +112,10 @@ const RankingsTable = (props: Props) => { defaultValue={ALL_FILTER} value={currentFilters.rarity || ALL_FILTER} direction="right" - options={[ALL_FILTER, ...Object.values(Rarity.schema.enum)].map( - rarity => ({ - value: rarity as string, - text: - rarity === ALL_FILTER - ? t('home_page.analytics.rankings.all_rarities') - : t(`rarity.${rarity}`) - }) - )} + options={[ALL_FILTER, ...Object.values(Rarity.schema.enum)].map(rarity => ({ + value: rarity as string, + text: rarity === ALL_FILTER ? t('home_page.analytics.rankings.all_rarities') : t(`rarity.${rarity}`) + }))} onChange={registerHandleFilterChange('rarity')} /> </> @@ -176,10 +135,7 @@ const RankingsTable = (props: Props) => { value: entity as string, text: t(`home_page.analytics.rankings.${entity}.tab_title`) }))} - onChange={( - _event: React.SyntheticEvent<HTMLElement, Event>, - { value }: DropdownProps - ) => handleTabChange(value as RankingEntities)} + onChange={(_event: React.SyntheticEvent<HTMLElement, Event>, { value }: DropdownProps) => handleTabChange(value as RankingEntities)} /> ) } @@ -188,8 +144,7 @@ const RankingsTable = (props: Props) => { switch (currentEntity) { case RankingEntities.EMOTES: case RankingEntities.WEARABLES: - const label = - currentEntity === RankingEntities.EMOTES ? 'emotes' : 'wearables' + const label = currentEntity === RankingEntities.EMOTES ? 'emotes' : 'wearables' return ( <Table.Header> <Table.Row> @@ -212,18 +167,12 @@ const RankingsTable = (props: Props) => { <span>{t('home_page.analytics.rankings.rarity')}</span> </Table.HeaderCell> <Table.HeaderCell> - <span> - {t(`home_page.analytics.rankings.${label}.items_sold`)} - </span> + <span>{t(`home_page.analytics.rankings.${label}.items_sold`)}</span> </Table.HeaderCell> <Table.HeaderCell> <span> {t('home_page.analytics.rankings.total_volume')} - <InfoTooltip - content={t( - 'home_page.analytics.rankings.total_volume_tooltip' - )} - /> + <InfoTooltip content={t('home_page.analytics.rankings.total_volume_tooltip')} /> </span> </Table.HeaderCell> </NotMobile> @@ -240,49 +189,29 @@ const RankingsTable = (props: Props) => { </Table.HeaderCell> <Table.HeaderCell> {' '} - <span> - {t('home_page.analytics.rankings.total_volume_sales')} - </span> + <span>{t('home_page.analytics.rankings.total_volume_sales')}</span> </Table.HeaderCell> </Mobile> <NotMobile> <Table.HeaderCell> - <span> - {t('home_page.analytics.rankings.creators.creator')} - </span> + <span>{t('home_page.analytics.rankings.creators.creator')}</span> </Table.HeaderCell> <Table.HeaderCell> - <span> - {t('home_page.analytics.rankings.creators.collections')} - </span> + <span>{t('home_page.analytics.rankings.creators.collections')}</span> </Table.HeaderCell> <Table.HeaderCell> - <span> - {t('home_page.analytics.rankings.creators.items_sold')} - </span> + <span>{t('home_page.analytics.rankings.creators.items_sold')}</span> </Table.HeaderCell> <Table.HeaderCell> <span> - {t( - 'home_page.analytics.rankings.creators.unique_collectors' - )} - <InfoTooltip - content={t( - 'home_page.analytics.rankings.creators.unique_collectors_tooltip' - )} - /> + {t('home_page.analytics.rankings.creators.unique_collectors')} + <InfoTooltip content={t('home_page.analytics.rankings.creators.unique_collectors_tooltip')} /> </span> </Table.HeaderCell> <Table.HeaderCell> <span> - {t( - 'home_page.analytics.rankings.creators.total_volume_sales' - )} - <InfoTooltip - content={t( - 'home_page.analytics.rankings.creators.total_volume_sales_tooltip' - )} - /> + {t('home_page.analytics.rankings.creators.total_volume_sales')} + <InfoTooltip content={t('home_page.analytics.rankings.creators.total_volume_sales_tooltip')} /> </span> </Table.HeaderCell> </NotMobile> @@ -295,59 +224,35 @@ const RankingsTable = (props: Props) => { <Table.Row> <Mobile> <Table.HeaderCell> - <span> - {t('home_page.analytics.rankings.collectors.collector')} - </span> + <span>{t('home_page.analytics.rankings.collectors.collector')}</span> </Table.HeaderCell> <Table.HeaderCell> - <span> - {t('home_page.analytics.rankings.collectors.total_spent')} - </span> + <span>{t('home_page.analytics.rankings.collectors.total_spent')}</span> </Table.HeaderCell> </Mobile> <NotMobile> <Table.HeaderCell> - <span> - {t('home_page.analytics.rankings.collectors.collector')} - </span> + <span>{t('home_page.analytics.rankings.collectors.collector')}</span> </Table.HeaderCell> <Table.HeaderCell> - <span> - {t('home_page.analytics.rankings.collectors.items_bought')} - </span> + <span>{t('home_page.analytics.rankings.collectors.items_bought')}</span> </Table.HeaderCell> <Table.HeaderCell> <span> - {t( - 'home_page.analytics.rankings.collectors.creators_supported' - )} - <InfoTooltip - content={t( - 'home_page.analytics.rankings.collectors.creators_supported_tooltip' - )} - /> + {t('home_page.analytics.rankings.collectors.creators_supported')} + <InfoTooltip content={t('home_page.analytics.rankings.collectors.creators_supported_tooltip')} /> </span> </Table.HeaderCell> <Table.HeaderCell> <span> - {t( - 'home_page.analytics.rankings.collectors.unique_items_bought' - )} - <InfoTooltip - content={t( - 'home_page.analytics.rankings.collectors.unique_items_bought_tooltip' - )} - /> + {t('home_page.analytics.rankings.collectors.unique_items_bought')} + <InfoTooltip content={t('home_page.analytics.rankings.collectors.unique_items_bought_tooltip')} /> </span> </Table.HeaderCell> <Table.HeaderCell> <span> {t('home_page.analytics.rankings.collectors.total_spent')} - <InfoTooltip - content={t( - 'home_page.analytics.rankings.collectors.total_spent_tooltip' - )} - /> + <InfoTooltip content={t('home_page.analytics.rankings.collectors.total_spent_tooltip')} /> </span> </Table.HeaderCell> </NotMobile> @@ -360,15 +265,12 @@ const RankingsTable = (props: Props) => { } const renderMobileTableHeader = () => { - const label = - currentEntity === RankingEntities.EMOTES ? 'emotes' : 'wearables' + const label = currentEntity === RankingEntities.EMOTES ? 'emotes' : 'wearables' let header = <span>{t(`home_page.analytics.rankings.${label}.item`)}</span> if (currentEntity === RankingEntities.CREATORS) { header = <span>{t('home_page.analytics.rankings.creators.creator')}</span> } else if (currentEntity === RankingEntities.COLLECTORS) { - header = ( - <span>{t('home_page.analytics.rankings.collectors.collector')}</span> - ) + header = <span>{t('home_page.analytics.rankings.collectors.collector')}</span> } return ( <div className="table-header"> @@ -381,18 +283,13 @@ const RankingsTable = (props: Props) => { const renderEmptyState = () => { return ( <div className="empty-state-container"> - <span className="empty-state-title"> - {t('home_page.analytics.rankings.no_results_title')} - </span> + <span className="empty-state-title">{t('home_page.analytics.rankings.no_results_title')}</span> <span className="empty-state-subtitle"> <T id="home_page.analytics.rankings.no_results_action" values={{ link: ( - <div - className="empty-state-action-button" - onClick={() => setCurrentFilters(INITIAL_FILTERS)} - > + <div className="empty-state-action-button" onClick={() => setCurrentFilters(INITIAL_FILTERS)}> {t('home_page.analytics.rankings.clear_filters')} </div> ) @@ -411,31 +308,13 @@ const RankingsTable = (props: Props) => { switch (currentEntity) { case RankingEntities.EMOTES: case RankingEntities.WEARABLES: - content = (data as ItemRank[]).map(entity => ( - <RankingItemRow - key={entity.id} - entity={entity} - isLoading={isLoading} - /> - )) + content = (data as ItemRank[]).map(entity => <RankingItemRow key={entity.id} entity={entity} isLoading={isLoading} />) break case RankingEntities.CREATORS: - content = (data as CreatorRank[])?.map(entity => ( - <RankingCreatorRow - key={entity.id} - entity={entity} - isLoading={isLoading} - /> - )) + content = (data as CreatorRank[])?.map(entity => <RankingCreatorRow key={entity.id} entity={entity} isLoading={isLoading} />) break case RankingEntities.COLLECTORS: - content = (data as CollectorRank[])?.map(entity => ( - <RankingCollectorRow - key={entity.id} - entity={entity} - isLoading={isLoading} - /> - )) + content = (data as CollectorRank[])?.map(entity => <RankingCollectorRow key={entity.id} entity={entity} isLoading={isLoading} />) break } @@ -462,9 +341,7 @@ const RankingsTable = (props: Props) => { <HeaderMenu> <HeaderMenu.Left> <Header>{t('home_page.analytics.rankings.title')}</Header> - <span className="subtitle"> - {t('home_page.analytics.rankings.subtitle')} - </span> + <span className="subtitle">{t('home_page.analytics.rankings.subtitle')}</span> </HeaderMenu.Left> <HeaderMenu.Right> <Dropdown @@ -477,23 +354,14 @@ const RankingsTable = (props: Props) => { }))} onChange={registerHandleFilterChange('sortBy')} /> - <TimeframeSelector - value={currentTimeframe} - onChange={handleTimeframeSelectorChange} - /> + <TimeframeSelector value={currentTimeframe} onChange={handleTimeframeSelectorChange} /> </HeaderMenu.Right> </HeaderMenu> <div className="rankings-card"> <NotMobile>{renderTableTabs()}</NotMobile> <Mobile>{renderEntityDropdown()}</Mobile> - {isLoading ? ( - <Loader active size="large" /> - ) : data && data.length > 0 ? ( - renderTableContent() - ) : ( - renderEmptyState() - )} + {isLoading ? <Loader active size="large" /> : data && data.length > 0 ? renderTableContent() : renderEmptyState()} </div> </div> ) diff --git a/webapp/src/components/RankingsTable/RankingsTable.types.ts b/webapp/src/components/RankingsTable/RankingsTable.types.ts index b6a9eb4d82..8ed8e076ef 100644 --- a/webapp/src/components/RankingsTable/RankingsTable.types.ts +++ b/webapp/src/components/RankingsTable/RankingsTable.types.ts @@ -1,13 +1,10 @@ import { Dispatch } from 'redux' import { RankingEntity } from '../../modules/analytics/types' -import { - fetchRankingsRequest, - FetchRankingsRequestAction -} from '../../modules/analytics/actions' +import { fetchRankingsRequest, FetchRankingsRequestAction } from '../../modules/analytics/actions' export type Props = { - data: RankingEntity[] | null - isLoading: boolean + data: RankingEntity[] | null + isLoading: boolean onFetchRankings: typeof fetchRankingsRequest } diff --git a/webapp/src/components/RankingsTable/utils.ts b/webapp/src/components/RankingsTable/utils.ts index b73bc7085d..2e4b36cee2 100644 --- a/webapp/src/components/RankingsTable/utils.ts +++ b/webapp/src/components/RankingsTable/utils.ts @@ -1,8 +1,4 @@ -import { - RankingEntities, - AnalyticsTimeframe, - RankingsSortBy -} from '../../modules/analytics/types' +import { RankingEntities, AnalyticsTimeframe, RankingsSortBy } from '../../modules/analytics/types' export const parseURLHash = (hash: string) => { const splitted = hash.split('-') diff --git a/webapp/src/components/RarityBadge/RarityBadge.container.ts b/webapp/src/components/RarityBadge/RarityBadge.container.ts index 7b2d7141a7..9005cc6de8 100644 --- a/webapp/src/components/RarityBadge/RarityBadge.container.ts +++ b/webapp/src/components/RarityBadge/RarityBadge.container.ts @@ -6,10 +6,7 @@ import { getSectionFromCategory } from '../../modules/routing/search' import { MapDispatchProps, OwnProps } from './RarityBadge.types' import RarityBadge from './RarityBadge' -const mapDispatch = ( - dispatch: Dispatch, - { rarity, category, assetType }: OwnProps -): MapDispatchProps => ({ +const mapDispatch = (dispatch: Dispatch, { rarity, category, assetType }: OwnProps): MapDispatchProps => ({ onClick: () => dispatch( push( diff --git a/webapp/src/components/RarityBadge/RarityBadge.tsx b/webapp/src/components/RarityBadge/RarityBadge.tsx index 7d30dc9296..435734759e 100644 --- a/webapp/src/components/RarityBadge/RarityBadge.tsx +++ b/webapp/src/components/RarityBadge/RarityBadge.tsx @@ -20,15 +20,7 @@ const RarityBadge = ({ rarity, size, withTooltip, onClick }: Props) => { </div> ) - return withTooltip ? ( - <Popup - position="top center" - content={t(`rarity_description.${rarity}`)} - trigger={trigger} - /> - ) : ( - trigger - ) + return withTooltip ? <Popup position="top center" content={t(`rarity_description.${rarity}`)} trigger={trigger} /> : trigger } RarityBadge.defaultProps = { diff --git a/webapp/src/components/RecentlySoldTable/RecentlySoldTable.container.ts b/webapp/src/components/RecentlySoldTable/RecentlySoldTable.container.ts index 7f30923944..1db1434ae9 100644 --- a/webapp/src/components/RecentlySoldTable/RecentlySoldTable.container.ts +++ b/webapp/src/components/RecentlySoldTable/RecentlySoldTable.container.ts @@ -1,17 +1,9 @@ import { connect } from 'react-redux' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { RootState } from '../../modules/reducer' -import { - MapStateProps, - MapDispatch, - MapDispatchProps -} from './RecentlySoldTable.types' -import { getLoading } from '../../modules/sale/selectors' -import { getSales } from '../../modules/sale/selectors' -import { - fetchSalesRequest, - FETCH_SALES_REQUEST -} from '../../modules/sale/actions' +import { MapStateProps, MapDispatch, MapDispatchProps } from './RecentlySoldTable.types' +import { getLoading, getSales } from '../../modules/sale/selectors' +import { fetchSalesRequest, FETCH_SALES_REQUEST } from '../../modules/sale/actions' import RecentlySoldTable from './RecentlySoldTable' const mapState = (state: RootState): MapStateProps => { diff --git a/webapp/src/components/RecentlySoldTable/RecentlySoldTable.tsx b/webapp/src/components/RecentlySoldTable/RecentlySoldTable.tsx index 9291fd35ce..a4427fcee8 100644 --- a/webapp/src/components/RecentlySoldTable/RecentlySoldTable.tsx +++ b/webapp/src/components/RecentlySoldTable/RecentlySoldTable.tsx @@ -1,17 +1,6 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { Link, useHistory, useLocation } from 'react-router-dom' -import { - HeaderMenu, - Header, - NotMobile, - Table, - Loader, - Mana, - Tabs, - Dropdown, - DropdownProps, - Mobile -} from 'decentraland-ui' +import { HeaderMenu, Header, NotMobile, Table, Loader, Mana, Tabs, Dropdown, DropdownProps, Mobile } from 'decentraland-ui' import { Item, NFTCategory, Sale, SaleSortBy } from '@dcl/schemas' import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics/utils' import { T, t } from 'decentraland-dapps/dist/modules/translation/utils' @@ -39,18 +28,11 @@ const RecentlySoldTable = (props: Props) => { const recentlySoldCardRef = useRef<HTMLDivElement>(null) const [currentCategory, setCurrentyCategory] = useState(NFTCategory.WEARABLE) - useScrollSectionIntoView( - recentlySoldCardRef, - TABS_PREFIX, - setCurrentyCategory - ) + useScrollSectionIntoView(recentlySoldCardRef, TABS_PREFIX, setCurrentyCategory) useEffect(() => { onFetchRecentSales({ - categories: - currentCategory === NFTCategory.PARCEL - ? [NFTCategory.ESTATE, NFTCategory.PARCEL] - : [currentCategory], + categories: currentCategory === NFTCategory.PARCEL ? [NFTCategory.ESTATE, NFTCategory.PARCEL] : [currentCategory], first: TABLE_SIZE, sortBy: SaleSortBy.RECENTLY_SOLD }) @@ -78,12 +60,7 @@ const RecentlySoldTable = (props: Props) => { <div className="recently-sold-card-tabs" ref={recentlySoldCardRef}> <Tabs isFullscreen> <Tabs.Left> - {Object.values([ - NFTCategory.WEARABLE, - NFTCategory.PARCEL, - NFTCategory.EMOTE, - NFTCategory.ENS - ]).map(category => ( + {Object.values([NFTCategory.WEARABLE, NFTCategory.PARCEL, NFTCategory.EMOTE, NFTCategory.ENS]).map(category => ( <Tabs.Tab key={category as string} active={currentCategory === category} @@ -110,19 +87,11 @@ const RecentlySoldTable = (props: Props) => { defaultValue={NFTCategory.WEARABLE} value={currentCategory} direction="right" - options={[ - NFTCategory.WEARABLE, - NFTCategory.PARCEL, - NFTCategory.EMOTE, - NFTCategory.ENS - ].map(category => ({ + options={[NFTCategory.WEARABLE, NFTCategory.PARCEL, NFTCategory.EMOTE, NFTCategory.ENS].map(category => ({ value: category as string, text: t(`home_page.recently_sold.tabs.${category}`) }))} - onChange={( - _event: React.SyntheticEvent<HTMLElement, Event>, - { value }: DropdownProps - ) => handleTabChange(value as NFTCategory)} + onChange={(_event: React.SyntheticEvent<HTMLElement, Event>, { value }: DropdownProps) => handleTabChange(value as NFTCategory)} /> ) } @@ -134,28 +103,12 @@ const RecentlySoldTable = (props: Props) => { return ( <Table.Header> <Table.Row> - <Table.HeaderCell> - {t( - `global.${ - currentCategory === NFTCategory.WEARABLE ? 'item' : 'emote' - }` - )} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.seller')} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.buyer')} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.type')} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.time')} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.price')} - </Table.HeaderCell> + <Table.HeaderCell>{t(`global.${currentCategory === NFTCategory.WEARABLE ? 'item' : 'emote'}`)}</Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.seller')}</Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.buyer')}</Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.type')}</Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.time')}</Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.price')}</Table.HeaderCell> </Table.Row> </Table.Header> ) @@ -165,27 +118,13 @@ const RecentlySoldTable = (props: Props) => { <Table.Header> <Table.Row> <Table.HeaderCell> - {t( - `home_page.recently_sold.tabs.${ - currentCategory === NFTCategory.PARCEL ? 'parcel' : 'ens' - }` - )} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.seller')} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.buyer')} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.type')} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.time')} - </Table.HeaderCell> - <Table.HeaderCell> - {t('home_page.recently_sold.wearables.price')} + {t(`home_page.recently_sold.tabs.${currentCategory === NFTCategory.PARCEL ? 'parcel' : 'ens'}`)} </Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.seller')}</Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.buyer')}</Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.type')}</Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.time')}</Table.HeaderCell> + <Table.HeaderCell>{t('home_page.recently_sold.wearables.price')}</Table.HeaderCell> </Table.Row> </Table.Header> ) @@ -198,19 +137,8 @@ const RecentlySoldTable = (props: Props) => { let header = <span>{t('global.item')}</span> if (currentCategory === NFTCategory.EMOTE) { header = <span>{t(`global.emote`)}</span> - } else if ( - currentCategory === NFTCategory.PARCEL || - currentCategory === NFTCategory.ENS - ) { - header = ( - <span> - {t( - `global.${ - currentCategory === NFTCategory.PARCEL ? 'parcel' : 'ens' - }` - )} - </span> - ) + } else if (currentCategory === NFTCategory.PARCEL || currentCategory === NFTCategory.ENS) { + header = <span>{t(`global.${currentCategory === NFTCategory.PARCEL ? 'parcel' : 'ens'}`)}</span> } return ( <div className="table-header"> @@ -231,17 +159,11 @@ const RecentlySoldTable = (props: Props) => { <> <div> <div className="sale-item-data"> - <Link - to={item.url} - onClick={() => handleOnLinkClick(item.id)} - > + <Link to={item.url} onClick={() => handleOnLinkClick(item.id)}> <AssetImage asset={item} isSmall /> </Link> <div className="sale-item-name-container"> - <Link - to={item.url} - onClick={() => handleOnLinkClick(item.id)} - > + <Link to={item.url} onClick={() => handleOnLinkClick(item.id)}> {item.name} </Link> <span className="recently-sold-sale-info"> @@ -276,26 +198,12 @@ const RecentlySoldTable = (props: Props) => { {item ? ( <> <div> - <span> - {t('home_page.recently_sold.wearables.seller')} - </span> - <LinkedProfile - className="account-link" - address={sale.seller} - textOnly - inline={false} - /> + <span>{t('home_page.recently_sold.wearables.seller')}</span> + <LinkedProfile className="account-link" address={sale.seller} textOnly inline={false} /> </div> <div> - <span> - {t('home_page.recently_sold.wearables.buyer')} - </span> - <LinkedProfile - className="account-link" - address={sale.buyer} - textOnly - inline={false} - /> + <span>{t('home_page.recently_sold.wearables.buyer')}</span> + <LinkedProfile className="account-link" address={sale.buyer} textOnly inline={false} /> </div> </> ) : null} @@ -310,19 +218,12 @@ const RecentlySoldTable = (props: Props) => { <Table.Cell width={4}> {item ? ( <div className="recently-sold-item-cell"> - <Link - className="recently-sold-item-cell-thumbnail" - to={item.url} - onClick={() => handleOnLinkClick(item.id)} - > + <Link className="recently-sold-item-cell-thumbnail" to={item.url} onClick={() => handleOnLinkClick(item.id)}> <AssetImage asset={item} isSmall /> </Link> <div className="sale-item-data"> - <Link - to={item.url} - onClick={() => handleOnLinkClick(item.id)} - > + <Link to={item.url} onClick={() => handleOnLinkClick(item.id)}> {item.name} </Link> @@ -332,11 +233,7 @@ const RecentlySoldTable = (props: Props) => { values={{ creator: ( <span className="rankings-item-data-creator"> - <LinkedProfile - address={item.creator} - textOnly - inline={false} - /> + <LinkedProfile address={item.creator} textOnly inline={false} /> </span> ) }} @@ -349,20 +246,10 @@ const RecentlySoldTable = (props: Props) => { ) : null} </Table.Cell> <Table.Cell width={2}> - <LinkedProfile - className="account-link" - address={sale.seller} - textOnly - inline={false} - /> + <LinkedProfile className="account-link" address={sale.seller} textOnly inline={false} /> </Table.Cell> <Table.Cell width={2}> - <LinkedProfile - className="account-link" - address={sale.buyer} - textOnly - inline={false} - /> + <LinkedProfile className="account-link" address={sale.buyer} textOnly inline={false} /> </Table.Cell> <Table.Cell width={1}>{t(`global.${sale.type}`)}</Table.Cell> <Table.Cell width={2}> @@ -384,11 +271,7 @@ const RecentlySoldTable = (props: Props) => { ) } - const soldParcelOrENSRow = ( - sale: Sale, - asset: NFT<VendorName.DECENTRALAND> | null, - isLoading: boolean - ) => { + const soldParcelOrENSRow = (sale: Sale, asset: NFT<VendorName.DECENTRALAND> | null, isLoading: boolean) => { return ( <> <Mobile> @@ -399,17 +282,11 @@ const RecentlySoldTable = (props: Props) => { <> <div> <div className="sale-item-data"> - <Link - to={asset.url} - onClick={() => handleOnLinkClick(asset.id)} - > + <Link to={asset.url} onClick={() => handleOnLinkClick(asset.id)}> <AssetImage asset={asset} isSmall /> </Link> <div className="sale-item-name-container"> - <Link - to={asset.url} - onClick={() => handleOnLinkClick(asset.id)} - > + <Link to={asset.url} onClick={() => handleOnLinkClick(asset.id)}> {asset.name} </Link> <span className="recently-sold-sale-info"> @@ -444,26 +321,12 @@ const RecentlySoldTable = (props: Props) => { {asset ? ( <> <div> - <span> - {t('home_page.recently_sold.wearables.seller')} - </span> - <LinkedProfile - className="account-link" - address={sale.seller} - textOnly - inline={false} - /> + <span>{t('home_page.recently_sold.wearables.seller')}</span> + <LinkedProfile className="account-link" address={sale.seller} textOnly inline={false} /> </div> <div> - <span> - {t('home_page.recently_sold.wearables.buyer')} - </span> - <LinkedProfile - className="account-link" - address={sale.buyer} - textOnly - inline={false} - /> + <span>{t('home_page.recently_sold.wearables.buyer')}</span> + <LinkedProfile className="account-link" address={sale.buyer} textOnly inline={false} /> </div> </> ) : null} @@ -478,18 +341,11 @@ const RecentlySoldTable = (props: Props) => { <Table.Cell width={4}> {asset ? ( <div className="recently-sold-item-cell"> - <Link - className="recently-sold-item-cell-thumbnail" - to={asset.url} - onClick={() => handleOnLinkClick(asset.id)} - > + <Link className="recently-sold-item-cell-thumbnail" to={asset.url} onClick={() => handleOnLinkClick(asset.id)}> <AssetImage asset={asset} isSmall /> </Link> <div className="rankings-item-data"> - <Link - to={asset.url} - onClick={() => handleOnLinkClick(asset.id)} - > + <Link to={asset.url} onClick={() => handleOnLinkClick(asset.id)}> {asset.name} </Link> </div> @@ -499,20 +355,10 @@ const RecentlySoldTable = (props: Props) => { ) : null} </Table.Cell> <Table.Cell width={2}> - <LinkedProfile - className="account-link" - address={sale.seller} - textOnly - inline={false} - /> + <LinkedProfile className="account-link" address={sale.seller} textOnly inline={false} /> </Table.Cell> <Table.Cell width={2}> - <LinkedProfile - className="account-link" - address={sale.buyer} - textOnly - inline={false} - /> + <LinkedProfile className="account-link" address={sale.buyer} textOnly inline={false} /> </Table.Cell> <Table.Cell width={1}>{t(`global.${sale.type}`)}</Table.Cell> <Table.Cell width={2}> @@ -543,30 +389,16 @@ const RecentlySoldTable = (props: Props) => { case NFTCategory.WEARABLE: case NFTCategory.EMOTE: content = data.map(sale => ( - <AssetProvider - key={sale.id} - type={AssetType.ITEM} - contractAddress={sale.contractAddress} - tokenId={sale.itemId} - > - {(item, _order, _rental, isLoading) => - soldItemRow(sale, item, isLoading) - } + <AssetProvider key={sale.id} type={AssetType.ITEM} contractAddress={sale.contractAddress} tokenId={sale.itemId}> + {(item, _order, _rental, isLoading) => soldItemRow(sale, item, isLoading)} </AssetProvider> )) break case NFTCategory.ENS: case NFTCategory.PARCEL: content = data.map(sale => ( - <AssetProvider - key={sale.id} - type={AssetType.NFT} - contractAddress={sale.contractAddress} - tokenId={sale.tokenId} - > - {(asset, _order, _rental, isLoading) => - soldParcelOrENSRow(sale, asset, isLoading) - } + <AssetProvider key={sale.id} type={AssetType.NFT} contractAddress={sale.contractAddress} tokenId={sale.tokenId}> + {(asset, _order, _rental, isLoading) => soldParcelOrENSRow(sale, asset, isLoading)} </AssetProvider> )) break diff --git a/webapp/src/components/RecentlySoldTable/RecentlySoldTable.types.ts b/webapp/src/components/RecentlySoldTable/RecentlySoldTable.types.ts index 76eac65a46..169c62dd1a 100644 --- a/webapp/src/components/RecentlySoldTable/RecentlySoldTable.types.ts +++ b/webapp/src/components/RecentlySoldTable/RecentlySoldTable.types.ts @@ -1,9 +1,6 @@ import { Dispatch } from 'redux' import { Sale } from '@dcl/schemas' -import { - fetchSalesRequest, - FetchSalesRequestAction -} from '../../modules/sale/actions' +import { fetchSalesRequest, FetchSalesRequestAction } from '../../modules/sale/actions' export type Props = { data: Sale[] | null diff --git a/webapp/src/components/Routes/Routes.tsx b/webapp/src/components/Routes/Routes.tsx index 0898856702..57921bafa6 100644 --- a/webapp/src/components/Routes/Routes.tsx +++ b/webapp/src/components/Routes/Routes.tsx @@ -37,15 +37,9 @@ import { Props } from './Routes.types' const Routes = ({ inMaintenance }: Props) => { const APP_ID = config.get('INTERCOM_APP_ID') - const renderItemAssetPage = useCallback( - () => <AssetPage type={AssetType.ITEM} />, - [] - ) + const renderItemAssetPage = useCallback(() => <AssetPage type={AssetType.ITEM} />, []) - const renderNFTAssetPage = useCallback( - () => <AssetPage type={AssetType.NFT} />, - [] - ) + const renderNFTAssetPage = useCallback(() => <AssetPage type={AssetType.NFT} />, []) if (inMaintenance) { return ( @@ -67,83 +61,41 @@ const Routes = ({ inMaintenance }: Props) => { <Route exact path={locations.names()} component={NamesPage} /> <Route exact path={locations.browse()} component={BrowsePage} /> <Route path={locations.campaign()} component={CampaignBrowserPage} /> - <Route - exact - path={locations.currentAccount()} - component={AccountPage} - /> + <Route exact path={locations.currentAccount()} component={AccountPage} /> <Route exact path={locations.account()} component={AccountPage} /> <ProtectedRoute exact path={locations.lists()} component={ListsPage} /> <Route exact path={locations.list()} component={ListPage} /> <Route exact path={locations.signIn()} component={SignInPage} /> <ProtectedRoute exact path={locations.sell()} component={SellPage} /> <ProtectedRoute exact path={locations.bid()} component={BidPage} /> - <ProtectedRoute - exact - path={locations.cancel()} - component={CancelSalePage} - /> - <ProtectedRoute - exact - path={locations.transfer()} - component={TransferPage} - /> + <ProtectedRoute exact path={locations.cancel()} component={CancelSalePage} /> + <ProtectedRoute exact path={locations.transfer()} component={TransferPage} /> <Route exact path={locations.collection()} component={CollectionPage} /> - <ProtectedRoute - exact - path={locations.manage()} - component={ManageAssetPage} - /> - <ProtectedRoute - exact - path={locations.buy(AssetType.NFT)} - component={() => <BuyPage type={AssetType.NFT} />} - /> - <ProtectedRoute - exact - path={locations.buy(AssetType.ITEM)} - component={() => <BuyPage type={AssetType.ITEM} />} - /> + <ProtectedRoute exact path={locations.manage()} component={ManageAssetPage} /> + <ProtectedRoute exact path={locations.buy(AssetType.NFT)} component={() => <BuyPage type={AssetType.NFT} />} /> + <ProtectedRoute exact path={locations.buy(AssetType.ITEM)} component={() => <BuyPage type={AssetType.ITEM} />} /> <Route exact path={locations.buyStatusPage(AssetType.NFT)} - component={(props: RouteComponentProps) => ( - <StatusPage {...props} type={AssetType.NFT} /> - )} + component={(props: RouteComponentProps) => <StatusPage {...props} type={AssetType.NFT} />} /> <Route exact path={locations.buyStatusPage(AssetType.ITEM)} - component={(props: RouteComponentProps) => ( - <StatusPage {...props} type={AssetType.ITEM} /> - )} + component={(props: RouteComponentProps) => <StatusPage {...props} type={AssetType.ITEM} />} /> <Route exact path={locations.nft()} component={renderNFTAssetPage} /> <Route exact path={locations.item()} component={renderItemAssetPage} /> - <ProtectedRoute - exact - path={locations.settings()} - component={SettingsPage} - /> - <ProtectedRoute - exact - path={locations.activity()} - component={ActivityPage} - /> + <ProtectedRoute exact path={locations.settings()} component={SettingsPage} /> + <ProtectedRoute exact path={locations.activity()} component={ActivityPage} /> <Route exact path={locations.root()} component={HomePage} /> <Route exact path={locations.parcel()} component={LegacyNFTPage} /> <Route exact path={locations.estate()} component={LegacyNFTPage} /> <Route exact path={locations.success()} component={SuccessPage} /> - <Redirect - from="/browse" - to={locations.browse() + window.location.search} - push - /> + <Redirect from="/browse" to={locations.browse() + window.location.search} push /> <Redirect to={locations.root()} /> </Switch> - {APP_ID ? ( - <Intercom appId={APP_ID} settings={{ alignment: 'right' }} /> - ) : null} + {APP_ID ? <Intercom appId={APP_ID} settings={{ alignment: 'right' }} /> : null} </> ) } diff --git a/webapp/src/components/Sales/Activity/Activity.container.ts b/webapp/src/components/Sales/Activity/Activity.container.ts index 5231bbfd8e..b229c03cfa 100644 --- a/webapp/src/components/Sales/Activity/Activity.container.ts +++ b/webapp/src/components/Sales/Activity/Activity.container.ts @@ -4,19 +4,9 @@ import { Item, Sale, SaleType } from '@dcl/schemas' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { NFT } from '../../../modules/nft/types' import { RootState } from '../../../modules/reducer' -import { - getSales, - getCount, - getLoading as getSaleLoading -} from '../../../modules/sale/selectors' -import { - getData as getItemsData, - getLoading as getItemLoading -} from '../../../modules/item/selectors' -import { - getData as getNftData, - getLoading as getNftLoading -} from '../../../modules/nft/selectors' +import { getSales, getCount, getLoading as getSaleLoading } from '../../../modules/sale/selectors' +import { getData as getItemsData, getLoading as getItemLoading } from '../../../modules/item/selectors' +import { getData as getNftData, getLoading as getNftLoading } from '../../../modules/nft/selectors' import { FETCH_SALES_REQUEST } from '../../../modules/sale/actions' import { FETCH_ITEM_REQUEST } from '../../../modules/item/actions' import { FETCH_NFT_REQUEST } from '../../../modules/nft/actions' @@ -26,25 +16,24 @@ import { Asset } from '../../../modules/asset/types' import { MapStateProps, MapDispatchProps } from './Activity.types' import Activity from './Activity' -const getAssets = ( - sales: Sale[], - items: Record<string, Item>, - nfts: Record<string, NFT> -) => - sales.reduce((acc, sale) => { - const { contractAddress, itemId, tokenId, type } = sale +const getAssets = (sales: Sale[], items: Record<string, Item>, nfts: Record<string, NFT>) => + sales.reduce( + (acc, sale) => { + const { contractAddress, itemId, tokenId, type } = sale - const item = items[`${contractAddress}-${itemId}`] - const nft = nfts[`${contractAddress}-${tokenId}`] + const item = items[`${contractAddress}-${itemId}`] + const nft = nfts[`${contractAddress}-${tokenId}`] - if (type === SaleType.MINT && item) { - acc[sale.id] = item - } else if (nft) { - acc[sale.id] = nft - } + if (type === SaleType.MINT && item) { + acc[sale.id] = item + } else if (nft) { + acc[sale.id] = nft + } - return acc - }, {} as Record<string, Asset>) + return acc + }, + {} as Record<string, Asset> + ) const getIsLoading = (state: RootState) => isLoadingType(getSaleLoading(state), FETCH_SALES_REQUEST) || diff --git a/webapp/src/components/Sales/Activity/Activity.tsx b/webapp/src/components/Sales/Activity/Activity.tsx index 890ca62d57..94ba31d9ce 100644 --- a/webapp/src/components/Sales/Activity/Activity.tsx +++ b/webapp/src/components/Sales/Activity/Activity.tsx @@ -1,14 +1,7 @@ import React, { ReactNode } from 'react' import { formatDistanceToNow } from 'date-fns' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - Header, - Loader, - Mobile, - NotMobile, - Pagination, - Table -} from 'decentraland-ui' +import { Header, Loader, Mobile, NotMobile, Pagination, Table } from 'decentraland-ui' import { SALES_PER_PAGE } from '../../../modules/routing/utils' import { formatWeiMANA } from '../../../lib/mana' import AssetCell from '../../OnSaleOrRentList/AssetCell' @@ -17,14 +10,7 @@ import { Mana } from '../../Mana' import { Props } from './Activity.types' import './Activity.css' -const Activity = ({ - count, - sales, - assets, - page, - isLoading, - onBrowse -}: Props) => { +const Activity = ({ count, sales, assets, page, isLoading, onBrowse }: Props) => { const pages = Math.ceil(count / SALES_PER_PAGE) const hasPagination = pages > 1 diff --git a/webapp/src/components/Sales/Activity/Activity.types.ts b/webapp/src/components/Sales/Activity/Activity.types.ts index 32c5d08569..fda2ab57f6 100644 --- a/webapp/src/components/Sales/Activity/Activity.types.ts +++ b/webapp/src/components/Sales/Activity/Activity.types.ts @@ -11,8 +11,5 @@ export type Props = { onBrowse: (options: BrowseOptions) => void } -export type MapStateProps = Pick< - Props, - 'sales' | 'assets' | 'count' | 'page' | 'isLoading' -> +export type MapStateProps = Pick<Props, 'sales' | 'assets' | 'count' | 'page' | 'isLoading'> export type MapDispatchProps = Pick<Props, 'onBrowse'> diff --git a/webapp/src/components/Sales/Stats/Stats.container.ts b/webapp/src/components/Sales/Stats/Stats.container.ts index c02cf5efc5..5d8c7f81b0 100644 --- a/webapp/src/components/Sales/Stats/Stats.container.ts +++ b/webapp/src/components/Sales/Stats/Stats.container.ts @@ -2,14 +2,10 @@ import { connect } from 'react-redux' import { RootState } from '../../../modules/reducer' import { MapStateProps, MapDispatchProps } from './Stats.types' import Stats from './Stats' -import { getMetricsByAddress } from '../../../modules/account/selectors' +import { getMetricsByAddress, getLoading } from '../../../modules/account/selectors' import { getAddress } from '../../../modules/wallet/selectors' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' -import { getLoading } from '../../../modules/account/selectors' -import { - fetchAccountMetricsRequest, - FETCH_ACCOUNT_METRICS_REQUEST -} from '../../../modules/account/actions' +import { fetchAccountMetricsRequest, FETCH_ACCOUNT_METRICS_REQUEST } from '../../../modules/account/actions' import { Dispatch } from 'redux' const getEmptyMetrics = (address: string) => ({ @@ -25,10 +21,7 @@ const mapState = (state: RootState): MapStateProps => { const address = getAddress(state)! const metrics = getMetricsByAddress(state)[address] const emptyMetrics = getEmptyMetrics(address) - const isLoading = isLoadingType( - getLoading(state), - FETCH_ACCOUNT_METRICS_REQUEST - ) + const isLoading = isLoadingType(getLoading(state), FETCH_ACCOUNT_METRICS_REQUEST) return { address, diff --git a/webapp/src/components/Sales/Stats/Stats.tsx b/webapp/src/components/Sales/Stats/Stats.tsx index 1d52f6f95b..8da0fea863 100644 --- a/webapp/src/components/Sales/Stats/Stats.tsx +++ b/webapp/src/components/Sales/Stats/Stats.tsx @@ -7,16 +7,7 @@ import { Mana } from '../../Mana' import { Network } from '@dcl/schemas' import './Stats.css' -const Stats = ({ - address, - totalSales, - totalEarnings, - ethereumEarned, - maticEarned, - royalties, - isLoading, - onFetchMetrics -}: Props) => { +const Stats = ({ address, totalSales, totalEarnings, ethereumEarned, maticEarned, royalties, isLoading, onFetchMetrics }: Props) => { useEffect(() => onFetchMetrics(address), [address, onFetchMetrics]) return ( @@ -31,13 +22,7 @@ const Stats = ({ subtitle={t('sales.total_earnings')} value={formatWeiMANA(totalEarnings)} isLoading={isLoading} - icon={ - <Icon - className="total-earnings-icon" - name="shopping bag" - size="large" - /> - } + icon={<Icon className="total-earnings-icon" name="shopping bag" size="large" />} /> <Stat subtitle={t('sales.royalties')} @@ -49,43 +34,19 @@ const Stats = ({ subtitle={t('sales.ethereum_earnings')} value={formatWeiMANA(ethereumEarned)} isLoading={isLoading} - icon={ - <Mana - showTooltip - className="ethereum-earnings-icon" - network={Network.ETHEREUM} - size="large" - /> - } + icon={<Mana showTooltip className="ethereum-earnings-icon" network={Network.ETHEREUM} size="large" />} /> <Stat subtitle={t('sales.polygon_earnings')} value={formatWeiMANA(maticEarned)} isLoading={isLoading} - icon={ - <Mana - showTooltip - className="polygon-earnings-icon" - network={Network.MATIC} - size="medium" - /> - } + icon={<Mana showTooltip className="polygon-earnings-icon" network={Network.MATIC} size="medium" />} /> </div> ) } -const Stat = ({ - value, - subtitle, - isLoading, - icon -}: { - value: string - subtitle: string - isLoading: boolean - icon: ReactNode -}) => { +const Stat = ({ value, subtitle, isLoading, icon }: { value: string; subtitle: string; isLoading: boolean; icon: ReactNode }) => { return ( <div className="Stat"> {isLoading ? ( diff --git a/webapp/src/components/Sales/Stats/Stats.types.ts b/webapp/src/components/Sales/Stats/Stats.types.ts index 07e78a39b1..6f207e7db2 100644 --- a/webapp/src/components/Sales/Stats/Stats.types.ts +++ b/webapp/src/components/Sales/Stats/Stats.types.ts @@ -11,12 +11,6 @@ export type Props = { export type MapStateProps = Pick< Props, - | 'address' - | 'totalEarnings' - | 'ethereumEarned' - | 'isLoading' - | 'maticEarned' - | 'totalSales' - | 'royalties' + 'address' | 'totalEarnings' | 'ethereumEarned' | 'isLoading' | 'maticEarned' | 'totalSales' | 'royalties' > export type MapDispatchProps = Pick<Props, 'onFetchMetrics'> diff --git a/webapp/src/components/SellPage/SellModal/SellModal.tsx b/webapp/src/components/SellPage/SellModal/SellModal.tsx index 4712d634d3..684bda33f4 100644 --- a/webapp/src/components/SellPage/SellModal/SellModal.tsx +++ b/webapp/src/components/SellPage/SellModal/SellModal.tsx @@ -9,17 +9,11 @@ import { toFixedMANAValue } from 'decentraland-dapps/dist/lib/mana' import { AuthorizationType } from 'decentraland-dapps/dist/modules/authorization/types' import { AuthorizedAction } from 'decentraland-dapps/dist/containers/withAuthorizedAction/AuthorizationModal' import { t, T } from 'decentraland-dapps/dist/modules/translation/utils' -import { - ChainButton, - withAuthorizedAction -} from 'decentraland-dapps/dist/containers' +import { ChainButton, withAuthorizedAction } from 'decentraland-dapps/dist/containers' import { Header, Form, Field, Button } from 'decentraland-ui' import { ContractName } from 'decentraland-transactions' import { parseMANANumber } from '../../../lib/mana' -import { - INPUT_FORMAT, - getDefaultExpirationDate -} from '../../../modules/order/utils' +import { INPUT_FORMAT, getDefaultExpirationDate } from '../../../modules/order/utils' import { VendorFactory } from '../../../modules/vendor/VendorFactory' import { getAssetName, isOwnedBy } from '../../../modules/asset/utils' import { getContractNames } from '../../../modules/vendor' @@ -35,23 +29,11 @@ import { Props } from './SellModal.types' import { showPriceBelowMarketValueWarning } from './utils' const SellModal = (props: Props) => { - const { - nft, - order, - wallet, - isLoading, - isCreatingOrder, - getContract, - onGoBack, - onCreateOrder, - onAuthorizedAction, - onClearOrderErrors - } = props + const { nft, order, wallet, isLoading, isCreatingOrder, getContract, onGoBack, onCreateOrder, onAuthorizedAction, onClearOrderErrors } = + props const isUpdate = order !== null - const [price, setPrice] = useState<string>( - isUpdate ? ethers.utils.formatEther(order!.price) : '' - ) + const [price, setPrice] = useState<string>(isUpdate ? ethers.utils.formatEther(order.price) : '') const [expiresAt, setExpiresAt] = useState(() => { let exp = order?.expiresAt @@ -84,11 +66,7 @@ const SellModal = (props: Props) => { try { const provider = await getNetworkProvider(nftContract.chainId) - const erc721 = new ethers.Contract( - nftContract.address, - ERC721ABI, - new ethers.providers.Web3Provider(provider) - ) + const erc721 = new ethers.Contract(nftContract.address, ERC721ABI, new ethers.providers.Web3Provider(provider)) const name = await erc721.name() setTargetContractLabel(name) @@ -116,12 +94,7 @@ const SellModal = (props: Props) => { return null } - const handleCreateOrder = () => - onCreateOrder( - nft, - parseMANANumber(price), - new Date(`${expiresAt} 00:00:00`).getTime() - ) + const handleCreateOrder = () => onCreateOrder(nft, parseMANANumber(price), new Date(`${expiresAt} 00:00:00`).getTime()) const handleSubmit = () => { onClearOrderErrors() @@ -131,13 +104,10 @@ const SellModal = (props: Props) => { authorizedContractLabel: marketplace?.label || marketplace.name, targetContract: nftContract as Contract, targetContractName: - (nft.category === NFTCategory.WEARABLE || - nft.category === NFTCategory.EMOTE) && - nft.network === Network.MATIC + (nft.category === NFTCategory.WEARABLE || nft.category === NFTCategory.EMOTE) && nft.network === Network.MATIC ? ContractName.ERC721CollectionV2 : ContractName.ERC721, - targetContractLabel: - targetContractLabel || nftContract.label || nftContract.name, + targetContractLabel: targetContractLabel || nftContract.label || nftContract.name, onAuthorized: handleCreateOrder, tokenId: nft.tokenId }) @@ -146,19 +116,12 @@ const SellModal = (props: Props) => { const { orderService } = VendorFactory.build(nft.vendor) const isInvalidDate = new Date(`${expiresAt} 00:00:00`).getTime() < Date.now() - const isInvalidPrice = - parseMANANumber(price) <= 0 || parseFloat(price) !== parseMANANumber(price) - const isDisabled = - !orderService.canSell() || - !isOwnedBy(nft, wallet) || - isInvalidPrice || - isInvalidDate + const isInvalidPrice = parseMANANumber(price) <= 0 || parseFloat(price) !== parseMANANumber(price) + const isDisabled = !orderService.canSell() || !isOwnedBy(nft, wallet) || isInvalidPrice || isInvalidDate return ( <AssetAction asset={nft}> - <Header size="large"> - {t(isUpdate ? 'sell_page.update_title' : 'sell_page.title')} - </Header> + <Header size="large">{t(isUpdate ? 'sell_page.update_title' : 'sell_page.title')}</Header> <p className="subtitle"> <T id={isUpdate ? 'sell_page.update_subtitle' : 'sell_page.subtitle'} @@ -186,9 +149,7 @@ const SellModal = (props: Props) => { label={t('sell_page.expiration_date')} type="date" value={expiresAt} - onChange={(_event, props) => - setExpiresAt(props.value || getDefaultExpirationDate()) - } + onChange={(_event, props) => setExpiresAt(props.value || getDefaultExpirationDate())} error={isInvalidDate} message={isInvalidDate ? t('sell_page.invalid_date') : undefined} /> @@ -197,13 +158,7 @@ const SellModal = (props: Props) => { <Button as="div" onClick={onGoBack}> {t('global.cancel')} </Button> - <ChainButton - type="submit" - primary - disabled={isDisabled || isLoading} - loading={isLoading} - chainId={nft.chainId} - > + <ChainButton type="submit" primary disabled={isDisabled || isLoading} loading={isLoading} chainId={nft.chainId}> {t(isUpdate ? 'sell_page.update_submit' : 'sell_page.submit')} </ChainButton> </div> diff --git a/webapp/src/components/SellPage/SellPage.container.ts b/webapp/src/components/SellPage/SellPage.container.ts index 2e34d8dc1c..efb8e7c9c4 100644 --- a/webapp/src/components/SellPage/SellPage.container.ts +++ b/webapp/src/components/SellPage/SellPage.container.ts @@ -1,16 +1,10 @@ import { connect } from 'react-redux' import { goBack } from 'connected-react-router' import { FETCH_AUTHORIZATIONS_REQUEST } from 'decentraland-dapps/dist/modules/authorization/actions' -import { - getLoading as getLoadingAuthorizations -} from 'decentraland-dapps/dist/modules/authorization/selectors' +import { getLoading as getLoadingAuthorizations } from 'decentraland-dapps/dist/modules/authorization/selectors' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { RootState } from '../../modules/reducer' -import { - createOrderRequest, - CREATE_ORDER_REQUEST, - clearOrderErrors -} from '../../modules/order/actions' +import { createOrderRequest, CREATE_ORDER_REQUEST, clearOrderErrors } from '../../modules/order/actions' import { getLoading as getLoadingOrders } from '../../modules/order/selectors' import { getContract } from '../../modules/contract/selectors' import { Contract } from '../../modules/vendor/services' @@ -18,19 +12,15 @@ import { MapStateProps, MapDispatchProps, MapDispatch } from './SellPage.types' import SellPage from './SellPage' const mapState = (state: RootState): MapStateProps => ({ - isLoading: isLoadingType( - getLoadingAuthorizations(state), - FETCH_AUTHORIZATIONS_REQUEST - ), + isLoading: isLoadingType(getLoadingAuthorizations(state), FETCH_AUTHORIZATIONS_REQUEST), isCreatingOrder: isLoadingType(getLoadingOrders(state), CREATE_ORDER_REQUEST), getContract: (query: Partial<Contract>) => getContract(state, query) }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ onGoBack: () => dispatch(goBack()), - onCreateOrder: (nft, price, expiresAt) => - dispatch(createOrderRequest(nft, price, expiresAt)), - onClearOrderErrors: () => dispatch(clearOrderErrors()), + onCreateOrder: (nft, price, expiresAt) => dispatch(createOrderRequest(nft, price, expiresAt)), + onClearOrderErrors: () => dispatch(clearOrderErrors()) }) export default connect(mapState, mapDispatch)(SellPage) diff --git a/webapp/src/components/SellPage/SellPage.tsx b/webapp/src/components/SellPage/SellPage.tsx index 51f7b5c770..9ad6b43a83 100644 --- a/webapp/src/components/SellPage/SellPage.tsx +++ b/webapp/src/components/SellPage/SellPage.tsx @@ -10,14 +10,7 @@ import { Props } from './SellPage.types' import './SellPage.css' const SellPage = (props: Props) => { - const { - isLoading, - isCreatingOrder, - onGoBack, - getContract, - onCreateOrder, - onClearOrderErrors - } = props + const { isLoading, isCreatingOrder, onGoBack, getContract, onCreateOrder, onClearOrderErrors } = props return ( <> <Navbar /> diff --git a/webapp/src/components/SellPage/SellPage.types.ts b/webapp/src/components/SellPage/SellPage.types.ts index 1d4a036b81..1cf2e2df47 100644 --- a/webapp/src/components/SellPage/SellPage.types.ts +++ b/webapp/src/components/SellPage/SellPage.types.ts @@ -1,11 +1,6 @@ import { Dispatch } from 'redux' import { CallHistoryMethodAction } from 'connected-react-router' -import { - clearOrderErrors, - ClearOrderErrorsAction, - createOrderRequest, - CreateOrderRequestAction -} from '../../modules/order/actions' +import { clearOrderErrors, ClearOrderErrorsAction, createOrderRequest, CreateOrderRequestAction } from '../../modules/order/actions' import { Contract } from '../../modules/vendor/services' import { getContract } from '../../modules/contract/selectors' @@ -18,14 +13,6 @@ export type Props = { onClearOrderErrors: typeof clearOrderErrors } -export type MapStateProps = Pick< - Props, - 'isLoading' | 'isCreatingOrder' | 'getContract' -> -export type MapDispatchProps = Pick< - Props, - 'onCreateOrder' | 'onGoBack' | 'onClearOrderErrors' -> -export type MapDispatch = Dispatch< - CallHistoryMethodAction | CreateOrderRequestAction | ClearOrderErrorsAction -> +export type MapStateProps = Pick<Props, 'isLoading' | 'isCreatingOrder' | 'getContract'> +export type MapDispatchProps = Pick<Props, 'onCreateOrder' | 'onGoBack' | 'onClearOrderErrors'> +export type MapDispatch = Dispatch<CallHistoryMethodAction | CreateOrderRequestAction | ClearOrderErrorsAction> diff --git a/webapp/src/components/SettingsPage/Authorization/Authorization.container.ts b/webapp/src/components/SettingsPage/Authorization/Authorization.container.ts index 1ecda585b4..60a36145a3 100644 --- a/webapp/src/components/SettingsPage/Authorization/Authorization.container.ts +++ b/webapp/src/components/SettingsPage/Authorization/Authorization.container.ts @@ -1,8 +1,5 @@ import { connect } from 'react-redux' -import { - getData as getAuthorizations, - getLoading -} from 'decentraland-dapps/dist/modules/authorization/selectors' +import { getData as getAuthorizations, getLoading } from 'decentraland-dapps/dist/modules/authorization/selectors' import { GrantTokenRequestAction, GRANT_TOKEN_REQUEST, @@ -17,31 +14,18 @@ import { RootState } from '../../../modules/reducer' import { getPendingAuthorizationTransactions } from '../../../modules/transaction/selectors' import { getContract } from '../../../modules/contract/selectors' import { Contract } from '../../../modules/vendor/services' -import { - OwnProps, - MapStateProps, - MapDispatchProps, - MapDispatch -} from './Authorization.types' +import { OwnProps, MapStateProps, MapDispatchProps, MapDispatch } from './Authorization.types' import Authorization from './Authorization' -const mapState = ( - state: RootState, - { authorization }: OwnProps -): MapStateProps => { +const mapState = (state: RootState, { authorization }: OwnProps): MapStateProps => { const { contractAddress, authorizedAddress } = authorization const authorizations = getAuthorizations(state) const pendingTransactions = getPendingAuthorizationTransactions(state) const isLoading = getLoading(state).some(action => { - if ( - action.type === GRANT_TOKEN_REQUEST || - action.type === REVOKE_TOKEN_REQUEST - ) { - const { payload } = action as - | GrantTokenRequestAction - | RevokeTokenRequestAction + if (action.type === GRANT_TOKEN_REQUEST || action.type === REVOKE_TOKEN_REQUEST) { + const { payload } = action as GrantTokenRequestAction | RevokeTokenRequestAction return areEqual(authorization, payload.authorization) } return false @@ -50,13 +34,7 @@ const mapState = ( return { authorizations, pendingTransactions, - isLoading: - isLoading || - hasTransactionPending( - pendingTransactions, - authorizedAddress, - contractAddress - ), + isLoading: isLoading || hasTransactionPending(pendingTransactions, authorizedAddress, contractAddress), getContract: (query: Partial<Contract>) => getContract(state, query) } } diff --git a/webapp/src/components/SettingsPage/Authorization/Authorization.tsx b/webapp/src/components/SettingsPage/Authorization/Authorization.tsx index 2624b5efa1..879a32b82a 100644 --- a/webapp/src/components/SettingsPage/Authorization/Authorization.tsx +++ b/webapp/src/components/SettingsPage/Authorization/Authorization.tsx @@ -14,15 +14,7 @@ import { Props } from './Authorization.types' import './Authorization.css' const Authorization = (props: Props) => { - const { - authorization, - authorizations, - shouldUpdateSpendingCap, - isLoading, - onGrant, - onRevoke, - getContract - } = props + const { authorization, authorizations, shouldUpdateSpendingCap, isLoading, onGrant, onRevoke, getContract } = props const handleOnChange = useCallback( (isChecked: boolean) => { @@ -59,10 +51,7 @@ const Authorization = (props: Props) => { return ( <div className="Authorization"> - <Form.Field - key={contractAddress} - className={isLoading ? 'is-pending' : ''} - > + <Form.Field key={contractAddress} className={isLoading ? 'is-pending' : ''}> <Popup content={t('settings_page.pending_tx')} position="top left" @@ -75,15 +64,10 @@ const Authorization = (props: Props) => { <ChainCheck chainId={authorization.chainId}> {isEnabled => ( <Radio - checked={ - isAuthorized(authorization, authorizations) && - !shouldUpdateSpendingCap - } + checked={isAuthorized(authorization, authorizations) && !shouldUpdateSpendingCap} label={token.name} disabled={!isEnabled} - onClick={(_, props: RadioProps) => - handleOnChange(!!props.checked) - } + onClick={(_, props: RadioProps) => handleOnChange(!!props.checked)} /> )} </ChainCheck> @@ -92,11 +76,7 @@ const Authorization = (props: Props) => { id="authorization.authorize" values={{ contract_link: ( - <TransactionLink - address={authorizedAddress} - txHash="" - chainId={authorization.chainId} - > + <TransactionLink address={authorizedAddress} txHash="" chainId={authorization.chainId}> {contract.label || contract.name} </TransactionLink> ), diff --git a/webapp/src/components/SettingsPage/Authorization/Authorization.types.ts b/webapp/src/components/SettingsPage/Authorization/Authorization.types.ts index 15b57b1601..b8c7435876 100644 --- a/webapp/src/components/SettingsPage/Authorization/Authorization.types.ts +++ b/webapp/src/components/SettingsPage/Authorization/Authorization.types.ts @@ -22,11 +22,6 @@ export type Props = { } export type OwnProps = Pick<Props, 'authorization'> -export type MapStateProps = Pick< - Props, - 'authorizations' | 'pendingTransactions' | 'isLoading' | 'getContract' -> +export type MapStateProps = Pick<Props, 'authorizations' | 'pendingTransactions' | 'isLoading' | 'getContract'> export type MapDispatchProps = Pick<Props, 'onGrant' | 'onRevoke'> -export type MapDispatch = Dispatch< - GrantTokenRequestAction | RevokeTokenRequestAction -> +export type MapDispatch = Dispatch<GrantTokenRequestAction | RevokeTokenRequestAction> diff --git a/webapp/src/components/SettingsPage/SettingsPage.container.ts b/webapp/src/components/SettingsPage/SettingsPage.container.ts index 5936c61bd5..1eee589b12 100644 --- a/webapp/src/components/SettingsPage/SettingsPage.container.ts +++ b/webapp/src/components/SettingsPage/SettingsPage.container.ts @@ -1,36 +1,17 @@ import { connect } from 'react-redux' import { push } from 'connected-react-router' -import { - getData as getAuthorizations, - getLoading, - getError -} from 'decentraland-dapps/dist/modules/authorization/selectors' +import { getData as getAuthorizations, getLoading, getError } from 'decentraland-dapps/dist/modules/authorization/selectors' import { FETCH_AUTHORIZATIONS_REQUEST } from 'decentraland-dapps/dist/modules/authorization/actions' import { RootState } from '../../modules/reducer' -import { - isUserCanceled, - isUserDeniedSignatureError, - isContractAccountError -} from '../../modules/transaction/utils' +import { isUserCanceled, isUserDeniedSignatureError, isContractAccountError } from '../../modules/transaction/utils' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { isConnecting } from 'decentraland-dapps/dist/modules/wallet/selectors' import { getWallet } from '../../modules/wallet/selectors' -import { - getContract, - getHasFetched, - getLoading as getContractLoading -} from '../../modules/contract/selectors' +import { getContract, getHasFetched, getLoading as getContractLoading } from '../../modules/contract/selectors' import { Contract } from '../../modules/vendor/services' -import { - fetchContractsRequest, - FETCH_CONTRACTS_REQUEST -} from '../../modules/contract/actions' -import { - MapStateProps, - MapDispatch, - MapDispatchProps -} from './SettingsPage.types' +import { fetchContractsRequest, FETCH_CONTRACTS_REQUEST } from '../../modules/contract/actions' +import { MapStateProps, MapDispatch, MapDispatchProps } from './SettingsPage.types' import SettingsPage from './SettingsPage' const mapState = (state: RootState): MapStateProps => { @@ -39,18 +20,13 @@ const mapState = (state: RootState): MapStateProps => { const error = getError(state) // TODO: Change this to use ErrorCodes. Needs an overhaul on decentraland-dapps - const hasError = - !!error && - !isUserCanceled(error) && - !isUserDeniedSignatureError(error) && - !isContractAccountError(error) + const hasError = !!error && !isUserCanceled(error) && !isUserDeniedSignatureError(error) && !isContractAccountError(error) return { wallet, authorizations: getAuthorizations(state), isLoading: - isLoadingType(getLoading(state), FETCH_AUTHORIZATIONS_REQUEST) || - isLoadingType(getContractLoading(state), FETCH_CONTRACTS_REQUEST), + isLoadingType(getLoading(state), FETCH_AUTHORIZATIONS_REQUEST) || isLoadingType(getContractLoading(state), FETCH_CONTRACTS_REQUEST), isConnecting: isConnecting(state), hasError, hasFetchedContracts: getHasFetched(state), diff --git a/webapp/src/components/SettingsPage/SettingsPage.tsx b/webapp/src/components/SettingsPage/SettingsPage.tsx index c9b35fccb2..9afc70d3eb 100644 --- a/webapp/src/components/SettingsPage/SettingsPage.tsx +++ b/webapp/src/components/SettingsPage/SettingsPage.tsx @@ -18,15 +18,7 @@ import copyText from '../../lib/copyText' import './SettingsPage.css' const SettingsPage = (props: Props) => { - const { - wallet, - authorizations, - isLoading, - hasError, - hasFetchedContracts, - getContract, - onFetchContracts - } = props + const { wallet, authorizations, isLoading, hasError, hasFetchedContracts, getContract, onFetchContracts } = props const [hasCopiedText, setHasCopiedAddress] = useTimer(1200) @@ -114,9 +106,7 @@ const SettingsPage = (props: Props) => { return false } - const isParcelOrEstate = - contract.category === NFTCategory.PARCEL || - contract.category === NFTCategory.ESTATE + const isParcelOrEstate = contract.category === NFTCategory.PARCEL || contract.category === NFTCategory.ESTATE return ( contract && @@ -135,11 +125,7 @@ const SettingsPage = (props: Props) => { {wallet ? ( <Grid> <Grid.Row> - <Grid.Column - className="left-column secondary-text" - computer={4} - mobile={16} - > + <Grid.Column className="left-column secondary-text" computer={4} mobile={16}> {t('global.address')} </Grid.Column> <Grid.Column computer={12} mobile={16}> @@ -147,37 +133,19 @@ const SettingsPage = (props: Props) => { <Blockie seed={wallet.address} scale={12} /> </div> <div className="address-container"> - <div className="address"> - {isMobile() - ? shortenAddress(wallet.address) - : wallet.address} - </div> - <div - role="button" - aria-label="copy" - onClick={() => - copyText(wallet.address, setHasCopiedAddress) - } - > + <div className="address">{isMobile() ? shortenAddress(wallet.address) : wallet.address}</div> + <div role="button" aria-label="copy" onClick={() => copyText(wallet.address, setHasCopiedAddress)}> {hasCopiedText ? ( - <span className="copy-text"> - {t('settings_page.copied')} - </span> + <span className="copy-text">{t('settings_page.copied')}</span> ) : ( - <span className="copy-text link"> - {t('settings_page.copy_address')} - </span> + <span className="copy-text link">{t('settings_page.copy_address')}</span> )} </div> </div> </Grid.Column> </Grid.Row> <Grid.Row> - <Grid.Column - className="left-column secondary-text" - computer={4} - mobile={16} - > + <Grid.Column className="left-column secondary-text" computer={4} mobile={16}> {t('settings_page.authorizations')} </Grid.Column> <Grid.Column computer={12} mobile={16}> @@ -196,9 +164,7 @@ const SettingsPage = (props: Props) => { ) : ( <Form> <div className="authorization-checks"> - <label className="secondary-text"> - {t('settings_page.for_buying')} - </label> + <label className="secondary-text">{t('settings_page.for_buying')}</label> <Authorization authorization={{ address: wallet.address, @@ -232,9 +198,7 @@ const SettingsPage = (props: Props) => { </div> <div className="authorization-checks"> - <label className="secondary-text"> - {t('settings_page.for_bidding')} - </label> + <label className="secondary-text">{t('settings_page.for_bidding')}</label> <Authorization authorization={{ address: wallet.address, @@ -258,9 +222,7 @@ const SettingsPage = (props: Props) => { </div> <div className="authorization-checks"> - <label className="secondary-text"> - {t('settings_page.for_renting')} - </label> + <label className="secondary-text">{t('settings_page.for_renting')}</label> <Authorization authorization={{ address: wallet.address, @@ -274,10 +236,7 @@ const SettingsPage = (props: Props) => { {authorizationsForRenting.map(authorization => { return ( <Authorization - key={ - authorization.authorizedAddress + - authorization.contractAddress - } + key={authorization.authorizedAddress + authorization.contractAddress} authorization={authorization} /> ) @@ -286,17 +245,12 @@ const SettingsPage = (props: Props) => { {authorizationsForSelling.length > 0 ? ( <div className="authorization-checks"> - <label className="secondary-text"> - {t('settings_page.for_selling')} - </label> + <label className="secondary-text">{t('settings_page.for_selling')}</label> {authorizationsForSelling.map(authorization => { return ( <Authorization - key={ - authorization.authorizedAddress + - authorization.contractAddress - } + key={authorization.authorizedAddress + authorization.contractAddress} authorization={authorization} /> ) diff --git a/webapp/src/components/SettingsPage/SettingsPage.types.ts b/webapp/src/components/SettingsPage/SettingsPage.types.ts index 9c25ce5552..03a8f44eb2 100644 --- a/webapp/src/components/SettingsPage/SettingsPage.types.ts +++ b/webapp/src/components/SettingsPage/SettingsPage.types.ts @@ -4,10 +4,7 @@ import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { Authorization } from 'decentraland-dapps/dist/modules/authorization/types' import { Contract } from '../../modules/vendor/services' import { getContract } from '../../modules/contract/selectors' -import { - fetchContractsRequest, - FetchContractsRequestAction -} from '../../modules/contract/actions' +import { fetchContractsRequest, FetchContractsRequestAction } from '../../modules/contract/actions' export type Props = { wallet: Wallet | null @@ -23,15 +20,7 @@ export type Props = { export type MapStateProps = Pick< Props, - | 'wallet' - | 'authorizations' - | 'isLoading' - | 'isConnecting' - | 'hasError' - | 'getContract' - | 'hasFetchedContracts' + 'wallet' | 'authorizations' | 'isLoading' | 'isConnecting' | 'hasError' | 'getContract' | 'hasFetchedContracts' > export type MapDispatchProps = Pick<Props, 'onNavigate' | 'onFetchContracts'> -export type MapDispatch = Dispatch< - CallHistoryMethodAction | FetchContractsRequestAction -> +export type MapDispatch = Dispatch<CallHistoryMethodAction | FetchContractsRequestAction> diff --git a/webapp/src/components/SignInPage/SignInPage.container.ts b/webapp/src/components/SignInPage/SignInPage.container.ts index ec86baf6b2..bae4daa5a8 100644 --- a/webapp/src/components/SignInPage/SignInPage.container.ts +++ b/webapp/src/components/SignInPage/SignInPage.container.ts @@ -1,8 +1,5 @@ import { connect } from 'react-redux' -import { - isConnecting, - isConnected -} from 'decentraland-dapps/dist/modules/wallet/selectors' +import { isConnecting, isConnected } from 'decentraland-dapps/dist/modules/wallet/selectors' import { RootState } from '../../modules/reducer' import { MapStateProps } from './SignInPage.types' import SignInPage from './SignInPage' diff --git a/webapp/src/components/SignInPage/SignInPage.tsx b/webapp/src/components/SignInPage/SignInPage.tsx index d845936e57..e8bf22289a 100644 --- a/webapp/src/components/SignInPage/SignInPage.tsx +++ b/webapp/src/components/SignInPage/SignInPage.tsx @@ -13,15 +13,9 @@ const SignInPage = (props: Props) => { const handleConnect = useCallback(() => { if (!isConnected && !isConnecting) { const params = new URLSearchParams(window.location.search) - const basename = /^decentraland.(zone|org|today)$/.test( - window.location.host - ) - ? '/marketplace' - : '' + const basename = /^decentraland.(zone|org|today)$/.test(window.location.host) ? '/marketplace' : '' window.location.replace( - `${config.get('AUTH_URL')}/login?redirectTo=${encodeURIComponent( - `${basename}${params.get('redirectTo') || '/'}` - )}` + `${config.get('AUTH_URL')}/login?redirectTo=${encodeURIComponent(`${basename}${params.get('redirectTo') || '/'}`)}` ) } }, [isConnected, isConnecting]) diff --git a/webapp/src/components/StoreSettings/CoverPicker/CoverPicker.tsx b/webapp/src/components/StoreSettings/CoverPicker/CoverPicker.tsx index 299fb85855..4094aa3580 100644 --- a/webapp/src/components/StoreSettings/CoverPicker/CoverPicker.tsx +++ b/webapp/src/components/StoreSettings/CoverPicker/CoverPicker.tsx @@ -16,10 +16,7 @@ const CoverPicker = ({ src, onChange }: Props) => { <Empty> <div className="cover-image-container"> <div className="watermelon" /> - <button - className="add-cover" - onClick={() => inputRef.current?.click()} - > + <button className="add-cover" onClick={() => inputRef.current?.click()}> {t('store_settings.add_cover_picture')} </button> </div> @@ -27,11 +24,7 @@ const CoverPicker = ({ src, onChange }: Props) => { )} {src && ( <div className="buttons"> - <Button - circular - icon="camera" - onClick={() => inputRef.current?.click()} - /> + <Button circular icon="camera" onClick={() => inputRef.current?.click()} /> <Button circular icon="cancel" diff --git a/webapp/src/components/StoreSettings/StoreSettings.container.ts b/webapp/src/components/StoreSettings/StoreSettings.container.ts index 80d07d0921..a92b2678de 100644 --- a/webapp/src/components/StoreSettings/StoreSettings.container.ts +++ b/webapp/src/components/StoreSettings/StoreSettings.container.ts @@ -5,12 +5,7 @@ import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors import { RootState } from '../../modules/reducer' import { MapStateProps, MapDispatchProps } from './StoreSettings.types' import StoreSettings from './StoreSettings' -import { - getStoresByOwner, - getLocalStore, - getLoading as getStoreLoading, - getError -} from '../../modules/store/selectors' +import { getStoresByOwner, getLocalStore, getLoading as getStoreLoading, getError } from '../../modules/store/selectors' import { Store } from '../../modules/store/types' import { fetchStoreRequest, @@ -24,7 +19,7 @@ import { getEmptyStore } from '../../modules/store/utils' const mapState = (state: RootState): MapStateProps => { const address = getAddress(state)! - const savedStore = getStoresByOwner(state)[address!] + const savedStore = getStoresByOwner(state)[address] const emptyStore = getEmptyStore({ owner: address }) const localStore = getLocalStore(state) const baseStore = savedStore || emptyStore diff --git a/webapp/src/components/StoreSettings/StoreSettings.tsx b/webapp/src/components/StoreSettings/StoreSettings.tsx index bc3bfa545c..40b0073e0c 100644 --- a/webapp/src/components/StoreSettings/StoreSettings.tsx +++ b/webapp/src/components/StoreSettings/StoreSettings.tsx @@ -9,34 +9,17 @@ import TextInput from './TextInput' import { Props } from './StoreSettings.types' import { locations } from '../../modules/routing/locations' import { LinkType, Store } from '../../modules/store/types' -import { - getIsValidLink, - getPrefixedCoverName, - linkStartsWith -} from '../../modules/store/utils' +import { getIsValidLink, getPrefixedCoverName, linkStartsWith } from '../../modules/store/utils' import './StoreSettings.css' const MAX_FILE_SIZE = 1000000 -const StoreSettings = ({ - address, - store, - canSubmit, - error, - isLoading, - isSaving, - onChange, - onRevert, - onSave, - onFetchStore -}: Props) => { +const StoreSettings = ({ address, store, canSubmit, error, isLoading, isSaving, onChange, onRevert, onSave, onFetchStore }: Props) => { const { cover, description, website, facebook, twitter, discord } = store const [coverSize, setCoverSize] = useState<number>() - const [errors, setErrors] = useState< - { [key in keyof Store]?: string } & { size?: string } - >({}) + const [errors, setErrors] = useState<{ [key in keyof Store]?: string } & { size?: string }>({}) useEffect(() => { onFetchStore(address) @@ -69,15 +52,9 @@ const StoreSettings = ({ } }, [coverSize, website]) - const hasErrors = useMemo( - () => Object.values(errors).some(error => !!error), - [errors] - ) + const hasErrors = useMemo(() => Object.values(errors).some(error => !!error), [errors]) - const getInputValue = useCallback( - (type: LinkType) => store[type].replace(linkStartsWith[type], ''), - [store] - ) + const getInputValue = useCallback((type: LinkType) => store[type].replace(linkStartsWith[type], ''), [store]) const handleInputOnChange = useCallback( (type: LinkType, value: string) => @@ -113,10 +90,7 @@ const StoreSettings = ({ <Header>{t('store_settings.settings')}</Header> </Column> <Column align="right"> - <Link - className={'see-store-as-guest'} - to={locations.currentAccount({ viewAsGuest: true })} - > + <Link className={'see-store-as-guest'} to={locations.currentAccount({ viewAsGuest: true })}> {t('store_settings.see_store_as_guest')} </Link> </Column> @@ -141,27 +115,17 @@ const StoreSettings = ({ {errors.size && <div className="error">{errors.size}</div>} </InputContainer> <InputContainer title={t('store_settings.description')}> - <TextInput - type="textarea" - value={description} - onChange={description => onChange({ ...store, description })} - /> + <TextInput type="textarea" value={description} onChange={description => onChange({ ...store, description })} /> </InputContainer> <InputContainer title={t('store_settings.website')}> - <TextInput - type="input" - value={website} - onChange={website => onChange({ ...store, website })} - /> + <TextInput type="input" value={website} onChange={website => onChange({ ...store, website })} /> {errors.website && <div className="error">{errors.website}</div>} </InputContainer> <InputContainer title={t('store_settings.facebook')}> <TextInput type="input" value={getInputValue(LinkType.FACEBOOK)} - onChange={value => - handleInputOnChange(LinkType.FACEBOOK, value) - } + onChange={value => handleInputOnChange(LinkType.FACEBOOK, value)} /> <div className="info">{facebook}</div> </InputContainer> @@ -183,12 +147,7 @@ const StoreSettings = ({ </InputContainer> </div> <div className="bottom"> - <Button - onClick={() => onSave(store)} - primary - disabled={!canSubmit || hasErrors || isSaving} - loading={isSaving} - > + <Button onClick={() => onSave(store)} primary disabled={!canSubmit || hasErrors || isSaving} loading={isSaving}> {t('store_settings.save')} </Button> <Button diff --git a/webapp/src/components/StoreSettings/StoreSettings.types.ts b/webapp/src/components/StoreSettings/StoreSettings.types.ts index 706b490b34..ff777ba538 100644 --- a/webapp/src/components/StoreSettings/StoreSettings.types.ts +++ b/webapp/src/components/StoreSettings/StoreSettings.types.ts @@ -13,11 +13,5 @@ export type Props = { onFetchStore: (address: string) => void } -export type MapStateProps = Pick< - Props, - 'store' | 'canSubmit' | 'address' | 'isLoading' | 'isSaving' | 'error' -> -export type MapDispatchProps = Pick< - Props, - 'onChange' | 'onRevert' | 'onSave' | 'onFetchStore' -> +export type MapStateProps = Pick<Props, 'store' | 'canSubmit' | 'address' | 'isLoading' | 'isSaving' | 'error'> +export type MapDispatchProps = Pick<Props, 'onChange' | 'onRevert' | 'onSave' | 'onFetchStore'> diff --git a/webapp/src/components/StoreSettings/TextInput/TextInput.tsx b/webapp/src/components/StoreSettings/TextInput/TextInput.tsx index 2080bd12c2..211d55f795 100644 --- a/webapp/src/components/StoreSettings/TextInput/TextInput.tsx +++ b/webapp/src/components/StoreSettings/TextInput/TextInput.tsx @@ -5,13 +5,7 @@ import './TextInput.css' const TextInput = ({ type, value, onChange }: Props) => { const Input = type - return ( - <Input - className="TextInput" - value={value} - onChange={e => onChange(e.target.value)} - /> - ) + return <Input className="TextInput" value={value} onChange={e => onChange(e.target.value)} /> } export default React.memo(TextInput) diff --git a/webapp/src/components/SuccessPage/SuccessPage.container.ts b/webapp/src/components/SuccessPage/SuccessPage.container.ts index 4cced01428..079011c30a 100644 --- a/webapp/src/components/SuccessPage/SuccessPage.container.ts +++ b/webapp/src/components/SuccessPage/SuccessPage.container.ts @@ -16,31 +16,19 @@ const mapState = (state: RootState): MapStateProps => { const search = new URLSearchParams(getSearch(state)) const isCrossChain = search.get('isCrossChain') === 'true' const transaction = getTransaction(state, search.get('txHash') || '') - const destinationTx = isCrossChain - ? getTransaction(state, search.get('destinationTxHash') || '') - : null + const destinationTx = isCrossChain ? getTransaction(state, search.get('destinationTxHash') || '') : null const address = getAddress(state) - const isLoadingTx = Boolean( - transaction && transaction.status !== TransactionStatus.CONFIRMED - ) - const isDestinationTxLoading = Boolean( - destinationTx && destinationTx.status !== TransactionStatus.CONFIRMED - ) + const isLoadingTx = Boolean(transaction && transaction.status !== TransactionStatus.CONFIRMED) + const isDestinationTxLoading = Boolean(destinationTx && destinationTx.status !== TransactionStatus.CONFIRMED) return { - isLoading: isCrossChain - ? isLoadingTx || isDestinationTxLoading - : isLoadingTx, - mintedTokenId: getTokenIdFromLogs( - ChainId.MATIC_MUMBAI, - transaction?.receipt?.logs - ), - profile: !!address ? getProfileOfAddress(state, address) : undefined + isLoading: isCrossChain ? isLoadingTx || isDestinationTxLoading : isLoadingTx, + mintedTokenId: getTokenIdFromLogs(ChainId.MATIC_MUMBAI, transaction?.receipt?.logs), + profile: address ? getProfileOfAddress(state, address) : undefined } } const mapDispatch = (dispatch: Dispatch): MapDispatchProps => ({ - onSetNameAsAlias: (name: string) => - dispatch(openModal('SetNameAsAliasModal', { name })) + onSetNameAsAlias: (name: string) => dispatch(openModal('SetNameAsAliasModal', { name })) }) export default connect(mapState, mapDispatch)(SuccessPage) diff --git a/webapp/src/components/SuccessPage/SuccessPage.spec.tsx b/webapp/src/components/SuccessPage/SuccessPage.spec.tsx index 2ef566adf0..746afa5bfe 100644 --- a/webapp/src/components/SuccessPage/SuccessPage.spec.tsx +++ b/webapp/src/components/SuccessPage/SuccessPage.spec.tsx @@ -2,10 +2,7 @@ import { RenderResult } from '@testing-library/react' import { NFTCategory, Profile, Rarity } from '@dcl/schemas' import { useLocation } from 'react-router-dom' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - renderWithProviders, - waitForComponentToFinishLoading -} from '../../utils/test' +import { renderWithProviders, waitForComponentToFinishLoading } from '../../utils/test' import { NFT } from '../../modules/nft/types' import { SuccessPage } from './SuccessPage' import { Props } from './SuccessPage.types' @@ -23,18 +20,9 @@ let useLocationMock: { search: string; pathname: string } jest.mock('lottie-react', () => () => <div>LOTTIE</div>) -function renderSuccessPage( - props: Partial<Props> = {}, - preloadedNFTData?: Record<string, NFT> -): RenderResult { +function renderSuccessPage(props: Partial<Props> = {}, preloadedNFTData?: Record<string, NFT>): RenderResult { return renderWithProviders( - <SuccessPage - profile={undefined} - onSetNameAsAlias={() => undefined} - isLoading={false} - mintedTokenId={null} - {...props} - />, + <SuccessPage profile={undefined} onSetNameAsAlias={() => undefined} isLoading={false} mintedTokenId={null} {...props} />, { preloadedState: { nft: { @@ -63,8 +51,7 @@ describe('when transaction is still loading', () => { describe('and its an ENS type of asset', () => { beforeEach(async () => { useLocationMock = { - search: - '?txHash=txhash&subdomain=bondi&contractAddress=address&assetType=nft', + search: '?txHash=txhash&subdomain=bondi&contractAddress=address&assetType=nft', pathname: '/v1/lists' } ;(useLocation as jest.Mock).mockReturnValue(useLocationMock) @@ -89,20 +76,15 @@ describe('when transaction is still loading', () => { }) it('should show the loading states messages asset and the asset image of the ENS', () => { - expect( - screen.getByText(t('success_page.loading_state.subdomain.title')) - ).toBeInTheDocument() - expect( - screen.getByText(t('success_page.loading_state.status')) - ).toBeInTheDocument() + expect(screen.getByText(t('success_page.loading_state.subdomain.title'))).toBeInTheDocument() + expect(screen.getByText(t('success_page.loading_state.status'))).toBeInTheDocument() }) }) describe('and its another type of asset', () => { beforeEach(async () => { useLocationMock = { - search: - '?txHash=txhash&tokenId=1&contractAddress=address&assetType=nft', + search: '?txHash=txhash&tokenId=1&contractAddress=address&assetType=nft', pathname: '/v1/lists' } ;(useLocation as jest.Mock).mockReturnValue(useLocationMock) @@ -111,9 +93,7 @@ describe('when transaction is still loading', () => { await waitForComponentToFinishLoading(screen) }) it('should render processing transaction message', () => { - expect( - screen.getByText(t('success_page.loading_state.status')) - ).toBeInTheDocument() + expect(screen.getByText(t('success_page.loading_state.status'))).toBeInTheDocument() }) }) }) @@ -150,15 +130,9 @@ describe('when transaction finishes successfully', () => { await waitForComponentToFinishLoading(screen) }) it('should show the CTAs to mint more names, set as primary name and manage names', () => { - expect( - screen.getByText(t('success_page.success_state.mint_more_names')) - ).toBeInTheDocument() - expect( - screen.getByText(t('success_page.success_state.set_as_primary_name')) - ).toBeInTheDocument() - expect( - screen.getByText(t('success_page.success_state.manage_names')) - ).toBeInTheDocument() + expect(screen.getByText(t('success_page.success_state.mint_more_names'))).toBeInTheDocument() + expect(screen.getByText(t('success_page.success_state.set_as_primary_name'))).toBeInTheDocument() + expect(screen.getByText(t('success_page.success_state.manage_names'))).toBeInTheDocument() }) }) @@ -183,17 +157,9 @@ describe('when transaction finishes successfully', () => { await waitForComponentToFinishLoading(screen) }) it('should show the CTAs to mint more names only', () => { - expect( - screen.getByText(t('success_page.success_state.mint_more_names')) - ).toBeInTheDocument() - expect( - screen.queryByText( - t('success_page.success_state.set_as_primary_name') - ) - ).not.toBeInTheDocument() - expect( - screen.queryByText(t('success_page.success_state.manage_names')) - ).not.toBeInTheDocument() + expect(screen.getByText(t('success_page.success_state.mint_more_names'))).toBeInTheDocument() + expect(screen.queryByText(t('success_page.success_state.set_as_primary_name'))).not.toBeInTheDocument() + expect(screen.queryByText(t('success_page.success_state.manage_names'))).not.toBeInTheDocument() }) }) }) @@ -205,9 +171,7 @@ describe('when transaction finishes successfully', () => { await waitForComponentToFinishLoading(screen) }) it('should render transaction confirmed message', () => { - expect( - screen.getByText(t('success_page.success_state.status')) - ).toBeInTheDocument() + expect(screen.getByText(t('success_page.success_state.status'))).toBeInTheDocument() }) }) }) diff --git a/webapp/src/components/SuccessPage/SuccessPage.tsx b/webapp/src/components/SuccessPage/SuccessPage.tsx index 1c1e45196f..fa7153d094 100644 --- a/webapp/src/components/SuccessPage/SuccessPage.tsx +++ b/webapp/src/components/SuccessPage/SuccessPage.tsx @@ -25,9 +25,7 @@ const SuccessPageLoadingStateDescription = () => { <div> {t('success_page.loading_state.description', { br: () => <br />, - highlight: (text: string) => ( - <span className={styles.highlighted}>{text}</span> - ), + highlight: (text: string) => <span className={styles.highlighted}>{text}</span>, link: (text: string) => <Link to={locations.activity()}>{text}</Link> })} </div> @@ -49,9 +47,7 @@ export function SuccessPage(props: Props) { <div className={styles.pageContainer}> <Navbar /> <div className={styles.container}> - <Header className={styles.title}> - {t('success_page.loading_state.subdomain.title')} - </Header> + <Header className={styles.title}>{t('success_page.loading_state.subdomain.title')}</Header> <AssetImage asset={{ category: 'ens', data: { ens: { subdomain } } } as Asset} className={classNames(styles.assetImage, styles.loading)} @@ -74,9 +70,7 @@ export function SuccessPage(props: Props) { <div className={styles.pageContainer}> <Navbar /> <div className={styles.container}> - <Header className={styles.title}> - {t('success_page.loading_state.item.title')} - </Header> + <Header className={styles.title}>{t('success_page.loading_state.item.title')}</Header> <div className={styles.statusInfo}> <Loader size="small" inline active /> @@ -94,30 +88,17 @@ export function SuccessPage(props: Props) { <Navbar /> <div className={styles.container}> {assetType && contractAddress && tokenId ? ( - <AssetProvider - retry - type={assetType as AssetType} - contractAddress={contractAddress} - tokenId={tokenId} - > + <AssetProvider retry type={assetType as AssetType} contractAddress={contractAddress} tokenId={tokenId}> {asset => { if (!asset) { - return ( - <Loader data-testid="asset-loader" size="massive" active /> - ) + return <Loader data-testid="asset-loader" size="massive" active /> } if (isLoading) { return ( <> - <Header className={styles.title}> - {t('success_page.loading_state.item.title')} - </Header> - <AssetImage - asset={asset} - isSmall - className={classNames(styles.assetImage, styles.loading)} - /> + <Header className={styles.title}>{t('success_page.loading_state.item.title')}</Header> + <AssetImage asset={asset} isSmall className={classNames(styles.assetImage, styles.loading)} /> <div className={styles.statusInfo}> <Loader size="small" inline active /> {t('success_page.loading_state.status')} @@ -129,31 +110,16 @@ export function SuccessPage(props: Props) { return ( <> - <Lottie - animationData={successAnimation} - loop={1} - className={styles.animation} - /> - <Header className={styles.title}> - {t('success_page.success_state.title')} - </Header> + <Lottie animationData={successAnimation} loop={1} className={styles.animation} /> + <Header className={styles.title}>{t('success_page.success_state.title')}</Header> <AssetImage asset={asset} className={styles.assetImage} /> - <span - className={classNames(styles.statusInfo, styles.success)} - > + <span className={classNames(styles.statusInfo, styles.success)}> <Icon name="check circle" className={styles.checkIcon} /> {t('success_page.success_state.status')} </span> <div className={styles.actionContainer}> - {assetType === AssetType.ITEM && - !isLoading && - mintedTokenId ? ( - <AssetProvider - retry - type={AssetType.NFT} - contractAddress={contractAddress} - tokenId={mintedTokenId.toString()} - > + {assetType === AssetType.ITEM && !isLoading && mintedTokenId ? ( + <AssetProvider retry type={AssetType.NFT} contractAddress={contractAddress} tokenId={mintedTokenId.toString()}> {asset => ( <Button as={Link} @@ -171,45 +137,23 @@ export function SuccessPage(props: Props) { {asset.category === NFTCategory.ENS ? ( <div className={styles.ensActions}> <div className={styles.primaryEnsActions}> - <Button - as={Link} - className={styles.successButton} - secondary - to={locations.claimName()} - > - {t( - 'success_page.success_state.mint_more_names' - )} + <Button as={Link} className={styles.successButton} secondary to={locations.claimName()}> + {t('success_page.success_state.mint_more_names')} </Button> {!!profile && ( <> - <Button - className={styles.successButton} - primary - onClick={() => onSetNameAsAlias(asset.name)} - > - {t( - 'success_page.success_state.set_as_primary_name' - )} + <Button className={styles.successButton} primary onClick={() => onSetNameAsAlias(asset.name)}> + {t('success_page.success_state.set_as_primary_name')} </Button> </> )} </div> {!!profile && ( <div> - <Button - inverted - fluid - as={'a'} - href={BUILDER_URL + '/names'} - > + <Button inverted fluid as={'a'} href={BUILDER_URL + '/names'}> <div className={styles.manageNames}> - <div - className={styles.manageNamesIcon} - ></div> - {t( - 'success_page.success_state.manage_names' - )} + <div className={styles.manageNamesIcon}></div> + {t('success_page.success_state.manage_names')} </div> </Button> </div> @@ -232,15 +176,8 @@ export function SuccessPage(props: Props) { </> )} - {(asset.category === NFTCategory.WEARABLE || - asset.category === NFTCategory.EMOTE) && ( - <Button - className={styles.successButton} - primary - as="a" - href={EXPLORER_URL} - target="_blank" - > + {(asset.category === NFTCategory.WEARABLE || asset.category === NFTCategory.EMOTE) && ( + <Button className={styles.successButton} primary as="a" href={EXPLORER_URL} target="_blank"> {t('success_page.success_state.try_genesis_city')} </Button> )} @@ -252,12 +189,8 @@ export function SuccessPage(props: Props) { ) : ( <div className={styles.errorContainer}> <div className={styles.errorInfo}> - <h1 className={styles.errorTitle}> - {t('success_page.error_state.title')} - </h1> - <p className={styles.errorDescription}> - {t('success_page.error_state.description')} - </p> + <h1 className={styles.errorTitle}>{t('success_page.error_state.title')}</h1> + <p className={styles.errorDescription}>{t('success_page.error_state.description')}</p> </div> <Button as={Link} primary to={locations.activity()}> {t('success_page.error_state.go_to_activity')} diff --git a/webapp/src/components/Table/TableContainer/TableContainer.tsx b/webapp/src/components/Table/TableContainer/TableContainer.tsx index 01a359d9d8..2e52deb499 100644 --- a/webapp/src/components/Table/TableContainer/TableContainer.tsx +++ b/webapp/src/components/Table/TableContainer/TableContainer.tsx @@ -4,15 +4,7 @@ import { Props } from './TableContianer.types' import './TableContainer.css' const TableContainer = forwardRef<HTMLDivElement, Props>((props, ref) => { - const { - children, - tabsList, - activeTab, - handleTabChange, - sortbyList, - handleSortByChange, - sortBy - } = props + const { children, tabsList, activeTab, handleTabChange, sortbyList, handleSortByChange, sortBy } = props return ( <div className={'tableContainer'} ref={ref}> diff --git a/webapp/src/components/Table/TableContent/TableContent.spec.tsx b/webapp/src/components/Table/TableContent/TableContent.spec.tsx index b756b926e2..af80ef5025 100644 --- a/webapp/src/components/Table/TableContent/TableContent.spec.tsx +++ b/webapp/src/components/Table/TableContent/TableContent.spec.tsx @@ -19,28 +19,14 @@ describe('Table content', () => { describe('Empty table', () => { it('should render the empty table message', async () => { - const { getByText } = renderWithProviders( - <TableContent - data={[]} - isLoading={false} - empty={() => <div>empty table</div>} - total={0} - /> - ) + const { getByText } = renderWithProviders(<TableContent data={[]} isLoading={false} empty={() => <div>empty table</div>} total={0} />) expect(getByText('empty table')).toBeInTheDocument() }) }) describe('Should render the table correctly', () => { it('should render the table', async () => { - const screen = renderWithProviders( - <TableContent - data={data} - isLoading={false} - empty={() => <div>empty table</div>} - total={0} - /> - ) + const screen = renderWithProviders(<TableContent data={data} isLoading={false} empty={() => <div>empty table</div>} total={0} />) const { getByTestId } = screen @@ -48,14 +34,7 @@ describe('Table content', () => { }) it('should render the headers', async () => { - const screen = renderWithProviders( - <TableContent - data={data} - isLoading={false} - empty={() => <div>empty table</div>} - total={0} - /> - ) + const screen = renderWithProviders(<TableContent data={data} isLoading={false} empty={() => <div>empty table</div>} total={0} />) const { getByText } = screen @@ -64,14 +43,7 @@ describe('Table content', () => { }) it('should render the content', async () => { - const screen = renderWithProviders( - <TableContent - data={data} - isLoading={false} - empty={() => <div>empty table</div>} - total={0} - /> - ) + const screen = renderWithProviders(<TableContent data={data} isLoading={false} empty={() => <div>empty table</div>} total={0} />) const { getByText } = screen @@ -84,14 +56,7 @@ describe('Table content', () => { describe('Should render the loader if its loading', () => { it('should render the loader', async () => { - const screen = renderWithProviders( - <TableContent - data={data} - isLoading={true} - empty={() => <div>empty table</div>} - total={0} - /> - ) + const screen = renderWithProviders(<TableContent data={data} isLoading={true} empty={() => <div>empty table</div>} total={0} />) expect(screen.getByTestId('loader')).toBeInTheDocument() }) @@ -106,13 +71,7 @@ describe('Table content', () => { }) const screen = renderWithProviders( - <TableContent - data={data} - isLoading={false} - empty={() => <div>empty table</div>} - total={data.length} - totalPages={2} - /> + <TableContent data={data} isLoading={false} empty={() => <div>empty table</div>} total={data.length} totalPages={2} /> ) const { getByRole } = screen @@ -127,13 +86,7 @@ describe('Table content', () => { describe('Should not have pagination', () => { it('should not render pagination as there is no need', async () => { const screen = renderWithProviders( - <TableContent - data={data} - isLoading={false} - empty={() => <div>empty table</div>} - total={data.length} - totalPages={1} - /> + <TableContent data={data} isLoading={false} empty={() => <div>empty table</div>} total={data.length} totalPages={1} /> ) const { queryByRole } = screen diff --git a/webapp/src/components/Table/TableContent/TableContent.tsx b/webapp/src/components/Table/TableContent/TableContent.tsx index 0ee085eda5..feff92bac7 100644 --- a/webapp/src/components/Table/TableContent/TableContent.tsx +++ b/webapp/src/components/Table/TableContent/TableContent.tsx @@ -9,28 +9,14 @@ const TABLE_SIBLINGS_RANGE_MOBILE = 0 const TABLE_SIBLINGS_RANGE_DESKTOP = 1 const TableContent = (props: Props) => { - const { - empty, - data, - isLoading, - totalPages, - activePage = 1, - setPage, - total, - rowsPerPage = ROWS_PER_PAGE, - hasHeaders = false - } = props + const { empty, data, isLoading, totalPages, activePage = 1, setPage, total, rowsPerPage = ROWS_PER_PAGE, hasHeaders = false } = props const isMobile = useMobileMediaQuery() const headers = data.length > 0 ? Object.keys(data[0]) : null const hasPagination = totalPages && totalPages > 1 return ( - <div - className={`TableContent ${!hasPagination ? 'radiusEnding' : ''} ${ - !hasHeaders ? 'emptyHeaders' : '' - }`} - > + <div className={`TableContent ${!hasPagination ? 'radiusEnding' : ''} ${!hasHeaders ? 'emptyHeaders' : ''}`}> {isLoading ? ( <div className={'emptyTable'}> <Loader active data-testid="loader" /> @@ -66,21 +52,14 @@ const TableContent = (props: Props) => { )} {hasPagination && total ? ( <div className="pagination"> - {`${t('global.showing')} ${(activePage - 1) * rowsPerPage + - 1}-${Math.min(activePage * rowsPerPage, total)} ${t( + {`${t('global.showing')} ${(activePage - 1) * rowsPerPage + 1}-${Math.min(activePage * rowsPerPage, total)} ${t( 'global.of' )} ${total}`} <Pagination - siblingRange={ - isMobile - ? TABLE_SIBLINGS_RANGE_MOBILE - : TABLE_SIBLINGS_RANGE_DESKTOP - } + siblingRange={isMobile ? TABLE_SIBLINGS_RANGE_MOBILE : TABLE_SIBLINGS_RANGE_DESKTOP} activePage={activePage} totalPages={totalPages} - onPageChange={(_event, props) => - setPage && setPage(+props.activePage!) - } + onPageChange={(_event, props) => setPage && setPage(+props.activePage!)} firstItem={null} lastItem={null} /> diff --git a/webapp/src/components/TransferPage/TransferPage.container.ts b/webapp/src/components/TransferPage/TransferPage.container.ts index 3a0ffd20b4..9e70cb100e 100644 --- a/webapp/src/components/TransferPage/TransferPage.container.ts +++ b/webapp/src/components/TransferPage/TransferPage.container.ts @@ -3,15 +3,8 @@ import { push } from 'connected-react-router' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { RootState } from '../../modules/reducer' import { getLoading } from '../../modules/nft/selectors' -import { - transferNFTRequest, - TRANSFER_NFT_REQUEST -} from '../../modules/nft/actions' -import { - MapStateProps, - MapDispatchProps, - MapDispatch -} from './TransferPage.types' +import { transferNFTRequest, TRANSFER_NFT_REQUEST } from '../../modules/nft/actions' +import { MapStateProps, MapDispatchProps, MapDispatch } from './TransferPage.types' import TransferPage from './TransferPage' const mapState = (state: RootState): MapStateProps => ({ diff --git a/webapp/src/components/TransferPage/TransferPage.tsx b/webapp/src/components/TransferPage/TransferPage.tsx index 9e3010662b..81bb2f84d9 100644 --- a/webapp/src/components/TransferPage/TransferPage.tsx +++ b/webapp/src/components/TransferPage/TransferPage.tsx @@ -42,29 +42,14 @@ const TransferPage = (props: Props) => { isDisabled = true canTransfer = false subtitleClasses.push('error') - subtitle = ( - <T - id="transfer_page.for_sale" - values={{ name: <b>{name}</b> }} - /> - ) + subtitle = <T id="transfer_page.for_sale" values={{ name: <b>{name}</b> }} /> } else if (!isOwnedBy(nft, wallet)) { isDisabled = true canTransfer = false subtitleClasses.push('error') - subtitle = ( - <T - id="transfer_page.invalid_owner" - values={{ name: <b>{name}</b> }} - /> - ) + subtitle = <T id="transfer_page.invalid_owner" values={{ name: <b>{name}</b> }} /> } else { - subtitle = ( - <T - id="transfer_page.subtitle" - values={{ name: <b>{name}</b> }} - /> - ) + subtitle = <T id="transfer_page.subtitle" values={{ name: <b>{name}</b> }} /> } return ( <AssetAction asset={nft}> @@ -79,11 +64,7 @@ const TransferPage = (props: Props) => { <AddressField type="address" error={isInvalidAddress} - message={ - isInvalidAddress - ? t('transfer_page.invalid_address') - : undefined - } + message={isInvalidAddress ? t('transfer_page.invalid_address') : undefined} label={t('transfer_page.recipient')} value={address} placeholder="0x..." @@ -93,31 +74,18 @@ const TransferPage = (props: Props) => { </div> {canTransfer ? ( <div className="warning"> - <T - id="transfer_page.warning" - values={{ br: <br /> }} - /> + <T id="transfer_page.warning" values={{ br: <br /> }} /> </div> ) : null} <div className="buttons"> <Button as="div" disabled={isTransferring} - onClick={() => - onNavigate( - locations.nft(nft.contractAddress, nft.tokenId) - ) - } + onClick={() => onNavigate(locations.nft(nft.contractAddress, nft.tokenId))} > {t('global.cancel')} </Button> - <ChainButton - type="submit" - primary - loading={isTransferring} - disabled={isDisabled} - chainId={nft.chainId} - > + <ChainButton type="submit" primary loading={isTransferring} disabled={isDisabled} chainId={nft.chainId}> {t('transfer_page.submit')} </ChainButton> </div> diff --git a/webapp/src/components/TransferPage/TransferPage.types.ts b/webapp/src/components/TransferPage/TransferPage.types.ts index 622cf78451..57e1999d3f 100644 --- a/webapp/src/components/TransferPage/TransferPage.types.ts +++ b/webapp/src/components/TransferPage/TransferPage.types.ts @@ -1,9 +1,6 @@ import { Dispatch } from 'redux' import { CallHistoryMethodAction } from 'connected-react-router' -import { - transferNFTRequest, - TransferNFTRequestAction -} from '../../modules/nft/actions' +import { transferNFTRequest, TransferNFTRequestAction } from '../../modules/nft/actions' export type Props = { onTransfer: typeof transferNFTRequest @@ -13,6 +10,4 @@ export type Props = { export type MapStateProps = Pick<Props, 'isTransferring'> export type MapDispatchProps = Pick<Props, 'onNavigate' | 'onTransfer'> -export type MapDispatch = Dispatch< - CallHistoryMethodAction | TransferNFTRequestAction -> +export type MapDispatch = Dispatch<CallHistoryMethodAction | TransferNFTRequestAction> diff --git a/webapp/src/components/Vendor/NFTFilters/SelectFilter/SelectFilter.tsx b/webapp/src/components/Vendor/NFTFilters/SelectFilter/SelectFilter.tsx index 2bc94b8881..8fd6975043 100644 --- a/webapp/src/components/Vendor/NFTFilters/SelectFilter/SelectFilter.tsx +++ b/webapp/src/components/Vendor/NFTFilters/SelectFilter/SelectFilter.tsx @@ -6,18 +6,7 @@ import { Props } from './SelectFilter.types' import './SelectFilter.css' const SelectFilter = (props: Props) => { - const { - name, - options, - fetchOptions, - fetchOptionFromValue, - value, - clearable, - onChange, - disabled = false, - placeholder, - className - } = props + const { name, options, fetchOptions, fetchOptionFromValue, value, clearable, onChange, disabled = false, placeholder, className } = props const [providedOptions, setProvidedOptions] = useState(options) const [search, setSearch] = useState('') @@ -31,11 +20,7 @@ const SelectFilter = (props: Props) => { // If the option is not found, the value will be changed to the first option. useEffect(() => { async function tryFetchOptionFromValue() { - if ( - !value || - !fetchOptionFromValue || - providedOptions.some(option => option.value === value) - ) { + if (!value || !fetchOptionFromValue || providedOptions.some(option => option.value === value)) { return } @@ -113,25 +98,13 @@ const SelectFilter = (props: Props) => { fluid selectOnBlur={false} noResultsMessage={ - search.length > 0 && - !isTyping && - !isLoading && - providedOptions.length === 0 + search.length > 0 && !isTyping && !isLoading && providedOptions.length === 0 ? t('filters.no_results') : t('filters.type_to_search') } loading={isLoading} placeholder={placeholder} - icon={ - fetchOptions ? ( - <Icon - name="search" - className={classNames(isLoading && 'search-loading')} - /> - ) : ( - <Icon name="dropdown" /> - ) - } + icon={fetchOptions ? <Icon name="search" className={classNames(isLoading && 'search-loading')} /> : <Icon name="dropdown" />} onChange={(_event, data) => { onChange(data.value as string) diff --git a/webapp/src/components/Vendor/NFTFilters/TextFilter/TextFilter.tsx b/webapp/src/components/Vendor/NFTFilters/TextFilter/TextFilter.tsx index 5dfd4143b1..327ef0dfc8 100644 --- a/webapp/src/components/Vendor/NFTFilters/TextFilter/TextFilter.tsx +++ b/webapp/src/components/Vendor/NFTFilters/TextFilter/TextFilter.tsx @@ -25,12 +25,7 @@ const TextFilter = (props: Props) => { </Header> ) : null} <div className="text-input"> - <input - ref={inputRef} - value={text} - onChange={setText} - placeholder={placeholder} - /> + <input ref={inputRef} value={text} onChange={setText} placeholder={placeholder} /> </div> </div> ) diff --git a/webapp/src/components/Vendor/NFTSidebar/NFTSidebar.container.ts b/webapp/src/components/Vendor/NFTSidebar/NFTSidebar.container.ts index 6254fa2572..a65854d532 100644 --- a/webapp/src/components/Vendor/NFTSidebar/NFTSidebar.container.ts +++ b/webapp/src/components/Vendor/NFTSidebar/NFTSidebar.container.ts @@ -2,17 +2,8 @@ import { connect } from 'react-redux' import { RootState } from '../../../modules/reducer' import { browse } from '../../../modules/routing/actions' -import { - getVendor, - getSection, - getCurrentSearch -} from '../../../modules/routing/selectors' -import { - MapStateProps, - MapDispatch, - MapDispatchProps, - OwnProps -} from './NFTSidebar.types' +import { getVendor, getSection, getCurrentSearch } from '../../../modules/routing/selectors' +import { MapStateProps, MapDispatch, MapDispatchProps, OwnProps } from './NFTSidebar.types' import NFTSidebar from './NFTSidebar' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => ({ diff --git a/webapp/src/components/Vendor/NFTSidebar/NFTSidebar.tsx b/webapp/src/components/Vendor/NFTSidebar/NFTSidebar.tsx index 355d7fc990..596fd86345 100644 --- a/webapp/src/components/Vendor/NFTSidebar/NFTSidebar.tsx +++ b/webapp/src/components/Vendor/NFTSidebar/NFTSidebar.tsx @@ -2,10 +2,7 @@ import React, { useCallback } from 'react' import { Sections } from '../../../modules/vendor/routing/types' import { Section as DecentralandSection } from '../../../modules/vendor/decentraland/routing/types' -import { - getMarketAssetTypeFromCategory, - getCategoryFromSection -} from '../../../modules/routing/search' +import { getMarketAssetTypeFromCategory, getCategoryFromSection } from '../../../modules/routing/search' import { VendorName } from '../../../modules/vendor/types' import { NFTSidebar as DecentralandNFTSidebar } from '../decentraland/NFTSidebar' import { Props } from './NFTSidebar.types' @@ -19,9 +16,7 @@ const NFTSidebar = (props: Props) => { onBrowse({ search, section, - assetType: category - ? getMarketAssetTypeFromCategory(category) - : undefined + assetType: category ? getMarketAssetTypeFromCategory(category) : undefined }) }, [onBrowse, search] @@ -33,9 +28,7 @@ const NFTSidebar = (props: Props) => { return ( <DecentralandNFTSidebar section={section as DecentralandSection} - sections={ - (sections as DecentralandSection[]) ?? [Sections.decentraland.ALL] - } + sections={(sections as DecentralandSection[]) ?? [Sections.decentraland.ALL]} onMenuItemClick={handleOnBrowse} onBrowse={onBrowse} /> diff --git a/webapp/src/components/Vendor/PriceChangeNotice/PriceChangeNotice.tsx b/webapp/src/components/Vendor/PriceChangeNotice/PriceChangeNotice.tsx index cbec4e558f..a2b0357079 100644 --- a/webapp/src/components/Vendor/PriceChangeNotice/PriceChangeNotice.tsx +++ b/webapp/src/components/Vendor/PriceChangeNotice/PriceChangeNotice.tsx @@ -10,10 +10,7 @@ const PRICE_CHANGE_NOTICE_KEY = 'price-change-notice' const PriceChangeNotice = (props: Props) => { const { view } = props - const isValidView = useCallback( - () => view !== undefined && !isAccountView(view), - [view] - ) + const isValidView = useCallback(() => view !== undefined && !isAccountView(view), [view]) const isDismissed = localStorage.getItem(PRICE_CHANGE_NOTICE_KEY) !== null const [isVisible, setIsVisible] = useState(isValidView()) diff --git a/webapp/src/components/Vendor/VendorMenu/VendorMenu.tsx b/webapp/src/components/Vendor/VendorMenu/VendorMenu.tsx index 239c56425b..1a8aaee519 100644 --- a/webapp/src/components/Vendor/VendorMenu/VendorMenu.tsx +++ b/webapp/src/components/Vendor/VendorMenu/VendorMenu.tsx @@ -12,9 +12,7 @@ import './VendorMenu.css' const VendorMenu = (props: Props) => { const { count, currentVendor, address, vendor, section, onClick } = props - const [isCurrentVendor, setIsCurrentVendor] = useState( - currentVendor === vendor - ) + const [isCurrentVendor, setIsCurrentVendor] = useState(currentVendor === vendor) const [isOpen, setIsOpen] = useState(isCurrentVendor) const [currentCount, setCurrentCount] = useState(count) @@ -50,14 +48,14 @@ const VendorMenu = (props: Props) => { currentCount === undefined ? '...' : currentCount === 0 - ? t('vendor_menu.no_assets') - : currentCount < getMaxQuerySize(vendor) - ? t('vendor_menu.assets_count', { - count: currentCount.toLocaleString() - }) - : t('vendor_menu.more_than_assets_count', { - count: currentCount.toLocaleString() - }) + ? t('vendor_menu.no_assets') + : currentCount < getMaxQuerySize(vendor) + ? t('vendor_menu.assets_count', { + count: currentCount.toLocaleString() + }) + : t('vendor_menu.more_than_assets_count', { + count: currentCount.toLocaleString() + }) const className = ['VendorMenu'] if (isCurrentVendor) { @@ -70,20 +68,8 @@ const VendorMenu = (props: Props) => { return ( <div className={className.join(' ')}> <Menu> - <MenuItem - className="vendor-menu-item" - value={vendor} - subtitle={subtitle} - image={`/${vendor}.png`} - onClick={handleToggleOpen} - /> - {isOpen ? ( - <NFTSections - vendor={vendor} - section={isCurrentVendor ? section : undefined} - onSectionClick={onClick} - /> - ) : null} + <MenuItem className="vendor-menu-item" value={vendor} subtitle={subtitle} image={`/${vendor}.png`} onClick={handleToggleOpen} /> + {isOpen ? <NFTSections vendor={vendor} section={isCurrentVendor ? section : undefined} onSectionClick={onClick} /> : null} </Menu> </div> ) diff --git a/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.container.ts b/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.container.ts index 0cdae76caf..3052515a6c 100644 --- a/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.container.ts +++ b/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.container.ts @@ -5,10 +5,7 @@ import { clearFilters } from '../../../../modules/routing/actions' import { getOnlyOnRent, getOnlySmart, - hasFiltersEnabled -} from '../../../../modules/routing/selectors' -import { getCount, getView } from '../../../../modules/ui/browse/selectors' -import { + hasFiltersEnabled, getSection, getSortBy, getOnlyOnSale, @@ -21,14 +18,9 @@ import { getAssetType, getEmotePlayMode } from '../../../../modules/routing/selectors' +import { getCount, getView } from '../../../../modules/ui/browse/selectors' import { isMapSet } from '../../../../modules/routing/utils' -import { - MapStateProps, - MapDispatchProps, - OwnProps, - Props, - MapDispatch -} from './NFTFilters.types' +import { MapStateProps, MapDispatchProps, OwnProps, Props, MapDispatch } from './NFTFilters.types' import NFTFilters from './NFTFilters' const mapState = (state: RootState): MapStateProps => ({ @@ -54,11 +46,7 @@ const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ onClearFilters: () => dispatch(clearFilters()) }) -const mergeProps = ( - stateProps: MapStateProps, - dispatchProps: MapDispatchProps, - ownProps: OwnProps -): Props => ({ +const mergeProps = (stateProps: MapStateProps, dispatchProps: MapDispatchProps, ownProps: OwnProps): Props => ({ ...stateProps, ...dispatchProps, ...ownProps diff --git a/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx b/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx index 90d0605383..cda1878f94 100644 --- a/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx +++ b/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx @@ -1,16 +1,5 @@ import React, { useCallback, useEffect, useState } from 'react' -import { - Radio, - CheckboxProps, - Button, - Header, - Dropdown, - DropdownProps, - Responsive, - Modal, - Icon, - NotMobile -} from 'decentraland-ui' +import { Radio, CheckboxProps, Button, Header, Dropdown, DropdownProps, Responsive, Modal, Icon, NotMobile } from 'decentraland-ui' import { NFTCategory } from '@dcl/schemas' import { t } from 'decentraland-dapps/dist/modules/translation/utils' @@ -21,11 +10,7 @@ import { NFTSidebar } from '../../NFTSidebar' import { Chip } from '../../../Chip' import { TextFilter } from '../../NFTFilters/TextFilter' import { AssetType } from '../../../../modules/asset/types' -import { - isAccountView, - isLandSection, - persistIsMapProperty -} from '../../../../modules/ui/utils' +import { isAccountView, isLandSection, persistIsMapProperty } from '../../../../modules/ui/utils' import { View } from '../../../../modules/ui/types' import { ToggleBox } from '../../../AssetBrowse/ToggleBox' import { LANDFilters } from '../types' @@ -90,8 +75,7 @@ const NFTFilters = (props: Props) => { { value: AssetType.NFT, text: t('filters.nft') } ] - const shouldShowOnSaleFilter = - (section && !isLandSection(section!)) || !section + const shouldShowOnSaleFilter = (section && !isLandSection(section)) || !section if (onlyOnSale) { orderByDropdownOptions.unshift({ @@ -108,11 +92,7 @@ const NFTFilters = (props: Props) => { }) } - const sortBy = orderByDropdownOptions.find( - option => option.value === props.sortBy - ) - ? props.sortBy - : orderByDropdownOptions[0].value + const sortBy = orderByDropdownOptions.find(option => option.value === props.sortBy) ? props.sortBy : orderByDropdownOptions[0].value let currentLANDStatus: LANDFilters if (onlyOnRent && !onlyOnSale) { @@ -150,10 +130,7 @@ const NFTFilters = (props: Props) => { isFullscreen: isMap, search: '', // Forces the onlyOnSale property in the defined cases so the users can see LAND on sale. - onlyOnSale: - (!onlyOnSale && onlyOnRent === false) || - (onlyOnSale === undefined && onlyOnRent === undefined) || - onlyOnSale + onlyOnSale: (!onlyOnSale && onlyOnRent === false) || (onlyOnSale === undefined && onlyOnRent === undefined) || onlyOnSale }) }, [onBrowse, onlyOnSale, onlyOnRent] @@ -189,79 +166,49 @@ const NFTFilters = (props: Props) => { [search, onBrowse] ) - useEffect( - () => - setShowFiltersMenu( - category === NFTCategory.WEARABLE || category === NFTCategory.EMOTE - ), - [category, setShowFiltersMenu] - ) + useEffect(() => setShowFiltersMenu(category === NFTCategory.WEARABLE || category === NFTCategory.EMOTE), [category, setShowFiltersMenu]) const searchPlaceholder = isMap ? t('nft_filters.search_land') : count === undefined - ? t('global.loading') + '...' - : t('nft_filters.search', { - suffix: - count < MAX_QUERY_SIZE - ? t('nft_filters.results', { - count: count.toLocaleString() - }) - : t('nft_filters.more_than_results', { - count: count.toLocaleString() - }) - }) + ? t('global.loading') + '...' + : t('nft_filters.search', { + suffix: + count < MAX_QUERY_SIZE + ? t('nft_filters.results', { + count: count.toLocaleString() + }) + : t('nft_filters.more_than_results', { + count: count.toLocaleString() + }) + }) - const toggleBoxI18nKey = - view && isAccountView(view) ? 'account_page' : 'browse_page' + const toggleBoxI18nKey = view && isAccountView(view) ? 'account_page' : 'browse_page' return ( <div className="NFTFilters"> <div className="topbar"> {isMap ? ( <> - <TextFilter - value={search} - placeholder={searchPlaceholder} - onChange={handleSearch} - /> - <Responsive - minWidth={Responsive.onlyTablet.minWidth} - className="topbar-filter" - > + <TextFilter value={search} placeholder={searchPlaceholder} onChange={handleSearch} /> + <Responsive minWidth={Responsive.onlyTablet.minWidth} className="topbar-filter"> {shouldShowOnSaleFilter ? ( - <Radio - toggle - checked={onlyOnSale} - onChange={handleOnlyOnSaleChange} - label={t('nft_filters.on_sale')} - /> + <Radio toggle checked={onlyOnSale} onChange={handleOnlyOnSaleChange} label={t('nft_filters.on_sale')} /> ) : null} </Responsive> </> ) : ( <> - <TextFilter - value={search} - placeholder={searchPlaceholder} - onChange={handleSearch} - /> + <TextFilter value={search} placeholder={searchPlaceholder} onChange={handleSearch} /> <NotMobile> {hasFiltersEnabled && ( <div className="clear-filters" onClick={onClearFilters}> - <Icon - aria-label="Clear filters" - aria-hidden="false" - name="close" - /> + <Icon aria-label="Clear filters" aria-hidden="false" name="close" /> <span>{t('filters.clear')}</span> </div> )} </NotMobile> - <Responsive - minWidth={Responsive.onlyTablet.minWidth} - className="topbar-filter" - > + <Responsive minWidth={Responsive.onlyTablet.minWidth} className="topbar-filter"> {view === View.CURRENT_ACCOUNT ? ( <Dropdown direction="left" @@ -279,51 +226,26 @@ const NFTFilters = (props: Props) => { onChange={handleOrderByDropdownChange} /> </Responsive> - <Responsive - minWidth={Responsive.onlyTablet.minWidth} - className="topbar-filter" - > + <Responsive minWidth={Responsive.onlyTablet.minWidth} className="topbar-filter"> {shouldShowOnSaleFilter ? ( - <Radio - toggle - checked={onlyOnSale} - onChange={handleOnlyOnSaleChange} - label={t('nft_filters.on_sale')} - /> + <Radio toggle checked={onlyOnSale} onChange={handleOnlyOnSaleChange} label={t('nft_filters.on_sale')} /> ) : null} </Responsive> </> )} <Responsive maxWidth={Responsive.onlyMobile.maxWidth}> - <div - className="open-filters-wrapper" - onClick={() => setShowFiltersModal(!showFiltersModal)} - > + <div className="open-filters-wrapper" onClick={() => setShowFiltersModal(!showFiltersModal)}> <div className="label">{t('nft_filters.filter')}</div> - <div - className={`open-filters ${ - showFiltersMenu || appliedFilters.length > 0 ? 'active' : '' - }`} - /> + <div className={`open-filters ${showFiltersMenu || appliedFilters.length > 0 ? 'active' : ''}`} /> </div> </Responsive> {isLandSection(section) && !isAccountView(view!) ? ( <div className="topbar-filter"> <div className="toggle-map"> - <Chip - className="grid" - icon="table" - isActive={!isMap} - onClick={() => handleIsMapChange(false)} - /> - <Chip - className="atlas" - icon="map marker alternate" - isActive={isMap} - onClick={() => handleIsMapChange(true)} - /> + <Chip className="grid" icon="table" isActive={!isMap} onClick={() => handleIsMapChange(false)} /> + <Chip className="atlas" icon="map marker alternate" isActive={isMap} onClick={() => handleIsMapChange(true)} /> </div> </div> ) : null} @@ -354,21 +276,13 @@ const NFTFilters = (props: Props) => { </> ) : null} - <Modal - className="FiltersModal" - open={showFiltersModal} - onClose={() => setShowFiltersModal(false)} - > + <Modal className="FiltersModal" open={showFiltersModal} onClose={() => setShowFiltersModal(false)}> <Modal.Header>{t('nft_filters.filter')}</Modal.Header> <Modal.Content> {hasFiltersEnabled && ( <div className="filter-row"> <div className="clear-filters-modal" onClick={onClearFilters}> - <Icon - aria-label="Clear filters" - aria-hidden="false" - name="close" - /> + <Icon aria-label="Clear filters" aria-hidden="false" name="close" /> <span>{t('filters.clear')}</span> </div> </div> @@ -377,51 +291,28 @@ const NFTFilters = (props: Props) => { <> <div className="filter-row"> <Header sub>{t('filters.type')}</Header> - <Dropdown - direction="left" - value={assetType} - options={typeDropdownOptions} - onChange={handleTypeByDropdownChange} - /> + <Dropdown direction="left" value={assetType} options={typeDropdownOptions} onChange={handleTypeByDropdownChange} /> </div> </> ) : null} <div className="filter-row"> <Header sub>{t('nft_filters.order_by')}</Header> - <Dropdown - direction="left" - value={sortBy} - options={orderByDropdownOptions} - onChange={handleOrderByDropdownChange} - /> + <Dropdown direction="left" value={sortBy} options={orderByDropdownOptions} onChange={handleOrderByDropdownChange} /> </div> {section && isLandSection(section) ? ( <div className="filter-row"> <Header sub>{t('filters.status')}</Header> - <Dropdown - direction="left" - value={currentLANDStatus} - options={landStatusDropdown} - onChange={handleStatusByDropdownChange} - /> + <Dropdown direction="left" value={currentLANDStatus} options={landStatusDropdown} onChange={handleStatusByDropdownChange} /> </div> ) : null} {shouldShowOnSaleFilter ? ( <div className="filter-row"> <Header sub>{t('nft_filters.on_sale')}</Header> - <Radio - toggle - checked={onlyOnSale} - onChange={handleOnlyOnSaleChange} - /> + <Radio toggle checked={onlyOnSale} onChange={handleOnlyOnSaleChange} /> </div> ) : null} <NFTSidebar /> - <Button - className="apply-filters" - primary - onClick={() => setShowFiltersModal(false)} - > + <Button className="apply-filters" primary onClick={() => setShowFiltersModal(false)}> {t('global.apply')} </Button> </Modal.Content> diff --git a/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.types.ts b/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.types.ts index d9ba890c6f..c2c01628b5 100644 --- a/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.types.ts +++ b/webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.types.ts @@ -1,11 +1,7 @@ import { Dispatch } from 'redux' import { EmotePlayMode, GenderFilterOption, Network, Rarity, WearableGender } from '@dcl/schemas' import { SortBy } from '../../../../modules/routing/types' -import { - browse, - clearFilters, - ClearFiltersAction -} from '../../../../modules/routing/actions' +import { browse, clearFilters, ClearFiltersAction } from '../../../../modules/routing/actions' import { Section } from '../../../../modules/vendor/routing/types' import { AssetType } from '../../../../modules/asset/types' import { View } from '../../../../modules/ui/types' diff --git a/webapp/src/components/Vendor/decentraland/NFTSections/NFTSectionsMenuItems/NFTSectionsMenuItems.tsx b/webapp/src/components/Vendor/decentraland/NFTSections/NFTSectionsMenuItems/NFTSectionsMenuItems.tsx index 1dc18e84b1..12e5966453 100644 --- a/webapp/src/components/Vendor/decentraland/NFTSections/NFTSectionsMenuItems/NFTSectionsMenuItems.tsx +++ b/webapp/src/components/Vendor/decentraland/NFTSections/NFTSectionsMenuItems/NFTSectionsMenuItems.tsx @@ -23,41 +23,21 @@ const NFTSectionsMenuItems = ({ section, sections, onSectionClick }: Props) => { return ( <> {sections.includes(Section.ALL) && ( - <MenuItem - key={Section.ALL} - value={Section.ALL} - currentValue={section} - onClick={handleOnSectionClick} - /> + <MenuItem key={Section.ALL} value={Section.ALL} currentValue={section} onClick={handleOnSectionClick} /> )} {shouldRenderSection(Section.LAND, sections) && ( <> - <MenuItem - key={Section.LAND} - value={Section.LAND} - currentValue={section} - onClick={handleOnSectionClick} - /> + <MenuItem key={Section.LAND} value={Section.LAND} currentValue={section} onClick={handleOnSectionClick} /> {isLandSection(section) ? [Section.PARCELS, Section.ESTATES].map(menuSection => ( - <MenuItem - key={menuSection} - value={menuSection} - currentValue={section} - onClick={handleOnSectionClick} - nestedLevel={1} - /> + <MenuItem key={menuSection} value={menuSection} currentValue={section} onClick={handleOnSectionClick} nestedLevel={1} /> )) : null} </> )} {shouldRenderSection(Section.WEARABLES, sections) && ( <> - <MenuItem - value={Section.WEARABLES} - currentValue={section} - onClick={handleOnSectionClick} - /> + <MenuItem value={Section.WEARABLES} currentValue={section} onClick={handleOnSectionClick} /> {[ Section.WEARABLES, Section.WEARABLES_HEAD, @@ -100,23 +80,10 @@ const NFTSectionsMenuItems = ({ section, sections, onSectionClick }: Props) => { onClick={handleOnSectionClick} nestedLevel={1} /> - <MenuItem - value={Section.WEARABLES_HANDS} - currentValue={section} - onClick={handleOnSectionClick} - nestedLevel={1} - /> - {[Section.WEARABLES_LOWER_BODY, Section.WEARABLES_FEET].map( - menuSection => ( - <MenuItem - key={menuSection} - value={menuSection} - currentValue={section} - onClick={handleOnSectionClick} - nestedLevel={1} - /> - ) - )} + <MenuItem value={Section.WEARABLES_HANDS} currentValue={section} onClick={handleOnSectionClick} nestedLevel={1} /> + {[Section.WEARABLES_LOWER_BODY, Section.WEARABLES_FEET].map(menuSection => ( + <MenuItem key={menuSection} value={menuSection} currentValue={section} onClick={handleOnSectionClick} nestedLevel={1} /> + ))} <DropdownMenu values={[ @@ -133,23 +100,14 @@ const NFTSectionsMenuItems = ({ section, sections, onSectionClick }: Props) => { onMenuItemClick={handleOnSectionClick} /> - <MenuItem - value={Section.WEARABLES_SKIN} - currentValue={section} - onClick={handleOnSectionClick} - nestedLevel={1} - /> + <MenuItem value={Section.WEARABLES_SKIN} currentValue={section} onClick={handleOnSectionClick} nestedLevel={1} /> </> ) : null} </> )} {shouldRenderSection(Section.EMOTES, sections) && ( <> - <MenuItem - value={Section.EMOTES} - currentValue={section} - onClick={handleOnSectionClick} - /> + <MenuItem value={Section.EMOTES} currentValue={section} onClick={handleOnSectionClick} /> {[ Section.EMOTES, Section.EMOTES_DANCE, @@ -171,24 +129,12 @@ const NFTSectionsMenuItems = ({ section, sections, onSectionClick }: Props) => { Section.EMOTES_STUNT, Section.EMOTES_REACTIONS ].map(menuSection => ( - <MenuItem - key={menuSection} - value={menuSection} - currentValue={section} - onClick={handleOnSectionClick} - nestedLevel={1} - /> + <MenuItem key={menuSection} value={menuSection} currentValue={section} onClick={handleOnSectionClick} nestedLevel={1} /> )) : null} </> )} - {shouldRenderSection(Section.ENS, sections) && ( - <MenuItem - value={Section.ENS} - currentValue={section} - onClick={handleOnSectionClick} - /> - )} + {shouldRenderSection(Section.ENS, sections) && <MenuItem value={Section.ENS} currentValue={section} onClick={handleOnSectionClick} />} </> ) } diff --git a/webapp/src/components/Vendor/decentraland/NFTSidebar/NFTSidebar.tsx b/webapp/src/components/Vendor/decentraland/NFTSidebar/NFTSidebar.tsx index c5148b9f58..c9a97b6bb4 100644 --- a/webapp/src/components/Vendor/decentraland/NFTSidebar/NFTSidebar.tsx +++ b/webapp/src/components/Vendor/decentraland/NFTSidebar/NFTSidebar.tsx @@ -9,11 +9,7 @@ const NFTSidebar = (props: Props) => { return ( <div className="NFTSidebar"> - <NFTSections - section={section} - sections={sections} - onSectionClick={onMenuItemClick} - /> + <NFTSections section={section} sections={sections} onSectionClick={onMenuItemClick} /> <AssetFilters /> </div> ) diff --git a/webapp/src/components/Vendor/decentraland/utils.ts b/webapp/src/components/Vendor/decentraland/utils.ts index 4a74f9234e..6d450c0e89 100644 --- a/webapp/src/components/Vendor/decentraland/utils.ts +++ b/webapp/src/components/Vendor/decentraland/utils.ts @@ -1,10 +1,7 @@ import { browse as browseAction } from '../../../modules/routing/actions' import { LANDFilters } from './types' -export function browseRentedLAND( - browse: typeof browseAction, - filter: LANDFilters -): void { +export function browseRentedLAND(browse: typeof browseAction, filter: LANDFilters): void { switch (filter) { case LANDFilters.ALL_LAND: browse({ onlyOnSale: undefined, onlyOnRent: undefined }) diff --git a/webapp/src/components/WarningBadge/WarningBadge.tsx b/webapp/src/components/WarningBadge/WarningBadge.tsx index ea703a18f4..0a7303a871 100644 --- a/webapp/src/components/WarningBadge/WarningBadge.tsx +++ b/webapp/src/components/WarningBadge/WarningBadge.tsx @@ -8,10 +8,7 @@ type Props = { } const WarningBadge = ({ className }: Props) => ( - <Badge - className={classNames(styles.WarningIcon, styles.badge, className)} - color={Color.OJ_NOT_SIMPSON} - > + <Badge className={classNames(styles.WarningIcon, styles.badge, className)} color={Color.OJ_NOT_SIMPSON}> {t('global.action_required')} </Badge> ) diff --git a/webapp/src/config/index.ts b/webapp/src/config/index.ts index 02b8660a9c..d4e5b6be3e 100644 --- a/webapp/src/config/index.ts +++ b/webapp/src/config/index.ts @@ -12,8 +12,7 @@ export const config = createConfig( { systemEnvVariables: { // eslint-disable-next-line @typescript-eslint/naming-convention - VITE_DCL_DEFAULT_ENV: - process.env.VITE_DCL_DEFAULT_ENV ?? 'dev' + VITE_DCL_DEFAULT_ENV: process.env.VITE_DCL_DEFAULT_ENV ?? 'dev' } } ) diff --git a/webapp/src/contracts/Converter.ts b/webapp/src/contracts/Converter.ts index 4c8b84d051..61e355882d 100644 --- a/webapp/src/contracts/Converter.ts +++ b/webapp/src/contracts/Converter.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import type { BaseContract, diff --git a/webapp/src/contracts/DCLController.ts b/webapp/src/contracts/DCLController.ts index 05f1a787b9..4118bb9456 100644 --- a/webapp/src/contracts/DCLController.ts +++ b/webapp/src/contracts/DCLController.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import type { BaseContract, diff --git a/webapp/src/contracts/DCLRegistrar.ts b/webapp/src/contracts/DCLRegistrar.ts index 1d9c1f9712..c698cc7b21 100644 --- a/webapp/src/contracts/DCLRegistrar.ts +++ b/webapp/src/contracts/DCLRegistrar.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import type { BaseContract, diff --git a/webapp/src/contracts/ERC721.ts b/webapp/src/contracts/ERC721.ts index b3642ef8df..0d6eeb4b8e 100644 --- a/webapp/src/contracts/ERC721.ts +++ b/webapp/src/contracts/ERC721.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import type { BaseContract, diff --git a/webapp/src/contracts/EstateRegistry.ts b/webapp/src/contracts/EstateRegistry.ts index 6c310ada3a..bdaacf1e8f 100644 --- a/webapp/src/contracts/EstateRegistry.ts +++ b/webapp/src/contracts/EstateRegistry.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import type { BaseContract, diff --git a/webapp/src/contracts/MarketplaceAdapter.ts b/webapp/src/contracts/MarketplaceAdapter.ts index daabee697b..e5259eecd9 100644 --- a/webapp/src/contracts/MarketplaceAdapter.ts +++ b/webapp/src/contracts/MarketplaceAdapter.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import type { BaseContract, diff --git a/webapp/src/contracts/common.ts b/webapp/src/contracts/common.ts index b1242c082c..014afcbad7 100644 --- a/webapp/src/contracts/common.ts +++ b/webapp/src/contracts/common.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import type { Listener } from "@ethersproject/providers"; import type { Event, EventFilter } from "ethers"; diff --git a/webapp/src/contracts/factories/Converter__factory.ts b/webapp/src/contracts/factories/Converter__factory.ts index 635b9e13a9..a74f17a10c 100644 --- a/webapp/src/contracts/factories/Converter__factory.ts +++ b/webapp/src/contracts/factories/Converter__factory.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; diff --git a/webapp/src/contracts/factories/DCLController__factory.ts b/webapp/src/contracts/factories/DCLController__factory.ts index 8837897e5e..1f5b178e61 100644 --- a/webapp/src/contracts/factories/DCLController__factory.ts +++ b/webapp/src/contracts/factories/DCLController__factory.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; diff --git a/webapp/src/contracts/factories/DCLRegistrar__factory.ts b/webapp/src/contracts/factories/DCLRegistrar__factory.ts index e0e2c8aceb..8587169eab 100644 --- a/webapp/src/contracts/factories/DCLRegistrar__factory.ts +++ b/webapp/src/contracts/factories/DCLRegistrar__factory.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; diff --git a/webapp/src/contracts/factories/ERC721__factory.ts b/webapp/src/contracts/factories/ERC721__factory.ts index 19dc9f3811..5d1bfcd895 100644 --- a/webapp/src/contracts/factories/ERC721__factory.ts +++ b/webapp/src/contracts/factories/ERC721__factory.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; diff --git a/webapp/src/contracts/factories/EstateRegistry__factory.ts b/webapp/src/contracts/factories/EstateRegistry__factory.ts index 53ff079fd3..f48391b567 100644 --- a/webapp/src/contracts/factories/EstateRegistry__factory.ts +++ b/webapp/src/contracts/factories/EstateRegistry__factory.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; diff --git a/webapp/src/contracts/factories/MarketplaceAdapter__factory.ts b/webapp/src/contracts/factories/MarketplaceAdapter__factory.ts index e5e9f7e3d3..a54ea652cc 100644 --- a/webapp/src/contracts/factories/MarketplaceAdapter__factory.ts +++ b/webapp/src/contracts/factories/MarketplaceAdapter__factory.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; diff --git a/webapp/src/contracts/factories/index.ts b/webapp/src/contracts/factories/index.ts index d9beffb6ae..95e2a0d6f1 100644 --- a/webapp/src/contracts/factories/index.ts +++ b/webapp/src/contracts/factories/index.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ export { Converter__factory } from "./Converter__factory"; export { ERC721__factory } from "./ERC721__factory"; diff --git a/webapp/src/contracts/index.ts b/webapp/src/contracts/index.ts index ed30d23bd4..30fc137083 100644 --- a/webapp/src/contracts/index.ts +++ b/webapp/src/contracts/index.ts @@ -1,5 +1,4 @@ /* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ /* eslint-disable */ export type { Converter } from "./Converter"; export type { ERC721 } from "./ERC721"; diff --git a/webapp/src/lib/asset.spec.ts b/webapp/src/lib/asset.spec.ts index 5bb94ef171..7c1d8f540f 100644 --- a/webapp/src/lib/asset.spec.ts +++ b/webapp/src/lib/asset.spec.ts @@ -1,11 +1,7 @@ import * as contentClient from 'dcl-catalyst-client/dist/client/ContentClient' import { builderAPI } from '../modules/vendor/decentraland/builder/api' import { Asset } from '../modules/asset/types' -import { - getSmartWearableRequiredPermissions, - getSmartWearableSceneContent, - getSmartWearableVideoShowcase -} from './asset' +import { getSmartWearableRequiredPermissions, getSmartWearableSceneContent, getSmartWearableVideoShowcase } from './asset' jest.mock('../modules/vendor/decentraland/builder/api', () => ({ builderAPI: { @@ -54,9 +50,7 @@ describe('when getting a smart wearable scene content', () => { describe('and the smart wearable does not have a valid entity', () => { beforeEach(() => { clientMock.mockReturnValueOnce({ - fetchEntitiesByPointers: jest - .fn() - .mockResolvedValueOnce([{ id: 'anId' }]) + fetchEntitiesByPointers: jest.fn().mockResolvedValueOnce([{ id: 'anId' }]) }) }) @@ -74,9 +68,7 @@ describe('when getting a smart wearable scene content', () => { }) it('should return a scene content json', async () => { - expect(await getSmartWearableSceneContent(anSWUrn)).toStrictEqual( - SWSceneContent - ) + expect(await getSmartWearableSceneContent(anSWUrn)).toStrictEqual(SWSceneContent) }) }) }) @@ -93,9 +85,7 @@ describe('when getting a smart wearable required permissions', () => { }) it('should return an empty array', async () => { - expect(await getSmartWearableRequiredPermissions(anSWUrn)).toStrictEqual( - [] - ) + expect(await getSmartWearableRequiredPermissions(anSWUrn)).toStrictEqual([]) }) }) @@ -108,9 +98,7 @@ describe('when getting a smart wearable required permissions', () => { }) it('should return an array with the required permission', async () => { - expect(await getSmartWearableRequiredPermissions(anSWUrn)).toStrictEqual( - SWSceneContent.requiredPermissions - ) + expect(await getSmartWearableRequiredPermissions(anSWUrn)).toStrictEqual(SWSceneContent.requiredPermissions) }) }) }) @@ -158,9 +146,7 @@ describe('when getting a smart wearable video showcase', () => { }) it('should return the video hash', async () => { - expect(await getSmartWearableVideoShowcase(smartWearable)).toBe( - 'aVideoHash' - ) + expect(await getSmartWearableVideoShowcase(smartWearable)).toBe('aVideoHash') }) }) }) diff --git a/webapp/src/lib/asset.ts b/webapp/src/lib/asset.ts index 563c63431d..2e780ccc84 100644 --- a/webapp/src/lib/asset.ts +++ b/webapp/src/lib/asset.ts @@ -13,16 +13,12 @@ const getContentClient = () => fetcher: createFetchComponent() }) -export const getSmartWearableSceneContent = async ( - urn: string -): Promise<Record<string, unknown> | undefined> => { +export const getSmartWearableSceneContent = async (urn: string): Promise<Record<string, unknown> | undefined> => { const contentClient = getContentClient() const wearableEntity = await contentClient.fetchEntitiesByPointers([urn]) if (wearableEntity.length > 0) { - const scene = wearableEntity[0].content?.find(entity => - entity.file.endsWith(SCENE_PATH) - ) + const scene = wearableEntity[0].content?.find(entity => entity.file.endsWith(SCENE_PATH)) if (scene) { const wearableScene = await contentClient.downloadContent(scene.hash) @@ -34,18 +30,12 @@ export const getSmartWearableSceneContent = async ( } } -export const getSmartWearableRequiredPermissions = async ( - urn: string -): Promise<string[]> => { +export const getSmartWearableRequiredPermissions = async (urn: string): Promise<string[]> => { const wearableSceneContent = await getSmartWearableSceneContent(urn) - return wearableSceneContent - ? (wearableSceneContent.requiredPermissions as string[]) - : [] + return wearableSceneContent ? (wearableSceneContent.requiredPermissions as string[]) : [] } -export const getSmartWearableVideoShowcase = async ( - asset: Asset -): Promise<string | undefined> => { +export const getSmartWearableVideoShowcase = async (asset: Asset): Promise<string | undefined> => { try { const { contractAddress, itemId } = asset @@ -53,9 +43,7 @@ export const getSmartWearableVideoShowcase = async ( const contents = await builderAPI.fetchItemContent(contractAddress, itemId) - const videoContentKey = Object.keys(contents).find(key => - key.endsWith(VIDEO_PATH) - ) + const videoContentKey = Object.keys(contents).find(key => key.endsWith(VIDEO_PATH)) return videoContentKey ? contents[videoContentKey] : undefined } catch (error) { diff --git a/webapp/src/lib/authorization.ts b/webapp/src/lib/authorization.ts index fa1b094c61..8000e7af8d 100644 --- a/webapp/src/lib/authorization.ts +++ b/webapp/src/lib/authorization.ts @@ -1,10 +1,7 @@ import { useEffect, useRef } from 'react' import { useSelector } from 'react-redux' import { fetchAuthorizationsRequest } from 'decentraland-dapps/dist/modules/authorization/actions' -import { - Authorization, - AuthorizationType -} from 'decentraland-dapps/dist/modules/authorization/types' +import { Authorization, AuthorizationType } from 'decentraland-dapps/dist/modules/authorization/types' import { getData as getAuthorizations, isLoading as getLoadingAuthorizations @@ -13,17 +10,12 @@ import { ContractName } from 'decentraland-transactions' import { Contract } from '../modules/vendor/services' -export function isAuthorized( - authorization: Authorization, - authorizations: Authorization[] -) { +export function isAuthorized(authorization: Authorization, authorizations: Authorization[]) { return authorizations.some( a => a.address.toLocaleLowerCase() === authorization.address.toLowerCase() && - a.authorizedAddress.toLowerCase() === - authorization.authorizedAddress.toLowerCase() && - a.contractAddress.toLowerCase() === - authorization.contractAddress.toLowerCase() && + a.authorizedAddress.toLowerCase() === authorization.authorizedAddress.toLowerCase() && + a.contractAddress.toLowerCase() === authorization.contractAddress.toLowerCase() && a.chainId === authorization.chainId && a.type === authorization.type ) @@ -50,10 +42,7 @@ export const getContractAuthorization = ( return authorization } -export const useAuthorization = ( - authorization: Authorization | null, - onFetchAuthorizations: typeof fetchAuthorizationsRequest -) => { +export const useAuthorization = (authorization: Authorization | null, onFetchAuthorizations: typeof fetchAuthorizationsRequest) => { const authorizations = useSelector(getAuthorizations) const isLoadingAuthorizations = useSelector(getLoadingAuthorizations) const hasFetchedAuthorizations = useRef(false) @@ -67,10 +56,7 @@ export const useAuthorization = ( // Allowance authorizations have an allowance amount that determines how much the target can spend in behalf of the user. // These need to be re-fetched every time because the user might have executed a transaction that consumed from this allowance, changing its value. // For other kind of authorizations, if it is already authorized, we don't need to re-fetch it. - if ( - authorization.type !== AuthorizationType.ALLOWANCE && - isAuthorized(authorization, authorizations) - ) { + if (authorization.type !== AuthorizationType.ALLOWANCE && isAuthorized(authorization, authorizations)) { return } @@ -78,8 +64,5 @@ export const useAuthorization = ( onFetchAuthorizations([authorization]) }, [authorization, authorizations, onFetchAuthorizations]) - return [ - isLoadingAuthorizations, - authorization ? isAuthorized(authorization, authorizations) : false - ] + return [isLoadingAuthorizations, authorization ? isAuthorized(authorization, authorizations) : false] } diff --git a/webapp/src/lib/date.ts b/webapp/src/lib/date.ts index 9ce5829655..145b09c821 100644 --- a/webapp/src/lib/date.ts +++ b/webapp/src/lib/date.ts @@ -1,7 +1,4 @@ -import { - getCurrentLocale, - t -} from 'decentraland-dapps/dist/modules/translation/utils' +import { getCurrentLocale, t } from 'decentraland-dapps/dist/modules/translation/utils' import formatDistanceToNowI18N from 'date-fns/formatDistanceToNow' import en from 'date-fns/locale/en-US' import es from 'date-fns/locale/es' @@ -25,12 +22,9 @@ export function getExpirationDateLabel(date: number | Date) { const expiresAtLabel = date.getTime() >= futureDate.getTime() ? t('best_buying_option.buy_listing.never_expires') - : `${t('best_buying_option.buy_listing.expires')} ${formatDistanceToNow( - date, - { - addSuffix: true - } - )}` + : `${t('best_buying_option.buy_listing.expires')} ${formatDistanceToNow(date, { + addSuffix: true + })}` return expiresAtLabel } @@ -54,7 +48,5 @@ export function formatDistanceToNow( export function getDateAndMonthName(date: number | Date) { const locale = locales[getCurrentLocale().locale] - return `${format(new Date(date), 'LLLL', { locale: locale })} ${new Date( - date - ).getDate()}` + return `${format(new Date(date), 'LLLL', { locale: locale })} ${new Date(date).getDate()}` } diff --git a/webapp/src/lib/enum.spec.ts b/webapp/src/lib/enum.spec.ts index 3899f9eef4..d6827a4a43 100644 --- a/webapp/src/lib/enum.spec.ts +++ b/webapp/src/lib/enum.spec.ts @@ -30,9 +30,7 @@ describe('when getting an enum value from a string', () => { }) it('should return the default value', () => { - expect(getParameter(enumValues, value, defaultValue)).toEqual( - defaultValue - ) + expect(getParameter(enumValues, value, defaultValue)).toEqual(defaultValue) }) }) @@ -42,9 +40,7 @@ describe('when getting an enum value from a string', () => { }) it('should return the default value', () => { - expect(getParameter(enumValues, value, defaultValue)).toEqual( - defaultValue - ) + expect(getParameter(enumValues, value, defaultValue)).toEqual(defaultValue) }) }) @@ -54,9 +50,7 @@ describe('when getting an enum value from a string', () => { }) it('should return the default value', () => { - expect(getParameter(enumValues, value, defaultValue)).toEqual( - defaultValue - ) + expect(getParameter(enumValues, value, defaultValue)).toEqual(defaultValue) }) }) }) diff --git a/webapp/src/lib/enum.ts b/webapp/src/lib/enum.ts index 0c4e6a69f1..5c7da20bfd 100644 --- a/webapp/src/lib/enum.ts +++ b/webapp/src/lib/enum.ts @@ -1,13 +1,5 @@ -export function getParameter<T>( - values: T[], - parameterValue: string | null | undefined, - defaultValue: T -): T { - if ( - parameterValue === undefined || - parameterValue === null || - !values.includes(parameterValue as T) - ) { +export function getParameter<T>(values: T[], parameterValue: string | null | undefined, defaultValue: T): T { + if (parameterValue === undefined || parameterValue === null || !values.includes(parameterValue as T)) { return defaultValue } diff --git a/webapp/src/lib/environment.ts b/webapp/src/lib/environment.ts index 24ae5bf507..f72dbfb391 100644 --- a/webapp/src/lib/environment.ts +++ b/webapp/src/lib/environment.ts @@ -1,6 +1,6 @@ import { config } from '../config' -export const environment = config.get('ENVIRONMENT')! -export const peerUrl = config.get('PEER_URL')! -export const builderUrl = config.get('BUILDER_URL')! -export const profileUrl = config.get('PROFILE_URL')! +export const environment = config.get('ENVIRONMENT') +export const peerUrl = config.get('PEER_URL') +export const builderUrl = config.get('BUILDER_URL') +export const profileUrl = config.get('PROFILE_URL') diff --git a/webapp/src/lib/error.ts b/webapp/src/lib/error.ts index c23934ecc6..289f47bdc7 100644 --- a/webapp/src/lib/error.ts +++ b/webapp/src/lib/error.ts @@ -1,14 +1,7 @@ export function isErrorWithMessage(error: unknown): error is Error { - return ( - error !== undefined && - error !== null && - typeof error === 'object' && - 'message' in error - ) + return error !== undefined && error !== null && typeof error === 'object' && 'message' in error } -export function isAPIError( - error: unknown -): error is Error & { status: number } { +export function isAPIError(error: unknown): error is Error & { status: number } { return isErrorWithMessage(error) && 'status' in error } diff --git a/webapp/src/lib/input.ts b/webapp/src/lib/input.ts index 891d0041af..64417f1e59 100644 --- a/webapp/src/lib/input.ts +++ b/webapp/src/lib/input.ts @@ -2,19 +2,12 @@ import { useState, useCallback, useEffect, useRef } from 'react' let timeout: NodeJS.Timeout | null = null -export const useInput = ( - value: string, - onChange: (newValue: string) => void, - ms = 500 -) => { +export const useInput = (value: string, onChange: (newValue: string) => void, ms = 500) => { const [text, setText] = useState(value) - const handleChange = useCallback( - (event: React.ChangeEvent<HTMLInputElement>) => setText(event.target.value), - [setText] - ) + const handleChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => setText(event.target.value), [setText]) // flag to skip debounce - let skip = useRef(false) + const skip = useRef(false) // when value is changed from outside (controlled prop) // should update internal value and skip debounce diff --git a/webapp/src/lib/mana.ts b/webapp/src/lib/mana.ts index 49fcd828af..19ed186308 100644 --- a/webapp/src/lib/mana.ts +++ b/webapp/src/lib/mana.ts @@ -4,10 +4,7 @@ import { MAXIMUM_FRACTION_DIGITS } from 'decentraland-dapps/dist/lib/mana' /** * Format wei to a supported unit ('ether' by default) and localizes it with the desired fraction digits (2 by default) */ -export function formatWeiMANA( - wei: string, - maximumFractionDigits: number = MAXIMUM_FRACTION_DIGITS -): string { +export function formatWeiMANA(wei: string, maximumFractionDigits: number = MAXIMUM_FRACTION_DIGITS): string { const value = Number(ethers.utils.formatEther(wei)) if (value === 0) { @@ -29,10 +26,7 @@ export function formatWeiMANA( * Takes a string representing an ether MANA value and converts it to a two-place decimal number. * If the mana value is either negative or invalid, it'll return 0 */ -export function parseMANANumber( - strMana: string, - maximumFractionDigits = MAXIMUM_FRACTION_DIGITS -): number { +export function parseMANANumber(strMana: string, maximumFractionDigits = MAXIMUM_FRACTION_DIGITS): number { const mana = parseFloat(strMana) if (strMana.length === 0 || isNaN(Number(strMana)) || mana < 0) { @@ -51,8 +45,6 @@ export function parseMANANumber( /** * returns the minimum value that can be given the maximum fraction digits */ -export function getMinimumValueForFractionDigits( - maximumFractionDigits: number -) { +export function getMinimumValueForFractionDigits(maximumFractionDigits: number) { return Math.pow(10, -maximumFractionDigits) } diff --git a/webapp/src/lib/pagination.spec.ts b/webapp/src/lib/pagination.spec.ts index 14ab8c9ed4..08d3eb16fd 100644 --- a/webapp/src/lib/pagination.spec.ts +++ b/webapp/src/lib/pagination.spec.ts @@ -92,8 +92,7 @@ describe('when getting the pagination hook', () => { describe('and there are some filters', () => { beforeEach(() => { - useLocationMock.search = - 'page=1&first=10&offset=0&sortBy=createdAt&filter1=value1&filter2=value2' + useLocationMock.search = 'page=1&first=10&offset=0&sortBy=createdAt&filter1=value1&filter2=value2' renderedHook = renderHook(() => usePagination()) currentResult = renderedHook.result.current as UsePaginationResult<string, string> }) @@ -141,9 +140,7 @@ describe('when getting the pagination hook', () => { }) it('should push the next page into the history with the current parameters', () => { - expect(historyPushMock).toHaveBeenCalledWith( - '/v1/lists?filter=value&sortBy=createdAt&page=2' - ) + expect(historyPushMock).toHaveBeenCalledWith('/v1/lists?filter=value&sortBy=createdAt&page=2') }) }) @@ -158,9 +155,7 @@ describe('when getting the pagination hook', () => { }) it('should push the desired page into the history with the current parameters', () => { - expect(historyPushMock).toHaveBeenCalledWith( - '/v1/lists?filter=value&sortBy=createdAt&page=4' - ) + expect(historyPushMock).toHaveBeenCalledWith('/v1/lists?filter=value&sortBy=createdAt&page=4') }) }) @@ -175,16 +170,13 @@ describe('when getting the pagination hook', () => { }) it('should push the first page into the history with the changed sorting parameter and the current filters', () => { - expect(historyPushMock).toHaveBeenCalledWith( - '/v1/lists?filter=value&sortBy=someSortProperty&page=1' - ) + expect(historyPushMock).toHaveBeenCalledWith('/v1/lists?filter=value&sortBy=someSortProperty&page=1') }) }) describe('and using the changeFilter function', () => { beforeEach(() => { - useLocationMock.search = - 'filter=value&anotherFilter=someValue&sortBy=createdAt' + useLocationMock.search = 'filter=value&anotherFilter=someValue&sortBy=createdAt' renderedHook = renderHook(() => usePagination()) currentResult = renderedHook.result.current as UsePaginationResult<string, string> }) @@ -199,9 +191,7 @@ describe('when getting the pagination hook', () => { }) it('should push the first page into the history only with the new filter and the current sorting', () => { - expect(historyPushMock).toHaveBeenCalledWith( - '/v1/lists?page=1&sortBy=createdAt&filter=newValue' - ) + expect(historyPushMock).toHaveBeenCalledWith('/v1/lists?page=1&sortBy=createdAt&filter=newValue') }) }) @@ -215,9 +205,7 @@ describe('when getting the pagination hook', () => { }) it('should push the first page into the history with the changed filter and the current sorting', () => { - expect(historyPushMock).toHaveBeenCalledWith( - '/v1/lists?filter=newValue&anotherFilter=someValue&sortBy=createdAt&page=1' - ) + expect(historyPushMock).toHaveBeenCalledWith('/v1/lists?filter=newValue&anotherFilter=someValue&sortBy=createdAt&page=1') }) }) }) @@ -225,9 +213,7 @@ describe('when getting the pagination hook', () => { describe('and the count option is set', () => { beforeEach(() => { useLocationMock.search = 'page=1' - renderedHook = renderHook(() => - usePagination({ pageSize: 50, count: 101 }) - ) + renderedHook = renderHook(() => usePagination({ pageSize: 50, count: 101 })) currentResult = renderedHook.result.current as UsePaginationResult<string, string> }) @@ -239,9 +225,7 @@ describe('when getting the pagination hook', () => { describe("and there's no more pages left", () => { beforeEach(() => { useLocationMock.search = 'page=3' - renderedHook = renderHook(() => - usePagination({ pageSize: 50, count: 101 }) - ) + renderedHook = renderHook(() => usePagination({ pageSize: 50, count: 101 })) currentResult = renderedHook.result.current as UsePaginationResult<string, string> }) @@ -253,9 +237,7 @@ describe('when getting the pagination hook', () => { describe('and there are more pages left', () => { beforeEach(() => { useLocationMock.search = 'page=1' - renderedHook = renderHook(() => - usePagination({ pageSize: 50, count: 101 }) - ) + renderedHook = renderHook(() => usePagination({ pageSize: 50, count: 101 })) currentResult = renderedHook.result.current as UsePaginationResult<string, string> }) diff --git a/webapp/src/lib/pagination.ts b/webapp/src/lib/pagination.ts index 13d7e5485f..236d00fcc6 100644 --- a/webapp/src/lib/pagination.ts +++ b/webapp/src/lib/pagination.ts @@ -13,11 +13,7 @@ export type UsePaginationResult<T extends string, S extends string> = { goToNextPage: () => void goToPage: (newPage: number) => void changeSorting: (sort: S) => void - changeFilter: ( - filter: T, - value: string, - options?: { clearOldFilters: boolean } - ) => void + changeFilter: (filter: T, value: string, options?: { clearOldFilters: boolean }) => void } export type PaginationOptions = { @@ -25,16 +21,12 @@ export type PaginationOptions = { count?: number } -export function usePagination< - T extends string = string, - S extends string = string ->(options?: PaginationOptions): UsePaginationResult<T, S> { +export function usePagination<T extends string = string, S extends string = string>( + options?: PaginationOptions +): UsePaginationResult<T, S> { const { search, pathname } = useLocation() const { push } = useHistory() - const pageSize = useMemo( - () => options?.pageSize?.toString() ?? PAGE_SIZE.toString(), - [options?.pageSize] - ) + const pageSize = useMemo(() => options?.pageSize?.toString() ?? PAGE_SIZE.toString(), [options?.pageSize]) const filters: Record<T, string | null> = useMemo(() => { const params = new URLSearchParams(search) params.delete('page') @@ -43,9 +35,7 @@ export function usePagination< params.delete('sortBy') return Object.fromEntries(params.entries()) as Record<T, string | null> }, [search]) - const sortBy = - (useMemo(() => new URLSearchParams(search).get('sortBy'), [search]) as S) ?? - undefined + const sortBy = (useMemo(() => new URLSearchParams(search).get('sortBy'), [search]) as S) ?? undefined const [page, first, offset] = useMemo(() => { const params = new URLSearchParams(search) @@ -82,11 +72,7 @@ export function usePagination< ) const changeFilter = useCallback( - ( - filter: string, - value: string, - options: { clearOldFilters: boolean } = { clearOldFilters: false } - ) => { + (filter: string, value: string, options: { clearOldFilters: boolean } = { clearOldFilters: false }) => { const params = new URLSearchParams(options.clearOldFilters ? {} : search) // Reset the page when changing the filter params.set('page', '1') @@ -99,9 +85,7 @@ export function usePagination< [pathname, push, search, sortBy] ) - const pages = options?.count - ? Math.ceil(options?.count / (options?.pageSize ?? PAGE_SIZE)) - : undefined + const pages = options?.count ? Math.ceil(options?.count / (options?.pageSize ?? PAGE_SIZE)) : undefined const hasMorePages = pages ? page < pages : undefined return { diff --git a/webapp/src/lib/profiles.spec.ts b/webapp/src/lib/profiles.spec.ts index 6487257172..5c7d576ffb 100644 --- a/webapp/src/lib/profiles.spec.ts +++ b/webapp/src/lib/profiles.spec.ts @@ -25,36 +25,26 @@ describe('when getting profiles from the cache', () => { avatars: [{ name: avatarName, ethAddress: anAddress } as Avatar] }, { - avatars: [ - { name: anotherAvatarName, ethAddress: anotherAddress } as Avatar - ] + avatars: [{ name: anotherAvatarName, ethAddress: anotherAddress } as Avatar] } ] //@ts-ignore - mockFetchProfile = jest - .spyOn(ProfilesCache.client, 'getAvatarsDetailsByPost') - .mockResolvedValueOnce(profiles) + mockFetchProfile = jest.spyOn(ProfilesCache.client, 'getAvatarsDetailsByPost').mockResolvedValueOnce(profiles) }) describe('and the request is not in the cache', () => { it('should start the request and return the promise', async () => { - expect( - await ProfilesCache.fetchProfile([anAddress, anotherAddress]) - ).toBe(profiles) - expect(mockFetchProfile).toHaveBeenCalledWith({ids: [anAddress, anotherAddress]}) + expect(await ProfilesCache.fetchProfile([anAddress, anotherAddress])).toBe(profiles) + expect(mockFetchProfile).toHaveBeenCalledWith({ ids: [anAddress, anotherAddress] }) }) }) describe('and the request is in the cache', () => { beforeEach(() => { - ProfilesCache.cache[ - [anAddress, anotherAddress].join(',') - ] = Promise.resolve(profiles) + ProfilesCache.cache[[anAddress, anotherAddress].join(',')] = Promise.resolve(profiles) }) it('should return the ongoing request and to not have called the fetchProfiles endpoint', async () => { - expect( - await ProfilesCache.fetchProfile([anAddress, anotherAddress]) - ).toBe(profiles) + expect(await ProfilesCache.fetchProfile([anAddress, anotherAddress])).toBe(profiles) expect(mockFetchProfile).not.toHaveBeenCalled() }) }) diff --git a/webapp/src/lib/profiles.ts b/webapp/src/lib/profiles.ts index 0f6cc76157..f5fe7f1d12 100644 --- a/webapp/src/lib/profiles.ts +++ b/webapp/src/lib/profiles.ts @@ -18,10 +18,8 @@ class ProfilesCache { return this.cache[addressesString] } - this.cache[addressesString] = - this.client.getAvatarsDetailsByPost({ ids: address }) - .then((profiles) => profiles as any) // "as any" so that no need to map types (prior versions returned any) - + this.cache[addressesString] = this.client.getAvatarsDetailsByPost({ ids: address }).then(profiles => profiles as any) // "as any" so that no need to map types (prior versions returned any) + return this.cache[addressesString] } } diff --git a/webapp/src/lib/timer.spec.ts b/webapp/src/lib/timer.spec.ts index 20ac6e9ac9..eb58c8038f 100644 --- a/webapp/src/lib/timer.spec.ts +++ b/webapp/src/lib/timer.spec.ts @@ -2,9 +2,7 @@ import { renderHook, act } from '@testing-library/react-hooks' import { useTimer } from './timer' const runTimerAutomaticallyOnce = () => { - ;((globalThis.setTimeout as unknown) as jest.Mock) = jest - .fn() - .mockImplementationOnce(callback => callback()) + ;(globalThis.setTimeout as unknown as jest.Mock) = jest.fn().mockImplementationOnce(callback => callback()) } describe('when initializing the hook', () => { diff --git a/webapp/src/lib/utils.ts b/webapp/src/lib/utils.ts index b93f80b673..b0fb30dfde 100644 --- a/webapp/src/lib/utils.ts +++ b/webapp/src/lib/utils.ts @@ -3,22 +3,19 @@ * @param obj * @param keys */ -export function omit( - obj: Record<string, unknown>, - keys: string[] -): Record<string, unknown> { +export function omit(obj: Record<string, unknown>, keys: string[]): Record<string, unknown> { const newKeys = Object.keys(obj).filter(key => !keys.includes(key)) return pick(obj, newKeys) } -export function reset( - obj: Record<string, unknown>, - keys: string[] -): Record<string, unknown> { - return keys.reduce((newObj, key) => ({ - ...newObj, - [key]: undefined - }), obj) +export function reset(obj: Record<string, unknown>, keys: string[]): Record<string, unknown> { + return keys.reduce( + (newObj, key) => ({ + ...newObj, + [key]: undefined + }), + obj + ) } /** @@ -26,10 +23,7 @@ export function reset( * @param obj * @param keys */ -export function pick( - obj: Record<string, unknown>, - keys: string[] -): Record<string, unknown> { +export function pick(obj: Record<string, unknown>, keys: string[]): Record<string, unknown> { const result = {} as Record<string, unknown> for (const key of keys) { diff --git a/webapp/src/modules/account/actions.ts b/webapp/src/modules/account/actions.ts index 74625357e7..d791b723f4 100644 --- a/webapp/src/modules/account/actions.ts +++ b/webapp/src/modules/account/actions.ts @@ -1,5 +1,4 @@ -import { AccountFilters as AccountMetricsFilters } from '@dcl/schemas' -import { Network } from '@dcl/schemas' +import { AccountFilters as AccountMetricsFilters, Network } from '@dcl/schemas' import { action } from 'typesafe-actions' import { AccountMetrics, CreatorAccount } from './types' @@ -9,8 +8,7 @@ export const FETCH_ACCOUNT_METRICS_REQUEST = '[Request] Fetch accounts' export const FETCH_ACCOUNT_METRICS_SUCCESS = '[Success] Fetch accounts' export const FETCH_ACCOUNT_METRICS_FAILURE = '[Failure] Fetch accounts' -export const fetchAccountMetricsRequest = (filters: AccountMetricsFilters) => - action(FETCH_ACCOUNT_METRICS_REQUEST, { filters }) +export const fetchAccountMetricsRequest = (filters: AccountMetricsFilters) => action(FETCH_ACCOUNT_METRICS_REQUEST, { filters }) export const fetchAccountMetricsSuccess = ( filters: AccountMetricsFilters, accountMetrics: { @@ -18,53 +16,29 @@ export const fetchAccountMetricsSuccess = ( [Network.MATIC]: AccountMetrics[] } ) => action(FETCH_ACCOUNT_METRICS_SUCCESS, { filters, accountMetrics }) -export const fetchAccountMetricsFailure = ( - filters: AccountMetricsFilters, - error: string -) => action(FETCH_ACCOUNT_METRICS_FAILURE, { filters, error }) +export const fetchAccountMetricsFailure = (filters: AccountMetricsFilters, error: string) => + action(FETCH_ACCOUNT_METRICS_FAILURE, { filters, error }) -export type FetchAccountMetricsRequestAction = ReturnType< - typeof fetchAccountMetricsRequest -> -export type FetchAccountMetricsSuccessAction = ReturnType< - typeof fetchAccountMetricsSuccess -> -export type FetchAccountMetricsFailureAction = ReturnType< - typeof fetchAccountMetricsFailure -> +export type FetchAccountMetricsRequestAction = ReturnType<typeof fetchAccountMetricsRequest> +export type FetchAccountMetricsSuccessAction = ReturnType<typeof fetchAccountMetricsSuccess> +export type FetchAccountMetricsFailureAction = ReturnType<typeof fetchAccountMetricsFailure> // Fetch creators accounts -export const FETCH_CREATORS_ACCOUNT_REQUEST = - '[Request] Fetch creators accounts' -export const FETCH_CREATORS_ACCOUNT_SUCCESS = - '[Success] Fetch creators accounts' -export const FETCH_CREATORS_ACCOUNT_FAILURE = - '[Failure] Fetch creators accounts' +export const FETCH_CREATORS_ACCOUNT_REQUEST = '[Request] Fetch creators accounts' +export const FETCH_CREATORS_ACCOUNT_SUCCESS = '[Success] Fetch creators accounts' +export const FETCH_CREATORS_ACCOUNT_FAILURE = '[Failure] Fetch creators accounts' -export const fetchCreatorsAccountRequest = ( - search: string, - searchUUID?: string -) => action(FETCH_CREATORS_ACCOUNT_REQUEST, { search, searchUUID }) -export const fetchCreatorsAccountSuccess = ( - search: string, - creatorAccounts: CreatorAccount[], - searchUUID?: string -) => +export const fetchCreatorsAccountRequest = (search: string, searchUUID?: string) => + action(FETCH_CREATORS_ACCOUNT_REQUEST, { search, searchUUID }) +export const fetchCreatorsAccountSuccess = (search: string, creatorAccounts: CreatorAccount[], searchUUID?: string) => action(FETCH_CREATORS_ACCOUNT_SUCCESS, { search, creatorAccounts, searchUUID }) -export const fetchCreatorsAccountFailure = (search: string, error: string) => - action(FETCH_CREATORS_ACCOUNT_FAILURE, { search, error }) +export const fetchCreatorsAccountFailure = (search: string, error: string) => action(FETCH_CREATORS_ACCOUNT_FAILURE, { search, error }) -export type FetchCreatorsAccountRequestAction = ReturnType< - typeof fetchCreatorsAccountRequest -> -export type FetchCreatorsAccountSuccessAction = ReturnType< - typeof fetchCreatorsAccountSuccess -> -export type FetchCreatorsAccountFailureAction = ReturnType< - typeof fetchCreatorsAccountFailure -> +export type FetchCreatorsAccountRequestAction = ReturnType<typeof fetchCreatorsAccountRequest> +export type FetchCreatorsAccountSuccessAction = ReturnType<typeof fetchCreatorsAccountSuccess> +export type FetchCreatorsAccountFailureAction = ReturnType<typeof fetchCreatorsAccountFailure> diff --git a/webapp/src/modules/account/reducer.spec.ts b/webapp/src/modules/account/reducer.spec.ts index f228b38832..3bfdb9bdfb 100644 --- a/webapp/src/modules/account/reducer.spec.ts +++ b/webapp/src/modules/account/reducer.spec.ts @@ -124,17 +124,14 @@ describe('when reducing the action that signals the request of the fetch of crea describe('when reducing the action that signals the successful fetch of creators accounts ', () => { let result: AccountState let search: string - let creatorsAccounts = [{} as CreatorAccount] + const creatorsAccounts = [{} as CreatorAccount] beforeEach(() => { search = 'aSearchTerm' state.loading = [{ type: FETCH_CREATORS_ACCOUNT_REQUEST }] state.error = 'some error' - result = accountReducer( - state, - fetchCreatorsAccountSuccess(search, creatorsAccounts) - ) + result = accountReducer(state, fetchCreatorsAccountSuccess(search, creatorsAccounts)) }) it('should return a state where the received account creators are stored in the creators state', () => { @@ -157,10 +154,7 @@ describe('when reducing the action that signals the failed fetch of creators acc beforeEach(() => { search = 'aSearchTerm' state.loading = [{ type: FETCH_CREATORS_ACCOUNT_REQUEST }] - result = accountReducer( - state, - fetchCreatorsAccountFailure(search, 'some error') - ) + result = accountReducer(state, fetchCreatorsAccountFailure(search, 'some error')) }) it('should return a state where the error is set', () => { diff --git a/webapp/src/modules/account/reducer.ts b/webapp/src/modules/account/reducer.ts index fa3db1b5d4..7af552c7f4 100644 --- a/webapp/src/modules/account/reducer.ts +++ b/webapp/src/modules/account/reducer.ts @@ -1,8 +1,5 @@ import { Network } from '@dcl/schemas' -import { - LoadingState, - loadingReducer -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { LoadingState, loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchNFTsRequestAction, FetchNFTsSuccessAction, @@ -63,10 +60,7 @@ type AccountReducerAction = | FetchCreatorsAccountSuccessAction | FetchCreatorsAccountFailureAction -export function accountReducer( - state: AccountState = INITIAL_STATE, - action: AccountReducerAction -): AccountState { +export function accountReducer(state: AccountState = INITIAL_STATE, action: AccountReducerAction): AccountState { switch (action.type) { case FETCH_CREATORS_ACCOUNT_REQUEST: case FETCH_ACCOUNT_METRICS_REQUEST: @@ -108,10 +102,13 @@ export function accountReducer( ...state, data: { ...state.data, - ...action.payload.accounts.reduce((obj, account) => { - obj[account.address] = account - return obj - }, {} as Record<string, Account>) + ...action.payload.accounts.reduce( + (obj, account) => { + obj[account.address] = account + return obj + }, + {} as Record<string, Account> + ) }, loading: loadingReducer(state.loading, action), error: null diff --git a/webapp/src/modules/account/sagas.spec.ts b/webapp/src/modules/account/sagas.spec.ts index b03b07ecb3..7313ae0b1e 100644 --- a/webapp/src/modules/account/sagas.spec.ts +++ b/webapp/src/modules/account/sagas.spec.ts @@ -1,12 +1,5 @@ import { Task } from 'redux-saga' -import { - Account, - AccountFilters, - AccountSortBy, - Network, - NFTCategory, - Profile -} from '@dcl/schemas' +import { Account, AccountFilters, AccountSortBy, Network, NFTCategory, Profile } from '@dcl/schemas' import { createFetchComponent } from '@well-known-components/fetch-component' import { createLambdasClient } from 'dcl-catalyst-client/dist/client/LambdasClient' import { expectSaga } from 'redux-saga-test-plan' @@ -22,12 +15,7 @@ import { fetchCreatorsAccountRequest, fetchCreatorsAccountSuccess } from './actions' -import { - accountSaga, - DEFAULT_FIRST_VALUE, - DEFAULT_SKIP_VALUE, - MAX_ENS_SEARCH_REQUESTS -} from './sagas' +import { accountSaga, DEFAULT_FIRST_VALUE, DEFAULT_SKIP_VALUE, MAX_ENS_SEARCH_REQUESTS } from './sagas' import { getCreators, getCreatorsSearchQuery } from './selectors' import { CreatorAccount } from './types' import { enhanceCreatorName, fromProfilesToCreators } from './utils' @@ -78,10 +66,7 @@ describe('when handling the request to fetch account metrics', () => { it('should signal that the request has failed with the request error', () => { return expectSaga(accountSaga, lambdasClient) .provide([ - [ - call([accountAPI, accountAPI.fetch], ethereumFilters), - Promise.reject(new Error(error)) - ], + [call([accountAPI, accountAPI.fetch], ethereumFilters), Promise.reject(new Error(error))], [ call([accountAPI, accountAPI.fetch], maticFilters), { @@ -107,10 +92,7 @@ describe('when handling the request to fetch account metrics', () => { total: 10 } as AccountResponse ], - [ - call([accountAPI, accountAPI.fetch], maticFilters), - Promise.reject(new Error(error)) - ] + [call([accountAPI, accountAPI.fetch], maticFilters), Promise.reject(new Error(error))] ]) .put(fetchAccountMetricsFailure(filters, error)) .dispatch(fetchAccountMetricsRequest(filters)) @@ -182,10 +164,7 @@ describe('when handling the request to fetch creators accounts', () => { return expectSaga(accountSaga, lambdasClient) .provide([ [select(getCreatorsSearchQuery), null], - [ - call([nftAPI, nftAPI.fetch], filters), - Promise.reject(new Error(error)) - ] + [call([nftAPI, nftAPI.fetch], filters), Promise.reject(new Error(error))] ]) .put(fetchCreatorsAccountFailure(search, error)) .dispatch(fetchCreatorsAccountRequest(search)) @@ -209,10 +188,7 @@ describe('when handling the request to fetch creators accounts', () => { return expectSaga(accountSaga, lambdasClient) .provide([ [select(getCreatorsSearchQuery), null], - [ - call([accountAPI, accountAPI.fetch], filters), - Promise.reject(new Error(error)) - ] + [call([accountAPI, accountAPI.fetch], filters), Promise.reject(new Error(error))] ]) .put(fetchCreatorsAccountFailure(search, error)) .dispatch(fetchCreatorsAccountRequest(search)) @@ -226,10 +202,7 @@ describe('when handling the request to fetch creators accounts', () => { describe('when the call with search with a term', () => { beforeEach(() => { search = '' - accounts = [ - { address: 'address1' } as Account, - { address: 'address2' } as Account - ] + accounts = [{ address: 'address1' } as Account, { address: 'address2' } as Account] filters = { sortBy: AccountSortBy.MOST_COLLECTIONS } @@ -263,15 +236,9 @@ describe('when handling the request to fetch creators accounts', () => { filters = { sortBy: AccountSortBy.MOST_COLLECTIONS } - accounts = [ - { address: 'address1' } as Account, - { address: 'address2' } as Account - ] + accounts = [{ address: 'address1' } as Account, { address: 'address2' } as Account] addresses = accounts.map(account => account.address) - profiles = [ - { avatars: [{ ethAddress: addresses[0] }] } as Profile, - { avatars: [{ ethAddress: addresses[1] }] } as Profile - ] + profiles = [{ avatars: [{ ethAddress: addresses[0] }] } as Profile, { avatars: [{ ethAddress: addresses[1] }] } as Profile] }) it('should fetch the accounts with more collections using the accountAPI and their profiles using the catalyst lambdas', () => { return expectSaga(accountSaga, lambdasClient) @@ -285,12 +252,7 @@ describe('when handling the request to fetch creators accounts', () => { profiles ] ]) - .put( - fetchCreatorsAccountSuccess( - search, - fromProfilesToCreators(profiles, accounts) - ) - ) + .put(fetchCreatorsAccountSuccess(search, fromProfilesToCreators(profiles, accounts))) .dispatch(fetchCreatorsAccountRequest(search)) .silentRun() }) @@ -306,10 +268,7 @@ describe('when handling the request to fetch creators accounts', () => { first: DEFAULT_FIRST_VALUE, skip: DEFAULT_SKIP_VALUE } - accounts = [ - { address: 'address1', collections: 2 } as Account, - { address: 'address2', collections: 3 } as Account - ] + accounts = [{ address: 'address1', collections: 2 } as Account, { address: 'address2', collections: 3 } as Account] addresses = accounts.map(account => account.address) filters = { address: addresses, @@ -354,9 +313,7 @@ describe('when handling the request to fetch creators accounts', () => { beforeEach(() => { creators = fromProfilesToCreators(profiles, accounts) total = MAX_ENS_SEARCH_REQUESTS * DEFAULT_FIRST_VALUE + 1 - creators.forEach(creator => - enhanceCreatorName(creator, nftResults, search) - ) + creators.forEach(creator => enhanceCreatorName(creator, nftResults, search)) }) it('should fetch the ens until it gets all the matching results using the nftAPI and then and their profiles using the catalyst lambdas and accounts using the nftAPI and put the success action with the creators profiles', () => { return expectSaga(accountSaga, lambdasClient) @@ -364,18 +321,15 @@ describe('when handling the request to fetch creators accounts', () => { [select(getCreatorsSearchQuery), null], ...[...Array(MAX_ENS_SEARCH_REQUESTS).keys()].map( index => - ([ + [ call([nftAPI, nftAPI.fetch], { ...nftAPIFilters, skip: index * DEFAULT_FIRST_VALUE }), { data: nftResults, total } - ] as unknown) as Task + ] as unknown as Task ), - [ - call([accountAPI, accountAPI.fetch], filters), - { data: accounts } - ], + [call([accountAPI, accountAPI.fetch], filters), { data: accounts }], [ call([lambdasClient, 'getAvatarsDetailsByPost'], { ids: addresses @@ -394,9 +348,7 @@ describe('when handling the request to fetch creators accounts', () => { beforeEach(() => { creators = fromProfilesToCreators(profiles, accounts) total = nftResults.length * REQUESTS_UNTIL_FILLED - creators.forEach(creator => - enhanceCreatorName(creator, nftResults, search) - ) + creators.forEach(creator => enhanceCreatorName(creator, nftResults, search)) }) it('should fetch the ens until it gets all the matching results using the nftAPI and then and their profiles using the catalyst lambdas and accounts using the nftAPI and put the success action with the creators profiles', () => { return expectSaga(accountSaga, lambdasClient) @@ -404,22 +356,16 @@ describe('when handling the request to fetch creators accounts', () => { [select(getCreatorsSearchQuery), null], ...[...Array(REQUESTS_UNTIL_FILLED).keys()].map( index => - ([ + [ call([nftAPI, nftAPI.fetch], { ...nftAPIFilters, skip: index * DEFAULT_FIRST_VALUE }), { data: nftResults, total } - ] as unknown) as Task + ] as unknown as Task ), - [ - call([nftAPI, nftAPI.fetch], nftAPIFilters), - { data: nftResults } - ], - [ - call([accountAPI, accountAPI.fetch], filters), - { data: accounts } - ], + [call([nftAPI, nftAPI.fetch], nftAPIFilters), { data: nftResults }], + [call([accountAPI, accountAPI.fetch], filters), { data: accounts }], [ call([lambdasClient, 'getAvatarsDetailsByPost'], { ids: addresses diff --git a/webapp/src/modules/account/sagas.ts b/webapp/src/modules/account/sagas.ts index cd43a30ce5..abd313f7e4 100644 --- a/webapp/src/modules/account/sagas.ts +++ b/webapp/src/modules/account/sagas.ts @@ -1,21 +1,10 @@ -import { - Account, - AccountSortBy, - Network, - NFTCategory, - Profile -} from '@dcl/schemas' +import { Account, AccountSortBy, Network, NFTCategory, Profile } from '@dcl/schemas' import { call, takeEvery, put, all } from '@redux-saga/core/effects' import { LambdasClient } from 'dcl-catalyst-client/dist/client/LambdasClient' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { cancelled, select, takeLatest } from 'redux-saga/effects' import { isErrorWithMessage } from '../../lib/error' -import { - accountAPI, - nftAPI, - NFTResponse, - NFTResult -} from '../vendor/decentraland' +import { accountAPI, nftAPI, NFTResponse, NFTResult } from '../vendor/decentraland' import { AccountResponse } from '../vendor/decentraland/account/types' import { fetchAccountMetricsFailure, @@ -36,18 +25,10 @@ export const DEFAULT_SKIP_VALUE = 0 export const MAX_ENS_SEARCH_REQUESTS = 5 export function* accountSaga(catalystLambdasClient: LambdasClient) { - yield takeEvery( - FETCH_ACCOUNT_METRICS_REQUEST, - handleFetchAccountMetricsRequest - ) - yield takeLatest( - FETCH_CREATORS_ACCOUNT_REQUEST, - handleFetchCreatorsAccountsRequest - ) + yield takeEvery(FETCH_ACCOUNT_METRICS_REQUEST, handleFetchAccountMetricsRequest) + yield takeLatest(FETCH_CREATORS_ACCOUNT_REQUEST, handleFetchCreatorsAccountsRequest) - function* handleFetchCreatorsAccountsRequest( - action: FetchCreatorsAccountRequestAction - ): any { + function* handleFetchCreatorsAccountsRequest(action: FetchCreatorsAccountRequestAction): any { const { search, searchUUID } = action.payload const previousSearch: string | null = yield select(getCreatorsSearchQuery) @@ -72,8 +53,7 @@ export function* accountSaga(catalystLambdasClient: LambdasClient) { }) ens = [...ens, ...data] - const hasReachedMaxSearchRequests = - MAX_ENS_SEARCH_REQUESTS - 1 === skip / DEFAULT_FIRST_VALUE + const hasReachedMaxSearchRequests = MAX_ENS_SEARCH_REQUESTS - 1 === skip / DEFAULT_FIRST_VALUE const hasFetchedAllResults = total === ens.length if (hasFetchedAllResults || hasReachedMaxSearchRequests) { @@ -83,20 +63,14 @@ export function* accountSaga(catalystLambdasClient: LambdasClient) { } addresses = new Set(ens.map(nft => nft.nft.owner)) } else { - const { data }: { data: Account[] } = yield call( - [accountAPI, 'fetch'], - { - sortBy: AccountSortBy.MOST_COLLECTIONS - } - ) + const { data }: { data: Account[] } = yield call([accountAPI, 'fetch'], { + sortBy: AccountSortBy.MOST_COLLECTIONS + }) accounts = data addresses = new Set([...accounts.map(nft => nft.address)]) } - const [profiles, creatorsAccounts]: [ - Profile[], - AccountResponse - ] = yield all([ + const [profiles, creatorsAccounts]: [Profile[], AccountResponse] = yield all([ call([catalystLambdasClient, 'getAvatarsDetailsByPost'], { ids: Array.from(addresses) }), @@ -108,22 +82,14 @@ export function* accountSaga(catalystLambdasClient: LambdasClient) { : Promise.resolve() ]) - const creators = fromProfilesToCreators( - profiles, - accounts ?? creatorsAccounts.data - ) + const creators = fromProfilesToCreators(profiles, accounts ?? creatorsAccounts.data) if (search) { creators.forEach(creator => enhanceCreatorName(creator, ens, search)) } yield put(fetchCreatorsAccountSuccess(search, creators, searchUUID)) } catch (error) { - yield put( - fetchCreatorsAccountFailure( - search, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchCreatorsAccountFailure(search, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } finally { // cancel ongoing requests and emit a failure to clean the loading state if (yield cancelled()) { @@ -133,9 +99,7 @@ export function* accountSaga(catalystLambdasClient: LambdasClient) { } } -export function* handleFetchAccountMetricsRequest( - action: FetchAccountMetricsRequestAction -) { +export function* handleFetchAccountMetricsRequest(action: FetchAccountMetricsRequestAction) { const { filters } = action.payload try { @@ -157,11 +121,6 @@ export function* handleFetchAccountMetricsRequest( }) ) } catch (error) { - yield put( - fetchAccountMetricsFailure( - filters, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchAccountMetricsFailure(filters, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } diff --git a/webapp/src/modules/account/selectors.spec.ts b/webapp/src/modules/account/selectors.spec.ts index 359f6012c7..97c96effae 100644 --- a/webapp/src/modules/account/selectors.spec.ts +++ b/webapp/src/modules/account/selectors.spec.ts @@ -81,9 +81,7 @@ describe('when getting account metrics by address by network', () => { } } - expect( - getMetricsByAddressByNetwork.resultFunc(metricsByNetworkByAddress) - ).toEqual({ + expect(getMetricsByAddressByNetwork.resultFunc(metricsByNetworkByAddress)).toEqual({ address1: { [Network.ETHEREUM]: metrics1, [Network.MATIC]: metrics3 @@ -107,17 +105,15 @@ describe('when getting aggregated metrics by address', () => { }, address2: { [Network.ETHEREUM]: metrics2, - [Network.MATIC]: (undefined as unknown) as AccountMetrics + [Network.MATIC]: undefined as unknown as AccountMetrics }, address3: { - [Network.ETHEREUM]: (undefined as unknown) as AccountMetrics, + [Network.ETHEREUM]: undefined as unknown as AccountMetrics, [Network.MATIC]: metrics4 } } - expect( - getAggregatedMetricsByAddress.resultFunc(metricsByAddressByNetwork) - ).toEqual({ + expect(getAggregatedMetricsByAddress.resultFunc(metricsByAddressByNetwork)).toEqual({ address1: sumAccountMetrics(metrics1, metrics3), address2: metrics2, address3: metrics4 @@ -134,10 +130,10 @@ describe('when getting metrics by address', () => { }, address2: { [Network.ETHEREUM]: metrics2, - [Network.MATIC]: (undefined as unknown) as AccountMetrics + [Network.MATIC]: undefined as unknown as AccountMetrics }, address3: { - [Network.ETHEREUM]: (undefined as unknown) as AccountMetrics, + [Network.ETHEREUM]: undefined as unknown as AccountMetrics, [Network.MATIC]: metrics4 } } @@ -148,12 +144,7 @@ describe('when getting metrics by address', () => { address3: metrics4 } - expect( - getMetricsByAddress.resultFunc( - metricsByAddressByNetwork, - aggregatedMetricsByAddress - ) - ).toEqual({ + expect(getMetricsByAddress.resultFunc(metricsByAddressByNetwork, aggregatedMetricsByAddress)).toEqual({ address1: { [Network.ETHEREUM]: metrics1, [Network.MATIC]: metrics3, diff --git a/webapp/src/modules/account/selectors.ts b/webapp/src/modules/account/selectors.ts index 5717331c0e..15ff1b05d3 100644 --- a/webapp/src/modules/account/selectors.ts +++ b/webapp/src/modules/account/selectors.ts @@ -8,72 +8,53 @@ import { sumAccountMetrics } from './utils' export const getState = (state: RootState) => state.account export const getData = (state: RootState) => getState(state).data -export const getCreators = (state: RootState) => - getState(state).creators.accounts -export const getCreatorsSearchQuery = (state: RootState) => - getState(state).creators.search -export const getMetricsByNetworkByAddress = (state: RootState) => - getState(state).metrics +export const getCreators = (state: RootState) => getState(state).creators.accounts +export const getCreatorsSearchQuery = (state: RootState) => getState(state).creators.search +export const getMetricsByNetworkByAddress = (state: RootState) => getState(state).metrics export const getLoading = (state: RootState) => getState(state).loading export const getError = (state: RootState) => getState(state).error -const accountMatchSelector = createMatchSelector< - RootState, - { address: string } ->(locations.account(':address')) +const accountMatchSelector = createMatchSelector<RootState, { address: string }>(locations.account(':address')) -export const getAddress = createSelector< - RootState, - ReturnType<typeof accountMatchSelector>, - string | undefined ->(accountMatchSelector, match => match?.params.address?.toLowerCase()) +export const getAddress = createSelector<RootState, ReturnType<typeof accountMatchSelector>, string | undefined>( + accountMatchSelector, + match => match?.params.address?.toLowerCase() +) -export const getMetricsByAddressByNetwork = createSelector( - getMetricsByNetworkByAddress, - metrics => { - const addresses = new Set([ - ...Object.keys(metrics.ETHEREUM), - ...Object.keys(metrics.MATIC) - ]) +export const getMetricsByAddressByNetwork = createSelector(getMetricsByNetworkByAddress, metrics => { + const addresses = new Set([...Object.keys(metrics.ETHEREUM), ...Object.keys(metrics.MATIC)]) - const res: Record< - string, - { [Network.ETHEREUM]: AccountMetrics; [Network.MATIC]: AccountMetrics } - > = {} + const res: Record<string, { [Network.ETHEREUM]: AccountMetrics; [Network.MATIC]: AccountMetrics }> = {} - for (const address of addresses) { - res[address] = { - [Network.ETHEREUM]: metrics[Network.ETHEREUM][address], - [Network.MATIC]: metrics[Network.MATIC][address] - } + for (const address of addresses) { + res[address] = { + [Network.ETHEREUM]: metrics[Network.ETHEREUM][address], + [Network.MATIC]: metrics[Network.MATIC][address] } - - return res } -) -export const getAggregatedMetricsByAddress = createSelector( - getMetricsByAddressByNetwork, - metrics => { - const addresses = Object.keys(metrics) - const res: Record<string, AccountMetrics> = {} + return res +}) - for (const address of addresses) { - const eth = metrics[address].ETHEREUM - const mat = metrics[address].MATIC +export const getAggregatedMetricsByAddress = createSelector(getMetricsByAddressByNetwork, metrics => { + const addresses = Object.keys(metrics) + const res: Record<string, AccountMetrics> = {} - if (eth && !mat) { - res[address] = eth - } else if (!eth && mat) { - res[address] = mat - } else if (eth && mat) { - res[address] = sumAccountMetrics(eth, mat) - } - } + for (const address of addresses) { + const eth = metrics[address].ETHEREUM + const mat = metrics[address].MATIC - return res + if (eth && !mat) { + res[address] = eth + } else if (!eth && mat) { + res[address] = mat + } else if (eth && mat) { + res[address] = sumAccountMetrics(eth, mat) + } } -) + + return res +}) export const getMetricsByAddress = createSelector( getMetricsByAddressByNetwork, diff --git a/webapp/src/modules/account/utils.spec.ts b/webapp/src/modules/account/utils.spec.ts index 3ed467a918..7fd3ebc855 100644 --- a/webapp/src/modules/account/utils.spec.ts +++ b/webapp/src/modules/account/utils.spec.ts @@ -1,11 +1,7 @@ import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { Account, Avatar, Profile } from '@dcl/schemas' import { NFTResult } from '../vendor/decentraland' -import { - enhanceCreatorName, - fromProfilesToCreators, - sumAccountMetrics -} from './utils' +import { enhanceCreatorName, fromProfilesToCreators, sumAccountMetrics } from './utils' import { CreatorAccount } from './types' describe('when summing account metrics', () => { @@ -60,9 +56,7 @@ describe('when transforming profiles and accounts objects to creators entities', } ] collectionsAmount = 3 - accounts = [ - { address: ethAddress, collections: collectionsAmount } as Account - ] + accounts = [{ address: ethAddress, collections: collectionsAmount } as Account] }) it('should return an creator account with the values from the profile and account', () => { expect(fromProfilesToCreators(profiles, accounts)).toEqual([ @@ -101,9 +95,7 @@ describe('when enhancing creator name', () => { }) it('should enhance the name and add the profile name at the end', () => { enhanceCreatorName(creator, ens, search) - expect(creator.name).toEqual( - `aName (${t('global.currently')} anotherName)` - ) + expect(creator.name).toEqual(`aName (${t('global.currently')} anotherName)`) }) }) describe('when the creator name contains the search', () => { diff --git a/webapp/src/modules/account/utils.ts b/webapp/src/modules/account/utils.ts index 9771d24843..e22354b6c9 100644 --- a/webapp/src/modules/account/utils.ts +++ b/webapp/src/modules/account/utils.ts @@ -16,39 +16,25 @@ export function sumAccountMetrics(a: AccountMetrics, b: AccountMetrics) { } function addStrings(a: string, b: string) { - return ethers.BigNumber.from(a) - .add(b) - .toString() + return ethers.BigNumber.from(a).add(b).toString() } -export function fromProfilesToCreators( - profiles: Profile[], - accounts: Account[] -): CreatorAccount[] { +export function fromProfilesToCreators(profiles: Profile[], accounts: Account[]): CreatorAccount[] { return profiles .map(profile => ({ name: profile.avatars[0].name, address: profile.avatars[0].ethAddress, - collections: - accounts.find( - account => account.address === profile.avatars[0].ethAddress - )?.collections || 0 + collections: accounts.find(account => account.address === profile.avatars[0].ethAddress)?.collections || 0 })) .filter(account => account.collections > 0) } -export function enhanceCreatorName( - creator: CreatorAccount, - ens: NFTResult[], - search: string -) { +export function enhanceCreatorName(creator: CreatorAccount, ens: NFTResult[], search: string) { if (!creator.name.toLocaleLowerCase().includes(search.toLocaleLowerCase())) { const ensThatMatches = ens.find(nft => nft.nft.owner === creator.address) const hasADifferentName = ensThatMatches?.nft.name !== creator.name if (ensThatMatches && hasADifferentName) { - creator.name = `${ensThatMatches.nft.name} (${t('global.currently')} ${ - creator.name - })` + creator.name = `${ensThatMatches.nft.name} (${t('global.currently')} ${creator.name})` } } } diff --git a/webapp/src/modules/analytics/actions.ts b/webapp/src/modules/analytics/actions.ts index 798680179e..923e302f23 100644 --- a/webapp/src/modules/analytics/actions.ts +++ b/webapp/src/modules/analytics/actions.ts @@ -1,34 +1,18 @@ import { action } from 'typesafe-actions' -import { - AnalyticsTimeframe, - AnalyticsVolumeData, - RankingEntities, - RankingEntity, - RankingsFilters -} from './types' +import { AnalyticsTimeframe, AnalyticsVolumeData, RankingEntities, RankingEntity, RankingsFilters } from './types' export const FETCH_ANALYTICS_VOLUME_DATA_REQUEST = '[Request] Fetch Volume Data' export const FETCH_ANALYTICS_VOLUME_DATA_SUCCESS = '[Success] Fetch Volume Data' export const FETCH_ANALYTICS_VOLUME_DATA_FAILURE = '[Failure] Fetch Volume Data' -export const fetchAnalyticsVolumeDataRequest = ( - timeframe: AnalyticsTimeframe -) => action(FETCH_ANALYTICS_VOLUME_DATA_REQUEST, { timeframe }) -export const fetchAnalyticsVolumeDataSuccess = ( - analyticsVolumeData: AnalyticsVolumeData -) => action(FETCH_ANALYTICS_VOLUME_DATA_SUCCESS, { analyticsVolumeData }) -export const fetchAnalyticsVolumeDataFailure = (error: string) => - action(FETCH_ANALYTICS_VOLUME_DATA_FAILURE, { error }) - -export type FetchAnalyticsDayDataRequestAction = ReturnType< - typeof fetchAnalyticsVolumeDataRequest -> -export type FetchAnalyticsDayDataSuccessAction = ReturnType< - typeof fetchAnalyticsVolumeDataSuccess -> -export type FetchAnalyticsDayDataFailureAction = ReturnType< - typeof fetchAnalyticsVolumeDataFailure -> +export const fetchAnalyticsVolumeDataRequest = (timeframe: AnalyticsTimeframe) => action(FETCH_ANALYTICS_VOLUME_DATA_REQUEST, { timeframe }) +export const fetchAnalyticsVolumeDataSuccess = (analyticsVolumeData: AnalyticsVolumeData) => + action(FETCH_ANALYTICS_VOLUME_DATA_SUCCESS, { analyticsVolumeData }) +export const fetchAnalyticsVolumeDataFailure = (error: string) => action(FETCH_ANALYTICS_VOLUME_DATA_FAILURE, { error }) + +export type FetchAnalyticsDayDataRequestAction = ReturnType<typeof fetchAnalyticsVolumeDataRequest> +export type FetchAnalyticsDayDataSuccessAction = ReturnType<typeof fetchAnalyticsVolumeDataSuccess> +export type FetchAnalyticsDayDataFailureAction = ReturnType<typeof fetchAnalyticsVolumeDataFailure> // Fetch Rankings @@ -36,17 +20,12 @@ export const FETCH_RANKINGS_REQUEST = '[Request] Fetch Rankings' export const FETCH_RANKINGS_SUCCESS = '[Success] Fetch Rankings' export const FETCH_RANKINGS_FAILURE = '[Failure] Fetch Rankings' -export const fetchRankingsRequest = ( - entity: RankingEntities, - timeframe: AnalyticsTimeframe, - filters?: RankingsFilters -) => action(FETCH_RANKINGS_REQUEST, { entity, timeframe, filters }) +export const fetchRankingsRequest = (entity: RankingEntities, timeframe: AnalyticsTimeframe, filters?: RankingsFilters) => + action(FETCH_RANKINGS_REQUEST, { entity, timeframe, filters }) -export const fetchRankingsSuccess = (results: RankingEntity[]) => - action(FETCH_RANKINGS_SUCCESS, { results }) +export const fetchRankingsSuccess = (results: RankingEntity[]) => action(FETCH_RANKINGS_SUCCESS, { results }) -export const fetchRankingsFailure = (error: string) => - action(FETCH_RANKINGS_FAILURE, { error }) +export const fetchRankingsFailure = (error: string) => action(FETCH_RANKINGS_FAILURE, { error }) export type FetchRankingsRequestAction = ReturnType<typeof fetchRankingsRequest> export type FetchRankingsSuccessAction = ReturnType<typeof fetchRankingsSuccess> diff --git a/webapp/src/modules/analytics/reducer.spec.ts b/webapp/src/modules/analytics/reducer.spec.ts index 8e50f6dac0..c051d7af3f 100644 --- a/webapp/src/modules/analytics/reducer.spec.ts +++ b/webapp/src/modules/analytics/reducer.spec.ts @@ -4,16 +4,12 @@ import { fetchAnalyticsVolumeDataSuccess, FETCH_ANALYTICS_VOLUME_DATA_REQUEST } from './actions' -import { analyticsReducer } from './reducer' -import { INITIAL_STATE } from './reducer' +import { analyticsReducer, INITIAL_STATE } from './reducer' import { AnalyticsTimeframe, AnalyticsVolumeData } from './types' describe('when fetch volume data request action is received', () => { it('should add a loading state action to the loading state array', () => { - const newState = analyticsReducer( - INITIAL_STATE, - fetchAnalyticsVolumeDataRequest(AnalyticsTimeframe.MONTH) - ) + const newState = analyticsReducer(INITIAL_STATE, fetchAnalyticsVolumeDataRequest(AnalyticsTimeframe.MONTH)) expect(newState.loading.length).toBe(1) expect(newState.loading[0].type).toBe(FETCH_ANALYTICS_VOLUME_DATA_REQUEST) }) diff --git a/webapp/src/modules/analytics/reducer.ts b/webapp/src/modules/analytics/reducer.ts index 254603e182..a639f07392 100644 --- a/webapp/src/modules/analytics/reducer.ts +++ b/webapp/src/modules/analytics/reducer.ts @@ -1,7 +1,4 @@ -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchAnalyticsDayDataRequestAction, FetchAnalyticsDayDataSuccessAction, @@ -40,10 +37,7 @@ type AnalyticsReducerAction = | FetchRankingsSuccessAction | FetchRankingsFailureAction -export function analyticsReducer( - state = INITIAL_STATE, - action: AnalyticsReducerAction -): AnalyticsState { +export function analyticsReducer(state = INITIAL_STATE, action: AnalyticsReducerAction): AnalyticsState { switch (action.type) { case FETCH_ANALYTICS_VOLUME_DATA_REQUEST: return { diff --git a/webapp/src/modules/analytics/sagas.spec.ts b/webapp/src/modules/analytics/sagas.spec.ts index 8f7dfbfac0..1fdb69878e 100644 --- a/webapp/src/modules/analytics/sagas.spec.ts +++ b/webapp/src/modules/analytics/sagas.spec.ts @@ -1,10 +1,6 @@ import { expectSaga } from 'redux-saga-test-plan' import * as matchers from 'redux-saga-test-plan/matchers' -import { - fetchAnalyticsVolumeDataRequest, - fetchAnalyticsVolumeDataSuccess, - fetchAnalyticsVolumeDataFailure -} from './actions' +import { fetchAnalyticsVolumeDataRequest, fetchAnalyticsVolumeDataSuccess, fetchAnalyticsVolumeDataFailure } from './actions' import { analyticsSagas } from './sagas' import { AnalyticsTimeframe, AnalyticsVolumeData } from './types' import { AnalyticsService } from '../vendor/decentraland' @@ -29,12 +25,7 @@ describe('when handling a fetch volume data request', () => { describe('when the api call is successful', () => { it('should put a success action with the volume for the timeframe asked', () => { return expectSaga(analyticsSagas) - .provide([ - [ - matchers.call.fn(AnalyticsService.prototype.fetchVolumeData), - Promise.resolve(response) - ] - ]) + .provide([[matchers.call.fn(AnalyticsService.prototype.fetchVolumeData), Promise.resolve(response)]]) .call.like({ fn: AnalyticsService.prototype.fetchVolumeData, args: [timeframe] @@ -48,12 +39,7 @@ describe('when handling a fetch volume data request', () => { describe('when the api call fails', () => { it('should put a failure action with the error', () => { return expectSaga(analyticsSagas) - .provide([ - [ - matchers.call.fn(AnalyticsService.prototype.fetchVolumeData), - Promise.reject(new Error('some error')) - ] - ]) + .provide([[matchers.call.fn(AnalyticsService.prototype.fetchVolumeData), Promise.reject(new Error('some error'))]]) .call.like({ fn: AnalyticsService.prototype.fetchVolumeData, args: [timeframe] diff --git a/webapp/src/modules/analytics/sagas.ts b/webapp/src/modules/analytics/sagas.ts index 6e8e4c6fe2..665e4d7c26 100644 --- a/webapp/src/modules/analytics/sagas.ts +++ b/webapp/src/modules/analytics/sagas.ts @@ -16,50 +16,29 @@ import { import { AnalyticsVolumeData, RankingEntity } from './types' export function* analyticsSagas() { - yield takeEvery( - FETCH_ANALYTICS_VOLUME_DATA_REQUEST, - handleFetchVolumeDataRequest - ) + yield takeEvery(FETCH_ANALYTICS_VOLUME_DATA_REQUEST, handleFetchVolumeDataRequest) yield takeEvery(FETCH_RANKINGS_REQUEST, handleFetchRankingsRequest) } -export function* handleFetchVolumeDataRequest( - action: FetchAnalyticsDayDataRequestAction -) { +export function* handleFetchVolumeDataRequest(action: FetchAnalyticsDayDataRequestAction) { const { timeframe } = action.payload try { const analyticsService = new AnalyticsService() - const volumeData: AnalyticsVolumeData = yield call( - [analyticsService, 'fetchVolumeData'], - timeframe - ) + const volumeData: AnalyticsVolumeData = yield call([analyticsService, 'fetchVolumeData'], timeframe) yield put(fetchAnalyticsVolumeDataSuccess(volumeData)) } catch (error) { - yield put( - fetchAnalyticsVolumeDataFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchAnalyticsVolumeDataFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } function* handleFetchRankingsRequest(action: FetchRankingsRequestAction) { const { entity, filters, timeframe } = action.payload try { - const { data }: { data: RankingEntity[] } = yield call( - [rankingsAPI, 'fetch'], - entity, - timeframe, - filters - ) + const { data }: { data: RankingEntity[] } = yield call([rankingsAPI, 'fetch'], entity, timeframe, filters) yield put(fetchRankingsSuccess(data)) } catch (error) { - yield put( - fetchRankingsFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchRankingsFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } diff --git a/webapp/src/modules/analytics/sentry.ts b/webapp/src/modules/analytics/sentry.ts index c1703fb7a8..a128d52329 100644 --- a/webapp/src/modules/analytics/sentry.ts +++ b/webapp/src/modules/analytics/sentry.ts @@ -4,9 +4,7 @@ import { config } from '../../config' init({ environment: config.get('ENVIRONMENT'), - release: `${config.get('SENTRY_RELEASE_PREFIX', 'marketplace')}@${ - process.env.VITE_REACT_APP_WEBSITE_VERSION - }`, + release: `${config.get('SENTRY_RELEASE_PREFIX', 'marketplace')}@${process.env.VITE_REACT_APP_WEBSITE_VERSION}`, dsn: config.get('SENTRY_DSN'), integrations: [new BrowserTracing(), new Replay()], // Performance Monitoring diff --git a/webapp/src/modules/analytics/track.ts b/webapp/src/modules/analytics/track.ts index d0b9ce06e5..6efe23e280 100644 --- a/webapp/src/modules/analytics/track.ts +++ b/webapp/src/modules/analytics/track.ts @@ -1,9 +1,6 @@ import { PayloadAction } from 'typesafe-actions' import { ethers } from 'ethers' -import { - EventName, - GetPayload -} from 'decentraland-dapps/dist/modules/analytics/types' +import { EventName, GetPayload } from 'decentraland-dapps/dist/modules/analytics/types' import { FETCH_TRANSACTION_FAILURE, FIX_REVERTED_TRANSACTION, @@ -20,10 +17,7 @@ import { } from 'decentraland-dapps/dist/modules/authorization/actions' import { TransactionStatus } from 'decentraland-dapps/dist/modules/transaction/types' import { add } from 'decentraland-dapps/dist/modules/analytics/utils' -import { - SET_PROFILE_AVATAR_ALIAS_SUCCESS, - SetProfileAvatarAliasSuccessAction -} from 'decentraland-dapps/dist/modules/profile' +import { SET_PROFILE_AVATAR_ALIAS_SUCCESS, SetProfileAvatarAliasSuccessAction } from 'decentraland-dapps/dist/modules/profile' import { capitalize } from '../../lib/text' import { CREATE_ORDER_SUCCESS, @@ -35,12 +29,7 @@ import { ExecuteOrderWithCardSuccessAction, EXECUTE_ORDER_WITH_CARD_SUCCESS } from '../order/actions' -import { - TRANSFER_NFT_TRANSACTION_SUBMITTED, - TransferNFTSuccessAction, - FETCH_NFTS_SUCCESS, - FetchNFTsSuccessAction -} from '../nft/actions' +import { TRANSFER_NFT_TRANSACTION_SUBMITTED, TransferNFTSuccessAction, FETCH_NFTS_SUCCESS, FetchNFTsSuccessAction } from '../nft/actions' import { PLACE_BID_SUCCESS, ACCEPT_BID_TRANSACTION_SUBMITTED, @@ -77,10 +66,7 @@ import { } from '../rental/actions' import { UpsertRentalOptType } from '../rental/types' import { NFTCategory } from '@dcl/schemas' -import { - SetPurchaseAction, - SET_PURCHASE -} from 'decentraland-dapps/dist/modules/gateway/actions' +import { SetPurchaseAction, SET_PURCHASE } from 'decentraland-dapps/dist/modules/gateway/actions' import { PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' import * as events from '../../utils/events' import { @@ -106,10 +92,7 @@ import { UpdateListSuccessAction } from '../favorites/actions' import { getCategoryInfo } from '../../utils/category' -import { - FETCH_CREATORS_ACCOUNT_SUCCESS, - FetchCreatorsAccountSuccessAction -} from '../account/actions' +import { FETCH_CREATORS_ACCOUNT_SUCCESS, FetchCreatorsAccountSuccessAction } from '../account/actions' import { isUserRejectedTransactionError } from '../transaction/utils' import { CLAIM_NAME_CROSS_CHAIN_SUCCESS, @@ -187,20 +170,12 @@ track<TransferNFTSuccessAction>( ) track<FetchTransactionFailureAction>(FETCH_TRANSACTION_FAILURE, ({ payload }) => - payload.status === TransactionStatus.REVERTED - ? events.TRANSACTION_FAILED - : events.TRANSACTION_DROPPED + payload.status === TransactionStatus.REVERTED ? events.TRANSACTION_FAILED : events.TRANSACTION_DROPPED ) -track<FixRevertedTransactionAction>( - FIX_REVERTED_TRANSACTION, - events.TRANSACTION_FIXED -) +track<FixRevertedTransactionAction>(FIX_REVERTED_TRANSACTION, events.TRANSACTION_FIXED) -track<ReplaceTransactionSuccessAction>( - REPLACE_TRANSACTION_SUCCESS, - events.TRANSACTION_REPLACED -) +track<ReplaceTransactionSuccessAction>(REPLACE_TRANSACTION_SUCCESS, events.TRANSACTION_REPLACED) track<GrantTokenSuccessAction>(GRANT_TOKEN_SUCCESS, () => events.AUTHORIZE) @@ -217,26 +192,18 @@ track<PlaceBidSuccessAction>( }) ) -track<AcceptBidTransactionSubmittedAction>( - ACCEPT_BID_TRANSACTION_SUBMITTED, - events.ACCEPT_BID, - ({ payload }) => ({ - tokenId: payload.bid.tokenId, - bidId: payload.bid.id, - bidder: payload.bid.bidder, - seller: payload.bid.seller - }) -) +track<AcceptBidTransactionSubmittedAction>(ACCEPT_BID_TRANSACTION_SUBMITTED, events.ACCEPT_BID, ({ payload }) => ({ + tokenId: payload.bid.tokenId, + bidId: payload.bid.id, + bidder: payload.bid.bidder, + seller: payload.bid.seller +})) -track<CancelBidSuccessAction>( - CANCEL_BID_SUCCESS, - events.CANCEL_BID, - ({ payload }) => ({ - tokenId: payload.bid.tokenId, - bidId: payload.bid.id, - bidder: payload.bid.bidder - }) -) +track<CancelBidSuccessAction>(CANCEL_BID_SUCCESS, events.CANCEL_BID, ({ payload }) => ({ + tokenId: payload.bid.tokenId, + bidId: payload.bid.id, + bidder: payload.bid.bidder +})) track<ArchiveBidAction>(ARCHIVE_BID, events.ARCHIVE_BID, ({ payload }) => ({ tokenId: payload.bid.tokenId, @@ -244,123 +211,86 @@ track<ArchiveBidAction>(ARCHIVE_BID, events.ARCHIVE_BID, ({ payload }) => ({ price: payload.bid.price })) -track<UnarchiveBidAction>( - UNARCHIVE_BID, - events.UNARCHIVE_BID, - ({ payload }) => ({ - tokenId: payload.bid.tokenId, - bidId: payload.bid.id, - price: payload.bid.price - }) -) +track<UnarchiveBidAction>(UNARCHIVE_BID, events.UNARCHIVE_BID, ({ payload }) => ({ + tokenId: payload.bid.tokenId, + bidId: payload.bid.id, + price: payload.bid.price +})) -track<FetchNFTsSuccessAction>( - FETCH_NFTS_SUCCESS, - events.FETCH_NFTS, - ({ payload }) => ({ - ...payload.options.params, - view: payload.options.view, - vendor: payload.options.vendor, - count: payload.count - }) -) +track<FetchNFTsSuccessAction>(FETCH_NFTS_SUCCESS, events.FETCH_NFTS, ({ payload }) => ({ + ...payload.options.params, + view: payload.options.view, + vendor: payload.options.vendor, + count: payload.count +})) -track<FetchItemsSuccessAction>( - FETCH_ITEMS_SUCCESS, - events.FETCH_ITEMS, - ({ payload }) => ({ - options: payload.options, - total: payload.total - }) -) +track<FetchItemsSuccessAction>(FETCH_ITEMS_SUCCESS, events.FETCH_ITEMS, ({ payload }) => ({ + options: payload.options, + total: payload.total +})) -track<BuyItemSuccessAction>( - BUY_ITEM_SUCCESS, - events.BUY_ITEM, - ({ payload }) => ({ - itemId: payload.item.itemId, - contractAddress: payload.item.contractAddress, - rarity: payload.item.rarity, - network: payload.item.network, - chainId: payload.item.chainId, - price: Number(ethers.utils.formatEther(payload.item.price)), - data: payload.item.data, - txHash: payload.txHash, - fromChainId: payload.chainId - }) -) +track<BuyItemSuccessAction>(BUY_ITEM_SUCCESS, events.BUY_ITEM, ({ payload }) => ({ + itemId: payload.item.itemId, + contractAddress: payload.item.contractAddress, + rarity: payload.item.rarity, + network: payload.item.network, + chainId: payload.item.chainId, + price: Number(ethers.utils.formatEther(payload.item.price)), + data: payload.item.data, + txHash: payload.txHash, + fromChainId: payload.chainId +})) -track<BuyItemCrossChainSuccessAction>( - BUY_ITEM_CROSS_CHAIN_SUCCESS, - events.BUY_ITEM_CROSS_CHAIN, - ({ payload }) => { - const { - route: { route }, - item, - order, - txHash - } = payload - return { - fromAmount: ethers.utils.formatUnits( - route.estimate.fromAmount, - route.estimate.fromToken.decimals - ), - fromTokenName: route.estimate.fromToken.name, - fromToken: route.params.fromToken, - fromChain: route.params.fromChain, - itemId: item.itemId, - contractAddress: item.contractAddress, - rarity: item.rarity, - network: item.network, - chainId: item.chainId, - price: Number(ethers.utils.formatEther(order?.price ?? item.price)), - data: item.data, - txHash - } +track<BuyItemCrossChainSuccessAction>(BUY_ITEM_CROSS_CHAIN_SUCCESS, events.BUY_ITEM_CROSS_CHAIN, ({ payload }) => { + const { + route: { route }, + item, + order, + txHash + } = payload + return { + fromAmount: ethers.utils.formatUnits(route.estimate.fromAmount, route.estimate.fromToken.decimals), + fromTokenName: route.estimate.fromToken.name, + fromToken: route.params.fromToken, + fromChain: route.params.fromChain, + itemId: item.itemId, + contractAddress: item.contractAddress, + rarity: item.rarity, + network: item.network, + chainId: item.chainId, + price: Number(ethers.utils.formatEther(order?.price ?? item.price)), + data: item.data, + txHash } -) +}) -track<ClaimNameSuccessAction>( - CLAIM_NAME_SUCCESS, - events.BUY_NAME_SUCCESS, - ({ payload }) => ({ +track<ClaimNameSuccessAction>(CLAIM_NAME_SUCCESS, events.BUY_NAME_SUCCESS, ({ payload }) => ({ + name: payload.ens.name, + payment_method: 'crypto', + crossChain: false, + txHash: payload.txHash +})) + +track<SetProfileAvatarAliasSuccessAction>(SET_PROFILE_AVATAR_ALIAS_SUCCESS, events.SET_AVATAR_NAME, ({ payload }) => ({ + alias: payload.alias +})) + +track<ClaimNameCrossChainSuccessAction>(CLAIM_NAME_CROSS_CHAIN_SUCCESS, events.BUY_NAME_SUCCESS, ({ payload }) => { + return { name: payload.ens.name, payment_method: 'crypto', - crossChain: false, + crossChain: true, + fromTokenName: payload.route.route.estimate.fromToken.name, + fromToken: payload.route.route.params.fromToken, + fromChain: payload.route.route.params.fromChain, txHash: payload.txHash - }) -) - -track<SetProfileAvatarAliasSuccessAction>( - SET_PROFILE_AVATAR_ALIAS_SUCCESS, - events.SET_AVATAR_NAME, - ({ payload }) => ({ - alias: payload.alias - }) -) - -track<ClaimNameCrossChainSuccessAction>( - CLAIM_NAME_CROSS_CHAIN_SUCCESS, - events.BUY_NAME_SUCCESS, - ({ payload }) => { - return { - name: payload.ens.name, - payment_method: 'crypto', - crossChain: true, - fromTokenName: payload.route.route.estimate.fromToken.name, - fromToken: payload.route.route.params.fromToken, - fromChain: payload.route.route.params.fromChain, - txHash: payload.txHash - } } -) +}) track<BuyItemCrossChainFailureAction>( BUY_ITEM_CROSS_CHAIN_FAILURE, ({ payload }) => - isUserRejectedTransactionError(payload.error) - ? events.BUY_ITEM_CROSS_CHAIN_TRANSACTION_DENIED - : events.BUY_ITEM_CROSS_CHAIN_ERROR, + isUserRejectedTransactionError(payload.error) ? events.BUY_ITEM_CROSS_CHAIN_TRANSACTION_DENIED : events.BUY_ITEM_CROSS_CHAIN_ERROR, ({ payload }) => { const { route: { route }, @@ -368,10 +298,7 @@ track<BuyItemCrossChainFailureAction>( price } = payload return { - fromAmount: ethers.utils.formatUnits( - route.estimate.fromAmount, - route.estimate.fromToken.decimals - ), + fromAmount: ethers.utils.formatUnits(route.estimate.fromAmount, route.estimate.fromToken.decimals), gasCosts: route.estimate.gasCosts[0] ? ethers.utils.formatUnits( route.estimate.gasCosts.reduce((acc, gasCost) => { @@ -404,52 +331,36 @@ track<BuyItemCrossChainFailureAction>( } ) -track<BuyItemWithCardSuccessAction>( - BUY_ITEM_WITH_CARD_SUCCESS, - events.BUY_ITEM_WITH_CARD, - ({ payload }) => ({ - itemId: payload.item.itemId, - contractAddress: payload.item.contractAddress, - rarity: payload.item.rarity, - network: payload.item.network, - chainId: payload.item.chainId, - price: payload.purchase.nft.cryptoAmount, - data: payload.item.data, - purchase: payload.purchase, - txHash: payload.purchase.txHash - }) -) +track<BuyItemWithCardSuccessAction>(BUY_ITEM_WITH_CARD_SUCCESS, events.BUY_ITEM_WITH_CARD, ({ payload }) => ({ + itemId: payload.item.itemId, + contractAddress: payload.item.contractAddress, + rarity: payload.item.rarity, + network: payload.item.network, + chainId: payload.item.chainId, + price: payload.purchase.nft.cryptoAmount, + data: payload.item.data, + purchase: payload.purchase, + txHash: payload.purchase.txHash +})) -track<SetIsTryingOnAction>( - SET_IS_TRYING_ON, - events.TOGGLE_PREVIEW_MODE, - ({ payload }) => ({ - mode: payload.value ? 'avatar' : 'wearable' - }) -) +track<SetIsTryingOnAction>(SET_IS_TRYING_ON, events.TOGGLE_PREVIEW_MODE, ({ payload }) => ({ + mode: payload.value ? 'avatar' : 'wearable' +})) -track<UpsertRentalSuccessAction>( - UPSERT_RENTAL_SUCCESS, - events.UPSERT_LAND_RENTAL, - ({ payload: { nft, operationType, rental } }) => ({ - nftId: nft.id, - assetType: isParcel(nft) ? NFTCategory.PARCEL : NFTCategory.ESTATE, - rentalId: rental.id, - pricePerDay: rental.periods[0].pricePerDay, // we're accepting just one price per day for all periods - operation: operationType === UpsertRentalOptType.EDIT ? 'edit' : 'create', - periods: rental.periods.map(period => period.maxDays).join(','), // maxDays is going to tell the duration for now - experiesAt: rental.expiration - }) -) +track<UpsertRentalSuccessAction>(UPSERT_RENTAL_SUCCESS, events.UPSERT_LAND_RENTAL, ({ payload: { nft, operationType, rental } }) => ({ + nftId: nft.id, + assetType: isParcel(nft) ? NFTCategory.PARCEL : NFTCategory.ESTATE, + rentalId: rental.id, + pricePerDay: rental.periods[0].pricePerDay, // we're accepting just one price per day for all periods + operation: operationType === UpsertRentalOptType.EDIT ? 'edit' : 'create', + periods: rental.periods.map(period => period.maxDays).join(','), // maxDays is going to tell the duration for now + experiesAt: rental.expiration +})) -track<ClaimAssetSuccessAction>( - CLAIM_ASSET_SUCCESS, - events.CLAIM_LAND_RENTAL, - ({ payload: { nft, rental } }) => ({ - nftId: nft.id, - rentalId: rental.id - }) -) +track<ClaimAssetSuccessAction>(CLAIM_ASSET_SUCCESS, events.CLAIM_LAND_RENTAL, ({ payload: { nft, rental } }) => ({ + nftId: nft.id, + rentalId: rental.id +})) track<AcceptRentalListingSuccessAction>( ACCEPT_RENTAL_LISTING_SUCCESS, @@ -469,102 +380,62 @@ track<SetPurchaseAction>( action.payload.purchase.status === PurchaseStatus.CANCELLED ? events.PURCHASED_CANCELLED : action.payload.purchase.status === PurchaseStatus.COMPLETE - ? events.PURCHASED_COMPLETE - : action.payload.purchase.status === PurchaseStatus.REFUNDED - ? events.PURCHASED_REFUNDED - : action.payload.purchase.status === PurchaseStatus.FAILED - ? events.PURCHASED_FAILED - : events.PURCHASED_STARTED, + ? events.PURCHASED_COMPLETE + : action.payload.purchase.status === PurchaseStatus.REFUNDED + ? events.PURCHASED_REFUNDED + : action.payload.purchase.status === PurchaseStatus.FAILED + ? events.PURCHASED_FAILED + : events.PURCHASED_STARTED, action => action.payload.purchase ) -track<PickItemSuccessAction>( - PICK_ITEM_SUCCESS, - events.PICK_ITEM, - ({ payload: { item, listId } }) => ({ - item, - listId - }) -) +track<PickItemSuccessAction>(PICK_ITEM_SUCCESS, events.PICK_ITEM, ({ payload: { item, listId } }) => ({ + item, + listId +})) -track<PickItemFailureAction>( - PICK_ITEM_FAILURE, - events.PICK_ITEM, - ({ payload: { item, listId, error } }) => ({ - item, - listId, - error - }) -) +track<PickItemFailureAction>(PICK_ITEM_FAILURE, events.PICK_ITEM, ({ payload: { item, listId, error } }) => ({ + item, + listId, + error +})) -track<UnpickItemSuccessAction>( - UNPICK_ITEM_SUCCESS, - events.UNPICK_ITEM, - ({ payload: { item, listId } }) => ({ - item, - listId - }) -) +track<UnpickItemSuccessAction>(UNPICK_ITEM_SUCCESS, events.UNPICK_ITEM, ({ payload: { item, listId } }) => ({ + item, + listId +})) -track<UnpickItemFailureAction>( - UNPICK_ITEM_FAILURE, - events.UNPICK_ITEM, - ({ payload: { item, listId, error } }) => ({ - item, - listId, - error - }) -) +track<UnpickItemFailureAction>(UNPICK_ITEM_FAILURE, events.UNPICK_ITEM, ({ payload: { item, listId, error } }) => ({ + item, + listId, + error +})) -track<CreateListSuccessAction>( - CREATE_LIST_SUCCESS, - events.CREATE_LIST, - ({ payload: { list } }) => ({ - list - }) -) +track<CreateListSuccessAction>(CREATE_LIST_SUCCESS, events.CREATE_LIST, ({ payload: { list } }) => ({ + list +})) -track<CreateListFailureAction>( - CREATE_LIST_FAILURE, - events.CREATE_LIST, - ({ payload: { error } }) => ({ - error - }) -) +track<CreateListFailureAction>(CREATE_LIST_FAILURE, events.CREATE_LIST, ({ payload: { error } }) => ({ + error +})) -track<UpdateListSuccessAction>( - UPDATE_LIST_SUCCESS, - events.UPDATE_LIST, - ({ payload: { list } }) => ({ - list - }) -) +track<UpdateListSuccessAction>(UPDATE_LIST_SUCCESS, events.UPDATE_LIST, ({ payload: { list } }) => ({ + list +})) -track<UpdateListFailureAction>( - UPDATE_LIST_FAILURE, - events.UPDATE_LIST, - ({ payload: { id, error } }) => ({ - id, - error - }) -) +track<UpdateListFailureAction>(UPDATE_LIST_FAILURE, events.UPDATE_LIST, ({ payload: { id, error } }) => ({ + id, + error +})) -track<DeleteListSuccessAction>( - DELETE_LIST_SUCCESS, - events.DELETE_LIST, - ({ payload: { list } }) => ({ - list - }) -) +track<DeleteListSuccessAction>(DELETE_LIST_SUCCESS, events.DELETE_LIST, ({ payload: { list } }) => ({ + list +})) -track<DeleteListFailureAction>( - DELETE_LIST_FAILURE, - events.DELETE_LIST, - ({ payload: { list, error } }) => ({ - list, - error - }) -) +track<DeleteListFailureAction>(DELETE_LIST_FAILURE, events.DELETE_LIST, ({ payload: { list, error } }) => ({ + list, + error +})) track<FetchCreatorsAccountSuccessAction>( FETCH_CREATORS_ACCOUNT_SUCCESS, diff --git a/webapp/src/modules/analytics/types.ts b/webapp/src/modules/analytics/types.ts index b30584c99e..2ac1bfd36a 100644 --- a/webapp/src/modules/analytics/types.ts +++ b/webapp/src/modules/analytics/types.ts @@ -1,10 +1,4 @@ -import { - AnalyticsDayData, - Account, - Item, - Rarity, - WearableCategory -} from '@dcl/schemas' +import { AnalyticsDayData, Account, Item, Rarity, WearableCategory } from '@dcl/schemas' export type AnalyticsVolumeData = Pick<AnalyticsDayData, 'sales'> & { volume: number diff --git a/webapp/src/modules/asset/actions.spec.ts b/webapp/src/modules/asset/actions.spec.ts index 19c88e3698..52ddee5a49 100644 --- a/webapp/src/modules/asset/actions.spec.ts +++ b/webapp/src/modules/asset/actions.spec.ts @@ -39,9 +39,7 @@ describe('when creating the action to signal a success in the smart wearable req const requiredPermissions = ['aPermission'] it('should return an object representing the action', () => { - expect( - fetchSmartWearableRequiredPermissionsSuccess(asset, requiredPermissions) - ).toEqual({ + expect(fetchSmartWearableRequiredPermissionsSuccess(asset, requiredPermissions)).toEqual({ type: FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_SUCCESS, meta: undefined, payload: { asset, requiredPermissions } @@ -51,9 +49,7 @@ describe('when creating the action to signal a success in the smart wearable req describe('when creating the action to signal a failure smart wearable required permissions request', () => { it('should return an object representing the action', () => { - expect( - fetchSmartWearableRequiredPermissionsFailure(asset, anErrorMessage) - ).toEqual({ + expect(fetchSmartWearableRequiredPermissionsFailure(asset, anErrorMessage)).toEqual({ type: FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_FAILURE, meta: undefined, payload: { asset, error: anErrorMessage } diff --git a/webapp/src/modules/asset/actions.ts b/webapp/src/modules/asset/actions.ts index d0b0d08c21..8bc44c44de 100644 --- a/webapp/src/modules/asset/actions.ts +++ b/webapp/src/modules/asset/actions.ts @@ -2,71 +2,42 @@ import { action } from 'typesafe-actions' import { Asset } from './types' // Fetch Smart Wearable Required Permissions -export const FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST = - '[Request] Fetch Smart Wearable Required Permissions' -export const FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_SUCCESS = - '[Success] Fetch Smart Wearable Required Permissions' -export const FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_FAILURE = - '[Failure] Fetch Smart Wearable Required Permissions' +export const FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST = '[Request] Fetch Smart Wearable Required Permissions' +export const FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_SUCCESS = '[Success] Fetch Smart Wearable Required Permissions' +export const FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_FAILURE = '[Failure] Fetch Smart Wearable Required Permissions' export const fetchSmartWearableRequiredPermissionsRequest = (asset: Asset) => action(FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST, { asset }) -export const fetchSmartWearableRequiredPermissionsSuccess = ( - asset: Asset, - requiredPermissions: string[] -) => +export const fetchSmartWearableRequiredPermissionsSuccess = (asset: Asset, requiredPermissions: string[]) => action(FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_SUCCESS, { asset, requiredPermissions }) -export const fetchSmartWearableRequiredPermissionsFailure = ( - asset: Asset, - error: string -) => action(FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_FAILURE, { asset, error }) +export const fetchSmartWearableRequiredPermissionsFailure = (asset: Asset, error: string) => + action(FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_FAILURE, { asset, error }) -export type FetchSmartWearableRequiredPermissionsRequestAction = ReturnType< - typeof fetchSmartWearableRequiredPermissionsRequest -> -export type FetchSmartWearableRequiredPermissionsSuccessAction = ReturnType< - typeof fetchSmartWearableRequiredPermissionsSuccess -> -export type FetchSmartWearableRequiredPermissionsFailureAction = ReturnType< - typeof fetchSmartWearableRequiredPermissionsFailure -> +export type FetchSmartWearableRequiredPermissionsRequestAction = ReturnType<typeof fetchSmartWearableRequiredPermissionsRequest> +export type FetchSmartWearableRequiredPermissionsSuccessAction = ReturnType<typeof fetchSmartWearableRequiredPermissionsSuccess> +export type FetchSmartWearableRequiredPermissionsFailureAction = ReturnType<typeof fetchSmartWearableRequiredPermissionsFailure> // Fetch Video Hash -export const FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST = - '[Request] Fetch Smart Wearable Video Hash' -export const FETCH_SMART_WEARABLE_VIDEO_HASH_SUCCESS = - '[Success] Fetch Smart Wearable Video Hash' -export const FETCH_SMART_WEARABLE_VIDEO_HASH_FAILURE = - '[Failure] Fetch Smart Wearable Video Hash' +export const FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST = '[Request] Fetch Smart Wearable Video Hash' +export const FETCH_SMART_WEARABLE_VIDEO_HASH_SUCCESS = '[Success] Fetch Smart Wearable Video Hash' +export const FETCH_SMART_WEARABLE_VIDEO_HASH_FAILURE = '[Failure] Fetch Smart Wearable Video Hash' -export const fetchSmartWearableVideoHashRequest = (asset: Asset) => - action(FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST, { asset }) +export const fetchSmartWearableVideoHashRequest = (asset: Asset) => action(FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST, { asset }) -export const fetchSmartWearableVideoHashSuccess = ( - asset: Asset, - videoHash: string | undefined -) => +export const fetchSmartWearableVideoHashSuccess = (asset: Asset, videoHash: string | undefined) => action(FETCH_SMART_WEARABLE_VIDEO_HASH_SUCCESS, { asset, videoHash }) -export const fetchSmartWearableVideoHashFailure = ( - asset: Asset, - error: string -) => action(FETCH_SMART_WEARABLE_VIDEO_HASH_FAILURE, { asset, error }) +export const fetchSmartWearableVideoHashFailure = (asset: Asset, error: string) => + action(FETCH_SMART_WEARABLE_VIDEO_HASH_FAILURE, { asset, error }) -export type FetchSmartWearableVideoHashRequestAction = ReturnType< - typeof fetchSmartWearableVideoHashRequest -> -export type FetchSmartWearableVideoHashSuccessAction = ReturnType< - typeof fetchSmartWearableVideoHashSuccess -> -export type FetchSmartWearableVideoHashFailureAction = ReturnType< - typeof fetchSmartWearableVideoHashFailure -> +export type FetchSmartWearableVideoHashRequestAction = ReturnType<typeof fetchSmartWearableVideoHashRequest> +export type FetchSmartWearableVideoHashSuccessAction = ReturnType<typeof fetchSmartWearableVideoHashSuccess> +export type FetchSmartWearableVideoHashFailureAction = ReturnType<typeof fetchSmartWearableVideoHashFailure> diff --git a/webapp/src/modules/asset/reducer.spec.ts b/webapp/src/modules/asset/reducer.spec.ts index b7c562729d..8711d73ca2 100644 --- a/webapp/src/modules/asset/reducer.spec.ts +++ b/webapp/src/modules/asset/reducer.spec.ts @@ -31,10 +31,7 @@ const notSmartWearableAsset = { const anErrorMessage = 'An error' -const requestActions = [ - fetchSmartWearableRequiredPermissionsRequest(asset), - fetchSmartWearableRequiredPermissionsRequest(asset) -] +const requestActions = [fetchSmartWearableRequiredPermissionsRequest(asset), fetchSmartWearableRequiredPermissionsRequest(asset)] requestActions.forEach(action => { describe(`when reducing the "${action.type}" action`, () => { @@ -117,21 +114,18 @@ describe.each([ fetchSmartWearableVideoHashSuccess(asset, 'videoHash'), { videoHash: 'videoHash' } ] -])( - 'when reducing the %s action', - (_action, requestAction, successAction, expectedData) => { - const initialState = { - ...INITIAL_STATE, - data: { anotherId: { requiredPermissions: [] } }, - loading: loadingReducer([], requestAction) - } +])('when reducing the %s action', (_action, requestAction, successAction, expectedData) => { + const initialState = { + ...INITIAL_STATE, + data: { anotherId: { requiredPermissions: [] } }, + loading: loadingReducer([], requestAction) + } - it('should return a state with the the loaded items with the fetched item and the loading state cleared', () => { - expect(assetReducer(initialState, successAction)).toEqual({ - ...INITIAL_STATE, - loading: [], - data: { ...initialState.data, [asset.id]: expectedData } - }) + it('should return a state with the the loaded items with the fetched item and the loading state cleared', () => { + expect(assetReducer(initialState, successAction)).toEqual({ + ...INITIAL_STATE, + loading: [], + data: { ...initialState.data, [asset.id]: expectedData } }) - } -) + }) +}) diff --git a/webapp/src/modules/asset/reducer.ts b/webapp/src/modules/asset/reducer.ts index dd6622df07..c6c74bcca0 100644 --- a/webapp/src/modules/asset/reducer.ts +++ b/webapp/src/modules/asset/reducer.ts @@ -1,7 +1,4 @@ -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchSmartWearableRequiredPermissionsFailureAction, FetchSmartWearableRequiredPermissionsRequestAction, @@ -38,10 +35,7 @@ type AssetReducerAction = | FetchSmartWearableRequiredPermissionsSuccessAction | FetchSmartWearableVideoHashSuccessAction -export function assetReducer( - state = INITIAL_STATE, - action: AssetReducerAction -): AssetState { +export function assetReducer(state = INITIAL_STATE, action: AssetReducerAction): AssetState { switch (action.type) { case FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST: case FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST: { diff --git a/webapp/src/modules/asset/sagas.spec.ts b/webapp/src/modules/asset/sagas.spec.ts index c07df5c8cd..bf899d63a0 100644 --- a/webapp/src/modules/asset/sagas.spec.ts +++ b/webapp/src/modules/asset/sagas.spec.ts @@ -3,10 +3,7 @@ import { expectSaga } from 'redux-saga-test-plan' import { call, select } from 'redux-saga/effects' import { Network } from '@dcl/schemas' import { setPurchase } from 'decentraland-dapps/dist/modules/gateway/actions' -import { - NFTPurchase, - PurchaseStatus -} from 'decentraland-dapps/dist/modules/gateway/types' +import { NFTPurchase, PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' import { TradeType } from 'decentraland-dapps/dist/modules/gateway/transak/types' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { NetworkGatewayType } from 'decentraland-ui' @@ -24,10 +21,7 @@ import { fetchSmartWearableVideoHashRequest, fetchSmartWearableVideoHashSuccess } from './actions' -import { - getSmartWearableRequiredPermissions, - getSmartWearableVideoShowcase -} from '../../lib/asset' +import { getSmartWearableRequiredPermissions, getSmartWearableVideoShowcase } from '../../lib/asset' import util from 'util' util.inspect.defaultOptions.depth = null @@ -37,13 +31,7 @@ const mockTokenId = 'aTokenId' const mockTradeType = TradeType.PRIMARY const mockPathname = (assetType: AssetType = AssetType.ITEM) => - new URL( - `${window.origin}${locations.buyWithCard( - assetType, - mockContractAddress, - mockTokenId - )}` - ).pathname + new URL(`${window.origin}${locations.buyWithCard(assetType, mockContractAddress, mockTokenId)}`).pathname const mockNFTPurchase: NFTPurchase = { address: '0x9c76ae45c36a4da3801a5ba387bbfa3c073ecae2', @@ -76,15 +64,7 @@ describe('when handling the set purchase action', () => { } ] ]) - .put( - push( - locations.buyStatusPage( - AssetType.ITEM, - mockContractAddress, - mockTokenId - ) - ) - ) + .put(push(locations.buyStatusPage(AssetType.ITEM, mockContractAddress, mockTokenId))) .dispatch(setPurchase(mockNFTPurchase)) .run({ silenceTimeout: true }) }) @@ -97,23 +77,11 @@ describe('when handling the set purchase action', () => { [ select(getLocation), { - pathname: locations.buyStatusPage( - AssetType.ITEM, - mockContractAddress, - mockTokenId - ) + pathname: locations.buyStatusPage(AssetType.ITEM, mockContractAddress, mockTokenId) } ] ]) - .put( - push( - locations.buyStatusPage( - AssetType.ITEM, - mockContractAddress, - mockTokenId - ) - ) - ) + .put(push(locations.buyStatusPage(AssetType.ITEM, mockContractAddress, mockTokenId))) .dispatch(setPurchase(mockNFTPurchase)) .run({ silenceTimeout: true }) }) @@ -158,11 +126,7 @@ describe('when handling the set purchase action', () => { }) }) - describe.each([ - PurchaseStatus.FAILED, - PurchaseStatus.CANCELLED, - PurchaseStatus.REFUNDED - ])( + describe.each([PurchaseStatus.FAILED, PurchaseStatus.CANCELLED, PurchaseStatus.REFUNDED])( 'when the purchase of an item has a status %s', (status: PurchaseStatus) => { it('should dispatch an action signaling the failure of the item', () => { @@ -176,72 +140,53 @@ describe('when handling the set purchase action', () => { ] ]) .put(buyItemWithCardFailure(t('global.unknown_error'))) - .put( - push( - locations.buyWithCard( - AssetType.ITEM, - mockContractAddress, - mockTokenId - ) - ) - ) + .put(push(locations.buyWithCard(AssetType.ITEM, mockContractAddress, mockTokenId))) .dispatch(setPurchase({ ...mockNFTPurchase, status })) .run({ silenceTimeout: true }) }) } ) - describe.each(failStatuses)( - 'when the purchase of an nft has a status %s', - status => { - it('should dispatch an action signaling the failure of the nft', () => { - return expectSaga(assetSaga) - .provide([ - [ - select(getLocation), - { - pathname: mockPathname(AssetType.NFT) - } - ] - ]) - .put(executeOrderWithCardFailure(t('global.unknown_error'))) - .put( - push( - locations.buyWithCard( - AssetType.NFT, - mockContractAddress, - mockTokenId - ) - ) - ) - .dispatch( - setPurchase({ - ...mockNFTPurchase, - status, - nft: { - ...mockNFTPurchase.nft, - tokenId: mockTokenId, - itemId: undefined, - tradeType: TradeType.SECONDARY - } - }) - ) - .run({ silenceTimeout: true }) - }) - } - ) + describe.each(failStatuses)('when the purchase of an nft has a status %s', status => { + it('should dispatch an action signaling the failure of the nft', () => { + return expectSaga(assetSaga) + .provide([ + [ + select(getLocation), + { + pathname: mockPathname(AssetType.NFT) + } + ] + ]) + .put(executeOrderWithCardFailure(t('global.unknown_error'))) + .put(push(locations.buyWithCard(AssetType.NFT, mockContractAddress, mockTokenId))) + .dispatch( + setPurchase({ + ...mockNFTPurchase, + status, + nft: { + ...mockNFTPurchase.nft, + tokenId: mockTokenId, + itemId: undefined, + tradeType: TradeType.SECONDARY + } + }) + ) + .run({ silenceTimeout: true }) + }) + }) }) describe('when handling the fetch smart wearable required permissions request action', () => { let asset: Asset beforeEach(() => { - asset = ({ + asset = { id: 'anId', name: 'aName', description: 'aDescription', data: {} - } as unknown) as Asset + } as unknown as Asset }) describe('when the asset is not smart wearable', () => { @@ -291,15 +236,8 @@ describe('when handling the fetch smart wearable required permissions request ac const anErrorMessage = 'An error' it('should dispatch an action signaling the failure of the request', () => { return expectSaga(assetSaga) - .provide([ - [ - call(getSmartWearableRequiredPermissions, urn), - Promise.reject(new Error(anErrorMessage)) - ] - ]) - .put( - fetchSmartWearableRequiredPermissionsFailure(asset, anErrorMessage) - ) + .provide([[call(getSmartWearableRequiredPermissions, urn), Promise.reject(new Error(anErrorMessage))]]) + .put(fetchSmartWearableRequiredPermissionsFailure(asset, anErrorMessage)) .dispatch(fetchSmartWearableRequiredPermissionsRequest(asset)) .run({ silenceTimeout: true }) }) @@ -321,12 +259,12 @@ describe('when handling the fetch smart wearable video hash request action', () let asset: Asset beforeEach(() => { - asset = ({ + asset = { id: 'anId', name: 'aName', description: 'aDescription', data: {} - } as unknown) as Asset + } as unknown as Asset }) describe('when the asset is not smart wearable', () => { @@ -376,12 +314,7 @@ describe('when handling the fetch smart wearable video hash request action', () const anErrorMessage = 'An error' it('should dispatch an action signaling the failure of the request', () => { return expectSaga(assetSaga) - .provide([ - [ - call(getSmartWearableVideoShowcase, asset), - Promise.reject(new Error(anErrorMessage)) - ] - ]) + .provide([[call(getSmartWearableVideoShowcase, asset), Promise.reject(new Error(anErrorMessage))]]) .put(fetchSmartWearableVideoHashFailure(asset, anErrorMessage)) .dispatch(fetchSmartWearableVideoHashRequest(asset)) .run({ silenceTimeout: true }) diff --git a/webapp/src/modules/asset/sagas.ts b/webapp/src/modules/asset/sagas.ts index 17ef71ed2f..2c2808e3dc 100644 --- a/webapp/src/modules/asset/sagas.ts +++ b/webapp/src/modules/asset/sagas.ts @@ -1,9 +1,6 @@ import { getLocation, push } from 'connected-react-router' import { call, put, select, takeEvery } from 'redux-saga/effects' -import { - SetPurchaseAction, - SET_PURCHASE -} from 'decentraland-dapps/dist/modules/gateway/actions' +import { SetPurchaseAction, SET_PURCHASE } from 'decentraland-dapps/dist/modules/gateway/actions' import { TradeType } from 'decentraland-dapps/dist/modules/gateway/transak/types' import { isNFTPurchase } from 'decentraland-dapps/dist/modules/gateway/utils' import { PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' @@ -12,10 +9,7 @@ import { locations } from '../routing/locations' import { buyItemWithCardFailure } from '../item/actions' import { executeOrderWithCardFailure } from '../order/actions' import { AssetType } from './types' -import { - getSmartWearableRequiredPermissions, - getSmartWearableVideoShowcase -} from '../../lib/asset' +import { getSmartWearableRequiredPermissions, getSmartWearableVideoShowcase } from '../../lib/asset' import { isErrorWithMessage } from '../../lib/error' import { FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST, @@ -28,63 +22,33 @@ import { fetchSmartWearableVideoHashSuccess } from './actions' -export const failStatuses = [ - PurchaseStatus.CANCELLED, - PurchaseStatus.FAILED, - PurchaseStatus.REFUNDED -] +export const failStatuses = [PurchaseStatus.CANCELLED, PurchaseStatus.FAILED, PurchaseStatus.REFUNDED] export function* assetSaga() { yield takeEvery(SET_PURCHASE, handleSetAssetPurchaseWithCard) - yield takeEvery( - FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST, - handleFetchSmartWearableRequiredPermissionsRequest - ) - yield takeEvery( - FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST, - handleFetchSmartWearableVideoHashRequest - ) + yield takeEvery(FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST, handleFetchSmartWearableRequiredPermissionsRequest) + yield takeEvery(FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST, handleFetchSmartWearableVideoHashRequest) } function* handleSetAssetPurchaseWithCard(action: SetPurchaseAction) { const { purchase } = action.payload if (isNFTPurchase(purchase)) { const { nft, status } = purchase - const { pathname }: ReturnType<typeof getLocation> = yield select( - getLocation - ) + const { pathname }: ReturnType<typeof getLocation> = yield select(getLocation) const { tradeType, contractAddress, tokenId, itemId } = nft - const assetType: AssetType = - tradeType === TradeType.PRIMARY ? AssetType.ITEM : AssetType.NFT + const assetType: AssetType = tradeType === TradeType.PRIMARY ? AssetType.ITEM : AssetType.NFT const assetId = tradeType === TradeType.PRIMARY ? itemId : tokenId - const buyWithCardPathname = locations.buyWithCard( - assetType, - contractAddress, - assetId - ) - const statusPagePathname = locations.buyStatusPage( - assetType, - contractAddress, - assetId - ) - const shouldRedirect = [ - new URL(`${window.origin}${buyWithCardPathname}`).pathname, - statusPagePathname - ].includes(pathname) - - if ( - shouldRedirect && - [PurchaseStatus.PENDING, PurchaseStatus.COMPLETE].includes(status) - ) { + const buyWithCardPathname = locations.buyWithCard(assetType, contractAddress, assetId) + const statusPagePathname = locations.buyStatusPage(assetType, contractAddress, assetId) + const shouldRedirect = [new URL(`${window.origin}${buyWithCardPathname}`).pathname, statusPagePathname].includes(pathname) + + if (shouldRedirect && [PurchaseStatus.PENDING, PurchaseStatus.COMPLETE].includes(status)) { yield put(push(statusPagePathname)) } if (failStatuses.includes(status)) { - const failureAction = - assetType === AssetType.NFT - ? executeOrderWithCardFailure - : buyItemWithCardFailure + const failureAction = assetType === AssetType.NFT ? executeOrderWithCardFailure : buyItemWithCardFailure if (shouldRedirect) yield put(push(buyWithCardPathname)) @@ -94,9 +58,7 @@ function* handleSetAssetPurchaseWithCard(action: SetPurchaseAction) { } } -function* handleFetchSmartWearableRequiredPermissionsRequest( - action: FetchSmartWearableRequiredPermissionsRequestAction -) { +function* handleFetchSmartWearableRequiredPermissionsRequest(action: FetchSmartWearableRequiredPermissionsRequestAction) { const { asset } = action.payload let requiredPermissions: string[] = [] @@ -110,22 +72,13 @@ function* handleFetchSmartWearableRequiredPermissionsRequest( requiredPermissions = yield call(getSmartWearableRequiredPermissions, urn) } - yield put( - fetchSmartWearableRequiredPermissionsSuccess(asset, requiredPermissions) - ) + yield put(fetchSmartWearableRequiredPermissionsSuccess(asset, requiredPermissions)) } catch (error) { - yield put( - fetchSmartWearableRequiredPermissionsFailure( - asset, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchSmartWearableRequiredPermissionsFailure(asset, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } -function* handleFetchSmartWearableVideoHashRequest( - action: FetchSmartWearableVideoHashRequestAction -) { +function* handleFetchSmartWearableVideoHashRequest(action: FetchSmartWearableVideoHashRequestAction) { const { asset } = action.payload let videoHash: string | undefined @@ -141,11 +94,6 @@ function* handleFetchSmartWearableVideoHashRequest( yield put(fetchSmartWearableVideoHashSuccess(asset, videoHash)) } catch (error) { - yield put( - fetchSmartWearableVideoHashFailure( - asset, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchSmartWearableVideoHashFailure(asset, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } diff --git a/webapp/src/modules/asset/selectors.spec.ts b/webapp/src/modules/asset/selectors.spec.ts index 796e199d06..a502cf5f14 100644 --- a/webapp/src/modules/asset/selectors.spec.ts +++ b/webapp/src/modules/asset/selectors.spec.ts @@ -1,8 +1,5 @@ import { RootState } from '../reducer' -import { - fetchSmartWearableRequiredPermissionsRequest, - fetchSmartWearableVideoHashRequest -} from './actions' +import { fetchSmartWearableRequiredPermissionsRequest, fetchSmartWearableVideoHashRequest } from './actions' import { INITIAL_STATE } from './reducer' import { getAssetData, @@ -117,9 +114,7 @@ describe('when getting if the required permissions are being fetched', () => { describe('and it is being fetched', () => { beforeEach(() => { - state.asset.loading.push( - fetchSmartWearableRequiredPermissionsRequest({ id } as Asset) - ) + state.asset.loading.push(fetchSmartWearableRequiredPermissionsRequest({ id } as Asset)) }) it('should return true', () => { @@ -162,9 +157,7 @@ describe('when getting if the video hash is being fetched', () => { describe('and it is being fetched', () => { beforeEach(() => { - state.asset.loading.push( - fetchSmartWearableVideoHashRequest({ id } as Asset) - ) + state.asset.loading.push(fetchSmartWearableVideoHashRequest({ id } as Asset)) }) it('should return true', () => { @@ -196,9 +189,7 @@ describe('when getting the required permissions of an asset', () => { }) it('should return the them ', () => { - expect(getRequiredPermissions(state, id)).toEqual( - state.asset.data[id].requiredPermissions - ) + expect(getRequiredPermissions(state, id)).toEqual(state.asset.data[id].requiredPermissions) }) }) }) diff --git a/webapp/src/modules/asset/selectors.ts b/webapp/src/modules/asset/selectors.ts index 6726cc91be..675705c2d2 100644 --- a/webapp/src/modules/asset/selectors.ts +++ b/webapp/src/modules/asset/selectors.ts @@ -1,32 +1,19 @@ import { RootState } from '../reducer' -import { - FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST, - FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST -} from './actions' +import { FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST, FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST } from './actions' export const getState = (state: RootState) => state.asset export const getData = (state: RootState) => getState(state).data export const getError = (state: RootState) => getState(state).error export const getLoading = (state: RootState) => getState(state).loading -export const getAssetData = (state: RootState, id: string) => - getData(state)[id] || {} +export const getAssetData = (state: RootState, id: string) => getData(state)[id] || {} export const isFetchingRequiredPermissions = (state: RootState, id: string) => - getLoading(state).find( - action => - action.type === FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST && - action.payload.asset.id === id - ) !== undefined + getLoading(state).find(action => action.type === FETCH_SMART_WEARABLE_REQUIRED_PERMISSIONS_REQUEST && action.payload.asset.id === id) !== + undefined export const isFetchingVideoHash = (state: RootState, id: string) => - getLoading(state).find( - action => - action.type === FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST && - action.payload.asset.id === id - ) !== undefined + getLoading(state).find(action => action.type === FETCH_SMART_WEARABLE_VIDEO_HASH_REQUEST && action.payload.asset.id === id) !== undefined -export const getRequiredPermissions = (state: RootState, id: string) => - getAssetData(state, id)?.requiredPermissions || [] +export const getRequiredPermissions = (state: RootState, id: string) => getAssetData(state, id)?.requiredPermissions || [] -export const getVideoHash = (state: RootState, id: string) => - getAssetData(state, id)?.videoHash || undefined +export const getVideoHash = (state: RootState, id: string) => getAssetData(state, id)?.videoHash || undefined diff --git a/webapp/src/modules/asset/types.ts b/webapp/src/modules/asset/types.ts index 178f7c6321..e7c58e16c8 100644 --- a/webapp/src/modules/asset/types.ts +++ b/webapp/src/modules/asset/types.ts @@ -6,11 +6,7 @@ export enum AssetType { NFT = 'nft' } -export type Asset<T extends AssetType = AssetType> = T extends AssetType.NFT - ? NFT - : T extends AssetType.ITEM - ? Item - : NFT | Item +export type Asset<T extends AssetType = AssetType> = T extends AssetType.NFT ? NFT : T extends AssetType.ITEM ? Item : NFT | Item export type AssetData = Record< string, diff --git a/webapp/src/modules/asset/utils.spec.ts b/webapp/src/modules/asset/utils.spec.ts index f62e80001d..eea340ff3a 100644 --- a/webapp/src/modules/asset/utils.spec.ts +++ b/webapp/src/modules/asset/utils.spec.ts @@ -1,9 +1,5 @@ import { Item, RentalListing, RentalStatus } from '@dcl/schemas' -import { - ContractData, - ContractName, - getContract -} from 'decentraland-transactions' +import { ContractData, ContractName, getContract } from 'decentraland-transactions' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { NFT } from '../nft/types' import { locations } from '../routing/locations' @@ -29,17 +25,13 @@ describe("when getting the asset's url", () => { describe('and the user is a manager of the asset', () => { it('should return the location path of the management page', () => { - expect(getAssetUrl(asset, true)).toEqual( - locations.manage(asset.contractAddress, (asset as NFT).tokenId) - ) + expect(getAssetUrl(asset, true)).toEqual(locations.manage(asset.contractAddress, (asset as NFT).tokenId)) }) }) describe('and the user is not a manager of the asset', () => { it("should return the location path of the token's page", () => { - expect(getAssetUrl(asset, false)).toEqual( - locations.nft(asset.contractAddress, (asset as NFT).tokenId) - ) + expect(getAssetUrl(asset, false)).toEqual(locations.nft(asset.contractAddress, (asset as NFT).tokenId)) }) }) }) @@ -51,17 +43,13 @@ describe("when getting the asset's url", () => { describe('and the user is a manager of the asset', () => { it("should return the location path of the item's page", () => { - expect(getAssetUrl(asset, true)).toEqual( - locations.item(asset.contractAddress, (asset as Item).itemId) - ) + expect(getAssetUrl(asset, true)).toEqual(locations.item(asset.contractAddress, (asset as Item).itemId)) }) }) describe('and the user is not a manager of the asset', () => { it("should return the location path of the item's page", () => { - expect(getAssetUrl(asset, false)).toEqual( - locations.item(asset.contractAddress, (asset as Item).itemId) - ) + expect(getAssetUrl(asset, false)).toEqual(locations.item(asset.contractAddress, (asset as Item).itemId)) }) }) }) @@ -142,10 +130,7 @@ describe('when getting the asset owner', () => { } as RentalListing }) describe('and the logged user is the rental lessor the asset is in the rentals contract', () => { - const rentalsContract: ContractData = getContract( - ContractName.Rentals, - 1 - ) + const rentalsContract: ContractData = getContract(ContractName.Rentals, 1) beforeEach(() => { asset = { openRentalId: null, @@ -235,10 +220,7 @@ describe('when getting the asset owner', () => { }) describe('and the logged user is not the asset owner since it is still in the rentals contract because it hasnt been claimed yet', () => { - const rentalsContract: ContractData = getContract( - ContractName.Rentals, - 1 - ) + const rentalsContract: ContractData = getContract(ContractName.Rentals, 1) beforeEach(() => { asset = { openRentalId: null, @@ -262,9 +244,7 @@ describe('when mapping the asset', () => { let asset: Asset | null let itemMappers: { [key in 'wearable' | 'emote']: (...args: any[]) => void } let nftMappers: { - [key in 'wearable' | 'emote' | 'parcel' | 'estate' | 'ens']: ( - ...args: any[] - ) => void + [key in 'wearable' | 'emote' | 'parcel' | 'estate' | 'ens']: (...args: any[]) => void } let fallback: (...args: any) => void @@ -300,9 +280,7 @@ describe('when mapping the asset', () => { asset = { data: {}, tokenId: 'tokenId' } as NFT }) - describe.each(['wearable', 'emote', 'parcel', 'estate', 'ens'] as Array< - keyof typeof nftMappers - >)('and is a %s', category => { + describe.each(['wearable', 'emote', 'parcel', 'estate', 'ens'] as Array<keyof typeof nftMappers>)('and is a %s', category => { beforeEach(() => { asset = { ...asset, data: { [category]: {} } } as NFT }) @@ -319,18 +297,15 @@ describe('when mapping the asset', () => { asset = { data: {}, itemId: 'itemId' } as Item }) - describe.each(['wearable', 'emote'] as Array<keyof typeof itemMappers>)( - 'and is a %s', - category => { - beforeEach(() => { - asset = { ...asset, data: { [category]: {} } } as Item - }) + describe.each(['wearable', 'emote'] as Array<keyof typeof itemMappers>)('and is a %s', category => { + beforeEach(() => { + asset = { ...asset, data: { [category]: {} } } as Item + }) - it(`should return the result of calling the ${category} mapper`, () => { - mapAsset(asset, itemMappers, nftMappers, fallback) - expect(itemMappers[category]).toHaveBeenCalled() - }) - } - ) + it(`should return the result of calling the ${category} mapper`, () => { + mapAsset(asset, itemMappers, nftMappers, fallback) + expect(itemMappers[category]).toHaveBeenCalled() + }) + }) }) }) diff --git a/webapp/src/modules/asset/utils.ts b/webapp/src/modules/asset/utils.ts index 20107fcef5..1f78ce1c5c 100644 --- a/webapp/src/modules/asset/utils.ts +++ b/webapp/src/modules/asset/utils.ts @@ -3,24 +3,15 @@ import { NFTCategory, Order, RentalListing } from '@dcl/schemas' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { SET_PURCHASE } from 'decentraland-dapps/dist/modules/gateway/actions' -import { - ContractData, - ContractName, - getContract -} from 'decentraland-transactions' -import { - CloseModalAction, - CLOSE_MODAL, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' +import { ContractData, ContractName, getContract } from 'decentraland-transactions' +import { CloseModalAction, CLOSE_MODAL, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { NFT } from '../nft/types' import { locations } from '../routing/locations' import { addressEquals } from '../wallet/utils' import { openTransak } from '../transak/actions' import { Asset, AssetType } from './types' -export const BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY = - 'buy-nfts-with-card-explanation-popup-key' +export const BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY = 'buy-nfts-with-card-explanation-popup-key' export function getAssetName(asset: Asset) { if (asset.name) { @@ -72,20 +63,10 @@ export function getAssetUrl(asset: Asset, isManager?: boolean) { } export function getAssetPrice(asset: Asset, order?: Order) { - return 'price' in asset - ? asset.isOnSale - ? asset.price - : null - : order - ? order.price - : null + return 'price' in asset ? (asset.isOnSale ? asset.price : null) : order ? order.price : null } -export function isOwnedBy( - asset: Asset, - wallet: Wallet | null, - rental?: RentalListing -) { +export function isOwnedBy(asset: Asset, wallet: Wallet | null, rental?: RentalListing) { const assetAddress = 'owner' in asset ? asset.owner : asset.creator const isLoggedUserTheOwner = addressEquals(wallet?.address, assetAddress) // this also covers the case of the rental being OPEN, since the asset owner will be the @@ -95,12 +76,8 @@ export function isOwnedBy( // If the asset was transfered with an open listing, it will be change to CANCELLED // but rental lessor will still be the past owner. - const rentalsContract: ContractData = getContract( - ContractName.Rentals, - (asset as NFT).chainId - ) - const rentalContractHasTheAsset = - rentalsContract.address === (asset as NFT).owner + const rentalsContract: ContractData = getContract(ContractName.Rentals, (asset as NFT).chainId) + const rentalContractHasTheAsset = rentalsContract.address === (asset as NFT).owner if (rental && rentalContractHasTheAsset) { // if the asset is not in the rental contracts, it has been transfered and should not have owner permissions return addressEquals(wallet?.address, rental?.lessor ?? undefined) @@ -118,18 +95,12 @@ export function isCatalogItem(asset: Asset): boolean { } export function isWearableOrEmote(asset: Asset): boolean { - const categories: Array<typeof asset.category> = [ - NFTCategory.WEARABLE, - NFTCategory.EMOTE - ] + const categories: Array<typeof asset.category> = [NFTCategory.WEARABLE, NFTCategory.EMOTE] return categories.includes(asset.category) } export function* buyAssetWithCard(asset: Asset) { - const buyNftsWithCardExplanationPopupKey: string | null = yield call( - [localStorage, 'getItem'], - BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY - ) + const buyNftsWithCardExplanationPopupKey: string | null = yield call([localStorage, 'getItem'], BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY) if (buyNftsWithCardExplanationPopupKey === 'true') { yield put(openTransak(asset)) @@ -147,11 +118,7 @@ export function* buyAssetWithCard(asset: Asset) { return } - yield call( - [localStorage, 'setItem'], - BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY, - 'true' - ) + yield call([localStorage, 'setItem'], BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY, 'true') } export function mapAsset<T>( diff --git a/webapp/src/modules/bid/actions.ts b/webapp/src/modules/bid/actions.ts index 15e508af49..3f1dc402c5 100644 --- a/webapp/src/modules/bid/actions.ts +++ b/webapp/src/modules/bid/actions.ts @@ -9,12 +9,8 @@ export const PLACE_BID_REQUEST = '[Request] Place Bid' export const PLACE_BID_SUCCESS = '[Success] Place Bid' export const PLACE_BID_FAILURE = '[Failure] Place Bid' -export const placeBidRequest = ( - nft: NFT, - price: number, - expiresAt: number, - fingerprint?: string -) => action(PLACE_BID_REQUEST, { nft, price, expiresAt, fingerprint }) +export const placeBidRequest = (nft: NFT, price: number, expiresAt: number, fingerprint?: string) => + action(PLACE_BID_REQUEST, { nft, price, expiresAt, fingerprint }) export const placeBidSuccess = ( nft: NFT, price: number, @@ -36,13 +32,7 @@ export const placeBidSuccess = ( price }) }) -export const placeBidFailure = ( - nft: NFT, - price: number, - expiresAt: number, - error: string, - fingerprint?: string -) => +export const placeBidFailure = (nft: NFT, price: number, expiresAt: number, error: string, fingerprint?: string) => action(PLACE_BID_FAILURE, { nft, price, @@ -69,17 +59,14 @@ export type UnarchiveBidAction = ReturnType<typeof unarchiveBid> export const ACCEPT_BID_REQUEST = '[Request] Accept Bid' export const ACCEPT_BID_SUCCESS = '[Success] Accept Bid' export const ACCEPT_BID_FAILURE = '[Failure] Accept Bid' -export const ACCEPT_BID_TRANSACTION_SUBMITTED = - '[Submitted transaction] Accept Bid' +export const ACCEPT_BID_TRANSACTION_SUBMITTED = '[Submitted transaction] Accept Bid' -export const acceptBidRequest = (bid: Bid) => - action(ACCEPT_BID_REQUEST, { bid }) +export const acceptBidRequest = (bid: Bid) => action(ACCEPT_BID_REQUEST, { bid }) export const acceptBidSuccess = (bid: Bid) => action(ACCEPT_BID_SUCCESS, { bid }) -export const acceptBidFailure = (bid: Bid, error: string) => - action(ACCEPT_BID_FAILURE, { bid, error }) +export const acceptBidFailure = (bid: Bid, error: string) => action(ACCEPT_BID_FAILURE, { bid, error }) export const acceptBidtransactionSubmitted = (bid: Bid, txHash: string) => action(ACCEPT_BID_TRANSACTION_SUBMITTED, { @@ -94,17 +81,14 @@ export const acceptBidtransactionSubmitted = (bid: Bid, txHash: string) => export type AcceptBidRequestAction = ReturnType<typeof acceptBidRequest> export type AcceptBidSuccessAction = ReturnType<typeof acceptBidSuccess> export type AcceptBidFailureAction = ReturnType<typeof acceptBidFailure> -export type AcceptBidTransactionSubmittedAction = ReturnType< - typeof acceptBidtransactionSubmitted -> +export type AcceptBidTransactionSubmittedAction = ReturnType<typeof acceptBidtransactionSubmitted> // Cancel Bid export const CANCEL_BID_REQUEST = '[Request] Cancel Bid' export const CANCEL_BID_SUCCESS = '[Success] Cancel Bid' export const CANCEL_BID_FAILURE = '[Failure] Cancel Bid' -export const cancelBidRequest = (bid: Bid) => - action(CANCEL_BID_REQUEST, { bid }) +export const cancelBidRequest = (bid: Bid) => action(CANCEL_BID_REQUEST, { bid }) export const cancelBidSuccess = (bid: Bid, txHash: string) => action(CANCEL_BID_SUCCESS, { bid, @@ -114,8 +98,7 @@ export const cancelBidSuccess = (bid: Bid, txHash: string) => price: formatWeiMANA(bid.price) }) }) -export const cancelBidFailure = (bid: Bid, error: string) => - action(CANCEL_BID_FAILURE, { bid, error }) +export const cancelBidFailure = (bid: Bid, error: string) => action(CANCEL_BID_FAILURE, { bid, error }) export type CancelBidRequestAction = ReturnType<typeof cancelBidRequest> export type CancelBidSuccessAction = ReturnType<typeof cancelBidSuccess> @@ -126,51 +109,31 @@ export const FETCH_BIDS_BY_ADDRESS_REQUEST = '[Request] Fetch bids by address' export const FETCH_BIDS_BY_ADDRESS_SUCCESS = '[Success] Fetch bids by address' export const FETCH_BIDS_BY_ADDRESS_FAILURE = '[Failure] Fetch bids by address' -export const fetchBidsByAddressRequest = (address: string) => - action(FETCH_BIDS_BY_ADDRESS_REQUEST, { address }) +export const fetchBidsByAddressRequest = (address: string) => action(FETCH_BIDS_BY_ADDRESS_REQUEST, { address }) -export const fetchBidsByAddressSuccess = ( - address: string, - sellerBids: Bid[], - bidderBids: Bid[] -) => action(FETCH_BIDS_BY_ADDRESS_SUCCESS, { address, sellerBids, bidderBids }) +export const fetchBidsByAddressSuccess = (address: string, sellerBids: Bid[], bidderBids: Bid[]) => + action(FETCH_BIDS_BY_ADDRESS_SUCCESS, { address, sellerBids, bidderBids }) -export const fetchBidsByAddressFailure = (address: string, error: string) => - action(FETCH_BIDS_BY_ADDRESS_FAILURE, { address, error }) +export const fetchBidsByAddressFailure = (address: string, error: string) => action(FETCH_BIDS_BY_ADDRESS_FAILURE, { address, error }) -export type FetchBidsByAddressRequestAction = ReturnType< - typeof fetchBidsByAddressRequest -> -export type FetchBidsByAddressSuccessAction = ReturnType< - typeof fetchBidsByAddressSuccess -> -export type FetchBidsByAddressFailureAction = ReturnType< - typeof fetchBidsByAddressFailure -> +export type FetchBidsByAddressRequestAction = ReturnType<typeof fetchBidsByAddressRequest> +export type FetchBidsByAddressSuccessAction = ReturnType<typeof fetchBidsByAddressSuccess> +export type FetchBidsByAddressFailureAction = ReturnType<typeof fetchBidsByAddressFailure> // Fetch Bids By NFT export const FETCH_BIDS_BY_NFT_REQUEST = '[Request] Fetch bids by NFT' export const FETCH_BIDS_BY_NFT_SUCCESS = '[Success] Fetch bids by NFT' export const FETCH_BIDS_BY_NFT_FAILURE = '[Failure] Fetch bids by NFT' -export const fetchBidsByNFTRequest = (nft: NFT) => - action(FETCH_BIDS_BY_NFT_REQUEST, { nft }) +export const fetchBidsByNFTRequest = (nft: NFT) => action(FETCH_BIDS_BY_NFT_REQUEST, { nft }) -export const fetchBidsByNFTSuccess = (nft: NFT, bids: Bid[]) => - action(FETCH_BIDS_BY_NFT_SUCCESS, { nft, bids }) +export const fetchBidsByNFTSuccess = (nft: NFT, bids: Bid[]) => action(FETCH_BIDS_BY_NFT_SUCCESS, { nft, bids }) -export const fetchBidsByNFTFailure = (nft: NFT, error: string) => - action(FETCH_BIDS_BY_NFT_FAILURE, { nft, error }) +export const fetchBidsByNFTFailure = (nft: NFT, error: string) => action(FETCH_BIDS_BY_NFT_FAILURE, { nft, error }) -export type FetchBidsByNFTRequestAction = ReturnType< - typeof fetchBidsByNFTRequest -> -export type FetchBidsByNFTSuccessAction = ReturnType< - typeof fetchBidsByNFTSuccess -> -export type FetchBidsByNFTFailureAction = ReturnType< - typeof fetchBidsByNFTFailure -> +export type FetchBidsByNFTRequestAction = ReturnType<typeof fetchBidsByNFTRequest> +export type FetchBidsByNFTSuccessAction = ReturnType<typeof fetchBidsByNFTSuccess> +export type FetchBidsByNFTFailureAction = ReturnType<typeof fetchBidsByNFTFailure> export const CLEAR_BID_ERROR = 'Clear Bid Error' diff --git a/webapp/src/modules/bid/reducer.spec.ts b/webapp/src/modules/bid/reducer.spec.ts index 38dcfe9fa0..9685cf0fda 100644 --- a/webapp/src/modules/bid/reducer.spec.ts +++ b/webapp/src/modules/bid/reducer.spec.ts @@ -1,5 +1,5 @@ -import { clearBidError } from "./actions" -import { bidReducer, BidState, INITIAL_STATE } from "./reducer" +import { clearBidError } from './actions' +import { bidReducer, BidState, INITIAL_STATE } from './reducer' let state: BidState @@ -7,12 +7,12 @@ beforeEach(() => { state = INITIAL_STATE }) -describe("when clear bid error action is received", () => { +describe('when clear bid error action is received', () => { beforeEach(() => { state.error = 'Some test error' }) - it("should set error field as null", () => { + it('should set error field as null', () => { expect(bidReducer(state, clearBidError())).toEqual(expect.objectContaining({ error: null })) }) }) diff --git a/webapp/src/modules/bid/reducer.ts b/webapp/src/modules/bid/reducer.ts index 7b62e61b2f..5f0246c363 100644 --- a/webapp/src/modules/bid/reducer.ts +++ b/webapp/src/modules/bid/reducer.ts @@ -1,8 +1,5 @@ import { Bid } from '@dcl/schemas' -import { - LoadingState, - loadingReducer -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { LoadingState, loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' import { toBidObject } from './utils' import { FetchBidsByAddressRequestAction, diff --git a/webapp/src/modules/bid/sagas.spec.ts b/webapp/src/modules/bid/sagas.spec.ts index 4fe807db70..a72c72a245 100644 --- a/webapp/src/modules/bid/sagas.spec.ts +++ b/webapp/src/modules/bid/sagas.spec.ts @@ -12,12 +12,7 @@ import { getRentalById } from '../rental/selectors' import { NFT } from '../nft/types' import { Contract } from '../vendor/services' import { getCurrentNFT } from '../nft/selectors' -import { - acceptBidFailure, - acceptBidtransactionSubmitted, - acceptBidRequest, - acceptBidSuccess -} from './actions' +import { acceptBidFailure, acceptBidtransactionSubmitted, acceptBidRequest, acceptBidSuccess } from './actions' import { bidSaga } from './sagas' describe('when handling the accepting a bid action', () => { @@ -35,15 +30,8 @@ describe('when handling the accepting a bid action', () => { } as Bid return expectSaga(bidSaga) - .provide([ - [select(getContract, { address: bid.contractAddress }), undefined] - ]) - .put( - acceptBidFailure( - bid, - `Couldn't find a valid vendor for contract ${bid.contractAddress}` - ) - ) + .provide([[select(getContract, { address: bid.contractAddress }), undefined]]) + .put(acceptBidFailure(bid, `Couldn't find a valid vendor for contract ${bid.contractAddress}`)) .dispatch(acceptBidRequest(bid)) .run({ silenceTimeout: true }) }) @@ -65,10 +53,7 @@ describe('when handling the accepting a bid action', () => { .provide([ [select(getContract, { address: bid.contractAddress }), contract], [select(getWallet), wallet], - [ - call(VendorFactory.build, contract.vendor), - throwError(new Error(error)) - ] + [call(VendorFactory.build, contract.vendor), throwError(new Error(error))] ]) .put(acceptBidFailure(bid, error)) .dispatch(acceptBidRequest(bid)) @@ -92,10 +77,7 @@ describe('when handling the accepting a bid action', () => { [select(getContract, { address: bid.contractAddress }), contract], [call(VendorFactory.build, contract.vendor), vendor], [select(getWallet), wallet], - [ - call([vendor.bidService!, 'accept'], wallet, bid), - Promise.reject(error) - ] + [call([vendor.bidService!, 'accept'], wallet, bid), Promise.reject(error)] ]) .put(acceptBidFailure(bid, error.message)) .dispatch(acceptBidRequest(bid)) @@ -147,15 +129,9 @@ describe('when handling the accepting a bid action', () => { [select(getWallet), wallet], [select(getCurrentNFT), nft], [select(getRentalById, nft.openRentalId!), rental], - [ - call([vendor.bidService!, 'accept'], wallet, bid), - Promise.resolve(txHash) - ], + [call([vendor.bidService!, 'accept'], wallet, bid), Promise.resolve(txHash)], [call(waitForTx, txHash), Promise.resolve()], - [ - call(waitUntilRentalChangesStatus, nft, RentalStatus.CANCELLED), - Promise.resolve() - ] + [call(waitUntilRentalChangesStatus, nft, RentalStatus.CANCELLED), Promise.resolve()] ]) .put(acceptBidSuccess(bid)) .put(acceptBidtransactionSubmitted(bid, txHash)) @@ -175,10 +151,7 @@ describe('when handling the accepting a bid action', () => { [call(VendorFactory.build, contract.vendor!), vendor], [select(getWallet), wallet], [select(getCurrentNFT), nft], - [ - call([vendor.bidService!, 'accept'], wallet, bid), - Promise.resolve(txHash) - ], + [call([vendor.bidService!, 'accept'], wallet, bid), Promise.resolve(txHash)], [call(waitForTx, txHash), Promise.resolve()] ]) .put(acceptBidSuccess(bid)) @@ -196,10 +169,7 @@ describe('when handling the accepting a bid action', () => { [call(VendorFactory.build, contract.vendor!), vendor], [select(getWallet), wallet], [select(getCurrentNFT), nft], - [ - call([vendor.bidService!, 'accept'], wallet, bid), - Promise.resolve(txHash) - ], + [call([vendor.bidService!, 'accept'], wallet, bid), Promise.resolve(txHash)], [call(waitForTx, txHash), Promise.reject(new Error('anError'))] ]) .put(acceptBidFailure(bid, 'anError')) diff --git a/webapp/src/modules/bid/sagas.ts b/webapp/src/modules/bid/sagas.ts index 0c52ace022..6ce7e95d26 100644 --- a/webapp/src/modules/bid/sagas.ts +++ b/webapp/src/modules/bid/sagas.ts @@ -33,19 +33,13 @@ import { VendorName } from '../vendor/types' import { getRentalById } from '../rental/selectors' import { NFT } from '../nft/types' import { getCurrentNFT } from '../nft/selectors' -import { - isRentalListingOpen, - waitUntilRentalChangesStatus -} from '../rental/utils' +import { isRentalListingOpen, waitUntilRentalChangesStatus } from '../rental/utils' export function* bidSaga() { yield takeEvery(PLACE_BID_REQUEST, handlePlaceBidRequest) yield takeEvery(ACCEPT_BID_REQUEST, handleAcceptBidRequest) yield takeEvery(CANCEL_BID_REQUEST, handleCancelBidRequest) - yield takeEvery( - FETCH_BIDS_BY_ADDRESS_REQUEST, - handleFetchBidsByAddressRequest - ) + yield takeEvery(FETCH_BIDS_BY_ADDRESS_REQUEST, handleFetchBidsByAddressRequest) yield takeEvery(FETCH_BIDS_BY_NFT_REQUEST, handleFetchBidsByNFTRequest) } @@ -55,30 +49,10 @@ function* handlePlaceBidRequest(action: PlaceBidRequestAction) { const { bidService } = VendorFactory.build(nft.vendor) const wallet: ReturnType<typeof getWallet> = yield select(getWallet) - const txHash: string = yield call(() => - bidService!.place(wallet, nft, price, expiresAt, fingerprint) - ) - yield put( - placeBidSuccess( - nft, - price, - expiresAt, - nft.chainId, - txHash, - wallet!.address, - fingerprint - ) - ) + const txHash: string = yield call(() => bidService!.place(wallet, nft, price, expiresAt, fingerprint)) + yield put(placeBidSuccess(nft, price, expiresAt, nft.chainId, txHash, wallet!.address, fingerprint)) } catch (error) { - yield put( - placeBidFailure( - nft, - price, - expiresAt, - isErrorWithMessage(error) ? error.message : t('global.unknown_error'), - fingerprint - ) - ) + yield put(placeBidFailure(nft, price, expiresAt, isErrorWithMessage(error) ? error.message : t('global.unknown_error'), fingerprint)) } } @@ -95,25 +69,15 @@ function* handleAcceptBidRequest(action: AcceptBidRequestAction) { : `Couldn't find a valid vendor for contract ${bid.contractAddress}` ) } - const vendor: Vendor<VendorName> = yield call( - VendorFactory.build, - contract.vendor - ) + const vendor: Vendor<VendorName> = yield call(VendorFactory.build, contract.vendor) const wallet: ReturnType<typeof getWallet> = yield select(getWallet) - const txHash: string = yield call( - [vendor.bidService!, 'accept'], - wallet, - bid - ) + const txHash: string = yield call([vendor.bidService!, 'accept'], wallet, bid) yield put(acceptBidtransactionSubmitted(bid, txHash)) const nft: NFT | null = yield select(getCurrentNFT) if (nft?.openRentalId) { yield call(waitForTx, txHash) - const rental: RentalListing | null = yield select( - getRentalById, - nft.openRentalId - ) + const rental: RentalListing | null = yield select(getRentalById, nft.openRentalId) if (isRentalListingOpen(rental)) { yield call(waitUntilRentalChangesStatus, nft, RentalStatus.CANCELLED) } @@ -121,12 +85,7 @@ function* handleAcceptBidRequest(action: AcceptBidRequestAction) { yield put(acceptBidSuccess(bid)) } catch (error) { - yield put( - acceptBidFailure( - bid, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(acceptBidFailure(bid, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } @@ -137,9 +96,7 @@ function* handleCancelBidRequest(action: CancelBidRequestAction) { address: bid.contractAddress }) if (!contract || !contract.vendor) { - throw new Error( - `Couldn't find a valid vendor for contract ${contract?.address}` - ) + throw new Error(`Couldn't find a valid vendor for contract ${contract?.address}`) } const { bidService } = VendorFactory.build(contract.vendor) @@ -148,18 +105,11 @@ function* handleCancelBidRequest(action: CancelBidRequestAction) { yield put(cancelBidSuccess(bid, txHash)) } catch (error) { - yield put( - cancelBidFailure( - bid, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(cancelBidFailure(bid, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } -function* handleFetchBidsByAddressRequest( - action: FetchBidsByAddressRequestAction -) { +function* handleFetchBidsByAddressRequest(action: FetchBidsByAddressRequestAction) { const { address } = action.payload try { let sellerBids: Bid[] = [] @@ -171,24 +121,14 @@ function* handleFetchBidsByAddressRequest( continue } - const bids: [Bid[], Bid[]] = yield call(() => - Promise.all([ - bidService.fetchBySeller(address), - bidService.fetchByBidder(address) - ]) - ) + const bids: [Bid[], Bid[]] = yield call(() => Promise.all([bidService.fetchBySeller(address), bidService.fetchByBidder(address)])) sellerBids = sellerBids.concat(bids[0]) bidderBids = bidderBids.concat(bids[1]) } yield put(fetchBidsByAddressSuccess(address, sellerBids, bidderBids)) } catch (error) { - yield put( - fetchBidsByAddressFailure( - address, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchBidsByAddressFailure(address, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } @@ -201,11 +141,6 @@ function* handleFetchBidsByNFTRequest(action: FetchBidsByNFTRequestAction) { yield put(fetchBidsByNFTSuccess(nft, bids)) } catch (error) { - yield put( - fetchBidsByNFTFailure( - nft, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchBidsByNFTFailure(nft, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } diff --git a/webapp/src/modules/bid/selectors.ts b/webapp/src/modules/bid/selectors.ts index 344fc4f288..40912a5726 100644 --- a/webapp/src/modules/bid/selectors.ts +++ b/webapp/src/modules/bid/selectors.ts @@ -7,7 +7,7 @@ export const getState = (state: RootState) => state.bid export const getData = (state: RootState) => getState(state).data export const getLoading = (state: RootState) => getState(state).loading export const getError = (state: RootState) => getState(state).error -export const getBidStatus = (state:RootState) => { +export const getBidStatus = (state: RootState) => { if (isLoadingType(getLoading(state), PLACE_BID_REQUEST)) { return AuthorizationStepStatus.WAITING } diff --git a/webapp/src/modules/bid/utils.ts b/webapp/src/modules/bid/utils.ts index 4c86877a45..81653f7153 100644 --- a/webapp/src/modules/bid/utils.ts +++ b/webapp/src/modules/bid/utils.ts @@ -9,20 +9,14 @@ export async function isInsufficientMANA(bid: Bid) { try { const provider = await getNetworkProvider(bid.chainId) const contract = getContract(ContractName.MANAToken, bid.chainId) - const mana = new ethers.Contract( - contract.address, - contract.abi, - new ethers.providers.Web3Provider(provider) - ) + const mana = new ethers.Contract(contract.address, contract.abi, new ethers.providers.Web3Provider(provider)) const balanceRaw = await mana.balanceOf(bid.bidder) const balance = parseFloat(ethers.utils.formatEther(balanceRaw)) const price = parseFloat(ethers.utils.formatEther(bid.price)) return balance < price } catch (error) { - console.warn( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) + console.warn(isErrorWithMessage(error) ? error.message : t('global.unknown_error')) } return false } @@ -35,8 +29,11 @@ export function checkFingerprint(bid: Bid, fingerprint: string | undefined) { } export function toBidObject(bids: Bid[]) { - return bids.reduce((obj, bid) => { - obj[bid.id] = bid - return obj - }, {} as Record<string, Bid>) + return bids.reduce( + (obj, bid) => { + obj[bid.id] = bid + return obj + }, + {} as Record<string, Bid> + ) } diff --git a/webapp/src/modules/collection/actions.ts b/webapp/src/modules/collection/actions.ts index 707ff7ddb6..1408582e47 100644 --- a/webapp/src/modules/collection/actions.ts +++ b/webapp/src/modules/collection/actions.ts @@ -7,44 +7,26 @@ export const FETCH_COLLECTIONS_REQUEST = '[Request] Fetch collections' export const FETCH_COLLECTIONS_SUCCESS = '[Success] Fetch collections' export const FETCH_COLLECTIONS_FAILURE = '[Failure] Fetch collections' -export const fetchCollectionsRequest = ( - filters: CollectionFilters, - shouldFetchItems?: boolean -) => action(FETCH_COLLECTIONS_REQUEST, { filters, shouldFetchItems }) -export const fetchCollectionsSuccess = ( - collections: Collection[], - count: number -) => +export const fetchCollectionsRequest = (filters: CollectionFilters, shouldFetchItems?: boolean) => + action(FETCH_COLLECTIONS_REQUEST, { filters, shouldFetchItems }) +export const fetchCollectionsSuccess = (collections: Collection[], count: number) => action(FETCH_COLLECTIONS_SUCCESS, { collections, count }) -export const fetchCollectionsFailure = (error: string) => - action(FETCH_COLLECTIONS_FAILURE, { error }) +export const fetchCollectionsFailure = (error: string) => action(FETCH_COLLECTIONS_FAILURE, { error }) -export type FetchCollectionsRequestAction = ReturnType< - typeof fetchCollectionsRequest -> -export type FetchCollectionsSuccessAction = ReturnType< - typeof fetchCollectionsSuccess -> -export type FetchCollectionsFailureAction = ReturnType< - typeof fetchCollectionsFailure -> +export type FetchCollectionsRequestAction = ReturnType<typeof fetchCollectionsRequest> +export type FetchCollectionsSuccessAction = ReturnType<typeof fetchCollectionsSuccess> +export type FetchCollectionsFailureAction = ReturnType<typeof fetchCollectionsFailure> // FETCH SINGLE COLLECTION -export const FETCH_SINGLE_COLLECTION_REQUEST = - '[Request] Fetch single collection' -export const FETCH_SINGLE_COLLECTION_SUCCESS = - '[Success] Fetch single collection' -export const FETCH_SINGLE_COLLECTION_FAILURE = - '[Failure] Fetch single collection' +export const FETCH_SINGLE_COLLECTION_REQUEST = '[Request] Fetch single collection' +export const FETCH_SINGLE_COLLECTION_SUCCESS = '[Success] Fetch single collection' +export const FETCH_SINGLE_COLLECTION_FAILURE = '[Failure] Fetch single collection' -export const fetchSingleCollectionRequest = ( - contractAddress: string, - shouldFetchItems?: boolean -) => +export const fetchSingleCollectionRequest = (contractAddress: string, shouldFetchItems?: boolean) => action(FETCH_SINGLE_COLLECTION_REQUEST, { contractAddress, shouldFetchItems @@ -58,12 +40,6 @@ export const fetchSingleCollectionFailure = (error: string) => error }) -export type FetchSingleCollectionRequestAction = ReturnType< - typeof fetchSingleCollectionRequest -> -export type FetchSingleCollectionSuccessAction = ReturnType< - typeof fetchSingleCollectionSuccess -> -export type FetchSingleCollectionFailureAction = ReturnType< - typeof fetchSingleCollectionFailure -> +export type FetchSingleCollectionRequestAction = ReturnType<typeof fetchSingleCollectionRequest> +export type FetchSingleCollectionSuccessAction = ReturnType<typeof fetchSingleCollectionSuccess> +export type FetchSingleCollectionFailureAction = ReturnType<typeof fetchSingleCollectionFailure> diff --git a/webapp/src/modules/collection/reducer.spec.ts b/webapp/src/modules/collection/reducer.spec.ts index 0328126818..6a1b1bae58 100644 --- a/webapp/src/modules/collection/reducer.spec.ts +++ b/webapp/src/modules/collection/reducer.spec.ts @@ -1,11 +1,5 @@ -import { - fetchCollectionsFailure, - fetchCollectionsRequest, - fetchCollectionsSuccess, - FETCH_COLLECTIONS_REQUEST -} from './actions' -import { collectionReducer } from './reducer' -import { INITIAL_STATE } from './reducer' +import { fetchCollectionsFailure, fetchCollectionsRequest, fetchCollectionsSuccess, FETCH_COLLECTIONS_REQUEST } from './actions' +import { collectionReducer, INITIAL_STATE } from './reducer' describe('when fetch collection request action is received', () => { it('should add a loading state action to the loading state array', () => { diff --git a/webapp/src/modules/collection/reducer.ts b/webapp/src/modules/collection/reducer.ts index 56893e441e..c9d30f3465 100644 --- a/webapp/src/modules/collection/reducer.ts +++ b/webapp/src/modules/collection/reducer.ts @@ -1,8 +1,5 @@ import { Collection } from '@dcl/schemas' -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchCollectionsFailureAction, FetchCollectionsRequestAction, @@ -40,10 +37,7 @@ type CollectionReducerAction = | FetchSingleCollectionSuccessAction | FetchSingleCollectionFailureAction -export function collectionReducer( - state = INITIAL_STATE, - action: CollectionReducerAction -): CollectionState { +export function collectionReducer(state = INITIAL_STATE, action: CollectionReducerAction): CollectionState { switch (action.type) { case FETCH_COLLECTIONS_REQUEST: case FETCH_SINGLE_COLLECTION_REQUEST: @@ -59,10 +53,13 @@ export function collectionReducer( ...state, loading: loadingReducer(state.loading, action), error: null, - data: collections.reduce((acc, collection) => { - acc[collection.urn] = collection - return acc - }, {} as CollectionState['data']), + data: collections.reduce( + (acc, collection) => { + acc[collection.urn] = collection + return acc + }, + {} as CollectionState['data'] + ), count } diff --git a/webapp/src/modules/collection/sagas.spec.ts b/webapp/src/modules/collection/sagas.spec.ts index af1fd531e2..4caf0da1c0 100644 --- a/webapp/src/modules/collection/sagas.spec.ts +++ b/webapp/src/modules/collection/sagas.spec.ts @@ -4,11 +4,7 @@ import { call } from 'redux-saga-test-plan/matchers' import { fetchCollectionItemsRequest } from '../item/actions' import { getItemsByContractAddress } from '../item/selectors' import { collectionAPI } from '../vendor/decentraland' -import { - fetchCollectionsFailure, - fetchCollectionsRequest, - fetchCollectionsSuccess -} from './actions' +import { fetchCollectionsFailure, fetchCollectionsRequest, fetchCollectionsSuccess } from './actions' import { collectionSaga } from './sagas' describe('when handling a fetch collections request', () => { @@ -20,12 +16,7 @@ describe('when handling a fetch collections request', () => { contractAddress: 'some contract address' } return expectSaga(collectionSaga) - .provide([ - [ - call([collectionAPI, collectionAPI.fetch], filters), - { data: [], total: 100 } - ] - ]) + .provide([[call([collectionAPI, collectionAPI.fetch], filters), { data: [], total: 100 }]]) .put(fetchCollectionsSuccess([], 100)) .dispatch(fetchCollectionsRequest(filters)) .silentRun() @@ -39,12 +30,7 @@ describe('when handling a fetch collections request', () => { contractAddress: 'some contract address' } return expectSaga(collectionSaga) - .provide([ - [ - call([collectionAPI, collectionAPI.fetch], filters), - Promise.reject(new Error('some error')) - ] - ]) + .provide([[call([collectionAPI, collectionAPI.fetch], filters), Promise.reject(new Error('some error'))]]) .put(fetchCollectionsFailure('some error')) .dispatch(fetchCollectionsRequest(filters)) .silentRun() diff --git a/webapp/src/modules/collection/sagas.ts b/webapp/src/modules/collection/sagas.ts index 45e15f92dd..265c9b2d42 100644 --- a/webapp/src/modules/collection/sagas.ts +++ b/webapp/src/modules/collection/sagas.ts @@ -18,31 +18,21 @@ import { export function* collectionSaga() { yield takeEvery(FETCH_COLLECTIONS_REQUEST, handleFetchCollectionsRequest) - yield takeEvery( - FETCH_SINGLE_COLLECTION_REQUEST, - handleFetchSingleCollectionRequest - ) + yield takeEvery(FETCH_SINGLE_COLLECTION_REQUEST, handleFetchSingleCollectionRequest) } -export function* handleFetchCollectionsRequest( - action: FetchCollectionsRequestAction -) { +export function* handleFetchCollectionsRequest(action: FetchCollectionsRequestAction) { const { filters, shouldFetchItems } = action.payload try { - const { data: collections, total }: CollectionResponse = yield call( - [collectionAPI, collectionAPI.fetch], - filters - ) + const { data: collections, total }: CollectionResponse = yield call([collectionAPI, collectionAPI.fetch], filters) yield put(fetchCollectionsSuccess(collections, total)) if (shouldFetchItems) { - const itemsByContractAddress: ReturnType<typeof getItemsByContractAddress> = yield select( - getItemsByContractAddress - ) + const itemsByContractAddress: ReturnType<typeof getItemsByContractAddress> = yield select(getItemsByContractAddress) - for (let collection of collections) { + for (const collection of collections) { const items = itemsByContractAddress[collection.contractAddress] if (!items || items.length !== collection.size) { @@ -56,40 +46,25 @@ export function* handleFetchCollectionsRequest( } } } catch (error) { - yield put( - fetchCollectionsFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchCollectionsFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } -export function* handleFetchSingleCollectionRequest( - action: FetchSingleCollectionRequestAction -) { +export function* handleFetchSingleCollectionRequest(action: FetchSingleCollectionRequestAction) { const { contractAddress, shouldFetchItems } = action.payload try { - const { data: collections }: CollectionResponse = yield call( - [collectionAPI, collectionAPI.fetch], - { contractAddress } - ) + const { data: collections }: CollectionResponse = yield call([collectionAPI, collectionAPI.fetch], { contractAddress }) if (collections.length === 0) { - yield put( - fetchSingleCollectionFailure( - `Could not get Collection "${contractAddress}"` - ) - ) + yield put(fetchSingleCollectionFailure(`Could not get Collection "${contractAddress}"`)) return } const [collection] = collections if (shouldFetchItems) { - const itemsByContractAddress: ReturnType<typeof getItemsByContractAddress> = yield select( - getItemsByContractAddress - ) + const itemsByContractAddress: ReturnType<typeof getItemsByContractAddress> = yield select(getItemsByContractAddress) const items = itemsByContractAddress[collection.contractAddress] @@ -104,10 +79,6 @@ export function* handleFetchSingleCollectionRequest( } yield put(fetchSingleCollectionSuccess(collection)) } catch (error) { - yield put( - fetchSingleCollectionFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchSingleCollectionFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } diff --git a/webapp/src/modules/collection/selectors.spec.ts b/webapp/src/modules/collection/selectors.spec.ts index f316a0fc31..aabca8a7e8 100644 --- a/webapp/src/modules/collection/selectors.spec.ts +++ b/webapp/src/modules/collection/selectors.spec.ts @@ -1,8 +1,5 @@ import { RootState } from '../reducer' -import { - fetchCollectionsRequest, - fetchSingleCollectionRequest -} from './actions' +import { fetchCollectionsRequest, fetchSingleCollectionRequest } from './actions' import { isFetchingCollection } from './selectors' let state: RootState @@ -57,9 +54,7 @@ describe('when getting if a collection is being fetched', () => { describe('and the given collection is being fetched in a collections fetch', () => { beforeEach(() => { - state.collection.loading = [ - fetchCollectionsRequest({ contractAddress: contractAddress }) - ] + state.collection.loading = [fetchCollectionsRequest({ contractAddress: contractAddress })] }) it('should return true', () => { diff --git a/webapp/src/modules/collection/selectors.ts b/webapp/src/modules/collection/selectors.ts index 42dcfcd4ba..db9136273e 100644 --- a/webapp/src/modules/collection/selectors.ts +++ b/webapp/src/modules/collection/selectors.ts @@ -3,10 +3,7 @@ import { createMatchSelector } from 'connected-react-router' import { createSelector } from 'reselect' import { locations } from '../routing/locations' import { RootState } from '../reducer' -import { - FETCH_COLLECTIONS_REQUEST, - FETCH_SINGLE_COLLECTION_REQUEST -} from './actions' +import { FETCH_COLLECTIONS_REQUEST, FETCH_SINGLE_COLLECTION_REQUEST } from './actions' export const getState = (state: RootState) => state.collection export const getCollectionsByUrn = (state: RootState) => getState(state).data @@ -14,45 +11,33 @@ export const getCount = (state: RootState) => getState(state).count export const getError = (state: RootState) => getState(state).error export const getLoading = (state: RootState) => getState(state).loading -export const isFetchingCollection = ( - state: RootState, - contractAddress: string -) => +export const isFetchingCollection = (state: RootState, contractAddress: string) => getLoading(state).find( action => - (action.type === FETCH_SINGLE_COLLECTION_REQUEST && - action.payload.contractAddress === contractAddress) || - (action.type === FETCH_COLLECTIONS_REQUEST && - action.payload.filters?.contractAddress === contractAddress) + (action.type === FETCH_SINGLE_COLLECTION_REQUEST && action.payload.contractAddress === contractAddress) || + (action.type === FETCH_COLLECTIONS_REQUEST && action.payload.filters?.contractAddress === contractAddress) ) !== undefined -export const getCollections = createSelector< - RootState, - ReturnType<typeof getCollectionsByUrn>, - Collection[] ->(getCollectionsByUrn, collectionsByUrn => Object.values(collectionsByUrn)) +export const getCollections = createSelector<RootState, ReturnType<typeof getCollectionsByUrn>, Collection[]>( + getCollectionsByUrn, + collectionsByUrn => Object.values(collectionsByUrn) +) -export const getCollectionsByAddress = createSelector< - RootState, - ReturnType<typeof getCollections>, - Record<string, Collection> ->(getCollections, collections => - Object.values(collections).reduce((acc, collection) => { - acc[collection.contractAddress] = collection - return acc - }, {} as Record<string, Collection>) +export const getCollectionsByAddress = createSelector<RootState, ReturnType<typeof getCollections>, Record<string, Collection>>( + getCollections, + collections => + Object.values(collections).reduce( + (acc, collection) => { + acc[collection.contractAddress] = collection + return acc + }, + {} as Record<string, Collection> + ) ) -const CollectionDetailMatchSelector = createMatchSelector< - RootState, - { contractAddress: string } ->(locations.collection(':contractAddress')) +const CollectionDetailMatchSelector = createMatchSelector<RootState, { contractAddress: string }>(locations.collection(':contractAddress')) -export const getContractAddress = createSelector< - RootState, - ReturnType<typeof CollectionDetailMatchSelector>, - string | null ->( +export const getContractAddress = createSelector<RootState, ReturnType<typeof CollectionDetailMatchSelector>, string | null>( CollectionDetailMatchSelector, match => match?.params.contractAddress.toLowerCase() || null ) diff --git a/webapp/src/modules/contract/actions.ts b/webapp/src/modules/contract/actions.ts index c15c013c26..a65e1314bc 100644 --- a/webapp/src/modules/contract/actions.ts +++ b/webapp/src/modules/contract/actions.ts @@ -12,25 +12,17 @@ export const fetchContractsSuccess = (contracts: Contract[]) => action(FETCH_CONTRACTS_SUCCESS, { contracts }) -export const fetchContractsFailure = (error: string) => - action(FETCH_CONTRACTS_FAILURE, { error }) - -export type FetchContractsRequestAction = ReturnType< - typeof fetchContractsRequest -> -export type FetchContractsSuccessAction = ReturnType< - typeof fetchContractsSuccess -> -export type FetchContractsFailureAction = ReturnType< - typeof fetchContractsFailure -> +export const fetchContractsFailure = (error: string) => action(FETCH_CONTRACTS_FAILURE, { error }) + +export type FetchContractsRequestAction = ReturnType<typeof fetchContractsRequest> +export type FetchContractsSuccessAction = ReturnType<typeof fetchContractsSuccess> +export type FetchContractsFailureAction = ReturnType<typeof fetchContractsFailure> // UPSERT CONTRACTS export const UPSERT_CONTRACTS = 'Upsert contracts' -export const upsertContracts = (contracts: Contract[]) => - action(UPSERT_CONTRACTS, { contracts }) +export const upsertContracts = (contracts: Contract[]) => action(UPSERT_CONTRACTS, { contracts }) export type UpsertContractsAction = ReturnType<typeof upsertContracts> diff --git a/webapp/src/modules/contract/reducer.spec.ts b/webapp/src/modules/contract/reducer.spec.ts index 32aa6cbc74..57eb0ed763 100644 --- a/webapp/src/modules/contract/reducer.spec.ts +++ b/webapp/src/modules/contract/reducer.spec.ts @@ -8,8 +8,7 @@ import { resetHasFetched, upsertContracts } from './actions' -import { contractReducer } from './reducer' -import { INITIAL_STATE } from './reducer' +import { contractReducer, INITIAL_STATE } from './reducer' describe('when fetch contract request action is received', () => { it('should add a loading state action to the loading state array', () => { diff --git a/webapp/src/modules/contract/reducer.ts b/webapp/src/modules/contract/reducer.ts index 9d9934d494..e1c191e81a 100644 --- a/webapp/src/modules/contract/reducer.ts +++ b/webapp/src/modules/contract/reducer.ts @@ -1,7 +1,4 @@ -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { config } from '../../config' import { contracts } from '../vendor/decentraland' import { Contract } from '../vendor/services' @@ -47,10 +44,7 @@ type ContractReducerAction = | UpsertContractsAction | ResetHasFetchedAction -export function contractReducer( - state = INITIAL_STATE, - action: ContractReducerAction -): ContractState { +export function contractReducer(state = INITIAL_STATE, action: ContractReducerAction): ContractState { switch (action.type) { case FETCH_CONTRACTS_REQUEST: { return { diff --git a/webapp/src/modules/contract/sagas.spec.ts b/webapp/src/modules/contract/sagas.spec.ts index 3686f26272..1f63b6ce5e 100644 --- a/webapp/src/modules/contract/sagas.spec.ts +++ b/webapp/src/modules/contract/sagas.spec.ts @@ -5,20 +5,12 @@ import { ContractName } from 'decentraland-transactions' import { fetchAuthorizationsRequest } from 'decentraland-dapps/dist/modules/authorization/actions' import { getData as getAuthorizations } from 'decentraland-dapps/dist/modules/authorization/selectors' import { AuthorizationType } from 'decentraland-dapps/dist/modules/authorization/types' -import { - changeAccount, - connectWalletSuccess -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { changeAccount, connectWalletSuccess } from 'decentraland-dapps/dist/modules/wallet/actions' import { getContractNames, VendorName } from '../vendor' import { ContractService } from '../vendor/decentraland' import { Contract } from '../vendor/services' import { getAddress } from '../wallet/selectors' -import { - fetchContractsFailure, - fetchContractsRequest, - fetchContractsSuccess, - resetHasFetched -} from './actions' +import { fetchContractsFailure, fetchContractsRequest, fetchContractsSuccess, resetHasFetched } from './actions' import { contractSaga } from './sagas' import { getContract, getContracts, getHasFetched } from './selectors' @@ -45,9 +37,7 @@ describe('when handling the fetch contracts request', () => { it('should put a success action with contracts and put a request for authorizations without the one that is already stored', () => { const address = '0x123' - mockGetContracts = jest - .spyOn(ContractService.prototype, 'getContracts') - .mockResolvedValueOnce([]) + mockGetContracts = jest.spyOn(ContractService.prototype, 'getContracts').mockResolvedValueOnce([]) const contractNames = getContractNames() @@ -274,9 +264,7 @@ describe('when handling the fetch contracts request', () => { describe('when the api call fails', () => { it('should put a failure action with the error', () => { - mockGetContracts = jest - .spyOn(ContractService.prototype, 'getContracts') - .mockRejectedValueOnce(new Error('some error')) + mockGetContracts = jest.spyOn(ContractService.prototype, 'getContracts').mockRejectedValueOnce(new Error('some error')) return expectSaga(contractSaga) .provide([[select(getHasFetched), false]]) .put(fetchContractsFailure('some error')) diff --git a/webapp/src/modules/contract/sagas.ts b/webapp/src/modules/contract/sagas.ts index 4f43670e65..e01d22a867 100644 --- a/webapp/src/modules/contract/sagas.ts +++ b/webapp/src/modules/contract/sagas.ts @@ -1,35 +1,17 @@ import { Network, NFTCategory } from '@dcl/schemas' import { call, takeEvery, put, select } from '@redux-saga/core/effects' -import { - fetchAuthorizationsRequest, - GRANT_TOKEN_SUCCESS -} from 'decentraland-dapps/dist/modules/authorization/actions' +import { fetchAuthorizationsRequest, GRANT_TOKEN_SUCCESS } from 'decentraland-dapps/dist/modules/authorization/actions' import { getData as getAuthorizations } from 'decentraland-dapps/dist/modules/authorization/selectors' -import { - Authorization, - AuthorizationType -} from 'decentraland-dapps/dist/modules/authorization/types' -import { - FetchTransactionSuccessAction, - FETCH_TRANSACTION_SUCCESS -} from 'decentraland-dapps/dist/modules/transaction/actions' +import { Authorization, AuthorizationType } from 'decentraland-dapps/dist/modules/authorization/types' +import { FetchTransactionSuccessAction, FETCH_TRANSACTION_SUCCESS } from 'decentraland-dapps/dist/modules/transaction/actions' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - CHANGE_ACCOUNT, - CONNECT_WALLET_SUCCESS -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { CHANGE_ACCOUNT, CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions' import { ContractName } from 'decentraland-transactions' import { isErrorWithMessage } from '../../lib/error' import { getContractNames, VendorFactory, VendorName } from '../vendor' import { Contract } from '../vendor/services' import { getAddress } from '../wallet/selectors' -import { - fetchContractsFailure, - fetchContractsSuccess, - FETCH_CONTRACTS_REQUEST, - FETCH_CONTRACTS_SUCCESS, - resetHasFetched -} from './actions' +import { fetchContractsFailure, fetchContractsSuccess, FETCH_CONTRACTS_REQUEST, FETCH_CONTRACTS_SUCCESS, resetHasFetched } from './actions' import { getContract, getContracts, getHasFetched } from './selectors' import { getAuthorizationKey } from './utils' @@ -54,19 +36,12 @@ export function* handleFetchContractsRequest() { for (const vendor of vendors) { const { contractService } = vendor - const moreContracts: Contract[] = yield call([ - contractService, - contractService.getContracts - ]) + const moreContracts: Contract[] = yield call([contractService, contractService.getContracts]) contracts = [...contracts, ...moreContracts] } yield put(fetchContractsSuccess(contracts)) } catch (error) { - yield put( - fetchContractsFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchContractsFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } @@ -75,9 +50,7 @@ export function* handleFetchContractsSuccess() { const address: string | undefined = yield select(getAddress) if (!address) { - console.warn( - 'Not fetching authorizations because the user is not connected' - ) + console.warn('Not fetching authorizations because the user is not connected') return } @@ -195,29 +168,16 @@ export function* handleFetchContractsSuccess() { for (const contract of contracts.filter(c => c.category !== null)) { // If the contract is a partner we might need to use a different contract name. See PR #680 - const marketplace: Contract = - contract.network === Network.MATIC - ? marketplaceMatic - : marketplaceEthereum - - if ( - contract.category === NFTCategory.WEARABLE || - contract.category === NFTCategory.EMOTE - ) { + const marketplace: Contract = contract.network === Network.MATIC ? marketplaceMatic : marketplaceEthereum + + if (contract.category === NFTCategory.WEARABLE || contract.category === NFTCategory.EMOTE) { // just add the authorizations for the contracts that are not already in the array - if ( - !authorizations.some( - authorization => authorization.contractAddress === contract.address - ) - ) { + if (!authorizations.some(authorization => authorization.contractAddress === contract.address)) { authorizations.push({ address, authorizedAddress: marketplace.address, contractAddress: contract.address, - contractName: - contract.network === Network.MATIC - ? ContractName.ERC721CollectionV2 - : ContractName.ERC721, + contractName: contract.network === Network.MATIC ? ContractName.ERC721CollectionV2 : ContractName.ERC721, chainId: contract.chainId, type: AuthorizationType.APPROVAL }) @@ -227,20 +187,14 @@ export function* handleFetchContractsSuccess() { address, authorizedAddress: marketplace.address, contractAddress: contract.address, - contractName: - contract.network === Network.MATIC - ? ContractName.ERC721CollectionV2 - : ContractName.ERC721, + contractName: contract.network === Network.MATIC ? ContractName.ERC721CollectionV2 : ContractName.ERC721, chainId: contract.chainId, type: AuthorizationType.APPROVAL }) } // add authorizations for the rentals contract for the land and estate registries - if ( - contract.category === NFTCategory.PARCEL || - contract.category === NFTCategory.ESTATE - ) { + if (contract.category === NFTCategory.PARCEL || contract.category === NFTCategory.ESTATE) { authorizations.push({ address, authorizedAddress: rentals.address, @@ -258,15 +212,11 @@ export function* handleFetchContractsSuccess() { const storeAuthorizations: Authorization[] = yield select(getAuthorizations) const storeAuthorizationsMap = storeAuthorizations.reduce( - (map, authorization) => - map.set(getAuthorizationKey(authorization), authorization), + (map, authorization) => map.set(getAuthorizationKey(authorization), authorization), new Map<string, Authorization>() ) - authorizations = authorizations.filter( - authorization => - !storeAuthorizationsMap.has(getAuthorizationKey(authorization)) - ) + authorizations = authorizations.filter(authorization => !storeAuthorizationsMap.has(getAuthorizationKey(authorization))) yield put(fetchAuthorizationsRequest(authorizations)) } diff --git a/webapp/src/modules/contract/types.ts b/webapp/src/modules/contract/types.ts index 327e7b9645..46ef88c0cd 100644 --- a/webapp/src/modules/contract/types.ts +++ b/webapp/src/modules/contract/types.ts @@ -1,5 +1,5 @@ export enum Network { GOERLI = 'goerli', MAINNET = 'mainnet', - SEPOLIA = 'sepolia' + SEPOLIA = 'sepolia' } diff --git a/webapp/src/modules/contract/utils.spec.ts b/webapp/src/modules/contract/utils.spec.ts index 6319b82523..b77d85b9fd 100644 --- a/webapp/src/modules/contract/utils.spec.ts +++ b/webapp/src/modules/contract/utils.spec.ts @@ -38,9 +38,7 @@ describe('when calling upsertContracts', () => { describe('and newContracts has a contract', () => { describe('and that contract has an upper cased address', () => { beforeEach(() => { - newContracts = [ - { address: 'ADDRESS', chainId: ChainId.MATIC_MUMBAI } as Contract - ] + newContracts = [{ address: 'ADDRESS', chainId: ChainId.MATIC_MUMBAI } as Contract] }) it('should return an array with the new contract with its address lower cased', () => { @@ -49,9 +47,7 @@ describe('when calling upsertContracts', () => { address: newContracts[0].address.toLowerCase() } - expect(upsertContracts(storedContracts, newContracts)).toEqual([ - expectedContract - ]) + expect(upsertContracts(storedContracts, newContracts)).toEqual([expectedContract]) }) }) }) @@ -74,9 +70,7 @@ describe('when calling upsertContracts', () => { }) it('should return the storedContracts as is', () => { - expect(upsertContracts(storedContracts, newContracts)).toEqual( - storedContracts - ) + expect(upsertContracts(storedContracts, newContracts)).toEqual(storedContracts) }) }) @@ -92,9 +86,7 @@ describe('when calling upsertContracts', () => { }) it('should return the storedContracts as is', () => { - expect(upsertContracts(storedContracts, newContracts)).toEqual( - storedContracts - ) + expect(upsertContracts(storedContracts, newContracts)).toEqual(storedContracts) }) }) @@ -110,10 +102,7 @@ describe('when calling upsertContracts', () => { }) it('should return an array with the new contract added to the stored contracts', () => { - expect(upsertContracts(storedContracts, newContracts)).toEqual([ - ...storedContracts, - ...newContracts - ]) + expect(upsertContracts(storedContracts, newContracts)).toEqual([...storedContracts, ...newContracts]) }) }) @@ -129,10 +118,7 @@ describe('when calling upsertContracts', () => { }) it('should return an array with the new contract added to the stored contracts', () => { - expect(upsertContracts(storedContracts, newContracts)).toEqual([ - ...storedContracts, - ...newContracts - ]) + expect(upsertContracts(storedContracts, newContracts)).toEqual([...storedContracts, ...newContracts]) }) }) @@ -148,9 +134,7 @@ describe('when calling upsertContracts', () => { }) it('should update the stored contract with the new name', () => { - expect(upsertContracts(storedContracts, newContracts)).toEqual([ - { ...storedContracts[0], name: newContracts[0].name } - ]) + expect(upsertContracts(storedContracts, newContracts)).toEqual([{ ...storedContracts[0], name: newContracts[0].name }]) }) }) }) @@ -283,9 +267,7 @@ describe('when calling getContractByParams', () => { describe('when sending one property in query', () => { it('should return the contract that matches the property', () => { - expect(getContractByParams(contracts, { label: 'contract1' })).toEqual( - contracts[0] - ) + expect(getContractByParams(contracts, { label: 'contract1' })).toEqual(contracts[0]) }) }) diff --git a/webapp/src/modules/contract/utils.ts b/webapp/src/modules/contract/utils.ts index d245fc4f5a..b35b36287f 100644 --- a/webapp/src/modules/contract/utils.ts +++ b/webapp/src/modules/contract/utils.ts @@ -5,10 +5,7 @@ import { NFT } from '../nft/types' import { VendorName } from '../vendor' import { Contract } from '../vendor/services' -export function upsertContracts( - storedContracts: Contract[], - newContracts: Contract[] -) { +export function upsertContracts(storedContracts: Contract[], newContracts: Contract[]) { const contractsByAddressAndChain = storedContracts.reduce( (map, contract) => map.set(getContractKey(contract), { ...contract }), new Map<string, Contract>() @@ -32,17 +29,11 @@ export function getContractKeyFromNFT(nft: NFT) { return `${nft.contractAddress.toLowerCase()}-${nft.chainId}` } -export function getAuthorizationKey({ - address, - authorizedAddress, - contractAddress, - chainId -}: Authorization) { +export function getAuthorizationKey({ address, authorizedAddress, contractAddress, chainId }: Authorization) { return `${address}-${authorizedAddress}-${contractAddress}-${chainId}` } -export const STUB_MATIC_COLLECTION_CONTRACT_NAME = - 'Stub Matic Collection Contract Name' +export const STUB_MATIC_COLLECTION_CONTRACT_NAME = 'Stub Matic Collection Contract Name' export function getStubMaticCollectionContract(address: string): Contract { return { @@ -56,21 +47,13 @@ export function getStubMaticCollectionContract(address: string): Contract { } export function isStubMaticCollectionContract(contract: Contract) { - return ( - contract.name === STUB_MATIC_COLLECTION_CONTRACT_NAME && - contract.network === Network.MATIC - ) + return contract.name === STUB_MATIC_COLLECTION_CONTRACT_NAME && contract.network === Network.MATIC } -export function getContractByParams( - contracts: Contract[], - query: Partial<Contract> -) { +export function getContractByParams(contracts: Contract[], query: Partial<Contract>) { const found = contracts.find(contract => Object.keys(query).every( - key => - query[key as keyof Contract]?.toString().toLowerCase() === - contract[key as keyof Contract]?.toString().toLowerCase() + key => query[key as keyof Contract]?.toString().toLowerCase() === contract[key as keyof Contract]?.toString().toLowerCase() ) ) diff --git a/webapp/src/modules/ens/actions.spec.ts b/webapp/src/modules/ens/actions.spec.ts index 73ebedbc82..af53c1ebe0 100644 --- a/webapp/src/modules/ens/actions.spec.ts +++ b/webapp/src/modules/ens/actions.spec.ts @@ -72,15 +72,7 @@ describe('claimName actions', () => { }) it('should create an action to signal that a name claim transaction is submitted', () => { - expect( - claimNameTransactionSubmitted( - subdomain, - address, - chainId, - txHash, - route - ) - ).toEqual({ + expect(claimNameTransactionSubmitted(subdomain, address, chainId, txHash, route)).toEqual({ type: CLAIM_NAME_TRANSACTION_SUBMITTED, payload: { ...buildTransactionPayload(chainId, txHash, { @@ -117,9 +109,7 @@ describe('claimName actions', () => { }) it('should create an action to signal that a cross chain name claim is successful', () => { - expect( - claimNameCrossChainSuccess({} as ENS, name, txHash, route) - ).toEqual({ + expect(claimNameCrossChainSuccess({} as ENS, name, txHash, route)).toEqual({ type: CLAIM_NAME_CROSS_CHAIN_SUCCESS, payload: { ens, name, txHash, route } }) diff --git a/webapp/src/modules/ens/actions.ts b/webapp/src/modules/ens/actions.ts index c6a153c7be..eabf929fd9 100644 --- a/webapp/src/modules/ens/actions.ts +++ b/webapp/src/modules/ens/actions.ts @@ -10,16 +10,9 @@ export const CLAIM_NAME_SUCCESS = '[Success] Claim Name' export const CLAIM_NAME_FAILURE = '[Failure] Claim Name' export const CLAIM_NAME_TRANSACTION_SUBMITTED = '[Submitted] Claim Name' -export const claimNameRequest = (name: string) => - action(CLAIM_NAME_REQUEST, { name }) +export const claimNameRequest = (name: string) => action(CLAIM_NAME_REQUEST, { name }) -export const claimNameTransactionSubmitted = ( - subdomain: string, - address: string, - chainId: ChainId, - txHash: string, - route?: Route -) => +export const claimNameTransactionSubmitted = (subdomain: string, address: string, chainId: ChainId, txHash: string, route?: Route) => action(CLAIM_NAME_TRANSACTION_SUBMITTED, { ...buildTransactionPayload(chainId, txHash, { subdomain, @@ -35,32 +28,21 @@ export const claimNameSuccess = (ens: ENS, name: string, txHash: string) => txHash }) -export const claimNameFailure = (error: ENSError) => - action(CLAIM_NAME_FAILURE, { error }) +export const claimNameFailure = (error: ENSError) => action(CLAIM_NAME_FAILURE, { error }) export type ClaimNameRequestAction = ReturnType<typeof claimNameRequest> export type ClaimNameSuccessAction = ReturnType<typeof claimNameSuccess> export type ClaimNameFailureAction = ReturnType<typeof claimNameFailure> -export type ClaimNameTransactionSubmittedAction = ReturnType< - typeof claimNameTransactionSubmitted -> +export type ClaimNameTransactionSubmittedAction = ReturnType<typeof claimNameTransactionSubmitted> // Mint name cross chain export const CLAIM_NAME_CROSS_CHAIN_REQUEST = '[Request] Claim name cross-chain' export const CLAIM_NAME_CROSS_CHAIN_SUCCESS = '[Success] Claim name cross-chain' export const CLAIM_NAME_CROSS_CHAIN_FAILURE = '[Failure] Claim name cross-chain' -export const claimNameCrossChainRequest = ( - name: string, - chainId: ChainId, - route: Route -) => action(CLAIM_NAME_CROSS_CHAIN_REQUEST, { name, chainId, route }) +export const claimNameCrossChainRequest = (name: string, chainId: ChainId, route: Route) => + action(CLAIM_NAME_CROSS_CHAIN_REQUEST, { name, chainId, route }) -export const claimNameCrossChainSuccess = ( - ens: ENS, - name: string, - txHash: string, - route: Route -) => +export const claimNameCrossChainSuccess = (ens: ENS, name: string, txHash: string, route: Route) => action(CLAIM_NAME_CROSS_CHAIN_SUCCESS, { ens, name, @@ -68,19 +50,10 @@ export const claimNameCrossChainSuccess = ( route }) -export const claimNameCrossChainFailure = ( - route: Route, - name: string, - error: string -) => action(CLAIM_NAME_CROSS_CHAIN_FAILURE, { route, name, error }) +export const claimNameCrossChainFailure = (route: Route, name: string, error: string) => + action(CLAIM_NAME_CROSS_CHAIN_FAILURE, { route, name, error }) -export type ClaimNameCrossChainRequestAction = ReturnType< - typeof claimNameCrossChainRequest -> -export type ClaimNameCrossChainSuccessAction = ReturnType< - typeof claimNameCrossChainSuccess -> +export type ClaimNameCrossChainRequestAction = ReturnType<typeof claimNameCrossChainRequest> +export type ClaimNameCrossChainSuccessAction = ReturnType<typeof claimNameCrossChainSuccess> -export type ClaimNameCrossChainFailureAction = ReturnType< - typeof claimNameCrossChainFailure -> +export type ClaimNameCrossChainFailureAction = ReturnType<typeof claimNameCrossChainFailure> diff --git a/webapp/src/modules/ens/reducer.spec.ts b/webapp/src/modules/ens/reducer.spec.ts index efff9704d1..8bdccff0ac 100644 --- a/webapp/src/modules/ens/reducer.spec.ts +++ b/webapp/src/modules/ens/reducer.spec.ts @@ -31,10 +31,7 @@ describe('ENS Reducer', () => { ens = { subdomain: 'example' } as ENS }) - const requestActions = [ - claimNameRequest('example'), - claimNameCrossChainRequest('example', ChainId.ETHEREUM_MAINNET, {} as Route) - ] + const requestActions = [claimNameRequest('example'), claimNameCrossChainRequest('example', ChainId.ETHEREUM_MAINNET, {} as Route)] describe.each(requestActions)('when reducing the "$type" action', action => { initialState = { ...INITIAL_STATE } as ENSState @@ -55,85 +52,57 @@ describe('ENS Reducer', () => { }) describe.each([ - [ - CLAIM_NAME_REQUEST, - claimNameRequest('example'), - claimNameSuccess({ subdomain: 'example' } as ENS, 'example', 'aTxHash') - ], + [CLAIM_NAME_REQUEST, claimNameRequest('example'), claimNameSuccess({ subdomain: 'example' } as ENS, 'example', 'aTxHash')], [ CLAIM_NAME_CROSS_CHAIN_REQUEST, - claimNameCrossChainRequest( - 'example', - ChainId.ETHEREUM_MAINNET, - {} as Route - ), - claimNameCrossChainSuccess( - { subdomain: 'example' } as ENS, - 'example', - 'aTxHash', - {} as Route - ) + claimNameCrossChainRequest('example', ChainId.ETHEREUM_MAINNET, {} as Route), + claimNameCrossChainSuccess({ subdomain: 'example' } as ENS, 'example', 'aTxHash', {} as Route) ] - ])( - 'when reducing the "%s" action', - (_action, requestAction, successAction) => { - beforeEach(() => { - initialState = { - ...INITIAL_STATE, - loading: [requestAction] - } as ENSState - }) + ])('when reducing the "%s" action', (_action, requestAction, successAction) => { + beforeEach(() => { + initialState = { + ...INITIAL_STATE, + loading: [requestAction] + } as ENSState + }) - it('should return an state with the loading action removed and the new ens subdomain added to the data', () => { - expect(ensReducer(initialState, successAction)).toEqual({ - ...initialState, - loading: loadingReducer(initialState.loading, successAction), - data: { - ...initialState.data, - [ens.subdomain]: { - ...initialState.data[ens.subdomain], - ...ens - } + it('should return an state with the loading action removed and the new ens subdomain added to the data', () => { + expect(ensReducer(initialState, successAction)).toEqual({ + ...initialState, + loading: loadingReducer(initialState.loading, successAction), + data: { + ...initialState.data, + [ens.subdomain]: { + ...initialState.data[ens.subdomain], + ...ens } - }) + } }) - } - ) + }) + }) describe.each([ - [ - CLAIM_NAME_FAILURE, - claimNameRequest('example'), - claimNameFailure({ message: 'An error' }), - 'An error' - ], + [CLAIM_NAME_FAILURE, claimNameRequest('example'), claimNameFailure({ message: 'An error' }), 'An error'], [ CLAIM_NAME_CROSS_CHAIN_FAILURE, - claimNameCrossChainRequest( - 'example', - ChainId.ETHEREUM_MAINNET, - {} as Route - ), + claimNameCrossChainRequest('example', ChainId.ETHEREUM_MAINNET, {} as Route), claimNameCrossChainFailure({} as Route, 'example', 'An error'), 'An error' ] - ])( - 'when handling the "$s" action', - (_action, requestAction, failureAction, expectedError) => { - beforeEach(() => { - initialState = { - ...INITIAL_STATE, - loading: [requestAction] - } as ENSState - }) + ])('when handling the "$s" action', (_action, requestAction, failureAction, expectedError) => { + beforeEach(() => { + initialState = { + ...INITIAL_STATE, + loading: [requestAction] + } as ENSState + }) - it('should return an state with the loading action removed and the error set', () => { - expect(ensReducer(initialState, failureAction)).toEqual({ - ...initialState, - loading: loadingReducer(initialState.loading, failureAction), - error: { message: expectedError } - }) + it('should return an state with the loading action removed and the error set', () => { + expect(ensReducer(initialState, failureAction)).toEqual({ + ...initialState, + loading: loadingReducer(initialState.loading, failureAction), + error: { message: expectedError } }) - } - ) + }) + }) }) diff --git a/webapp/src/modules/ens/reducer.ts b/webapp/src/modules/ens/reducer.ts index 3351224c2d..49794ed4a9 100644 --- a/webapp/src/modules/ens/reducer.ts +++ b/webapp/src/modules/ens/reducer.ts @@ -1,7 +1,4 @@ -import { - LoadingState, - loadingReducer -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { LoadingState, loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchTransactionSuccessAction } from 'decentraland-dapps/dist/modules/transaction/actions' import { ClaimNameRequestAction, @@ -46,10 +43,7 @@ export type ENSReducerAction = | ClaimNameCrossChainSuccessAction | ClaimNameCrossChainFailureAction -export function ensReducer( - state: ENSState = INITIAL_STATE, - action: ENSReducerAction -): ENSState { +export function ensReducer(state: ENSState = INITIAL_STATE, action: ENSReducerAction): ENSState { switch (action.type) { case CLAIM_NAME_CROSS_CHAIN_REQUEST: case CLAIM_NAME_REQUEST: { @@ -76,9 +70,7 @@ export function ensReducer( case CLAIM_NAME_CROSS_CHAIN_FAILURE: case CLAIM_NAME_FAILURE: { - const error = isENSError(action.payload.error) - ? action.payload.error - : { message: action.payload.error } + const error = isENSError(action.payload.error) ? action.payload.error : { message: action.payload.error } return { ...state, loading: loadingReducer(state.loading, action), diff --git a/webapp/src/modules/ens/sagas.spec.ts b/webapp/src/modules/ens/sagas.spec.ts index 63a0833b5a..b99815419f 100644 --- a/webapp/src/modules/ens/sagas.spec.ts +++ b/webapp/src/modules/ens/sagas.spec.ts @@ -5,14 +5,8 @@ import { expectSaga } from 'redux-saga-test-plan' import { call, select } from 'redux-saga/effects' import { ethers, BigNumber } from 'ethers' import { Route, AxelarProvider } from 'decentraland-transactions/crossChain' -import { - getSigner, - getConnectedProvider -} from 'decentraland-dapps/dist/lib/eth' -import { - TRANSACTION_ACTION_FLAG, - waitForTx -} from 'decentraland-dapps/dist/modules/transaction/utils' +import { getSigner, getConnectedProvider } from 'decentraland-dapps/dist/lib/eth' +import { TRANSACTION_ACTION_FLAG, waitForTx } from 'decentraland-dapps/dist/modules/transaction/utils' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { closeModal } from 'decentraland-dapps/dist/modules/modal/actions' import { ensSaga } from './sagas' @@ -78,43 +72,20 @@ describe('ENS Saga', () => { [select(getWallet), mockWallet], [call(getSigner), signer], [ - call( - [DCLController__factory, 'connect'], - CONTROLLER_V2_ADDRESS, - signer - ), + call([DCLController__factory, 'connect'], CONTROLLER_V2_ADDRESS, signer), { register: () => Promise.resolve(mockTransaction) } ], [ - call( - [DCLRegistrar__factory, 'connect'], - REGISTRAR_ADDRESS, - signer - ), + call([DCLRegistrar__factory, 'connect'], REGISTRAR_ADDRESS, signer), { ...dclRegistrarContract, getTokenId: () => mockTokenId } ], [call(waitForTx, mockTransaction.hash), null], - [ - claimNameTransactionSubmitted( - mockName, - mockWallet.address, - mockWallet.chainId, - mockTransaction.hash - ), - undefined - ] + [claimNameTransactionSubmitted(mockName, mockWallet.address, mockWallet.chainId, mockTransaction.hash), undefined] ]) - .put( - claimNameTransactionSubmitted( - mockName, - mockWallet.address, - mockWallet.chainId, - mockTransaction.hash - ) - ) + .put(claimNameTransactionSubmitted(mockName, mockWallet.address, mockWallet.chainId, mockTransaction.hash)) .put(closeModal('ClaimNameFatFingerModal')) .dispatch(claimNameRequest(mockName)) .silentRun() @@ -128,14 +99,7 @@ describe('ENS Saga', () => { .provide([ [select(getWallet), mockWallet], [call(getSigner), {}], - [ - call( - [DCLController__factory, 'connect'], - CONTROLLER_V2_ADDRESS, - signer - ), - { register: () => Promise.reject(error) } - ] + [call([DCLController__factory, 'connect'], CONTROLLER_V2_ADDRESS, signer), { register: () => Promise.reject(error) }] ]) .put(claimNameFailure({ message: error.message })) .dispatch(mockAction) @@ -156,13 +120,7 @@ describe('ENS Saga', () => { it('should put a claim cross chain name failure action', () => { return expectSaga(ensSaga) .provide([[select(getWallet), null]]) - .put( - claimNameCrossChainFailure( - route, - mockName, - 'A wallet is required to claim a name' - ) - ) + .put(claimNameCrossChainFailure(route, mockName, 'A wallet is required to claim a name')) .dispatch(claimNameCrossChainRequest(mockName, chainId, route)) .silentRun() }) @@ -175,13 +133,7 @@ describe('ENS Saga', () => { [select(getWallet), { address: '0xWalletAddress' }], [call(getConnectedProvider), null] ]) - .put( - claimNameCrossChainFailure( - route, - mockName, - 'A connected provider is required claim a name' - ) - ) + .put(claimNameCrossChainFailure(route, mockName, 'A connected provider is required claim a name')) .dispatch(claimNameCrossChainRequest(mockName, chainId, route)) .silentRun() }) @@ -208,18 +160,9 @@ describe('ENS Saga', () => { .provide([ [select(getWallet), mockWallet], [call(getConnectedProvider), Promise.resolve(provider)], + [matchers.call.fn(AxelarProvider.prototype.executeRoute), Promise.resolve(mockTransaction)], [ - matchers.call.fn(AxelarProvider.prototype.executeRoute), - Promise.resolve(mockTransaction) - ], - [ - claimNameTransactionSubmitted( - mockName, - mockWallet.address, - mockWallet.chainId, - mockTransaction.transactionHash, - route - ), + claimNameTransactionSubmitted(mockName, mockWallet.address, mockWallet.chainId, mockTransaction.transactionHash, route), undefined ] ]) @@ -227,15 +170,7 @@ describe('ENS Saga', () => { fn: AxelarProvider.prototype.executeRoute, args: [route, provider] }) - .put( - claimNameTransactionSubmitted( - mockName, - mockWallet.address, - mockWallet.chainId, - mockTransaction.transactionHash, - route - ) - ) + .put(claimNameTransactionSubmitted(mockName, mockWallet.address, mockWallet.chainId, mockTransaction.transactionHash, route)) .dispatch(claimNameCrossChainRequest(mockName, chainId, route)) .silentRun() }) @@ -259,10 +194,7 @@ describe('ENS Saga', () => { .provide([ [select(getWallet), mockWallet], [call(getConnectedProvider), Promise.resolve(provider)], - [ - matchers.call.fn(AxelarProvider.prototype.executeRoute), - Promise.reject(error) - ] + [matchers.call.fn(AxelarProvider.prototype.executeRoute), Promise.reject(error)] ]) .put(claimNameCrossChainFailure(route, mockName, error.message)) .dispatch(claimNameCrossChainRequest(mockName, chainId, route)) @@ -322,11 +254,7 @@ describe('ENS Saga', () => { .provide([ [call(waitForTx, mockTransaction.hash), null], [ - call( - [DCLRegistrar__factory, 'connect'], - REGISTRAR_ADDRESS, - signer - ), + call([DCLRegistrar__factory, 'connect'], REGISTRAR_ADDRESS, signer), { ...dclRegistrarContract, getTokenId: () => mockTokenId @@ -335,24 +263,13 @@ describe('ENS Saga', () => { [select(getWallet), mockWallet], [call(getSigner), signer], [ - call( - [DCLController__factory, 'connect'], - CONTROLLER_V2_ADDRESS, - signer - ), + call([DCLController__factory, 'connect'], CONTROLLER_V2_ADDRESS, signer), { register: () => Promise.resolve(mockTransaction) } ] ]) .put(claimNameSuccess(mockENS, mockName, mockTransaction.hash)) .put(closeModal('ClaimNameFatFingerModal')) - .dispatch( - claimNameTransactionSubmitted( - mockName, - mockWallet.address, - mockWallet.chainId, - mockTransaction.hash - ) - ) + .dispatch(claimNameTransactionSubmitted(mockName, mockWallet.address, mockWallet.chainId, mockTransaction.hash)) .silentRun() }) }) @@ -369,11 +286,7 @@ describe('ENS Saga', () => { .provide([ [call(waitForTx, mockTransaction.hash), null], [ - call( - [DCLRegistrar__factory, 'connect'], - REGISTRAR_ADDRESS, - signer - ), + call([DCLRegistrar__factory, 'connect'], REGISTRAR_ADDRESS, signer), { ...dclRegistrarContract, getTokenId: () => mockTokenId @@ -382,32 +295,13 @@ describe('ENS Saga', () => { [select(getWallet), mockWallet], [call(getSigner), signer], [ - call( - [DCLController__factory, 'connect'], - CONTROLLER_V2_ADDRESS, - signer - ), + call([DCLController__factory, 'connect'], CONTROLLER_V2_ADDRESS, signer), { register: () => Promise.resolve(mockTransaction) } ] ]) - .put( - claimNameCrossChainSuccess( - mockENS, - mockName, - mockTransaction.hash, - route - ) - ) + .put(claimNameCrossChainSuccess(mockENS, mockName, mockTransaction.hash, route)) .put(closeModal('ClaimNameFatFingerModal')) - .dispatch( - claimNameTransactionSubmitted( - mockName, - mockWallet.address, - mockWallet.chainId, - mockTransaction.hash, - route - ) - ) + .dispatch(claimNameTransactionSubmitted(mockName, mockWallet.address, mockWallet.chainId, mockTransaction.hash, route)) .silentRun() }) }) @@ -421,14 +315,7 @@ describe('ENS Saga', () => { [select(getWallet), mockWallet], [call(waitForTx, mockTransaction.hash), null], [call(getSigner), {}], - [ - call( - [DCLRegistrar__factory, 'connect'], - REGISTRAR_ADDRESS, - signer - ), - { getTokenId: () => Promise.reject(error) } - ] + [call([DCLRegistrar__factory, 'connect'], REGISTRAR_ADDRESS, signer), { getTokenId: () => Promise.reject(error) }] ]) .put(claimNameFailure({ message: error.message })) .dispatch(mockAction) diff --git a/webapp/src/modules/ens/sagas.ts b/webapp/src/modules/ens/sagas.ts index 5ea7405b72..725eeda315 100644 --- a/webapp/src/modules/ens/sagas.ts +++ b/webapp/src/modules/ens/sagas.ts @@ -1,14 +1,8 @@ import { BigNumber, ethers } from 'ethers' import { call, put, select, takeEvery } from 'redux-saga/effects' -import { - getConnectedProvider, - getSigner -} from 'decentraland-dapps/dist/lib/eth' +import { getConnectedProvider, getSigner } from 'decentraland-dapps/dist/lib/eth' import { Provider, Wallet } from 'decentraland-dapps/dist/modules/wallet/types' -import { - TRANSACTION_ACTION_FLAG, - waitForTx -} from 'decentraland-dapps/dist/modules/transaction/utils' +import { TRANSACTION_ACTION_FLAG, waitForTx } from 'decentraland-dapps/dist/modules/transaction/utils' import { t } from 'decentraland-dapps/dist/modules/translation' import { closeModal } from 'decentraland-dapps/dist/modules/modal/actions' import { DCLController } from '../../contracts' @@ -34,26 +28,15 @@ import { import { ENS, ENSError } from './types' import { getDomainFromName } from './utils' -export const CONTROLLER_V2_ADDRESS = config.get( - 'CONTROLLER_V2_CONTRACT_ADDRESS', - '' -) +export const CONTROLLER_V2_ADDRESS = config.get('CONTROLLER_V2_CONTRACT_ADDRESS', '') export const REGISTRAR_ADDRESS = config.get('REGISTRAR_CONTRACT_ADDRESS', '') export function* ensSaga() { yield takeEvery(CLAIM_NAME_REQUEST, handleClaimNameRequest) - yield takeEvery( - CLAIM_NAME_TRANSACTION_SUBMITTED, - handleClaimNameSubmittedRequest - ) - yield takeEvery( - CLAIM_NAME_CROSS_CHAIN_REQUEST, - handleClaimNameCrossChainRequest - ) - - function* handleClaimNameSubmittedRequest( - action: ClaimNameTransactionSubmittedAction - ) { + yield takeEvery(CLAIM_NAME_TRANSACTION_SUBMITTED, handleClaimNameSubmittedRequest) + yield takeEvery(CLAIM_NAME_CROSS_CHAIN_REQUEST, handleClaimNameCrossChainRequest) + + function* handleClaimNameSubmittedRequest(action: ClaimNameTransactionSubmittedAction) { const data = action.payload[TRANSACTION_ACTION_FLAG] const { hash, @@ -66,15 +49,8 @@ export function* ensSaga() { yield call(waitForTx, hash) const signer: ethers.Signer = yield call(getSigner) - const dclRegistrarContract: DCLRegistrar = yield call( - [DCLRegistrar__factory, 'connect'], - REGISTRAR_ADDRESS, - signer - ) - const tokenId: BigNumber = yield call( - [dclRegistrarContract, 'getTokenId'], - subdomain - ) + const dclRegistrarContract: DCLRegistrar = yield call([DCLRegistrar__factory, 'connect'], REGISTRAR_ADDRESS, signer) + const tokenId: BigNumber = yield call([dclRegistrarContract, 'getTokenId'], subdomain) if (from) { const ens: ENS = { name: subdomain, @@ -109,24 +85,9 @@ export function* ensSaga() { const signer: ethers.Signer = yield call(getSigner) const from = wallet.address - const controllerContract: DCLController = yield call( - [DCLController__factory, 'connect'], - CONTROLLER_V2_ADDRESS, - signer - ) - const transaction: ethers.ContractTransaction = yield call( - [controllerContract, 'register'], - name, - from - ) - yield put( - claimNameTransactionSubmitted( - name, - wallet.address, - wallet.chainId, - transaction.hash - ) - ) + const controllerContract: DCLController = yield call([DCLController__factory, 'connect'], CONTROLLER_V2_ADDRESS, signer) + const transaction: ethers.ContractTransaction = yield call([controllerContract, 'register'], name, from) + yield put(claimNameTransactionSubmitted(name, wallet.address, wallet.chainId, transaction.hash)) } catch (error) { const ensError: ENSError = { message: isErrorWithMessage(error) ? error.message : 'Unknown error' @@ -135,9 +96,7 @@ export function* ensSaga() { } } - function* handleClaimNameCrossChainRequest( - action: ClaimNameCrossChainRequestAction - ) { + function* handleClaimNameCrossChainRequest(action: ClaimNameCrossChainRequestAction) { const { name, chainId, route } = action.payload try { const wallet: ReturnType<typeof getWallet> = yield select(getWallet) @@ -153,34 +112,14 @@ export function* ensSaga() { } const crossChainModule = import('decentraland-transactions/crossChain') - const { - AxelarProvider - }: Awaited<typeof crossChainModule> = yield crossChainModule + const { AxelarProvider }: Awaited<typeof crossChainModule> = yield crossChainModule const crossChainProvider = new AxelarProvider(config.get('SQUID_API_URL')) - const txResponse: ethers.providers.TransactionReceipt = yield call( - [crossChainProvider, 'executeRoute'], - route, - provider - ) - - yield put( - claimNameTransactionSubmitted( - name, - wallet.address, - chainId, - txResponse.transactionHash, - route - ) - ) + const txResponse: ethers.providers.TransactionReceipt = yield call([crossChainProvider, 'executeRoute'], route, provider) + + yield put(claimNameTransactionSubmitted(name, wallet.address, chainId, txResponse.transactionHash, route)) } catch (error) { - yield put( - claimNameCrossChainFailure( - route, - name, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(claimNameCrossChainFailure(route, name, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } } diff --git a/webapp/src/modules/ens/selectors.spec.ts b/webapp/src/modules/ens/selectors.spec.ts index d3e7afc0d7..3bf21b1aa9 100644 --- a/webapp/src/modules/ens/selectors.spec.ts +++ b/webapp/src/modules/ens/selectors.spec.ts @@ -126,9 +126,7 @@ describe('ENS Selectors', () => { from: state.wallet?.data?.address } as Transaction ] - expect(getClaimNameStatus(state)).toBe( - AuthorizationStepStatus.PROCESSING - ) + expect(getClaimNameStatus(state)).toBe(AuthorizationStepStatus.PROCESSING) }) }) diff --git a/webapp/src/modules/ens/selectors.ts b/webapp/src/modules/ens/selectors.ts index 72880c2398..f511ba8bf7 100644 --- a/webapp/src/modules/ens/selectors.ts +++ b/webapp/src/modules/ens/selectors.ts @@ -8,19 +8,12 @@ import { CLAIM_NAME_REQUEST, CLAIM_NAME_TRANSACTION_SUBMITTED } from './actions' export const getState = (state: RootState) => state.ens export const getData = (state: RootState) => getState(state).data -export const getAuthorizations = (state: RootState) => - getState(state).authorizations +export const getAuthorizations = (state: RootState) => getState(state).authorizations export const getError = (state: RootState) => getState(state).error export const getLoading = (state: RootState) => getState(state).loading -export const isWaitingTxClaimName = createSelector< - RootState, - Transaction[], - boolean ->(getPendingTransactions, transactions => - transactions.some( - transaction => CLAIM_NAME_TRANSACTION_SUBMITTED === transaction.actionType - ) +export const isWaitingTxClaimName = createSelector<RootState, Transaction[], boolean>(getPendingTransactions, transactions => + transactions.some(transaction => CLAIM_NAME_TRANSACTION_SUBMITTED === transaction.actionType) ) export const getClaimNameStatus = (state: RootState) => { diff --git a/webapp/src/modules/ens/utils.spec.ts b/webapp/src/modules/ens/utils.spec.ts index e6ab7170d1..19d71982fa 100644 --- a/webapp/src/modules/ens/utils.spec.ts +++ b/webapp/src/modules/ens/utils.spec.ts @@ -1,10 +1,4 @@ -import { - isNameAvailable, - isNameValid, - getNameInvalidType, - hasNameMinLength, - NameInvalidType -} from './utils' +import { isNameAvailable, isNameValid, getNameInvalidType, hasNameMinLength, NameInvalidType } from './utils' import { DCLRegistrar__factory } from '../../contracts/factories/DCLRegistrar__factory' jest.mock('../../contracts/factories/DCLRegistrar__factory') @@ -135,9 +129,7 @@ describe('Name Management Tests', () => { name = 'invalid#Name' }) it('should return INVALID_CHARACTERS', () => { - expect(getNameInvalidType(name)).toBe( - NameInvalidType.INVALID_CHARACTERS - ) + expect(getNameInvalidType(name)).toBe(NameInvalidType.INVALID_CHARACTERS) }) }) }) diff --git a/webapp/src/modules/ens/utils.ts b/webapp/src/modules/ens/utils.ts index 6bcda6cc20..a53aabd6aa 100644 --- a/webapp/src/modules/ens/utils.ts +++ b/webapp/src/modules/ens/utils.ts @@ -28,10 +28,7 @@ export async function isNameAvailable(name: string): Promise<boolean> { const provider = networkProvider ? new ethers.providers.Web3Provider(networkProvider) : new ethers.providers.JsonRpcProvider(configuration.network.urls[chainId]) - const contractDCLRegistrar = DCLRegistrar__factory.connect( - REGISTRAR_ADDRESS, - provider - ) + const contractDCLRegistrar = DCLRegistrar__factory.connect(REGISTRAR_ADDRESS, provider) return contractDCLRegistrar.available(name) } @@ -55,9 +52,7 @@ export function getNameInvalidType(name: string): NameInvalidType | null { return NameInvalidType.TOO_SHORT } const hasSpaces = /\s/.test(name) - return hasSpaces - ? NameInvalidType.HAS_SPACES - : NameInvalidType.INVALID_CHARACTERS + return hasSpaces ? NameInvalidType.HAS_SPACES : NameInvalidType.INVALID_CHARACTERS } export function hasNameMinLength(name: string): boolean { diff --git a/webapp/src/modules/event/actions.ts b/webapp/src/modules/event/actions.ts index 381ca5841c..4df2c26a45 100644 --- a/webapp/src/modules/event/actions.ts +++ b/webapp/src/modules/event/actions.ts @@ -6,10 +6,8 @@ export const FETCH_EVENT_FAILURE = '[Failure] Fetch event' export const fetchEventRequest = (eventTag: string, additionalSearchTags: string[] = []) => action(FETCH_EVENT_REQUEST, { eventTag, additionalSearchTags }) -export const fetchEventSuccess = (eventTag: string, contracts: string[]) => - action(FETCH_EVENT_SUCCESS, { eventTag, contracts }) -export const fetchEventFailure = (error: string) => - action(FETCH_EVENT_FAILURE, { error }) +export const fetchEventSuccess = (eventTag: string, contracts: string[]) => action(FETCH_EVENT_SUCCESS, { eventTag, contracts }) +export const fetchEventFailure = (error: string) => action(FETCH_EVENT_FAILURE, { error }) export type FetchEventRequestAction = ReturnType<typeof fetchEventRequest> export type FetchEventSuccessAction = ReturnType<typeof fetchEventSuccess> diff --git a/webapp/src/modules/event/reducer.spec.ts b/webapp/src/modules/event/reducer.spec.ts index cdf5e910a8..51a7a84f61 100644 --- a/webapp/src/modules/event/reducer.spec.ts +++ b/webapp/src/modules/event/reducer.spec.ts @@ -1,9 +1,5 @@ import { loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' -import { - fetchEventFailure, - fetchEventRequest, - fetchEventSuccess -} from './actions' +import { fetchEventFailure, fetchEventRequest, fetchEventSuccess } from './actions' import { eventReducer, INITIAL_STATE } from './reducer' const anErrorMessage = 'An error' diff --git a/webapp/src/modules/event/reducer.ts b/webapp/src/modules/event/reducer.ts index a29dba2709..e19693a27e 100644 --- a/webapp/src/modules/event/reducer.ts +++ b/webapp/src/modules/event/reducer.ts @@ -1,7 +1,4 @@ -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchEventFailureAction, FetchEventRequestAction, @@ -23,15 +20,9 @@ export const INITIAL_STATE: EventState = { error: null } -type EventReducerAction = - | FetchEventRequestAction - | FetchEventSuccessAction - | FetchEventFailureAction +type EventReducerAction = FetchEventRequestAction | FetchEventSuccessAction | FetchEventFailureAction -export function eventReducer( - state = INITIAL_STATE, - action: EventReducerAction -): EventState { +export function eventReducer(state = INITIAL_STATE, action: EventReducerAction): EventState { switch (action.type) { case FETCH_EVENT_REQUEST: return { diff --git a/webapp/src/modules/event/sagas.spec.ts b/webapp/src/modules/event/sagas.spec.ts index 55f917cc49..1c7dc24c3f 100644 --- a/webapp/src/modules/event/sagas.spec.ts +++ b/webapp/src/modules/event/sagas.spec.ts @@ -1,10 +1,6 @@ import { expectSaga } from 'redux-saga-test-plan' import { call } from 'redux-saga/effects' -import { - fetchEventFailure, - fetchEventRequest, - fetchEventSuccess -} from './actions' +import { fetchEventFailure, fetchEventRequest, fetchEventSuccess } from './actions' import { builderAPI } from '../vendor/decentraland/builder/api' import { eventSaga } from './sagas' @@ -17,12 +13,7 @@ describe('when handling the fetch events request action', () => { describe('and the api call fails', () => { it('should dispatch an action signaling the failure of the action handling', () => { return expectSaga(eventSaga) - .provide([ - [ - call([builderAPI, 'fetchAddressesByTag'], [eventTag]), - Promise.reject(anError) - ] - ]) + .provide([[call([builderAPI, 'fetchAddressesByTag'], [eventTag]), Promise.reject(anError)]]) .put(fetchEventFailure(anError.message)) .dispatch(fetchEventRequest(eventTag)) .run({ silenceTimeout: true }) @@ -32,12 +23,7 @@ describe('when handling the fetch events request action', () => { describe('and the api call fails', () => { it('should dispatch an action signaling the success of the action handling', () => { return expectSaga(eventSaga) - .provide([ - [ - call([builderAPI, 'fetchAddressesByTag'], [eventTag]), - eventContracts - ] - ]) + .provide([[call([builderAPI, 'fetchAddressesByTag'], [eventTag]), eventContracts]]) .put(fetchEventSuccess(eventTag, eventContracts)) .dispatch(fetchEventRequest(eventTag)) .run({ silenceTimeout: true }) diff --git a/webapp/src/modules/event/sagas.ts b/webapp/src/modules/event/sagas.ts index 43dcc839c2..57133624c6 100644 --- a/webapp/src/modules/event/sagas.ts +++ b/webapp/src/modules/event/sagas.ts @@ -2,12 +2,7 @@ import { call, takeEvery, put } from '@redux-saga/core/effects' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { isErrorWithMessage } from '../../lib/error' import { builderAPI } from '../vendor/decentraland/builder/api' -import { - fetchEventFailure, - FetchEventRequestAction, - fetchEventSuccess, - FETCH_EVENT_REQUEST -} from './actions' +import { fetchEventFailure, FetchEventRequestAction, fetchEventSuccess, FETCH_EVENT_REQUEST } from './actions' export function* eventSaga() { yield takeEvery(FETCH_EVENT_REQUEST, handleFetchEventRequest) @@ -17,17 +12,10 @@ export function* handleFetchEventRequest(action: FetchEventRequestAction) { const { eventTag, additionalSearchTags } = action.payload try { - const addresses: string[] = yield call( - [builderAPI, builderAPI.fetchAddressesByTag], - [eventTag, ...additionalSearchTags] - ) + const addresses: string[] = yield call([builderAPI, builderAPI.fetchAddressesByTag], [eventTag, ...additionalSearchTags]) yield put(fetchEventSuccess(eventTag, addresses)) } catch (error) { - yield put( - fetchEventFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchEventFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } diff --git a/webapp/src/modules/favorites/actions.spec.ts b/webapp/src/modules/favorites/actions.spec.ts index 51297ef9f2..d6cab2dd81 100644 --- a/webapp/src/modules/favorites/actions.spec.ts +++ b/webapp/src/modules/favorites/actions.spec.ts @@ -1,12 +1,7 @@ import { Item, Network } from '@dcl/schemas' import { ItemBrowseOptions } from '../item/types' import { View } from '../ui/types' -import { - ListDetails, - ListOfLists, - Permission, - UpdateOrCreateList -} from '../vendor/decentraland/favorites/types' +import { ListDetails, ListOfLists, Permission, UpdateOrCreateList } from '../vendor/decentraland/favorites/types' import { fetchFavoritedItemsFailure, fetchFavoritedItemsRequest, @@ -136,9 +131,7 @@ describe('when creating the action to signal the start of the fetch favorited it describe('when creating the action to signal a successful fetch favorited items request', () => { it('should return an object representing the action', () => { - expect( - fetchFavoritedItemsSuccess([item], createdAt, total, {}, 0, true) - ).toEqual({ + expect(fetchFavoritedItemsSuccess([item], createdAt, total, {}, 0, true)).toEqual({ type: FETCH_FAVORITED_ITEMS_SUCCESS, meta: undefined, payload: { @@ -185,9 +178,7 @@ describe('when creating the action to signal a failure in the fetch lists reques describe('when creating the action to signal a successful fetch lists request', () => { it('should return an object representing the action', () => { - expect( - fetchListsSuccess([listOfLists], [item], total, listsBrowseOptions) - ).toEqual({ + expect(fetchListsSuccess([listOfLists], [item], total, listsBrowseOptions)).toEqual({ type: FETCH_LISTS_SUCCESS, meta: undefined, payload: { @@ -358,27 +349,23 @@ describe('when creating the action to signal the start of the bulk item pick-unp describe('when creating the action to signal a successful bulk item pick-unpick request', () => { it('should return an object representing the action', () => { - expect(bulkPickUnpickSuccess(item, [listOfLists], [], true, false)).toEqual( - { - type: BULK_PICK_SUCCESS, - meta: undefined, - payload: { - item, - pickedFor: [listOfLists], - unpickedFrom: [], - isPickedByUser: true, - ownerRemovedFromCurrentList: false - } + expect(bulkPickUnpickSuccess(item, [listOfLists], [], true, false)).toEqual({ + type: BULK_PICK_SUCCESS, + meta: undefined, + payload: { + item, + pickedFor: [listOfLists], + unpickedFrom: [], + isPickedByUser: true, + ownerRemovedFromCurrentList: false } - ) + }) }) }) describe('when creating the action to signal a failure in the bulk item pick-unpick request', () => { it('should return an object representing the action', () => { - expect( - bulkPickUnpickFailure(item, [listOfLists], [], anErrorMessage) - ).toEqual({ + expect(bulkPickUnpickFailure(item, [listOfLists], [], anErrorMessage)).toEqual({ type: BULK_PICK_FAILURE, meta: undefined, payload: { diff --git a/webapp/src/modules/favorites/actions.ts b/webapp/src/modules/favorites/actions.ts index 3d5c24e9cc..df8ed78a22 100644 --- a/webapp/src/modules/favorites/actions.ts +++ b/webapp/src/modules/favorites/actions.ts @@ -1,17 +1,8 @@ import { action } from 'typesafe-actions' import { Item } from '@dcl/schemas' import { ItemBrowseOptions } from '../item/types' -import { - ListDetails, - ListOfLists, - UpdateOrCreateList -} from '../vendor/decentraland/favorites/types' -import { - CreateListParameters, - List, - ListsBrowseOptions, - UpdateListParameters -} from './types' +import { ListDetails, ListOfLists, UpdateOrCreateList } from '../vendor/decentraland/favorites/types' +import { CreateListParameters, List, ListsBrowseOptions, UpdateListParameters } from './types' // Fetch Favorited Items @@ -19,10 +10,8 @@ export const FETCH_FAVORITED_ITEMS_REQUEST = '[Request] Fetch Favorited Items' export const FETCH_FAVORITED_ITEMS_SUCCESS = '[Success] Fetch Favorited Items' export const FETCH_FAVORITED_ITEMS_FAILURE = '[Failure] Fetch Favorited Items' -export const fetchFavoritedItemsRequest = ( - options: ItemBrowseOptions, - forceLoadMore?: boolean -) => action(FETCH_FAVORITED_ITEMS_REQUEST, { options, forceLoadMore }) +export const fetchFavoritedItemsRequest = (options: ItemBrowseOptions, forceLoadMore?: boolean) => + action(FETCH_FAVORITED_ITEMS_REQUEST, { options, forceLoadMore }) export const fetchFavoritedItemsSuccess = ( items: Item[], @@ -41,18 +30,11 @@ export const fetchFavoritedItemsSuccess = ( forceLoadMore }) -export const fetchFavoritedItemsFailure = (error: string) => - action(FETCH_FAVORITED_ITEMS_FAILURE, { error }) +export const fetchFavoritedItemsFailure = (error: string) => action(FETCH_FAVORITED_ITEMS_FAILURE, { error }) -export type FetchFavoritedItemsRequestAction = ReturnType< - typeof fetchFavoritedItemsRequest -> -export type FetchFavoritedItemsSuccessAction = ReturnType< - typeof fetchFavoritedItemsSuccess -> -export type FetchFavoritedItemsFailureAction = ReturnType< - typeof fetchFavoritedItemsFailure -> +export type FetchFavoritedItemsRequestAction = ReturnType<typeof fetchFavoritedItemsRequest> +export type FetchFavoritedItemsSuccessAction = ReturnType<typeof fetchFavoritedItemsSuccess> +export type FetchFavoritedItemsFailureAction = ReturnType<typeof fetchFavoritedItemsFailure> // Fetch lists @@ -60,15 +42,9 @@ export const FETCH_LISTS_REQUEST = '[Request] Fetch Lists' export const FETCH_LISTS_SUCCESS = '[Success] Fetch Lists' export const FETCH_LISTS_FAILURE = '[Failure] Fetch Lists' -export const fetchListsRequest = (options: ListsBrowseOptions) => - action(FETCH_LISTS_REQUEST, { options }) +export const fetchListsRequest = (options: ListsBrowseOptions) => action(FETCH_LISTS_REQUEST, { options }) -export const fetchListsSuccess = ( - lists: ListOfLists[], - items: Item[], - total: number, - options: ListsBrowseOptions -) => +export const fetchListsSuccess = (lists: ListOfLists[], items: Item[], total: number, options: ListsBrowseOptions) => action(FETCH_LISTS_SUCCESS, { lists, items, @@ -76,8 +52,7 @@ export const fetchListsSuccess = ( options }) -export const fetchListsFailure = (error: string) => - action(FETCH_LISTS_FAILURE, { error }) +export const fetchListsFailure = (error: string) => action(FETCH_LISTS_FAILURE, { error }) export type FetchListsRequestAction = ReturnType<typeof fetchListsRequest> export type FetchListsSuccessAction = ReturnType<typeof fetchListsSuccess> @@ -89,19 +64,16 @@ export const DELETE_LIST_REQUEST = '[Request] Delete List' export const DELETE_LIST_SUCCESS = '[Success] Delete List' export const DELETE_LIST_FAILURE = '[Failure] Delete List' -export const deleteListStart = (list: List) => - action(DELETE_LIST_START, { list }) +export const deleteListStart = (list: List) => action(DELETE_LIST_START, { list }) -export const deleteListRequest = (list: List) => - action(DELETE_LIST_REQUEST, { list }) +export const deleteListRequest = (list: List) => action(DELETE_LIST_REQUEST, { list }) export const deleteListSuccess = (list: List) => action(DELETE_LIST_SUCCESS, { list }) -export const deleteListFailure = (list: List, error: string) => - action(DELETE_LIST_FAILURE, { list, error }) +export const deleteListFailure = (list: List, error: string) => action(DELETE_LIST_FAILURE, { list, error }) export type DeleteListStartAction = ReturnType<typeof deleteListStart> export type DeleteListRequestAction = ReturnType<typeof deleteListRequest> @@ -121,8 +93,7 @@ export const getListSuccess = (list: ListDetails, items: Item[]) => items }) -export const getListFailure = (id: string, error: string) => - action(GET_LIST_FAILURE, { id, error }) +export const getListFailure = (id: string, error: string) => action(GET_LIST_FAILURE, { id, error }) export type GetListRequestAction = ReturnType<typeof getListRequest> export type GetListSuccessAction = ReturnType<typeof getListSuccess> @@ -133,16 +104,11 @@ export const UPDATE_LIST_REQUEST = '[Request] Update List' export const UPDATE_LIST_SUCCESS = '[Success] Update List' export const UPDATE_LIST_FAILURE = '[Failure] Update List' -export const updateListRequest = ( - id: string, - updatedList: UpdateListParameters -) => action(UPDATE_LIST_REQUEST, { id, updatedList }) +export const updateListRequest = (id: string, updatedList: UpdateListParameters) => action(UPDATE_LIST_REQUEST, { id, updatedList }) -export const updateListSuccess = (list: UpdateOrCreateList) => - action(UPDATE_LIST_SUCCESS, { list }) +export const updateListSuccess = (list: UpdateOrCreateList) => action(UPDATE_LIST_SUCCESS, { list }) -export const updateListFailure = (id: string, error: string) => - action(UPDATE_LIST_FAILURE, { id, error }) +export const updateListFailure = (id: string, error: string) => action(UPDATE_LIST_FAILURE, { id, error }) export type UpdateListRequestAction = ReturnType<typeof updateListRequest> export type UpdateListSuccessAction = ReturnType<typeof updateListSuccess> @@ -154,18 +120,12 @@ export const CREATE_LIST_SUCCESS = '[Success] Create List' export const CREATE_LIST_FAILURE = '[Failure] Create List' export const CREATE_LIST_CLEAR = '[Clear] Create List' -export const createListRequest = ({ - name, - isPrivate, - description -}: CreateListParameters) => +export const createListRequest = ({ name, isPrivate, description }: CreateListParameters) => action(CREATE_LIST_REQUEST, { name, description, isPrivate }) -export const createListSuccess = (list: UpdateOrCreateList) => - action(CREATE_LIST_SUCCESS, { list }) +export const createListSuccess = (list: UpdateOrCreateList) => action(CREATE_LIST_SUCCESS, { list }) -export const createListFailure = (error: string) => - action(CREATE_LIST_FAILURE, { error }) +export const createListFailure = (error: string) => action(CREATE_LIST_FAILURE, { error }) export const createListClear = () => action(CREATE_LIST_CLEAR) @@ -181,14 +141,10 @@ export const BULK_PICK_SUCCESS = '[Success] Bulk pick' export const BULK_PICK_FAILURE = '[Failure] Bulk pick' export const BULK_PICK_CANCEL = '[Cancel] Bulk pick' -export const bulkPickUnpickStart = (item: Item) => - action(BULK_PICK_START, { item }) +export const bulkPickUnpickStart = (item: Item) => action(BULK_PICK_START, { item }) -export const bulkPickUnpickRequest = ( - item: Item, - pickedFor: ListOfLists[], - unpickedFrom: ListOfLists[] -) => action(BULK_PICK_REQUEST, { item, pickedFor, unpickedFrom }) +export const bulkPickUnpickRequest = (item: Item, pickedFor: ListOfLists[], unpickedFrom: ListOfLists[]) => + action(BULK_PICK_REQUEST, { item, pickedFor, unpickedFrom }) export const bulkPickUnpickSuccess = ( item: Item, @@ -205,27 +161,16 @@ export const bulkPickUnpickSuccess = ( ownerRemovedFromCurrentList }) -export const bulkPickUnpickFailure = ( - item: Item, - pickedFor: ListOfLists[], - unpickedFrom: ListOfLists[], - error: string -) => action(BULK_PICK_FAILURE, { item, pickedFor, unpickedFrom, error }) +export const bulkPickUnpickFailure = (item: Item, pickedFor: ListOfLists[], unpickedFrom: ListOfLists[], error: string) => + action(BULK_PICK_FAILURE, { item, pickedFor, unpickedFrom, error }) -export const bulkPickUnpickCancel = (item: Item, error?: string) => - action(BULK_PICK_CANCEL, { item, error }) +export const bulkPickUnpickCancel = (item: Item, error?: string) => action(BULK_PICK_CANCEL, { item, error }) export type BulkPickUnpickStartAction = ReturnType<typeof bulkPickUnpickStart> -export type BulkPickUnpickRequestAction = ReturnType< - typeof bulkPickUnpickRequest -> -export type BulkPickUnpickSuccessAction = ReturnType< - typeof bulkPickUnpickSuccess -> -export type BulkPickUnpickFailureAction = ReturnType< - typeof bulkPickUnpickFailure -> +export type BulkPickUnpickRequestAction = ReturnType<typeof bulkPickUnpickRequest> +export type BulkPickUnpickSuccessAction = ReturnType<typeof bulkPickUnpickSuccess> +export type BulkPickUnpickFailureAction = ReturnType<typeof bulkPickUnpickFailure> export type BulkPickUnpickCancelAction = ReturnType<typeof bulkPickUnpickCancel> diff --git a/webapp/src/modules/favorites/reducer.spec.ts b/webapp/src/modules/favorites/reducer.spec.ts index 72a34d01a6..998e66347c 100644 --- a/webapp/src/modules/favorites/reducer.spec.ts +++ b/webapp/src/modules/favorites/reducer.spec.ts @@ -2,12 +2,7 @@ import { Item, Network } from '@dcl/schemas' import { loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' import { ItemBrowseOptions } from '../item/types' import { View } from '../ui/types' -import { - ListDetails, - ListOfLists, - Permission, - UpdateOrCreateList -} from '../vendor/decentraland/favorites/types' +import { ListDetails, ListOfLists, Permission, UpdateOrCreateList } from '../vendor/decentraland/favorites/types' import { fetchItemSuccess, fetchItemsSuccess } from '../item/actions' import { BulkPickUnpickCancelAction, @@ -181,28 +176,25 @@ const failureActions = [ } ] -describe.each(failureActions)( - `when reducing the "$failure.type" action`, - ({ request, failure }) => { - let initialState: FavoritesState +describe.each(failureActions)(`when reducing the "$failure.type" action`, ({ request, failure }) => { + let initialState: FavoritesState - beforeEach(() => { - initialState = { - ...INITIAL_STATE, - error: null, - loading: loadingReducer([], request) - } - }) + beforeEach(() => { + initialState = { + ...INITIAL_STATE, + error: null, + loading: loadingReducer([], request) + } + }) - it('should return a state with the error set and the loading state cleared', () => { - expect(favoritesReducer(initialState, failure)).toEqual({ - ...INITIAL_STATE, - error, - loading: [] - }) + it('should return a state with the error set and the loading state cleared', () => { + expect(favoritesReducer(initialState, failure)).toEqual({ + ...INITIAL_STATE, + error, + loading: [] }) - } -) + }) +}) describe('when reducing the action of canceling a bulk pick/unpick item process', () => { let requestAction: BulkPickUnpickStartAction @@ -269,12 +261,7 @@ describe('when reducing the successful action of fetching an item', () => { describe('when reducing the successful action of fetching items', () => { it('should return a state with the picks stats', () => { - expect( - favoritesReducer( - initialState, - fetchItemsSuccess([item], 1, {}, Date.now()) - ) - ).toEqual({ + expect(favoritesReducer(initialState, fetchItemsSuccess([item], 1, {}, Date.now()))).toEqual({ ...initialState, data: { ...initialState.data, @@ -297,13 +284,7 @@ describe('when reducing the successful action of fetching the favorited items', beforeEach(() => { total = 2 requestAction = fetchFavoritedItemsRequest(itemBrowseOptions) - successAction = fetchFavoritedItemsSuccess( - [{ ...item, picks: { pickedByUser: true, count: 2 } }], - createdAt, - total, - {}, - Date.now() - ) + successAction = fetchFavoritedItemsSuccess([{ ...item, picks: { pickedByUser: true, count: 2 } }], createdAt, total, {}, Date.now()) initialState = { ...initialState, @@ -368,12 +349,7 @@ describe('when reducing the successful action of fetching lists', () => { } total = 2 requestAction = fetchListsRequest(listsBrowseOptions) - successAction = fetchListsSuccess( - [newList], - [item], - total, - listsBrowseOptions - ) + successAction = fetchListsSuccess([newList], [item], total, listsBrowseOptions) initialState = { ...initialState, @@ -726,18 +702,7 @@ describe('when reducing the successful action of bulk picking and unpicking', () }) it('should return a state where the item is flagged as not picked by the user, the created date set as undefined, the counter decreased and the loading state cleared', () => { - expect( - favoritesReducer( - initialState, - bulkPickUnpickSuccess( - item, - [listOfLists], - [], - false, - ownerRemovedFromCurrentList - ) - ) - ).toEqual({ + expect(favoritesReducer(initialState, bulkPickUnpickSuccess(item, [listOfLists], [], false, ownerRemovedFromCurrentList))).toEqual({ ...INITIAL_STATE, data: { ...INITIAL_STATE.data, @@ -774,18 +739,7 @@ describe('when reducing the successful action of bulk picking and unpicking', () }) it("should return a state where the item favorite data hasn't changed and the loading state cleared", () => { - expect( - favoritesReducer( - initialState, - bulkPickUnpickSuccess( - item, - [listOfLists], - [], - true, - ownerRemovedFromCurrentList - ) - ) - ).toEqual({ + expect(favoritesReducer(initialState, bulkPickUnpickSuccess(item, [listOfLists], [], true, ownerRemovedFromCurrentList))).toEqual({ ...INITIAL_STATE, data: { ...INITIAL_STATE.data, @@ -817,18 +771,7 @@ describe('when reducing the successful action of bulk picking and unpicking', () }) it('should return a state where the item is flagged as not picked by the user, the created date set as undefined, the counter decreased and the loading state cleared', () => { - expect( - favoritesReducer( - initialState, - bulkPickUnpickSuccess( - item, - [listOfLists], - [], - true, - ownerRemovedFromCurrentList - ) - ) - ).toEqual({ + expect(favoritesReducer(initialState, bulkPickUnpickSuccess(item, [listOfLists], [], true, ownerRemovedFromCurrentList))).toEqual({ ...INITIAL_STATE, data: { ...INITIAL_STATE.data, @@ -871,18 +814,7 @@ describe('when reducing the successful action of bulk picking and unpicking', () }) it('should return a state where the item is flagged as not picked by the user, the created date set as undefined, the counter decreased and the loading state cleared', () => { - expect( - favoritesReducer( - initialState, - bulkPickUnpickSuccess( - item, - [listOfLists], - [], - false, - ownerRemovedFromCurrentList - ) - ) - ).toEqual({ + expect(favoritesReducer(initialState, bulkPickUnpickSuccess(item, [listOfLists], [], false, ownerRemovedFromCurrentList))).toEqual({ ...INITIAL_STATE, data: { ...INITIAL_STATE.data, @@ -929,18 +861,7 @@ describe('when reducing the successful action of bulk picking and unpicking', () }) it('should return a state where the item is flagged as picked by the user, the created date set as now, the counter increased and the loading state cleared', () => { - expect( - favoritesReducer( - initialState, - bulkPickUnpickSuccess( - item, - [listOfLists], - [], - true, - ownerRemovedFromCurrentList - ) - ) - ).toEqual({ + expect(favoritesReducer(initialState, bulkPickUnpickSuccess(item, [listOfLists], [], true, ownerRemovedFromCurrentList))).toEqual({ ...INITIAL_STATE, data: { ...INITIAL_STATE.data, @@ -977,18 +898,7 @@ describe('when reducing the successful action of bulk picking and unpicking', () }) it("should return an estate where the pick didn't change at all and the loading state cleared", () => { - expect( - favoritesReducer( - initialState, - bulkPickUnpickSuccess( - item, - [listOfLists], - [], - true, - ownerRemovedFromCurrentList - ) - ) - ).toEqual({ + expect(favoritesReducer(initialState, bulkPickUnpickSuccess(item, [listOfLists], [], true, ownerRemovedFromCurrentList))).toEqual({ ...initialState, loading: [] }) @@ -1037,18 +947,7 @@ describe('when reducing the successful action of bulk picking and unpicking', () }) it('should decrease or increase the item count in the lists accordingly and remove the loading state', () => { - expect( - favoritesReducer( - initialState, - bulkPickUnpickSuccess( - item, - [aListOfLists], - [anotherListOfLists], - true, - false - ) - ) - ).toEqual({ + expect(favoritesReducer(initialState, bulkPickUnpickSuccess(item, [aListOfLists], [anotherListOfLists], true, false))).toEqual({ ...initialState, data: { ...initialState.data, diff --git a/webapp/src/modules/favorites/reducer.ts b/webapp/src/modules/favorites/reducer.ts index 438043174d..c2e71c0a3d 100644 --- a/webapp/src/modules/favorites/reducer.ts +++ b/webapp/src/modules/favorites/reducer.ts @@ -1,13 +1,5 @@ -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' -import { - FETCH_ITEM_SUCCESS, - FETCH_ITEMS_SUCCESS, - FetchItemsSuccessAction, - FetchItemSuccessAction -} from '../item/actions' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' +import { FETCH_ITEM_SUCCESS, FETCH_ITEMS_SUCCESS, FetchItemsSuccessAction, FetchItemSuccessAction } from '../item/actions' import { ListDetails } from '../vendor/decentraland/favorites/types' import { FETCH_FAVORITED_ITEMS_REQUEST, @@ -56,10 +48,10 @@ import { BULK_PICK_CANCEL, BulkPickUnpickStartAction, BulkPickUnpickCancelAction, - BULK_PICK_START + BULK_PICK_START, + GET_LIST_REQUEST } from './actions' import { FavoritesData, List } from './types' -import { GET_LIST_REQUEST } from './actions' export type FavoritesState = { data: { @@ -104,10 +96,7 @@ type FavoritesReducerAction = | BulkPickUnpickCancelAction | CreateListClearAction -export function favoritesReducer( - state = INITIAL_STATE, - action: FavoritesReducerAction -): FavoritesState { +export function favoritesReducer(state = INITIAL_STATE, action: FavoritesReducerAction): FavoritesState { switch (action.type) { case FETCH_LISTS_REQUEST: case GET_LIST_REQUEST: @@ -137,10 +126,7 @@ export function favoritesReducer( ...state.data, items: { ...state.data.items, - [item.id]: - state.data.items[item.id] && item.picks - ? { ...state.data.items[item.id], ...item.picks } - : item.picks + [item.id]: state.data.items[item.id] && item.picks ? { ...state.data.items[item.id], ...item.picks } : item.picks } } } @@ -244,13 +230,7 @@ export function favoritesReducer( } case BULK_PICK_SUCCESS: { - const { - isPickedByUser, - ownerRemovedFromCurrentList, - pickedFor, - unpickedFrom, - item - } = action.payload + const { isPickedByUser, ownerRemovedFromCurrentList, pickedFor, unpickedFrom, item } = action.payload const wasPickedBefore = state.data.items[item.id]?.pickedByUser ?? false const isNowPicked = isPickedByUser && !ownerRemovedFromCurrentList @@ -265,18 +245,10 @@ export function favoritesReducer( createdAt = Date.now() } const pickedLists = pickedFor - .map(list => - state.data.lists[list.id] - ? { ...state.data.lists[list.id], itemsCount: list.itemsCount + 1 } - : undefined - ) + .map(list => (state.data.lists[list.id] ? { ...state.data.lists[list.id], itemsCount: list.itemsCount + 1 } : undefined)) .filter(Boolean) as List[] const unpickedLists = unpickedFrom - .map(list => - state.data.lists[list.id] - ? { ...state.data.lists[list.id], itemsCount: list.itemsCount - 1 } - : undefined - ) + .map(list => (state.data.lists[list.id] ? { ...state.data.lists[list.id], itemsCount: list.itemsCount - 1 } : undefined)) .filter(Boolean) as List[] return { @@ -313,9 +285,7 @@ export function favoritesReducer( ...state.data.lists, [list.id]: { ...state.data.lists[list.id], - itemsCount: Object.hasOwn(list, 'itemsCount') - ? (list as ListDetails).itemsCount - : state.data.lists[list.id]?.itemsCount ?? 0, + itemsCount: Object.hasOwn(list, 'itemsCount') ? (list as ListDetails).itemsCount : state.data.lists[list.id]?.itemsCount ?? 0, ...list } } diff --git a/webapp/src/modules/favorites/sagas.spec.ts b/webapp/src/modules/favorites/sagas.spec.ts index 600b23a881..f4402fe05d 100644 --- a/webapp/src/modules/favorites/sagas.spec.ts +++ b/webapp/src/modules/favorites/sagas.spec.ts @@ -5,24 +5,14 @@ import { expectSaga } from 'redux-saga-test-plan' import { throwError } from 'redux-saga-test-plan/providers' import { Item } from '@dcl/schemas' import { CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions' -import { - CLOSE_MODAL, - closeModal, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' +import { CLOSE_MODAL, closeModal, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { FavoritesAPI } from '../vendor/decentraland/favorites/api' import { getAddress } from '../wallet/selectors' import { ItemBrowseOptions } from '../item/types' import { View } from '../ui/types' import { getIdentity as getAccountIdentity } from '../identity/utils' import { ItemAPI } from '../vendor/decentraland/item/api' -import { - ListDetails, - ListOfLists, - ListsSortBy, - Permission, - UpdateOrCreateList -} from '../vendor/decentraland/favorites/types' +import { ListDetails, ListOfLists, ListsSortBy, Permission, UpdateOrCreateList } from '../vendor/decentraland/favorites/types' import { locations } from '../routing/locations' import { SortDirection } from '../routing/types' import { CatalogAPI } from '../vendor/decentraland/catalog/api' @@ -61,20 +51,9 @@ import { updateListSuccess } from './actions' import { favoritesSaga } from './sagas' -import { - getList, - getListId, - isOwnerUnpickingFromCurrentList -} from './selectors' +import { getList, getListId, isOwnerUnpickingFromCurrentList } from './selectors' import { convertListsBrowseSortByIntoApiSortBy } from './utils' -import { - CreateListParameters, - FavoritedItems, - List, - ListsBrowseOptions, - ListsBrowseSortBy, - UpdateListParameters -} from './types' +import { CreateListParameters, FavoritedItems, List, ListsBrowseOptions, ListsBrowseSortBy, UpdateListParameters } from './types' let item: Item let address: string @@ -138,10 +117,7 @@ describe('when handling the request for fetching favorited items', () => { [select(getAddress), address], [select(getIsMarketplaceServerEnabled), true], [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.getPicksByList), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.getPicksByList), Promise.reject(error)] ]) .call.like({ fn: FavoritesAPI.prototype.getPicksByList, @@ -178,14 +154,8 @@ describe('when handling the request for fetching favorited items', () => { [select(getIsMarketplaceServerEnabled), isMarketplaceFFOn], [select(getAddress), address], [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.getPicksByList), - Promise.resolve({ results: favoritedItemIds, total }) - ], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.getPicksByList), Promise.resolve({ results: favoritedItemIds, total })], + [matchers.call.fn(CatalogAPI.prototype.get), Promise.reject(error)] ]) .call.like({ fn: CatalogAPI.prototype.get, @@ -216,14 +186,8 @@ describe('when handling the request for fetching favorited items', () => { [select(getIsMarketplaceServerEnabled), isMarketplaceFFOn], [select(getAddress), address], [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.getPicksByList), - Promise.resolve({ results: favoritedItemIds, total }) - ], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.getPicksByList), Promise.resolve({ results: favoritedItemIds, total })], + [matchers.call.fn(CatalogAPI.prototype.get), Promise.reject(error)] ]) .call.like({ fn: CatalogAPI.prototype.get, @@ -257,14 +221,8 @@ describe('when handling the request for fetching favorited items', () => { [select(getAddress), address], [select(getIsMarketplaceServerEnabled), true], [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.getPicksByList), - Promise.resolve({ results: favoritedItemIds, total }) - ], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.resolve({ data: [item] }) - ] + [matchers.call.fn(FavoritesAPI.prototype.getPicksByList), Promise.resolve({ results: favoritedItemIds, total })], + [matchers.call.fn(CatalogAPI.prototype.get), Promise.resolve({ data: [item] })] ]) .call.like({ fn: FavoritesAPI.prototype.getPicksByList, @@ -312,10 +270,7 @@ describe('when handling the request for fetching favorited items', () => { [select(getAddress), address], [select(getIsMarketplaceServerEnabled), true], [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.getPicksByList), - { results: favoritedItemIds, total } - ] + [matchers.call.fn(FavoritesAPI.prototype.getPicksByList), { results: favoritedItemIds, total }] ]) .call.like({ fn: FavoritesAPI.prototype.getPicksByList, @@ -352,10 +307,7 @@ describe('when handling the request for fetching favorited items', () => { [select(getListId), listId], [select(getAddress), null], [select(getIsMarketplaceServerEnabled), true], - [ - matchers.call.fn(FavoritesAPI.prototype.getPicksByList), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.getPicksByList), Promise.reject(error)] ]) .call.like({ fn: FavoritesAPI.prototype.getPicksByList, @@ -386,14 +338,8 @@ describe('when handling the request for fetching favorited items', () => { [select(getListId), listId], [select(getAddress), null], [select(getIsMarketplaceServerEnabled), true], - [ - matchers.call.fn(FavoritesAPI.prototype.getPicksByList), - Promise.resolve({ results: favoritedItemIds, total }) - ], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.getPicksByList), Promise.resolve({ results: favoritedItemIds, total })], + [matchers.call.fn(CatalogAPI.prototype.get), Promise.reject(error)] ]) .call.like({ fn: CatalogAPI.prototype.get, @@ -425,14 +371,8 @@ describe('when handling the request for fetching favorited items', () => { [select(getListId), listId], [select(getAddress), null], [select(getIsMarketplaceServerEnabled), true], - [ - matchers.call.fn(FavoritesAPI.prototype.getPicksByList), - Promise.resolve({ results: favoritedItemIds, total }) - ], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.resolve({ data: [item] }) - ] + [matchers.call.fn(FavoritesAPI.prototype.getPicksByList), Promise.resolve({ results: favoritedItemIds, total })], + [matchers.call.fn(CatalogAPI.prototype.get), Promise.resolve({ data: [item] })] ]) .call.like({ fn: FavoritesAPI.prototype.getPicksByList, @@ -479,10 +419,7 @@ describe('when handling the request for fetching favorited items', () => { [select(getListId), listId], [select(getAddress), null], [select(getIsMarketplaceServerEnabled), true], - [ - matchers.call.fn(FavoritesAPI.prototype.getPicksByList), - { results: favoritedItemIds, total } - ] + [matchers.call.fn(FavoritesAPI.prototype.getPicksByList), { results: favoritedItemIds, total }] ]) .call.like({ fn: FavoritesAPI.prototype.getPicksByList, @@ -537,10 +474,7 @@ describe('when handling the request for fetching lists', () => { return expectSaga(favoritesSaga, getIdentity) .provide([ [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.getLists), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.getLists), Promise.reject(error)] ]) .call.like({ fn: FavoritesAPI.prototype.getLists, @@ -577,17 +511,8 @@ describe('when handling the request for fetching lists', () => { return expectSaga(favoritesSaga, getIdentity) .provide([ [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.getLists), - Promise.reject(error) - ], - [ - call( - convertListsBrowseSortByIntoApiSortBy, - options.sortBy ?? ListsBrowseSortBy.NAME_ASC - ), - convertedSortBy - ] + [matchers.call.fn(FavoritesAPI.prototype.getLists), Promise.reject(error)], + [call(convertListsBrowseSortByIntoApiSortBy, options.sortBy ?? ListsBrowseSortBy.NAME_ASC), convertedSortBy] ]) .call.like({ fn: FavoritesAPI.prototype.getLists, @@ -614,10 +539,7 @@ describe('when handling the request for fetching lists', () => { return expectSaga(favoritesSaga, getIdentity) .provide([ [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.getLists), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.getLists), Promise.reject(error)] ]) .call.like({ fn: FavoritesAPI.prototype.getLists, @@ -664,10 +586,7 @@ describe('when handling the request for fetching lists', () => { let items: Item[] beforeEach(() => { - items = [ - { id: 'anItemId', name: 'anItemName' } as Item, - { id: 'anotherItemId', name: 'anotherItemName' } as Item - ] + items = [{ id: 'anItemId', name: 'anItemName' } as Item, { id: 'anotherItemId', name: 'anotherItemName' } as Item] }) describe('and there are no items in the state', () => { @@ -676,15 +595,9 @@ describe('when handling the request for fetching lists', () => { .provide([ [call(getAccountIdentity), Promise.resolve()], [select(getIsMarketplaceServerEnabled), true], - [ - matchers.call.fn(FavoritesAPI.prototype.getLists), - Promise.resolve({ results: lists, total }) - ], + [matchers.call.fn(FavoritesAPI.prototype.getLists), Promise.resolve({ results: lists, total })], [select(getItemsData), {}], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.resolve({ data: items }) - ] + [matchers.call.fn(CatalogAPI.prototype.get), Promise.resolve({ data: items })] ]) .call.like({ fn: FavoritesAPI.prototype.getLists, @@ -702,10 +615,7 @@ describe('when handling the request for fetching lists', () => { args: [ { first: 2, - ids: [ - ...lists[0].previewOfItemIds, - ...lists[1].previewOfItemIds - ] + ids: [...lists[0].previewOfItemIds, ...lists[1].previewOfItemIds] } ] }) @@ -721,15 +631,9 @@ describe('when handling the request for fetching lists', () => { .provide([ [call(getAccountIdentity), Promise.resolve()], [select(getIsMarketplaceServerEnabled), true], - [ - matchers.call.fn(FavoritesAPI.prototype.getLists), - Promise.resolve({ results: lists, total }) - ], + [matchers.call.fn(FavoritesAPI.prototype.getLists), Promise.resolve({ results: lists, total })], [select(getItemsData), { anItemId: items[0] }], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.resolve({ data: [items[1]] }) - ] + [matchers.call.fn(CatalogAPI.prototype.get), Promise.resolve({ data: [items[1]] })] ]) .call.like({ fn: FavoritesAPI.prototype.getLists, @@ -762,14 +666,8 @@ describe('when handling the request for fetching lists', () => { return expectSaga(favoritesSaga, getIdentity) .provide([ [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.getLists), - Promise.resolve({ results: lists, total }) - ], - [ - select(getItemsData), - { [items[0].id]: items[0], [items[1].id]: items[1] } - ] + [matchers.call.fn(FavoritesAPI.prototype.getLists), Promise.resolve({ results: lists, total })], + [select(getItemsData), { [items[0].id]: items[0], [items[1].id]: items[1] }] ]) .call.like({ fn: FavoritesAPI.prototype.getLists, @@ -808,10 +706,7 @@ describe('when handling the request for fetching lists', () => { previewOfItemIds: ['anotherItemId'] } ] - items = [ - { id: 'anItemId', name: 'anItemName' } as Item, - { id: 'anotherItemId', name: 'anotherItemName' } as Item - ] + items = [{ id: 'anItemId', name: 'anItemName' } as Item, { id: 'anotherItemId', name: 'anotherItemName' } as Item] }) it('should dispatch an action signaling the success of the handled action', () => { @@ -819,15 +714,9 @@ describe('when handling the request for fetching lists', () => { .provide([ [call(getAccountIdentity), Promise.resolve()], [select(getIsMarketplaceServerEnabled), true], - [ - matchers.call.fn(FavoritesAPI.prototype.getLists), - Promise.resolve({ results: lists, total }) - ], + [matchers.call.fn(FavoritesAPI.prototype.getLists), Promise.resolve({ results: lists, total })], [select(getItemsData), {}], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.resolve({ data: items }) - ] + [matchers.call.fn(CatalogAPI.prototype.get), Promise.resolve({ data: items })] ]) .call.like({ fn: FavoritesAPI.prototype.getLists, @@ -845,12 +734,7 @@ describe('when handling the request for fetching lists', () => { args: [ { first: 2, - ids: Array.from( - new Set([ - ...lists[0].previewOfItemIds, - ...lists[1].previewOfItemIds - ]) - ) + ids: Array.from(new Set([...lists[0].previewOfItemIds, ...lists[1].previewOfItemIds])) } ] }) @@ -867,10 +751,7 @@ describe('when handling the request for fetching lists', () => { .provide([ [call(getAccountIdentity), Promise.resolve()], [select(getIsMarketplaceServerEnabled), true], - [ - matchers.call.fn(FavoritesAPI.prototype.getLists), - Promise.resolve({ results: lists, total }) - ], + [matchers.call.fn(FavoritesAPI.prototype.getLists), Promise.resolve({ results: lists, total })], [select(getItemsData), {}], [matchers.call.fn(CatalogAPI.prototype.get), Promise.reject(error)] ]) @@ -890,10 +771,7 @@ describe('when handling the request for fetching lists', () => { args: [ { first: 2, - ids: [ - ...lists[0].previewOfItemIds, - ...lists[1].previewOfItemIds - ] + ids: [...lists[0].previewOfItemIds, ...lists[1].previewOfItemIds] } ] }) @@ -976,10 +854,7 @@ describe('when handling the request for deleting a list', () => { return expectSaga(favoritesSaga, getIdentity) .provide([ [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.deleteList), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.deleteList), Promise.reject(error)] ]) .call.like({ fn: FavoritesAPI.prototype.deleteList, @@ -996,10 +871,7 @@ describe('when handling the request for deleting a list', () => { return expectSaga(favoritesSaga, getIdentity) .provide([ [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.deleteList), - Promise.resolve() - ], + [matchers.call.fn(FavoritesAPI.prototype.deleteList), Promise.resolve()], [select(getLocation), { pathname: locations.lists() }] ]) .call.like({ @@ -1061,12 +933,7 @@ describe('when handling the request for getting a list', () => { describe('and the call to the favorites api fails', () => { it('should dispatch an action signaling the failure of the handled action', () => { return expectSaga(favoritesSaga, getIdentity) - .provide([ - [ - matchers.call.fn(FavoritesAPI.prototype.getList), - Promise.reject(error) - ] - ]) + .provide([[matchers.call.fn(FavoritesAPI.prototype.getList), Promise.reject(error)]]) .call.like({ fn: FavoritesAPI.prototype.getList, args: [list.id] @@ -1093,16 +960,10 @@ describe('when handling the request for getting a list', () => { it('should dispatch an action signaling the success of the handled action with the received list and items', () => { return expectSaga(favoritesSaga, getIdentity) .provide([ - [ - matchers.call.fn(FavoritesAPI.prototype.getList), - Promise.resolve(list) - ], + [matchers.call.fn(FavoritesAPI.prototype.getList), Promise.resolve(list)], [select(getIsMarketplaceServerEnabled), true], [select(getItemsData), {}], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.resolve({ data: items }) - ] + [matchers.call.fn(CatalogAPI.prototype.get), Promise.resolve({ data: items })] ]) .call.like({ fn: FavoritesAPI.prototype.getList, @@ -1138,16 +999,10 @@ describe('when handling the request for getting a list', () => { it('should dispatch an action signaling the success of the handled action with the received list and the items that are not in the state', () => { return expectSaga(favoritesSaga, getIdentity) .provide([ - [ - matchers.call.fn(FavoritesAPI.prototype.getList), - Promise.resolve(list) - ], + [matchers.call.fn(FavoritesAPI.prototype.getList), Promise.resolve(list)], [select(getIsMarketplaceServerEnabled), true], [select(getItemsData), { anotherItemId: {} }], - [ - matchers.call.fn(CatalogAPI.prototype.get), - Promise.resolve({ data: items }) - ] + [matchers.call.fn(CatalogAPI.prototype.get), Promise.resolve({ data: items })] ]) .call.like({ fn: FavoritesAPI.prototype.getList, @@ -1196,12 +1051,7 @@ describe('when handling the request for updating a list', () => { describe('and the call to the favorites api fails', () => { it('should dispatch an action signaling the failure of the handled action', () => { return expectSaga(favoritesSaga, getIdentity) - .provide([ - [ - matchers.call.fn(FavoritesAPI.prototype.updateList), - Promise.reject(error) - ] - ]) + .provide([[matchers.call.fn(FavoritesAPI.prototype.updateList), Promise.reject(error)]]) .call.like({ fn: FavoritesAPI.prototype.updateList, args: [updatedList.id, listToUpdate] @@ -1215,12 +1065,7 @@ describe('when handling the request for updating a list', () => { describe('and the call to the favorites api succeeds', () => { it('should dispatch an action signaling the success of the handled action', () => { return expectSaga(favoritesSaga, getIdentity) - .provide([ - [ - matchers.call.fn(FavoritesAPI.prototype.updateList), - Promise.resolve(updatedList) - ] - ]) + .provide([[matchers.call.fn(FavoritesAPI.prototype.updateList), Promise.resolve(updatedList)]]) .call.like({ fn: FavoritesAPI.prototype.updateList, args: [updatedList.id, listToUpdate] @@ -1274,10 +1119,7 @@ describe('when handling the request for creating a list', () => { .provide([ [select(getLocation), { pathname: locations.lists() }], [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.createList), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.createList), Promise.reject(error)] ]) .call.like({ fn: FavoritesAPI.prototype.createList, @@ -1296,10 +1138,7 @@ describe('when handling the request for creating a list', () => { .provide([ [select(getLocation), { pathname: locations.lists() }], [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.createList), - Promise.resolve(returnedList) - ] + [matchers.call.fn(FavoritesAPI.prototype.createList), Promise.resolve(returnedList)] ]) .call.like({ fn: FavoritesAPI.prototype.createList, @@ -1318,10 +1157,7 @@ describe('when handling the request for creating a list', () => { .provide([ [select(getLocation), { pathname: locations.browse() }], [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.createList), - Promise.resolve(returnedList) - ] + [matchers.call.fn(FavoritesAPI.prototype.createList), Promise.resolve(returnedList)] ]) .call.like({ fn: FavoritesAPI.prototype.createList, @@ -1498,10 +1334,7 @@ describe('when handling the request to perform picks and unpicks in bulk', () => return expectSaga(favoritesSaga, getIdentity) .provide([ [call(getAccountIdentity), Promise.resolve()], - [ - matchers.call.fn(FavoritesAPI.prototype.bulkPickUnpick), - Promise.reject(error) - ] + [matchers.call.fn(FavoritesAPI.prototype.bulkPickUnpick), Promise.reject(error)] ]) .call.like({ fn: FavoritesAPI.prototype.bulkPickUnpick, @@ -1519,10 +1352,7 @@ describe('when handling the request to perform picks and unpicks in bulk', () => .provide([ [call(getAccountIdentity), Promise.resolve()], [select(isOwnerUnpickingFromCurrentList, [sndList]), true], - [ - matchers.call.fn(FavoritesAPI.prototype.bulkPickUnpick), - Promise.resolve({ pickedByUser: true }) - ] + [matchers.call.fn(FavoritesAPI.prototype.bulkPickUnpick), Promise.resolve({ pickedByUser: true })] ]) .call.like({ fn: FavoritesAPI.prototype.bulkPickUnpick, diff --git a/webapp/src/modules/favorites/sagas.ts b/webapp/src/modules/favorites/sagas.ts index a40ea2d3f3..181353e423 100644 --- a/webapp/src/modules/favorites/sagas.ts +++ b/webapp/src/modules/favorites/sagas.ts @@ -2,23 +2,11 @@ import { getLocation, push } from 'connected-react-router' import { call, put, race, select, take, takeEvery } from 'redux-saga/effects' import { CatalogFilters, Item } from '@dcl/schemas' import { AuthIdentity } from 'decentraland-crypto-fetch' -import { - ConnectWalletSuccessAction, - CONNECT_WALLET_FAILURE, - CONNECT_WALLET_SUCCESS -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { ConnectWalletSuccessAction, CONNECT_WALLET_FAILURE, CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions' import { isErrorWithMessage } from '../../lib/error' import { ItemBrowseOptions } from '../item/types' -import { - closeModal, - CloseModalAction, - CLOSE_MODAL, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' -import { - FavoritesAPI, - MARKETPLACE_FAVORITES_SERVER_URL -} from '../vendor/decentraland/favorites/api' +import { closeModal, CloseModalAction, CLOSE_MODAL, openModal } from 'decentraland-dapps/dist/modules/modal/actions' +import { FavoritesAPI, MARKETPLACE_FAVORITES_SERVER_URL } from '../vendor/decentraland/favorites/api' import { getIdentity as getAccountIdentity } from '../identity/utils' import { CatalogAPI } from '../vendor/decentraland/catalog/api' import { retryParams } from '../vendor/decentraland/utils' @@ -75,11 +63,7 @@ import { unpickItemFailure, BULK_PICK_FAILURE } from './actions' -import { - getList, - getListId, - isOwnerUnpickingFromCurrentList -} from './selectors' +import { getList, getListId, isOwnerUnpickingFromCurrentList } from './selectors' import { convertListsBrowseSortByIntoApiSortBy } from './utils' import { List } from './types' import { getData as getItemsData } from '../item/selectors' @@ -91,20 +75,11 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { retryDelay: retryParams.delay, identity: getIdentity } - const favoritesAPI = new FavoritesAPI( - MARKETPLACE_FAVORITES_SERVER_URL, - API_OPTS - ) + const favoritesAPI = new FavoritesAPI(MARKETPLACE_FAVORITES_SERVER_URL, API_OPTS) const catalogAPI = new CatalogAPI(NFT_SERVER_URL, API_OPTS) - const marketplaceServerCatalogAPI = new CatalogAPI( - MARKETPLACE_SERVER_URL, - API_OPTS - ) - - yield takeEvery( - FETCH_FAVORITED_ITEMS_REQUEST, - handleFetchFavoritedItemsRequest - ) + const marketplaceServerCatalogAPI = new CatalogAPI(MARKETPLACE_SERVER_URL, API_OPTS) + + yield takeEvery(FETCH_FAVORITED_ITEMS_REQUEST, handleFetchFavoritedItemsRequest) yield takeEvery(FETCH_LISTS_REQUEST, handleFetchListsRequest) yield takeEvery(DELETE_LIST_REQUEST, handleDeleteListRequest) yield takeEvery(DELETE_LIST_START, handleDeleteListStart) @@ -114,15 +89,10 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { yield takeEvery(CREATE_LIST_REQUEST, handleCreateListRequest) yield takeEvery(BULK_PICK_START, handleBulkPickStart) yield takeEvery(BULK_PICK_REQUEST, handleBulkPickRequest) - yield takeEvery( - [BULK_PICK_SUCCESS, BULK_PICK_FAILURE], - handleBulkPickSuccessOrFailure - ) + yield takeEvery([BULK_PICK_SUCCESS, BULK_PICK_FAILURE], handleBulkPickSuccessOrFailure) function* getCatalogAPI() { - const isMarketplaceServerEnabled: boolean = yield select( - getIsMarketplaceServerEnabled - ) + const isMarketplaceServerEnabled: boolean = yield select(getIsMarketplaceServerEnabled) return isMarketplaceServerEnabled ? marketplaceServerCatalogAPI : catalogAPI } @@ -148,9 +118,7 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { return previewItems } - function* handleFetchFavoritedItemsRequest( - action: FetchFavoritedItemsRequestAction - ) { + function* handleFetchFavoritedItemsRequest(action: FetchFavoritedItemsRequestAction) { const { filters } = action.payload.options try { const address: ReturnType<typeof getAddress> = yield select(getAddress) @@ -159,20 +127,12 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { let items: Item[] = [] const listId: string = yield select(getListId) - const { - results, - total - }: Awaited<ReturnType<typeof favoritesAPI.getPicksByList>> = yield call( + const { results, total }: Awaited<ReturnType<typeof favoritesAPI.getPicksByList>> = yield call( [favoritesAPI, 'getPicksByList'], listId, filters ) - const createdAt = Object.fromEntries( - results.map(favoritedItem => [ - favoritedItem.itemId, - favoritedItem.createdAt - ]) - ) + const createdAt = Object.fromEntries(results.map(favoritedItem => [favoritedItem.itemId, favoritedItem.createdAt])) const ids = results.map(({ itemId }) => itemId) const optionsFilters = { first: results.length, @@ -186,29 +146,13 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { const api: CatalogAPI = yield call(getCatalogAPI) if (results.length > 0) { - const result: { data: Item[] } = yield call( - [api, 'get'], - optionsFilters - ) + const result: { data: Item[] } = yield call([api, 'get'], optionsFilters) items = result.data } - yield put( - fetchFavoritedItemsSuccess( - items, - createdAt, - total, - options, - Date.now(), - action.payload.forceLoadMore - ) - ) + yield put(fetchFavoritedItemsSuccess(items, createdAt, total, options, Date.now(), action.payload.forceLoadMore)) } catch (error) { - yield put( - fetchFavoritedItemsFailure( - isErrorWithMessage(error) ? error.message : 'Unknown error' - ) - ) + yield put(fetchFavoritedItemsFailure(isErrorWithMessage(error) ? error.message : 'Unknown error')) } } @@ -230,43 +174,26 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { sortDirection = sortValues.sortDirection } - const { - results, - total - }: Awaited<ReturnType<typeof favoritesAPI.getLists>> = yield call( - [favoritesAPI, 'getLists'], - { - first: options.first, - skip: options.skip ?? (options.page - 1) * options.first, - sortBy, - sortDirection - } - ) + const { results, total }: Awaited<ReturnType<typeof favoritesAPI.getLists>> = yield call([favoritesAPI, 'getLists'], { + first: options.first, + skip: options.skip ?? (options.page - 1) * options.first, + sortBy, + sortDirection + }) - const previewListsItemIds = Array.from( - new Set(results.flatMap(list => list.previewOfItemIds)) - ) - let previewItems: Item[] = yield call( - fetchPreviewItems, - previewListsItemIds - ) + const previewListsItemIds = Array.from(new Set(results.flatMap(list => list.previewOfItemIds))) + const previewItems: Item[] = yield call(fetchPreviewItems, previewListsItemIds) yield put(fetchListsSuccess(results, previewItems, total, options)) } catch (error) { - yield put( - fetchListsFailure( - isErrorWithMessage(error) ? error.message : 'Unknown error' - ) - ) + yield put(fetchListsFailure(isErrorWithMessage(error) ? error.message : 'Unknown error')) } } function* handleDeleteListStart(action: DeleteListStartAction) { const { list } = action.payload if (list.itemsCount > 0) { - yield put( - openModal('ConfirmDeleteListModal', { list: action.payload.list }) - ) + yield put(openModal('ConfirmDeleteListModal', { list: action.payload.list })) } else { yield put(deleteListRequest(list)) } @@ -286,12 +213,7 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { yield call([favoritesAPI, 'deleteList'], list.id) yield put(deleteListSuccess(list)) } catch (error) { - yield put( - deleteListFailure( - list, - isErrorWithMessage(error) ? error.message : 'Unknown error' - ) - ) + yield put(deleteListFailure(list, isErrorWithMessage(error) ? error.message : 'Unknown error')) } } @@ -299,23 +221,15 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { const { id } = action.payload try { - const list: Awaited<ReturnType<typeof favoritesAPI.getList>> = yield call( - [favoritesAPI, 'getList'], - id - ) + const list: Awaited<ReturnType<typeof favoritesAPI.getList>> = yield call([favoritesAPI, 'getList'], id) - let { previewOfItemIds } = list + const { previewOfItemIds } = list - let previewItems: Item[] = yield call(fetchPreviewItems, previewOfItemIds) + const previewItems: Item[] = yield call(fetchPreviewItems, previewOfItemIds) yield put(getListSuccess(list, previewItems)) } catch (error) { - yield put( - getListFailure( - id, - isErrorWithMessage(error) ? error.message : 'Unknown error' - ) - ) + yield put(getListFailure(id, isErrorWithMessage(error) ? error.message : 'Unknown error')) } } @@ -323,17 +237,10 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { const { id, updatedList } = action.payload try { - const list: Awaited<ReturnType< - typeof favoritesAPI.updateList - >> = yield call([favoritesAPI, 'updateList'], id, updatedList) + const list: Awaited<ReturnType<typeof favoritesAPI.updateList>> = yield call([favoritesAPI, 'updateList'], id, updatedList) yield put(updateListSuccess(list)) } catch (error) { - yield put( - updateListFailure( - id, - isErrorWithMessage(error) ? error.message : 'Unknown error' - ) - ) + yield put(updateListFailure(id, isErrorWithMessage(error) ? error.message : 'Unknown error')) } } @@ -343,9 +250,7 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { const { pathname } = yield select(getLocation) // Force the user to have the signed identity yield call(getAccountIdentity) - const list: Awaited<ReturnType< - typeof favoritesAPI.createList - >> = yield call([favoritesAPI, 'createList'], { + const list: Awaited<ReturnType<typeof favoritesAPI.createList>> = yield call([favoritesAPI, 'createList'], { name, isPrivate, description @@ -355,11 +260,7 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { yield put(push(locations.list(list.id))) } } catch (error) { - yield put( - createListFailure( - isErrorWithMessage(error) ? error.message : 'Unknown error' - ) - ) + yield put(createListFailure(isErrorWithMessage(error) ? error.message : 'Unknown error')) } } @@ -424,12 +325,7 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { yield put(bulkPickUnpickRequest(item, [pickedList], [])) } } catch (error) { - yield put( - bulkPickUnpickCancel( - item, - isErrorWithMessage(error) ? error.message : 'Unknown error' - ) - ) + yield put(bulkPickUnpickCancel(item, isErrorWithMessage(error) ? error.message : 'Unknown error')) } } @@ -439,9 +335,7 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { try { // Force the user to have the signed identity yield call(getAccountIdentity) - const { - pickedByUser - }: Awaited<ReturnType<typeof favoritesAPI.bulkPickUnpick>> = yield call( + const { pickedByUser }: Awaited<ReturnType<typeof favoritesAPI.bulkPickUnpick>> = yield call( [favoritesAPI, 'bulkPickUnpick'], item.id, pickedFor.map(list => list.id), @@ -452,30 +346,13 @@ export function* favoritesSaga(getIdentity: () => AuthIdentity | undefined) { unpickedFrom ) - yield put( - bulkPickUnpickSuccess( - item, - pickedFor, - unpickedFrom, - pickedByUser, - isOwnerUnpickingFromListInView - ) - ) + yield put(bulkPickUnpickSuccess(item, pickedFor, unpickedFrom, pickedByUser, isOwnerUnpickingFromListInView)) } catch (error) { - yield put( - bulkPickUnpickFailure( - item, - pickedFor, - unpickedFrom, - isErrorWithMessage(error) ? error.message : 'Unknown error' - ) - ) + yield put(bulkPickUnpickFailure(item, pickedFor, unpickedFrom, isErrorWithMessage(error) ? error.message : 'Unknown error')) } } - function* handleBulkPickSuccessOrFailure( - action: BulkPickUnpickSuccessAction | BulkPickUnpickFailureAction - ) { + function* handleBulkPickSuccessOrFailure(action: BulkPickUnpickSuccessAction | BulkPickUnpickFailureAction) { const { item, pickedFor, unpickedFrom } = action.payload if (action.type === BULK_PICK_SUCCESS) { diff --git a/webapp/src/modules/favorites/selectors.spec.ts b/webapp/src/modules/favorites/selectors.spec.ts index 97d73bb2a8..711ebc6950 100644 --- a/webapp/src/modules/favorites/selectors.spec.ts +++ b/webapp/src/modules/favorites/selectors.spec.ts @@ -1,10 +1,7 @@ import { Item } from '@dcl/schemas' import { match } from 'react-router-dom' import { RootState } from '../reducer' -import { - DEFAULT_FAVORITES_LIST_ID, - ListOfLists -} from '../vendor/decentraland/favorites' +import { DEFAULT_FAVORITES_LIST_ID, ListOfLists } from '../vendor/decentraland/favorites' import { locations } from '../routing/locations' import { INITIAL_STATE } from './reducer' import { @@ -120,18 +117,14 @@ describe('when getting the loading state of the state', () => { describe('when getting the favorites data by item id', () => { it('should return the favorites data state for the given item id', () => { - expect(getFavoritesDataByItemId(state, 'item1')).toEqual( - state.favorites.data.items.item1 - ) + expect(getFavoritesDataByItemId(state, 'item1')).toEqual(state.favorites.data.items.item1) }) }) describe('when getting the if an item is picked by user', () => { describe('and the data is already in the store', () => { it('should return the a boolean with the value', () => { - expect(getIsPickedByUser(state, 'item1')).toEqual( - state.favorites.data.items.item1?.pickedByUser - ) + expect(getIsPickedByUser(state, 'item1')).toEqual(state.favorites.data.items.item1?.pickedByUser) }) }) @@ -145,9 +138,7 @@ describe('when getting the if an item is picked by user', () => { describe('when getting the count of favorites an item has', () => { describe('and the data is already in the store', () => { it('should return the numeric value representing the count', () => { - expect(getCount(state, 'item1')).toEqual( - state.favorites.data.items.item1?.count - ) + expect(getCount(state, 'item1')).toEqual(state.favorites.data.items.item1?.count) }) }) @@ -217,9 +208,7 @@ describe('when getting if an item is being bulk picked or unpicked', () => { describe(`and it isn't not being bulk picked or unpicked`, () => { beforeEach(() => { - state.favorites.loading = [ - bulkPickUnpickRequest({ id: '0xaddress-anotherItemId' } as Item, [], []) - ] + state.favorites.loading = [bulkPickUnpickRequest({ id: '0xaddress-anotherItemId' } as Item, [], [])] }) it('should return false', () => { @@ -253,9 +242,7 @@ describe('when getting a list by id', () => { describe('and the list is loaded in the state', () => { it('should return the list', () => { - expect(getList(state, 'listId')).toEqual( - state.favorites.data.lists['listId'] - ) + expect(getList(state, 'listId')).toEqual(state.favorites.data.lists['listId']) }) }) }) @@ -312,10 +299,7 @@ describe('when getting if the lists are being loaded', () => { describe('when getting the preview loading items', () => { it('should get the items in the preview when they exist in the items state', () => { - expect(getPreviewListItems(state, 'listId')).toEqual([ - state.item.data.item1, - state.item.data.item2 - ]) + expect(getPreviewListItems(state, 'listId')).toEqual([state.item.data.item1, state.item.data.item2]) }) }) @@ -459,9 +443,7 @@ describe('when getting if the owner of the current list is unpicking an item fro }) it('should return false', () => { - expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe( - false - ) + expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe(false) }) }) @@ -471,9 +453,7 @@ describe('when getting if the owner of the current list is unpicking an item fro }) it('should return false', () => { - expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe( - false - ) + expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe(false) }) }) }) @@ -485,8 +465,7 @@ describe('when getting if the owner of the current list is unpicking an item fro wallet: { ...state.wallet, data: { - address: - state.favorites.data.lists[unpickedFrom[0].id].userAddress ?? '' + address: state.favorites.data.lists[unpickedFrom[0].id].userAddress ?? '' } as any } } @@ -498,9 +477,7 @@ describe('when getting if the owner of the current list is unpicking an item fro }) it('should return true', () => { - expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe( - true - ) + expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe(true) }) }) @@ -510,9 +487,7 @@ describe('when getting if the owner of the current list is unpicking an item fro }) it('should return false', () => { - expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe( - false - ) + expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe(false) }) }) }) @@ -557,9 +532,7 @@ describe('when getting if the owner of the current list is unpicking an item fro }) it('should return true', () => { - expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe( - true - ) + expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe(true) }) }) @@ -569,9 +542,7 @@ describe('when getting if the owner of the current list is unpicking an item fro }) it('should return false', () => { - expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe( - false - ) + expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe(false) }) }) }) @@ -583,8 +554,7 @@ describe('when getting if the owner of the current list is unpicking an item fro wallet: { ...state.wallet, data: { - address: - state.favorites.data.lists[unpickedFrom[0].id].userAddress ?? '' + address: state.favorites.data.lists[unpickedFrom[0].id].userAddress ?? '' } as any } } @@ -596,9 +566,7 @@ describe('when getting if the owner of the current list is unpicking an item fro }) it('should return true', () => { - expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe( - true - ) + expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe(true) }) }) @@ -608,9 +576,7 @@ describe('when getting if the owner of the current list is unpicking an item fro }) it('should return false', () => { - expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe( - false - ) + expect(isOwnerUnpickingFromCurrentList(state, unpickedFrom)).toBe(false) }) }) }) diff --git a/webapp/src/modules/favorites/selectors.ts b/webapp/src/modules/favorites/selectors.ts index 300a1f2868..0be66a7d65 100644 --- a/webapp/src/modules/favorites/selectors.ts +++ b/webapp/src/modules/favorites/selectors.ts @@ -3,10 +3,7 @@ import { createSelector } from 'reselect' import { Item } from '@dcl/schemas' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { getAddress } from 'decentraland-dapps/dist/modules/wallet/selectors' -import { - DEFAULT_FAVORITES_LIST_ID, - ListOfLists -} from '../vendor/decentraland/favorites' +import { DEFAULT_FAVORITES_LIST_ID, ListOfLists } from '../vendor/decentraland/favorites' import { RootState } from '../reducer' import { locations } from '../routing/locations' import { getData as getItems } from '../item/selectors' @@ -27,29 +24,18 @@ export const getLists = (state: RootState) => getData(state).lists export const getLoading = (state: RootState) => getState(state).loading export const getError = (state: RootState) => getState(state).error -export const isLoadingFavoritedItems = (state: RootState): boolean => - isLoadingType(getLoading(state), FETCH_FAVORITED_ITEMS_REQUEST) +export const isLoadingFavoritedItems = (state: RootState): boolean => isLoadingType(getLoading(state), FETCH_FAVORITED_ITEMS_REQUEST) -export const isLoadingLists = (state: RootState): boolean => - isLoadingType(getLoading(state), FETCH_LISTS_REQUEST) -export const isLoadingCreateList = (state: RootState): boolean => - isLoadingType(getLoading(state), CREATE_LIST_REQUEST) -export const isLoadingUpdateList = (state: RootState): boolean => - isLoadingType(getLoading(state), UPDATE_LIST_REQUEST) -export const isLoadingDeleteList = (state: RootState): boolean => - isLoadingType(getLoading(state), DELETE_LIST_REQUEST) -export const isLoadingBulkPicksUnpicks = (state: RootState): boolean => - isLoadingType(getLoading(state), BULK_PICK_REQUEST) +export const isLoadingLists = (state: RootState): boolean => isLoadingType(getLoading(state), FETCH_LISTS_REQUEST) +export const isLoadingCreateList = (state: RootState): boolean => isLoadingType(getLoading(state), CREATE_LIST_REQUEST) +export const isLoadingUpdateList = (state: RootState): boolean => isLoadingType(getLoading(state), UPDATE_LIST_REQUEST) +export const isLoadingDeleteList = (state: RootState): boolean => isLoadingType(getLoading(state), DELETE_LIST_REQUEST) +export const isLoadingBulkPicksUnpicks = (state: RootState): boolean => isLoadingType(getLoading(state), BULK_PICK_REQUEST) -export const getFavoritesDataByItemId = ( - state: RootState, - itemId: string -): FavoritesData | undefined => getFavoritedItems(state)[itemId] +export const getFavoritesDataByItemId = (state: RootState, itemId: string): FavoritesData | undefined => getFavoritedItems(state)[itemId] -export const getIsPickedByUser = (state: RootState, itemId: string) => - getFavoritesDataByItemId(state, itemId)?.pickedByUser || false -export const getCount = (state: RootState, itemId: string) => - getFavoritesDataByItemId(state, itemId)?.count || 0 +export const getIsPickedByUser = (state: RootState, itemId: string) => getFavoritesDataByItemId(state, itemId)?.pickedByUser || false +export const getCount = (state: RootState, itemId: string) => getFavoritesDataByItemId(state, itemId)?.count || 0 const listMatchSelector = createMatchSelector< RootState, @@ -58,41 +44,30 @@ const listMatchSelector = createMatchSelector< } >(locations.list()) -export const getListId = createSelector< - RootState, - ReturnType<typeof listMatchSelector>, - string | null ->(listMatchSelector, match => match?.params.listId || null) +export const getListId = createSelector<RootState, ReturnType<typeof listMatchSelector>, string | null>( + listMatchSelector, + match => match?.params.listId || null +) export const isPickingOrUnpicking = (state: RootState, itemId: string) => - getLoading(state).some( - ({ type, payload }) => - [BULK_PICK_REQUEST].includes(type) && payload.item.id === itemId - ) + getLoading(state).some(({ type, payload }) => [BULK_PICK_REQUEST].includes(type) && payload.item.id === itemId) -export const getList = (state: RootState, id: string): List | null => - getLists(state)[id] ?? null +export const getList = (state: RootState, id: string): List | null => getLists(state)[id] ?? null export const getPreviewListItems = (state: RootState, id: string): Item[] => getLists(state) [id]?.previewOfItemIds?.map(itemId => getItems(state)[itemId]) .filter(Boolean) ?? [] -export const isOwnerUnpickingFromCurrentList = ( - state: RootState, - unpickedFrom: ListOfLists[] -): boolean => { +export const isOwnerUnpickingFromCurrentList = (state: RootState, unpickedFrom: ListOfLists[]): boolean => { const currentListId = getListId(state) - const isCurrentListUnpicked = unpickedFrom.some( - list => list.id === currentListId - ) + const isCurrentListUnpicked = unpickedFrom.some(list => list.id === currentListId) if (!isCurrentListUnpicked || !currentListId) { return false } const userAddress = getAddress(state) const currentUnpickedList = getList(state, currentListId) const isListOwner = - currentUnpickedList?.userAddress?.toLowerCase() === - userAddress?.toLowerCase() || currentListId === DEFAULT_FAVORITES_LIST_ID + currentUnpickedList?.userAddress?.toLowerCase() === userAddress?.toLowerCase() || currentListId === DEFAULT_FAVORITES_LIST_ID return isListOwner && currentUnpickedList !== undefined } diff --git a/webapp/src/modules/favorites/utils.spec.ts b/webapp/src/modules/favorites/utils.spec.ts index 62b36a04e1..1b030877a6 100644 --- a/webapp/src/modules/favorites/utils.spec.ts +++ b/webapp/src/modules/favorites/utils.spec.ts @@ -8,27 +8,18 @@ describe.each([ [ListsBrowseSortBy.NAME_DESC, ListsSortBy.NAME, SortDirection.DESC], [ListsBrowseSortBy.NEWEST, ListsSortBy.CREATED_AT, SortDirection.DESC], [ListsBrowseSortBy.OLDEST, ListsSortBy.CREATED_AT, SortDirection.ASC], - [ - ListsBrowseSortBy.RECENTLY_UPDATED, - ListsSortBy.UPDATED_AT, - SortDirection.DESC - ] -])( - 'when converting the %s sortBy into an API sortBy', - (sortBy, expectedAPISortby, expectedAPISortDirection) => { - it(`should return the API sortBy ${expectedAPISortby} and the API sortDirection ${expectedAPISortDirection}`, () => { - expect(convertListsBrowseSortByIntoApiSortBy(sortBy)).toEqual({ - sortBy: expectedAPISortby, - sortDirection: expectedAPISortDirection - }) + [ListsBrowseSortBy.RECENTLY_UPDATED, ListsSortBy.UPDATED_AT, SortDirection.DESC] +])('when converting the %s sortBy into an API sortBy', (sortBy, expectedAPISortby, expectedAPISortDirection) => { + it(`should return the API sortBy ${expectedAPISortby} and the API sortDirection ${expectedAPISortDirection}`, () => { + expect(convertListsBrowseSortByIntoApiSortBy(sortBy)).toEqual({ + sortBy: expectedAPISortby, + sortDirection: expectedAPISortDirection }) - } -) + }) +}) describe('when converting a wrong sortBy value into an API sortBy', () => { it('should throw an error signaling that the sortBy value is wrong', () => { - expect(() => - convertListsBrowseSortByIntoApiSortBy('wrong' as ListsBrowseSortBy) - ).toThrowError('Wrong sortBy value') + expect(() => convertListsBrowseSortByIntoApiSortBy('wrong' as ListsBrowseSortBy)).toThrowError('Wrong sortBy value') }) }) diff --git a/webapp/src/modules/favorites/utils.ts b/webapp/src/modules/favorites/utils.ts index 37b05b4def..702810562c 100644 --- a/webapp/src/modules/favorites/utils.ts +++ b/webapp/src/modules/favorites/utils.ts @@ -2,9 +2,7 @@ import { SortDirection } from '../routing/types' import { ListsSortBy } from '../vendor/decentraland/favorites/types' import { ListsBrowseSortBy } from './types' -export function convertListsBrowseSortByIntoApiSortBy( - sortBy: ListsBrowseSortBy -): { sortBy: ListsSortBy; sortDirection: SortDirection } { +export function convertListsBrowseSortByIntoApiSortBy(sortBy: ListsBrowseSortBy): { sortBy: ListsSortBy; sortDirection: SortDirection } { switch (sortBy) { case ListsBrowseSortBy.NAME_ASC: return { sortBy: ListsSortBy.NAME, sortDirection: SortDirection.ASC } diff --git a/webapp/src/modules/features/selectors.spec.ts b/webapp/src/modules/features/selectors.spec.ts index a1930d522e..380f46e8b4 100644 --- a/webapp/src/modules/features/selectors.spec.ts +++ b/webapp/src/modules/features/selectors.spec.ts @@ -1,9 +1,6 @@ import { Item } from '@dcl/schemas' import { INITIAL_STATE } from 'decentraland-dapps/dist/modules/features/reducer' -import { - getIsFeatureEnabled, - hasLoadedInitialFlags -} from 'decentraland-dapps/dist/modules/features/selectors' +import { getIsFeatureEnabled, hasLoadedInitialFlags } from 'decentraland-dapps/dist/modules/features/selectors' import { ApplicationName } from 'decentraland-dapps/dist/modules/features/types' import { RootState } from '../reducer' import { @@ -19,9 +16,7 @@ import { import { FeatureName } from './types' jest.mock('decentraland-dapps/dist/modules/features/selectors', () => { - const originalModule = jest.requireActual( - 'decentraland-dapps/dist/modules/features/selectors' - ) + const originalModule = jest.requireActual('decentraland-dapps/dist/modules/features/selectors') return { __esModule: true, @@ -46,12 +41,8 @@ beforeEach(() => { loading: [] } } as any - getIsFeatureEnabledMock = getIsFeatureEnabled as jest.MockedFunction< - typeof getIsFeatureEnabled - > - hasLoadedInitialFlagsMock = hasLoadedInitialFlags as jest.MockedFunction< - typeof hasLoadedInitialFlags - > + getIsFeatureEnabledMock = getIsFeatureEnabled as jest.MockedFunction<typeof getIsFeatureEnabled> + hasLoadedInitialFlagsMock = hasLoadedInitialFlags as jest.MockedFunction<typeof hasLoadedInitialFlags> }) describe('when getting the loading state of the features state', () => { @@ -101,11 +92,7 @@ tryCatchSelectors.forEach(({ name, feature, selector }) => const isEnabled = selector(state) expect(isEnabled).toBe(false) - expect(getIsFeatureEnabledMock).toHaveBeenCalledWith( - state, - ApplicationName.MARKETPLACE, - feature - ) + expect(getIsFeatureEnabledMock).toHaveBeenCalledWith(state, ApplicationName.MARKETPLACE, feature) }) }) @@ -118,11 +105,7 @@ tryCatchSelectors.forEach(({ name, feature, selector }) => const isEnabled = selector(state) expect(isEnabled).toBe(false) - expect(getIsFeatureEnabledMock).toHaveBeenCalledWith( - state, - ApplicationName.MARKETPLACE, - feature - ) + expect(getIsFeatureEnabledMock).toHaveBeenCalledWith(state, ApplicationName.MARKETPLACE, feature) }) }) @@ -135,11 +118,7 @@ tryCatchSelectors.forEach(({ name, feature, selector }) => const isEnabled = selector(state) expect(isEnabled).toBe(true) - expect(getIsFeatureEnabledMock).toHaveBeenCalledWith( - state, - ApplicationName.MARKETPLACE, - feature - ) + expect(getIsFeatureEnabledMock).toHaveBeenCalledWith(state, ApplicationName.MARKETPLACE, feature) }) }) }) @@ -159,59 +138,50 @@ const waitForInitialLoadingSelectors = [ } ] -waitForInitialLoadingSelectors.forEach( - ({ name, feature, applicationName, selector }) => - describe(`when getting if the ${name} feature flag is enabled`, () => { - describe('when the initial flags have not been yet loaded', () => { +waitForInitialLoadingSelectors.forEach(({ name, feature, applicationName, selector }) => + describe(`when getting if the ${name} feature flag is enabled`, () => { + describe('when the initial flags have not been yet loaded', () => { + beforeEach(() => { + hasLoadedInitialFlagsMock.mockReturnValueOnce(false) + }) + + it('should return false', () => { + const isEnabled = selector(state) + + expect(isEnabled).toBe(false) + }) + }) + + describe('when the initial flags have been loaded', () => { + beforeEach(() => { + hasLoadedInitialFlagsMock.mockReturnValueOnce(true) + }) + + describe('when the feature is not enabled', () => { beforeEach(() => { - hasLoadedInitialFlagsMock.mockReturnValueOnce(false) + getIsFeatureEnabledMock.mockReturnValueOnce(false) }) it('should return false', () => { const isEnabled = selector(state) expect(isEnabled).toBe(false) + expect(getIsFeatureEnabledMock).toHaveBeenCalledWith(state, applicationName || ApplicationName.MARKETPLACE, feature) }) }) - describe('when the initial flags have been loaded', () => { + describe('when the feature is enabled', () => { beforeEach(() => { - hasLoadedInitialFlagsMock.mockReturnValueOnce(true) + getIsFeatureEnabledMock.mockReturnValueOnce(true) }) - describe('when the feature is not enabled', () => { - beforeEach(() => { - getIsFeatureEnabledMock.mockReturnValueOnce(false) - }) - - it('should return false', () => { - const isEnabled = selector(state) - - expect(isEnabled).toBe(false) - expect(getIsFeatureEnabledMock).toHaveBeenCalledWith( - state, - applicationName || ApplicationName.MARKETPLACE, - feature - ) - }) - }) + it('should return true', () => { + const isEnabled = selector(state) - describe('when the feature is enabled', () => { - beforeEach(() => { - getIsFeatureEnabledMock.mockReturnValueOnce(true) - }) - - it('should return true', () => { - const isEnabled = selector(state) - - expect(isEnabled).toBe(true) - expect(getIsFeatureEnabledMock).toHaveBeenCalledWith( - state, - applicationName || ApplicationName.MARKETPLACE, - feature - ) - }) + expect(isEnabled).toBe(true) + expect(getIsFeatureEnabledMock).toHaveBeenCalledWith(state, applicationName || ApplicationName.MARKETPLACE, feature) }) }) }) + }) ) diff --git a/webapp/src/modules/features/selectors.ts b/webapp/src/modules/features/selectors.ts index 269d42c8fe..cc275e6372 100644 --- a/webapp/src/modules/features/selectors.ts +++ b/webapp/src/modules/features/selectors.ts @@ -1,9 +1,5 @@ import { RootState } from '../reducer' -import { - getIsFeatureEnabled, - getLoading, - hasLoadedInitialFlags -} from 'decentraland-dapps/dist/modules/features/selectors' +import { getIsFeatureEnabled, getLoading, hasLoadedInitialFlags } from 'decentraland-dapps/dist/modules/features/selectors' import { ApplicationName } from 'decentraland-dapps/dist/modules/features/types' import { FeatureName } from './types' @@ -15,25 +11,15 @@ export const getIsMaintenanceEnabled = (state: RootState) => { // As this is called by the routes component which is rendered when the user enters the application, // Features might have not yet been requested and will throw in that case. try { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.MAINTENANCE - ) + return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.MAINTENANCE) } catch (e) { return false } } -export const getIsMarketplaceLaunchPopupEnabled = ( - state: RootState -): boolean => { +export const getIsMarketplaceLaunchPopupEnabled = (state: RootState): boolean => { try { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.LAUNCH_POPUP - ) + return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.LAUNCH_POPUP) } catch (e) { return false } @@ -41,11 +27,7 @@ export const getIsMarketplaceLaunchPopupEnabled = ( export const getIsCampaignHomepageBannerEnabled = (state: RootState) => { try { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.CAMPAIGN_HOMEPAGE_BANNER - ) + return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.CAMPAIGN_HOMEPAGE_BANNER) } catch (e) { return false } @@ -53,11 +35,7 @@ export const getIsCampaignHomepageBannerEnabled = (state: RootState) => { export const getIsCampaignCollectionsBannerEnabled = (state: RootState) => { try { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.CAMPAIGN_COLLECTIBLES_BANNER - ) + return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.CAMPAIGN_COLLECTIBLES_BANNER) } catch (e) { return false } @@ -65,11 +43,7 @@ export const getIsCampaignCollectionsBannerEnabled = (state: RootState) => { export const getIsCampaignBrowserEnabled = (state: RootState) => { try { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.CAMPAIGN_BROWSER - ) + return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.CAMPAIGN_BROWSER) } catch (e) { return false } @@ -77,33 +51,21 @@ export const getIsCampaignBrowserEnabled = (state: RootState) => { export const getIsSmartWearablesFTUEnabled = (state: RootState) => { if (hasLoadedInitialFlags(state)) { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.SMART_WEARABLES_FTU - ) + return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.SMART_WEARABLES_FTU) } return false } export const getIsMarketplaceServerEnabled = (state: RootState) => { if (hasLoadedInitialFlags(state)) { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.MARKETPLACE_SERVER - ) + return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.MARKETPLACE_SERVER) } return false } export const getIsChainSelectorEnabled = (state: RootState) => { if (hasLoadedInitialFlags(state)) { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.CHAIN_SELECTOR - ) + return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.CHAIN_SELECTOR) } return false } diff --git a/webapp/src/modules/features/utils.spec.ts b/webapp/src/modules/features/utils.spec.ts index ffe70e3ecf..97bb735703 100644 --- a/webapp/src/modules/features/utils.spec.ts +++ b/webapp/src/modules/features/utils.spec.ts @@ -1,10 +1,7 @@ import { expectSaga } from 'redux-saga-test-plan' import { select } from 'redux-saga/effects' import { isLoadingFeatureFlags } from 'decentraland-dapps/dist/modules/features/selectors' -import { - FETCH_APPLICATION_FEATURES_FAILURE, - FETCH_APPLICATION_FEATURES_SUCCESS -} from 'decentraland-dapps/dist/modules/features/actions' +import { FETCH_APPLICATION_FEATURES_FAILURE, FETCH_APPLICATION_FEATURES_SUCCESS } from 'decentraland-dapps/dist/modules/features/actions' import { waitForFeatureFlagsToBeLoaded } from './utils' describe('waitForFeatureFlagsToBeLoaded Util', () => { diff --git a/webapp/src/modules/features/utils.ts b/webapp/src/modules/features/utils.ts index 9b2f7b4b85..99af498368 100644 --- a/webapp/src/modules/features/utils.ts +++ b/webapp/src/modules/features/utils.ts @@ -1,8 +1,5 @@ import { race, select, take } from 'redux-saga/effects' -import { - FETCH_APPLICATION_FEATURES_FAILURE, - FETCH_APPLICATION_FEATURES_SUCCESS -} from 'decentraland-dapps/dist/modules/features/actions' +import { FETCH_APPLICATION_FEATURES_FAILURE, FETCH_APPLICATION_FEATURES_SUCCESS } from 'decentraland-dapps/dist/modules/features/actions' import { isLoadingFeatureFlags } from 'decentraland-dapps/dist/modules/features/selectors' export function* waitForFeatureFlagsToBeLoaded() { diff --git a/webapp/src/modules/identity/actions.ts b/webapp/src/modules/identity/actions.ts index 6473b0a20a..657fdc6845 100644 --- a/webapp/src/modules/identity/actions.ts +++ b/webapp/src/modules/identity/actions.ts @@ -7,21 +7,10 @@ export const GENERATE_IDENTITY_REQUEST = '[Request] Generate Identity' export const GENERATE_IDENTITY_SUCCESS = '[Success] Generate Identity' export const GENERATE_IDENTITY_FAILURE = '[Failure] Generate Identity' -export const generateIdentityRequest = (address: string) => - action(GENERATE_IDENTITY_REQUEST, { address }) -export const generateIdentitySuccess = ( - address: string, - identity: AuthIdentity -) => action(GENERATE_IDENTITY_SUCCESS, { address, identity }) -export const generateIdentityFailure = (address: string, error: string) => - action(GENERATE_IDENTITY_FAILURE, { address, error }) +export const generateIdentityRequest = (address: string) => action(GENERATE_IDENTITY_REQUEST, { address }) +export const generateIdentitySuccess = (address: string, identity: AuthIdentity) => action(GENERATE_IDENTITY_SUCCESS, { address, identity }) +export const generateIdentityFailure = (address: string, error: string) => action(GENERATE_IDENTITY_FAILURE, { address, error }) -export type GenerateIdentityRequestAction = ReturnType< - typeof generateIdentityRequest -> -export type GenerateIdentitySuccessAction = ReturnType< - typeof generateIdentitySuccess -> -export type GenerateIdentityFailureAction = ReturnType< - typeof generateIdentityFailure -> +export type GenerateIdentityRequestAction = ReturnType<typeof generateIdentityRequest> +export type GenerateIdentitySuccessAction = ReturnType<typeof generateIdentitySuccess> +export type GenerateIdentityFailureAction = ReturnType<typeof generateIdentityFailure> diff --git a/webapp/src/modules/identity/reducer.ts b/webapp/src/modules/identity/reducer.ts index 20c37c50d6..a63bf51520 100644 --- a/webapp/src/modules/identity/reducer.ts +++ b/webapp/src/modules/identity/reducer.ts @@ -1,8 +1,5 @@ import { AuthIdentity } from '@dcl/crypto' -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { GenerateIdentityRequestAction, GenerateIdentitySuccessAction, @@ -24,15 +21,9 @@ export const INITIAL_STATE: IdentityState = { error: null } -export type IdentityReducerAction = - | GenerateIdentityRequestAction - | GenerateIdentitySuccessAction - | GenerateIdentityFailureAction +export type IdentityReducerAction = GenerateIdentityRequestAction | GenerateIdentitySuccessAction | GenerateIdentityFailureAction -export function identityReducer( - state: IdentityState = INITIAL_STATE, - action: IdentityReducerAction -): IdentityState { +export function identityReducer(state: IdentityState = INITIAL_STATE, action: IdentityReducerAction): IdentityState { switch (action.type) { case GENERATE_IDENTITY_REQUEST: { return { diff --git a/webapp/src/modules/identity/sagas.spec.ts b/webapp/src/modules/identity/sagas.spec.ts index 72f3fdecf2..08f6efb25a 100644 --- a/webapp/src/modules/identity/sagas.spec.ts +++ b/webapp/src/modules/identity/sagas.spec.ts @@ -1,14 +1,8 @@ import { expectSaga } from 'redux-saga-test-plan' import { call } from 'redux-saga/effects' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' -import { - connectWalletSuccess, - disconnectWallet -} from 'decentraland-dapps/dist/modules/wallet/actions' -import { - localStorageClearIdentity, - localStorageGetIdentity -} from '@dcl/single-sign-on-client' +import { connectWalletSuccess, disconnectWallet } from 'decentraland-dapps/dist/modules/wallet/actions' +import { localStorageClearIdentity, localStorageGetIdentity } from '@dcl/single-sign-on-client' import { identitySaga, setAuxAddress } from './sagas' import { generateIdentitySuccess } from './actions' import { AuthIdentity } from '@dcl/crypto' @@ -41,9 +35,9 @@ describe('when handling the wallet connection success', () => { beforeEach(() => { windowLocation = window.location delete (window as any).location - window.location = ({ + window.location = { replace: jest.fn() - } as any) as Location + } as any as Location }) afterEach(() => { window.location = windowLocation @@ -82,9 +76,7 @@ describe('when handling the disconnect', () => { }) it('should call the sso client to clear the identity in the local storage', async () => { - await expectSaga(identitySaga) - .dispatch(disconnectWallet()) - .run({ silenceTimeout: true }) + await expectSaga(identitySaga).dispatch(disconnectWallet()).run({ silenceTimeout: true }) expect(localStorageClearIdentity).toHaveBeenCalledWith(address) }) @@ -96,9 +88,7 @@ describe('when handling the disconnect', () => { }) it('should not call the sso client to clear the identity', async () => { - await expectSaga(identitySaga) - .dispatch(disconnectWallet()) - .run({ silenceTimeout: true }) + await expectSaga(identitySaga).dispatch(disconnectWallet()).run({ silenceTimeout: true }) expect(localStorageClearIdentity).not.toHaveBeenCalled() }) diff --git a/webapp/src/modules/identity/sagas.ts b/webapp/src/modules/identity/sagas.ts index 4ea58b45b5..c9dff326b2 100644 --- a/webapp/src/modules/identity/sagas.ts +++ b/webapp/src/modules/identity/sagas.ts @@ -1,28 +1,19 @@ import { takeLatest, put, call } from 'redux-saga/effects' import { ethers } from 'ethers' import { Authenticator, AuthIdentity } from '@dcl/crypto' -import { - localStorageGetIdentity, - localStorageClearIdentity, - localStorageStoreIdentity -} from '@dcl/single-sign-on-client' +import { localStorageGetIdentity, localStorageClearIdentity, localStorageStoreIdentity } from '@dcl/single-sign-on-client' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { CONNECT_WALLET_SUCCESS, DISCONNECT_WALLET, - DisconnectWalletAction + DisconnectWalletAction, + ConnectWalletSuccessAction } from 'decentraland-dapps/dist/modules/wallet/actions' -import { ConnectWalletSuccessAction } from 'decentraland-dapps/dist/modules/wallet/actions' import { isErrorWithMessage } from '../../lib/error' import { config } from '../../config' import { getEth } from '../wallet/utils' -import { - GENERATE_IDENTITY_REQUEST, - GenerateIdentityRequestAction, - generateIdentityFailure, - generateIdentitySuccess -} from './actions' +import { GENERATE_IDENTITY_REQUEST, GenerateIdentityRequestAction, generateIdentityFailure, generateIdentitySuccess } from './actions' import { IDENTITY_EXPIRATION_IN_MINUTES } from './utils' export function* identitySaga() { @@ -46,11 +37,8 @@ function* handleGenerateIdentityRequest(action: GenerateIdentityRequestAction) { const signer = eth.getSigner() - const identity: AuthIdentity = yield Authenticator.initializeAuthChain( - address, - payload, - IDENTITY_EXPIRATION_IN_MINUTES, - message => signer.signMessage(message) + const identity: AuthIdentity = yield Authenticator.initializeAuthChain(address, payload, IDENTITY_EXPIRATION_IN_MINUTES, message => + signer.signMessage(message) ) // Stores the identity into the SSO iframe. @@ -58,12 +46,7 @@ function* handleGenerateIdentityRequest(action: GenerateIdentityRequestAction) { yield put(generateIdentitySuccess(address, identity)) } catch (error) { - yield put( - generateIdentityFailure( - address, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(generateIdentityFailure(address, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } @@ -85,11 +68,7 @@ function* handleConnectWalletSuccess(action: ConnectWalletSuccessAction) { if (identity) { yield put(generateIdentitySuccess(address, identity)) } else { - window.location.replace( - `${config.get('AUTH_URL')}/login?redirectTo=${encodeURIComponent( - window.location.href - )}` - ) + window.location.replace(`${config.get('AUTH_URL')}/login?redirectTo=${encodeURIComponent(window.location.href)}`) } } diff --git a/webapp/src/modules/identity/selectors.ts b/webapp/src/modules/identity/selectors.ts index 39b5ee6394..ff0eed8184 100644 --- a/webapp/src/modules/identity/selectors.ts +++ b/webapp/src/modules/identity/selectors.ts @@ -8,20 +8,16 @@ export const getData = (state: RootState) => getState(state).data export const getLoading = (state: RootState) => getState(state).loading export const getError = (state: RootState) => getState(state).error -export const getCurrentIdentity = createSelector( - getData, - getAddress, - (identities, address) => { - if (!address) { - return null - } - - const identity = identities[address] +export const getCurrentIdentity = createSelector(getData, getAddress, (identities, address) => { + if (!address) { + return null + } - if (!isValid(identity)) { - return null - } + const identity = identities[address] - return identity + if (!isValid(identity)) { + return null } -) + + return identity +}) diff --git a/webapp/src/modules/identity/utils.ts b/webapp/src/modules/identity/utils.ts index f08a4e76a9..0482e5456a 100644 --- a/webapp/src/modules/identity/utils.ts +++ b/webapp/src/modules/identity/utils.ts @@ -9,12 +9,7 @@ import { import { getAddress } from '../wallet/selectors' import { config } from '../../config' import { getCurrentIdentity } from './selectors' -import { - generateIdentityRequest, - GenerateIdentitySuccessAction, - GENERATE_IDENTITY_FAILURE, - GENERATE_IDENTITY_SUCCESS -} from './actions' +import { generateIdentityRequest, GenerateIdentitySuccessAction, GENERATE_IDENTITY_FAILURE, GENERATE_IDENTITY_SUCCESS } from './actions' const ONE_MONTH_IN_MINUTES = 31 * 24 * 60 @@ -51,9 +46,7 @@ export function* getIdentity(): Generator<any, AuthIdentity, any> { throw new Error(IDENTITY_ERROR) } - const identity: ReturnType<typeof getCurrentIdentity> = yield select( - getCurrentIdentity - ) + const identity: ReturnType<typeof getCurrentIdentity> = yield select(getCurrentIdentity) if (identity) { return identity diff --git a/webapp/src/modules/item/actions.spec.ts b/webapp/src/modules/item/actions.spec.ts index 4ed19ced55..fa435cc88d 100644 --- a/webapp/src/modules/item/actions.spec.ts +++ b/webapp/src/modules/item/actions.spec.ts @@ -1,13 +1,7 @@ import { ChainId, Item, Network } from '@dcl/schemas' import { TradeType } from 'decentraland-dapps/dist/modules/gateway/transak/types' -import { - NFTPurchase, - PurchaseStatus -} from 'decentraland-dapps/dist/modules/gateway/types' -import { - buildTransactionWithFromPayload, - buildTransactionWithReceiptPayload -} from 'decentraland-dapps/dist/modules/transaction/utils' +import { NFTPurchase, PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' +import { buildTransactionWithFromPayload, buildTransactionWithReceiptPayload } from 'decentraland-dapps/dist/modules/transaction/utils' import { NetworkGatewayType } from 'decentraland-ui' import { formatWeiMANA } from '../../lib/mana' import { getAssetName } from '../asset/utils' @@ -72,9 +66,7 @@ describe('when creating the action to signal a success in the items request', () const timestamp = 1627595757 it('should return an object representing the action', () => { - expect( - fetchItemsSuccess(items, total, itemBrowseOptions, timestamp) - ).toEqual({ + expect(fetchItemsSuccess(items, total, itemBrowseOptions, timestamp)).toEqual({ type: FETCH_ITEMS_SUCCESS, meta: undefined, payload: { items, total, options: itemBrowseOptions, timestamp } diff --git a/webapp/src/modules/item/actions.ts b/webapp/src/modules/item/actions.ts index 24b9886066..ab71338222 100644 --- a/webapp/src/modules/item/actions.ts +++ b/webapp/src/modules/item/actions.ts @@ -1,9 +1,6 @@ import { ChainId, Item, ItemFilters, Order } from '@dcl/schemas' import { NFTPurchase } from 'decentraland-dapps/dist/modules/gateway/types' -import { - buildTransactionWithFromPayload, - buildTransactionWithReceiptPayload -} from 'decentraland-dapps/dist/modules/transaction/utils' +import { buildTransactionWithFromPayload, buildTransactionWithReceiptPayload } from 'decentraland-dapps/dist/modules/transaction/utils' import type { Route } from 'decentraland-transactions/crossChain' import { action } from 'typesafe-actions' import { formatWeiMANA } from '../../lib/mana' @@ -17,18 +14,12 @@ export const FETCH_ITEMS_SUCCESS = '[Success] Fetch Items' export const FETCH_ITEMS_FAILURE = '[Failure] Fetch Items' export const FETCH_ITEMS_CANCELLED_ERROR_MESSAGE = '[Cancelled] Fetch Items' -export const fetchItemsRequest = (options: ItemBrowseOptions) => - action(FETCH_ITEMS_REQUEST, options) +export const fetchItemsRequest = (options: ItemBrowseOptions) => action(FETCH_ITEMS_REQUEST, options) -export const fetchItemsSuccess = ( - items: Item[], - total: number, - options: ItemBrowseOptions, - timestamp: number -) => action(FETCH_ITEMS_SUCCESS, { items, total, options, timestamp }) +export const fetchItemsSuccess = (items: Item[], total: number, options: ItemBrowseOptions, timestamp: number) => + action(FETCH_ITEMS_SUCCESS, { items, total, options, timestamp }) -export const fetchItemsFailure = (error: string, options: ItemBrowseOptions) => - action(FETCH_ITEMS_FAILURE, { error, options }) +export const fetchItemsFailure = (error: string, options: ItemBrowseOptions) => action(FETCH_ITEMS_FAILURE, { error, options }) export type FetchItemsRequestAction = ReturnType<typeof fetchItemsRequest> export type FetchItemsSuccessAction = ReturnType<typeof fetchItemsSuccess> @@ -40,24 +31,15 @@ export const FETCH_TRENDING_ITEMS_REQUEST = '[Request] Fetch Trending Items' export const FETCH_TRENDING_ITEMS_SUCCESS = '[Success] Fetch Trending Items' export const FETCH_TRENDING_ITEMS_FAILURE = '[Failure] Fetch Trending Items' -export const fetchTrendingItemsRequest = (size?: number) => - action(FETCH_TRENDING_ITEMS_REQUEST, { size }) +export const fetchTrendingItemsRequest = (size?: number) => action(FETCH_TRENDING_ITEMS_REQUEST, { size }) -export const fetchTrendingItemsSuccess = (items: Item[]) => - action(FETCH_TRENDING_ITEMS_SUCCESS, { items }) +export const fetchTrendingItemsSuccess = (items: Item[]) => action(FETCH_TRENDING_ITEMS_SUCCESS, { items }) -export const fetchTrendingItemsFailure = (error: string) => - action(FETCH_TRENDING_ITEMS_FAILURE, { error }) +export const fetchTrendingItemsFailure = (error: string) => action(FETCH_TRENDING_ITEMS_FAILURE, { error }) -export type FetchTrendingItemsRequestAction = ReturnType< - typeof fetchTrendingItemsRequest -> -export type FetchTrendingItemsSuccessAction = ReturnType< - typeof fetchTrendingItemsSuccess -> -export type FetchTrendingItemsFailureAction = ReturnType< - typeof fetchTrendingItemsFailure -> +export type FetchTrendingItemsRequestAction = ReturnType<typeof fetchTrendingItemsRequest> +export type FetchTrendingItemsSuccessAction = ReturnType<typeof fetchTrendingItemsSuccess> +export type FetchTrendingItemsFailureAction = ReturnType<typeof fetchTrendingItemsFailure> // Fetch Collection Items @@ -65,25 +47,16 @@ export const FETCH_COLLECTION_ITEMS_REQUEST = '[Request] Fetch Collection Items' export const FETCH_COLLECTION_ITEMS_SUCCESS = '[Success] Fetch Collection Items' export const FETCH_COLLECTION_ITEMS_FAILURE = '[Failure] Fetch Collection Items' -export const fetchCollectionItemsRequest = ( - options: Pick<ItemFilters, 'first' | 'contractAddresses'> -) => action(FETCH_COLLECTION_ITEMS_REQUEST, options) +export const fetchCollectionItemsRequest = (options: Pick<ItemFilters, 'first' | 'contractAddresses'>) => + action(FETCH_COLLECTION_ITEMS_REQUEST, options) -export const fetchCollectionItemsSuccess = (items: Item[]) => - action(FETCH_COLLECTION_ITEMS_SUCCESS, { items }) +export const fetchCollectionItemsSuccess = (items: Item[]) => action(FETCH_COLLECTION_ITEMS_SUCCESS, { items }) -export const fetchCollectionItemsFailure = (error: string) => - action(FETCH_COLLECTION_ITEMS_FAILURE, { error }) +export const fetchCollectionItemsFailure = (error: string) => action(FETCH_COLLECTION_ITEMS_FAILURE, { error }) -export type FetchCollectionItemsRequestAction = ReturnType< - typeof fetchCollectionItemsRequest -> -export type FetchCollectionItemsSuccessAction = ReturnType< - typeof fetchCollectionItemsSuccess -> -export type FetchCollectionItemsFailureAction = ReturnType< - typeof fetchCollectionItemsFailure -> +export type FetchCollectionItemsRequestAction = ReturnType<typeof fetchCollectionItemsRequest> +export type FetchCollectionItemsSuccessAction = ReturnType<typeof fetchCollectionItemsSuccess> +export type FetchCollectionItemsFailureAction = ReturnType<typeof fetchCollectionItemsFailure> // Buy Item export const BUY_ITEM_REQUEST = '[Request] Buy item' @@ -106,8 +79,7 @@ export const buyItemSuccess = (chainId: ChainId, txHash: string, item: Item) => }) }) -export const buyItemFailure = (error: string) => - action(BUY_ITEM_FAILURE, { error }) +export const buyItemFailure = (error: string) => action(BUY_ITEM_FAILURE, { error }) export type BuyItemRequestAction = ReturnType<typeof buyItemRequest> export type BuyItemSuccessAction = ReturnType<typeof buyItemSuccess> @@ -122,13 +94,7 @@ export const BUY_ITEM_CROSS_CHAIN_FAILURE = '[Failure] Buy item cross-chain' export const buyItemCrossChainRequest = (item: Item, route: Route, order?: Order) => action(BUY_ITEM_CROSS_CHAIN_REQUEST, { item, route, order }) -export const buyItemCrossChainSuccess = ( - route: Route, - chainId: ChainId, - txHash: string, - item: Item, - order?: Order -) => +export const buyItemCrossChainSuccess = (route: Route, chainId: ChainId, txHash: string, item: Item, order?: Order) => action(BUY_ITEM_CROSS_CHAIN_SUCCESS, { route, item, @@ -143,44 +109,25 @@ export const buyItemCrossChainSuccess = ( }) }) - export const trackCrossChainTx = ( - chainId: ChainId, - txHash: string, -) => +export const trackCrossChainTx = (chainId: ChainId, txHash: string) => action(TRACK_CROSS_CHAIN_TX_REQUEST, { - ...buildTransactionWithReceiptPayload(chainId, txHash ) + ...buildTransactionWithReceiptPayload(chainId, txHash) }) -export const buyItemCrossChainFailure = ( - route: Route, - item: Item, - price: string, - error: string -) => action(BUY_ITEM_CROSS_CHAIN_FAILURE, { route, item, price, error }) - -export type BuyItemCrossChainRequestAction = ReturnType< - typeof buyItemCrossChainRequest -> -export type BuyItemCrossChainSuccessAction = ReturnType< - typeof buyItemCrossChainSuccess -> -export type BuyItemCrossChainFailureAction = ReturnType< - typeof buyItemCrossChainFailure -> +export const buyItemCrossChainFailure = (route: Route, item: Item, price: string, error: string) => + action(BUY_ITEM_CROSS_CHAIN_FAILURE, { route, item, price, error }) + +export type BuyItemCrossChainRequestAction = ReturnType<typeof buyItemCrossChainRequest> +export type BuyItemCrossChainSuccessAction = ReturnType<typeof buyItemCrossChainSuccess> +export type BuyItemCrossChainFailureAction = ReturnType<typeof buyItemCrossChainFailure> // Buy Item With Card export const BUY_ITEM_WITH_CARD_REQUEST = '[Request] Buy Item with Card' export const BUY_ITEM_WITH_CARD_SUCCESS = '[Success] Buy Item with Card' export const BUY_ITEM_WITH_CARD_FAILURE = '[Failure] Buy Item with Card' -export const buyItemWithCardRequest = (item: Item) => - action(BUY_ITEM_WITH_CARD_REQUEST, { item }) -export const buyItemWithCardSuccess = ( - chainId: ChainId, - txHash: string, - item: Item, - purchase: NFTPurchase -) => +export const buyItemWithCardRequest = (item: Item) => action(BUY_ITEM_WITH_CARD_REQUEST, { item }) +export const buyItemWithCardSuccess = (chainId: ChainId, txHash: string, item: Item, purchase: NFTPurchase) => action(BUY_ITEM_WITH_CARD_SUCCESS, { item, purchase, @@ -192,18 +139,11 @@ export const buyItemWithCardSuccess = ( price: purchase.nft.cryptoAmount.toString() }) }) -export const buyItemWithCardFailure = (error: string) => - action(BUY_ITEM_WITH_CARD_FAILURE, { error }) - -export type BuyItemWithCardRequestAction = ReturnType< - typeof buyItemWithCardRequest -> -export type BuyItemWithCardSuccessAction = ReturnType< - typeof buyItemWithCardSuccess -> -export type BuyItemWithCardFailureAction = ReturnType< - typeof buyItemWithCardFailure -> +export const buyItemWithCardFailure = (error: string) => action(BUY_ITEM_WITH_CARD_FAILURE, { error }) + +export type BuyItemWithCardRequestAction = ReturnType<typeof buyItemWithCardRequest> +export type BuyItemWithCardSuccessAction = ReturnType<typeof buyItemWithCardSuccess> +export type BuyItemWithCardFailureAction = ReturnType<typeof buyItemWithCardFailure> // Fetch Item @@ -211,15 +151,10 @@ export const FETCH_ITEM_REQUEST = '[Request] Fetch Item' export const FETCH_ITEM_SUCCESS = '[Success] Fetch Item' export const FETCH_ITEM_FAILURE = '[Failure] Fetch Item' -export const fetchItemRequest = (contractAddress: string, tokenId: string) => - action(FETCH_ITEM_REQUEST, { contractAddress, tokenId }) -export const fetchItemSuccess = (item: Item) => - action(FETCH_ITEM_SUCCESS, { item }) -export const fetchItemFailure = ( - contractAddress: string, - tokenId: string, - error: string -) => action(FETCH_ITEM_FAILURE, { contractAddress, tokenId, error }) +export const fetchItemRequest = (contractAddress: string, tokenId: string) => action(FETCH_ITEM_REQUEST, { contractAddress, tokenId }) +export const fetchItemSuccess = (item: Item) => action(FETCH_ITEM_SUCCESS, { item }) +export const fetchItemFailure = (contractAddress: string, tokenId: string, error: string) => + action(FETCH_ITEM_FAILURE, { contractAddress, tokenId, error }) export type FetchItemRequestAction = ReturnType<typeof fetchItemRequest> export type FetchItemSuccessAction = ReturnType<typeof fetchItemSuccess> diff --git a/webapp/src/modules/item/reducer.spec.ts b/webapp/src/modules/item/reducer.spec.ts index e97949549f..78c19c7bb2 100644 --- a/webapp/src/modules/item/reducer.spec.ts +++ b/webapp/src/modules/item/reducer.spec.ts @@ -1,9 +1,6 @@ import { ChainId, Item, Network } from '@dcl/schemas' import { TradeType } from 'decentraland-dapps/dist/modules/gateway/transak/types' -import { - NFTPurchase, - PurchaseStatus -} from 'decentraland-dapps/dist/modules/gateway/types' +import { NFTPurchase, PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' import { loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' import { NetworkGatewayType } from 'decentraland-ui' import { View } from '../ui/types' @@ -205,12 +202,7 @@ describe('when reducing the successful action of fetching items', () => { newItemData = { minPrice: '1234' } as Item - successAction = fetchItemsSuccess( - [{ ...item, ...newItemData }], - 1, - itemBrowseOptions, - 223423423 - ) + successAction = fetchItemsSuccess([{ ...item, ...newItemData }], 1, itemBrowseOptions, 223423423) initialState = { ...INITIAL_STATE, data: { anotherId: anotherItem, [item.id]: item }, @@ -228,37 +220,15 @@ describe('when reducing the successful action of fetching items', () => { }) describe.each([ - [ - FETCH_COLLECTION_ITEMS_SUCCESS, - fetchCollectionItemsRequest({ contractAddresses: [], first: 10 }), - fetchCollectionItemsSuccess([item]) - ], + [FETCH_COLLECTION_ITEMS_SUCCESS, fetchCollectionItemsRequest({ contractAddresses: [], first: 10 }), fetchCollectionItemsSuccess([item])], [GET_LIST_SUCCESS, getListRequest(item.id), getListSuccess(list, [item])], - [ - FETCH_LISTS_SUCCESS, - fetchListsRequest(listsBrowseOptions), - fetchListsSuccess([list], [item], 1, listsBrowseOptions) - ], - [ - FETCH_ITEM_SUCCESS, - fetchItemRequest(item.contractAddress, item.itemId), - fetchItemSuccess(item) - ], - [ - FETCH_TRENDING_ITEMS_SUCCESS, - fetchTrendingItemsRequest(trendingItemsBatchSize), - fetchTrendingItemsSuccess([item]) - ], + [FETCH_LISTS_SUCCESS, fetchListsRequest(listsBrowseOptions), fetchListsSuccess([list], [item], 1, listsBrowseOptions)], + [FETCH_ITEM_SUCCESS, fetchItemRequest(item.contractAddress, item.itemId), fetchItemSuccess(item)], + [FETCH_TRENDING_ITEMS_SUCCESS, fetchTrendingItemsRequest(trendingItemsBatchSize), fetchTrendingItemsSuccess([item])], [ FETCH_FAVORITED_ITEMS_SUCCESS, fetchFavoritedItemsRequest({}), - fetchFavoritedItemsSuccess( - [item], - { [item.id]: Date.now() }, - 1, - {}, - Date.now() - ) + fetchFavoritedItemsSuccess([item], { [item.id]: Date.now() }, 1, {}, Date.now()) ] ])('when reducing the %s action', (_action, requestAction, successAction) => { const initialState = { @@ -349,8 +319,6 @@ describe('when reducing a clear item errors action', () => { }) it('should set the error field as null', () => { - expect(itemReducer(state, clearItemErrors())).toEqual( - expect.objectContaining({ error: null }) - ) + expect(itemReducer(state, clearItemErrors())).toEqual(expect.objectContaining({ error: null })) }) }) diff --git a/webapp/src/modules/item/reducer.ts b/webapp/src/modules/item/reducer.ts index 9d59bf5a4c..87e136bceb 100644 --- a/webapp/src/modules/item/reducer.ts +++ b/webapp/src/modules/item/reducer.ts @@ -1,9 +1,6 @@ import isEqual from 'lodash/isEqual' import { Item } from '@dcl/schemas' -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { FETCH_FAVORITED_ITEMS_SUCCESS, FETCH_LISTS_SUCCESS, @@ -98,10 +95,7 @@ type ItemReducerAction = | BuyItemCrossChainFailureAction | BuyItemCrossChainSuccessAction -export function itemReducer( - state = INITIAL_STATE, - action: ItemReducerAction -): ItemState { +export function itemReducer(state = INITIAL_STATE, action: ItemReducerAction): ItemState { switch (action.type) { case BUY_ITEM_REQUEST: case BUY_ITEM_SUCCESS: @@ -130,12 +124,15 @@ export function itemReducer( loading: loadingReducer(state.loading, action), data: { ...state.data, - ...items.reduce((obj, item) => { - if (!state.data[item.id] || !isEqual(state.data[item.id], item)) { - obj[item.id] = { ...state.data[item.id], ...item } - } - return obj - }, {} as Record<string, Item>) + ...items.reduce( + (obj, item) => { + if (!state.data[item.id] || !isEqual(state.data[item.id], item)) { + obj[item.id] = { ...state.data[item.id], ...item } + } + return obj + }, + {} as Record<string, Item> + ) }, error: null } diff --git a/webapp/src/modules/item/sagas.spec.ts b/webapp/src/modules/item/sagas.spec.ts index c9232f4089..77fe6cbbd1 100644 --- a/webapp/src/modules/item/sagas.spec.ts +++ b/webapp/src/modules/item/sagas.spec.ts @@ -7,15 +7,8 @@ import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { sendTransaction } from 'decentraland-dapps/dist/modules/wallet/utils' import { setPurchase } from 'decentraland-dapps/dist/modules/gateway/actions' import { TradeType } from 'decentraland-dapps/dist/modules/gateway/transak/types' -import { - ManaPurchase, - NFTPurchase, - PurchaseStatus -} from 'decentraland-dapps/dist/modules/gateway/types' -import { - closeModal, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' +import { ManaPurchase, NFTPurchase, PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' +import { closeModal, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { NetworkGatewayType } from 'decentraland-ui' import { locations } from '../routing/locations' import { fetchSmartWearableRequiredPermissionsRequest } from '../asset/actions' @@ -23,10 +16,7 @@ import { getWallet } from '../wallet/selectors' import { View } from '../ui/types' import { ItemAPI } from '../vendor/decentraland/item/api' import { CatalogAPI } from '../vendor/decentraland/catalog/api' -import { - buyAssetWithCard, - BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY -} from '../asset/utils' +import { buyAssetWithCard, BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY } from '../asset/utils' import { waitForWalletConnectionAndIdentityIfConnecting } from '../wallet/utils' import { buyItemRequest, @@ -52,11 +42,7 @@ import { buyItemCrossChainSuccess, trackCrossChainTx } from './actions' -import { - AxelarProvider, - RouteResponse, - StatusResponse -} from 'decentraland-transactions/crossChain' +import { AxelarProvider, RouteResponse, StatusResponse } from 'decentraland-transactions/crossChain' import { CANCEL_FETCH_ITEMS, itemSaga } from './sagas' import { getData as getItems } from './selectors' import { getItem } from './utils' @@ -79,8 +65,7 @@ const wallet = { chainId: ChainId.MATIC_MAINNET } -const txHash = - '0x9fc518261399c1bd236997706347f8b117a061cef5518073b1c3eefd5efbff84' +const txHash = '0x9fc518261399c1bd236997706347f8b117a061cef5518073b1c3eefd5efbff84' const anError = new Error('An error occured') @@ -165,15 +150,7 @@ describe('when handling the buy items with card action', () => { describe('when the explanation modal has already been shown', () => { it('should open Transak widget', () => { return expectSaga(itemSaga, getIdentity) - .provide([ - [ - call( - [localStorage, 'getItem'], - BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY - ), - null - ] - ]) + .provide([[call([localStorage, 'getItem'], BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY), null]]) .put(openModal('BuyWithCardExplanationModal', { asset: item })) .dispatch(buyItemWithCardRequest(item)) .dispatch(closeModal('BuyWithCardExplanationModal')) @@ -187,15 +164,7 @@ describe('when handling the buy items with card action', () => { describe('when the explanation modal is shown and the user closes it', () => { it('should not set the item in the local storage to show the modal again later', () => { return expectSaga(itemSaga, getIdentity) - .provide([ - [ - call( - [localStorage, 'getItem'], - BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY - ), - null - ] - ]) + .provide([[call([localStorage, 'getItem'], BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY), null]]) .put(openModal('BuyWithCardExplanationModal', { asset: item })) .dispatch(buyItemWithCardRequest(item)) .dispatch(closeModal('BuyWithCardExplanationModal')) @@ -299,10 +268,7 @@ describe('when handling the set purchase action', () => { return expectSaga(itemSaga, getIdentity) .provide([ [select(getItems), {}], - [ - matchers.put(fetchItemRequest(contractAddress, itemId!)), - undefined - ] + [matchers.put(fetchItemRequest(contractAddress, itemId!)), undefined] ]) .put(fetchItemRequest(contractAddress, itemId!)) .dispatch( @@ -325,14 +291,8 @@ describe('when handling the set purchase action', () => { return expectSaga(itemSaga, getIdentity) .provide([ [select(getItems), {}], - [ - matchers.put(fetchItemRequest(contractAddress, itemId!)), - undefined - ], - [ - take(FETCH_ITEM_FAILURE), - { payload: { error: anError.message } } - ] + [matchers.put(fetchItemRequest(contractAddress, itemId!)), undefined], + [take(FETCH_ITEM_FAILURE), { payload: { error: anError.message } }] ]) .put(fetchItemRequest(contractAddress, itemId!)) .put(buyItemWithCardFailure(anError.message)) @@ -389,9 +349,7 @@ describe('when handling the fetch collections items request action', () => { args: [{ first: 10, contractAddresses: [] }] }) .put(fetchCollectionItemsSuccess(fetchResult.data)) - .dispatch( - fetchCollectionItemsRequest({ contractAddresses: [], first: 10 }) - ) + .dispatch(fetchCollectionItemsRequest({ contractAddresses: [], first: 10 })) .run({ silenceTimeout: true }) }) }) @@ -399,13 +357,9 @@ describe('when handling the fetch collections items request action', () => { describe('when the request fails', () => { it('should dispatch a failing action with the error and the options', () => { return expectSaga(itemSaga, getIdentity) - .provide([ - [matchers.call.fn(ItemAPI.prototype.get), Promise.reject(anError)] - ]) + .provide([[matchers.call.fn(ItemAPI.prototype.get), Promise.reject(anError)]]) .put(fetchCollectionItemsFailure(anError.message)) - .dispatch( - fetchCollectionItemsRequest({ contractAddresses: [], first: 10 }) - ) + .dispatch(fetchCollectionItemsRequest({ contractAddresses: [], first: 10 })) .run({ silenceTimeout: true }) }) }) @@ -419,9 +373,7 @@ describe('when handling the fetch items request action', () => { const fetchResult = { data: [item], total: 1 } beforeEach(() => { - dateNowSpy = jest - .spyOn(Date, 'now') - .mockImplementation(() => nowTimestamp) + dateNowSpy = jest.spyOn(Date, 'now').mockImplementation(() => nowTimestamp) }) afterEach(() => { @@ -434,8 +386,8 @@ describe('when handling the fetch items request action', () => { }) describe('and there is an ongoing fetch item request', () => { let wallet: Wallet | undefined - let originalBrowseOptions = itemBrowseOptions - let newBrowseOptions: ItemBrowseOptions = { + const originalBrowseOptions = itemBrowseOptions + const newBrowseOptions: ItemBrowseOptions = { ...itemBrowseOptions, filters: { ...itemBrowseOptions.filters, rarities: [Rarity.COMMON] } } @@ -447,29 +399,18 @@ describe('when handling the fetch items request action', () => { it('should dispatch a successful action with the fetched items and cancel the ongoing one', () => { return expectSaga(itemSaga, getIdentity) .provide([ - [ - matchers.call.fn( - waitForWalletConnectionAndIdentityIfConnecting - ), - undefined - ], + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined], [matchers.call.fn(waitForFeatureFlagsToBeLoaded), undefined], [select(getWallet), wallet], [select(getIsMarketplaceServerEnabled), true], [select(getLocation), { pathname }], { call(effect, next) { - if ( - effect.fn === CatalogAPI.prototype.get && - effect.args[0] === originalBrowseOptions.filters - ) { + if (effect.fn === CatalogAPI.prototype.get && effect.args[0] === originalBrowseOptions.filters) { // Add a setTimeout so it gives time to get it cancelled return new Promise(() => {}) } - if ( - effect.fn === CatalogAPI.prototype.get && - effect.args[0] === newBrowseOptions.filters - ) { + if (effect.fn === CatalogAPI.prototype.get && effect.args[0] === newBrowseOptions.filters) { // Mock without timeout return fetchResult } @@ -481,20 +422,8 @@ describe('when handling the fetch items request action', () => { fn: CatalogAPI.prototype.get, args: [newBrowseOptions.filters] }) - .put( - fetchItemsFailure( - FETCH_ITEMS_CANCELLED_ERROR_MESSAGE, - originalBrowseOptions - ) - ) - .put( - fetchItemsSuccess( - fetchResult.data, - fetchResult.total, - newBrowseOptions, - nowTimestamp - ) - ) + .put(fetchItemsFailure(FETCH_ITEMS_CANCELLED_ERROR_MESSAGE, originalBrowseOptions)) + .put(fetchItemsSuccess(fetchResult.data, fetchResult.total, newBrowseOptions, nowTimestamp)) .dispatch(fetchItemsRequest(originalBrowseOptions)) .dispatch({ type: CANCEL_FETCH_ITEMS }) .dispatch(fetchItemsRequest(newBrowseOptions)) @@ -506,29 +435,18 @@ describe('when handling the fetch items request action', () => { it('should dispatch a successful action with the fetched items and cancel the ongoing one', () => { return expectSaga(itemSaga, getIdentity) .provide([ - [ - matchers.call.fn( - waitForWalletConnectionAndIdentityIfConnecting - ), - undefined - ], + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined], [matchers.call.fn(waitForFeatureFlagsToBeLoaded), undefined], [select(getWallet), wallet], [select(getIsMarketplaceServerEnabled), true], [select(getLocation), { pathname }], { call(effect, next) { - if ( - effect.fn === CatalogAPI.prototype.get && - effect.args[0] === originalBrowseOptions.filters - ) { + if (effect.fn === CatalogAPI.prototype.get && effect.args[0] === originalBrowseOptions.filters) { // Add a setTimeout so it gives time to get it cancelled return new Promise(() => {}) } - if ( - effect.fn === CatalogAPI.prototype.get && - effect.args[0] === newBrowseOptions.filters - ) { + if (effect.fn === CatalogAPI.prototype.get && effect.args[0] === newBrowseOptions.filters) { // Mock without timeout return fetchResult } @@ -540,20 +458,8 @@ describe('when handling the fetch items request action', () => { fn: CatalogAPI.prototype.get, args: [newBrowseOptions.filters] }) - .put( - fetchItemsFailure( - FETCH_ITEMS_CANCELLED_ERROR_MESSAGE, - originalBrowseOptions - ) - ) - .put( - fetchItemsSuccess( - fetchResult.data, - fetchResult.total, - newBrowseOptions, - nowTimestamp - ) - ) + .put(fetchItemsFailure(FETCH_ITEMS_CANCELLED_ERROR_MESSAGE, originalBrowseOptions)) + .put(fetchItemsSuccess(fetchResult.data, fetchResult.total, newBrowseOptions, nowTimestamp)) .dispatch(fetchItemsRequest(originalBrowseOptions)) .dispatch({ type: CANCEL_FETCH_ITEMS }) .dispatch(fetchItemsRequest(newBrowseOptions)) @@ -571,23 +477,13 @@ describe('when handling the fetch items request action', () => { return expectSaga(itemSaga, getIdentity) .provide([ [matchers.call.fn(CatalogAPI.prototype.get), fetchResult], - [ - matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), - undefined - ], + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined], [matchers.call.fn(waitForFeatureFlagsToBeLoaded), undefined], [select(getWallet), undefined], [select(getLocation), { pathname }], [select(getIsMarketplaceServerEnabled), false] ]) - .put( - fetchItemsSuccess( - fetchResult.data, - fetchResult.total, - itemBrowseOptions, - nowTimestamp - ) - ) + .put(fetchItemsSuccess(fetchResult.data, fetchResult.total, itemBrowseOptions, nowTimestamp)) .dispatch(fetchItemsRequest(itemBrowseOptions)) .run({ silenceTimeout: true }) }) @@ -603,10 +499,7 @@ describe('when handling the fetch items request action', () => { [select(getIsMarketplaceServerEnabled), true], [select(getWallet), undefined], [matchers.call.fn(CatalogAPI.prototype.get), Promise.reject(anError)], - [ - matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), - undefined - ], + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined], [matchers.call.fn(waitForFeatureFlagsToBeLoaded), undefined] ]) .put(fetchItemsFailure(anError.message, itemBrowseOptions)) @@ -622,12 +515,7 @@ describe('when handling the fetch items request action', () => { return expectSaga(itemSaga, getIdentity) .provide([ [matchers.call.fn(ItemAPI.prototype.getOne), item], - [ - matchers.call.fn( - waitForWalletConnectionAndIdentityIfConnecting - ), - undefined - ] + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined] ]) .put(fetchItemSuccess(item)) .dispatch(fetchItemRequest(item.contractAddress, item.itemId)) @@ -654,21 +542,11 @@ describe('when handling the fetch items request action', () => { return expectSaga(itemSaga, getIdentity) .provide([ [matchers.call.fn(ItemAPI.prototype.getOne), smartWearable], - [ - matchers.call.fn( - waitForWalletConnectionAndIdentityIfConnecting - ), - undefined - ] + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined] ]) .put(fetchItemSuccess(smartWearable)) .put(fetchSmartWearableRequiredPermissionsRequest(smartWearable)) - .dispatch( - fetchItemRequest( - smartWearable.contractAddress, - smartWearable.itemId - ) - ) + .dispatch(fetchItemRequest(smartWearable.contractAddress, smartWearable.itemId)) .run({ silenceTimeout: true }) }) }) @@ -678,18 +556,10 @@ describe('when handling the fetch items request action', () => { it('should dispatching a failing action with the contract address, the token id and the error message', () => { return expectSaga(itemSaga, getIdentity) .provide([ - [ - matchers.call.fn(ItemAPI.prototype.getOne), - Promise.reject(anError) - ], - [ - matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), - undefined - ] + [matchers.call.fn(ItemAPI.prototype.getOne), Promise.reject(anError)], + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined] ]) - .put( - fetchItemFailure(item.contractAddress, item.itemId, anError.message) - ) + .put(fetchItemFailure(item.contractAddress, item.itemId, anError.message)) .dispatch(fetchItemRequest(item.contractAddress, item.itemId)) .run({ silenceTimeout: true }) }) @@ -705,9 +575,7 @@ describe('when handling the fetch trending items request action', () => { const fetchResult = { data: [item], total: 1 } beforeEach(() => { - dateNowSpy = jest - .spyOn(Date, 'now') - .mockImplementation(() => nowTimestamp) + dateNowSpy = jest.spyOn(Date, 'now').mockImplementation(() => nowTimestamp) }) afterEach(() => { @@ -720,10 +588,7 @@ describe('when handling the fetch trending items request action', () => { [select(getIsMarketplaceServerEnabled), true], [matchers.call.fn(ItemAPI.prototype.getTrendings), fetchResult], [matchers.call.fn(CatalogAPI.prototype.get), fetchResult], - [ - matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), - undefined - ] + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined] ]) .put(fetchTrendingItemsSuccess(fetchResult.data)) .dispatch(fetchTrendingItemsRequest()) @@ -739,10 +604,7 @@ describe('when handling the fetch trending items request action', () => { .provide([ // [select(getIsMarketplaceServerEnabled), true], [matchers.call.fn(ItemAPI.prototype.getTrendings), fetchResult], - [ - matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), - undefined - ] + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined] ]) .put(fetchTrendingItemsSuccess(fetchResult.data)) .dispatch(fetchTrendingItemsRequest()) @@ -755,14 +617,8 @@ describe('when handling the fetch trending items request action', () => { it('should dispatch a failing action with the error and the options', () => { return expectSaga(itemSaga, getIdentity) .provide([ - [ - matchers.call.fn(ItemAPI.prototype.getTrendings), - Promise.reject(anError) - ], - [ - matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), - undefined - ] + [matchers.call.fn(ItemAPI.prototype.getTrendings), Promise.reject(anError)], + [matchers.call.fn(waitForWalletConnectionAndIdentityIfConnecting), undefined] ]) .put(fetchTrendingItemsFailure(anError.message)) .dispatch(fetchTrendingItemsRequest()) @@ -801,25 +657,11 @@ describe('when handling the buy item cross chain success action', () => { it('should get the status of the transaction and put the trackCrossChainTx action, put location success and put the cross chain success toast', () => { return expectSaga(itemSaga, getIdentity) .provide([ - [ - matchers.call.fn(AxelarProvider.prototype.getStatus), - statusResponse - ], + [matchers.call.fn(AxelarProvider.prototype.getStatus), statusResponse], [delay(1000), void 0] ]) - .put( - trackCrossChainTx( - parseInt(route.route.params.toChain) as ChainId, - statusResponse.toChain!.transactionId - ) - ) - .put( - showToast( - getCrossChainTransactionSuccessToast( - AxelarProvider.getTxLink(txHash) - ) - ) - ) + .put(trackCrossChainTx(parseInt(route.route.params.toChain) as ChainId, statusResponse.toChain!.transactionId)) + .put(showToast(getCrossChainTransactionSuccessToast(AxelarProvider.getTxLink(txHash)))) .put( push( locations.success({ diff --git a/webapp/src/modules/item/sagas.ts b/webapp/src/modules/item/sagas.ts index a95dff3552..a45542105f 100644 --- a/webapp/src/modules/item/sagas.ts +++ b/webapp/src/modules/item/sagas.ts @@ -2,16 +2,7 @@ import { matchPath } from 'react-router-dom' import { getLocation, push } from 'connected-react-router' import { SagaIterator } from 'redux-saga' import { put, takeEvery } from '@redux-saga/core/effects' -import { - call, - cancel, - cancelled, - delay, - fork, - race, - select, - take -} from 'redux-saga/effects' +import { call, cancel, cancelled, delay, fork, race, select, take } from 'redux-saga/effects' import { ethers } from 'ethers' import { ChainId, Item } from '@dcl/schemas' import { getConnectedProvider } from 'decentraland-dapps/dist/lib/eth' @@ -20,10 +11,7 @@ import { Provider } from 'decentraland-connect' import { AuthIdentity } from 'decentraland-crypto-fetch' import { sendTransaction } from 'decentraland-dapps/dist/modules/wallet/utils' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { - SetPurchaseAction, - SET_PURCHASE -} from 'decentraland-dapps/dist/modules/gateway/actions' +import { SetPurchaseAction, SET_PURCHASE } from 'decentraland-dapps/dist/modules/gateway/actions' import { isNFTPurchase } from 'decentraland-dapps/dist/modules/gateway/utils' import { PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' import { isErrorWithMessage } from '../../lib/error' @@ -86,7 +74,7 @@ import { getData as getItems } from './selectors' import { AssetType } from '../asset/types' import { getItem } from './utils' -export const NFT_SERVER_URL = config.get('NFT_SERVER_URL')! +export const NFT_SERVER_URL = config.get('NFT_SERVER_URL') export const CANCEL_FETCH_ITEMS = 'CANCEL_FETCH_ITEMS' export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { @@ -96,17 +84,11 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { identity: getIdentity } const itemAPI = new ItemAPI(NFT_SERVER_URL, API_OPTS) - const marketplaceServerCatalogAPI = new CatalogAPI( - MARKETPLACE_SERVER_URL, - API_OPTS - ) + const marketplaceServerCatalogAPI = new CatalogAPI(MARKETPLACE_SERVER_URL, API_OPTS) const catalogAPI = new CatalogAPI(NFT_SERVER_URL, API_OPTS) yield fork(() => takeLatestByPath(FETCH_ITEMS_REQUEST, locations.browse())) - yield takeEvery( - FETCH_COLLECTION_ITEMS_REQUEST, - handleFetchCollectionItemsRequest - ) + yield takeEvery(FETCH_COLLECTION_ITEMS_REQUEST, handleFetchCollectionItemsRequest) yield takeEvery(FETCH_TRENDING_ITEMS_REQUEST, handleFetchTrendingItemsRequest) yield takeEvery(BUY_ITEM_REQUEST, handleBuyItem) yield takeEvery(BUY_ITEM_CROSS_CHAIN_REQUEST, handleBuyItemCrossChain) @@ -121,9 +103,7 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { while (true) { const action: FetchItemsRequestAction = yield take(actionType) - const { - pathname: currentPathname - }: ReturnType<typeof getLocation> = yield select(getLocation) + const { pathname: currentPathname }: ReturnType<typeof getLocation> = yield select(getLocation) // if we have a task running in the browse path, we cancel the previous one if (matchPath(currentPathname, { path }) && task && task.isRunning()) { @@ -134,19 +114,14 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { } } - function* handleFetchTrendingItemsRequest( - action: FetchTrendingItemsRequestAction - ) { + function* handleFetchTrendingItemsRequest(action: FetchTrendingItemsRequestAction) { const { size } = action.payload // If the wallet is getting connected, wait until it finishes to fetch the items so it can fetch them with authentication try { yield call(waitForWalletConnectionAndIdentityIfConnecting) - const { data }: { data: Item[] } = yield call( - [itemAPI, 'getTrendings'], - size - ) + const { data }: { data: Item[] } = yield call([itemAPI, 'getTrendings'], size) if (!data.length) { yield put(fetchTrendingItemsSuccess([])) @@ -154,81 +129,45 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { } const ids = data.map(item => item.id) - const isMarketplaceServerEnabled: boolean = yield select( - getIsMarketplaceServerEnabled - ) - const api = isMarketplaceServerEnabled - ? marketplaceServerCatalogAPI - : catalogAPI - const { data: itemData }: { data: Item[]; total: number } = yield call( - [api, 'get'], - { - ids - } - ) + const isMarketplaceServerEnabled: boolean = yield select(getIsMarketplaceServerEnabled) + const api = isMarketplaceServerEnabled ? marketplaceServerCatalogAPI : catalogAPI + const { data: itemData }: { data: Item[]; total: number } = yield call([api, 'get'], { + ids + }) yield put(fetchTrendingItemsSuccess(itemData)) } catch (error) { - yield put( - fetchTrendingItemsFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchTrendingItemsFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } - function* handleFetchCollectionItemsRequest( - action: FetchCollectionItemsRequestAction - ) { + function* handleFetchCollectionItemsRequest(action: FetchCollectionItemsRequestAction) { const { contractAddresses, first } = action.payload try { - const { data }: { data: Item[]; total: number } = yield call( - [itemAPI, 'get'], - { first, contractAddresses } - ) + const { data }: { data: Item[]; total: number } = yield call([itemAPI, 'get'], { first, contractAddresses }) yield put(fetchCollectionItemsSuccess(data)) } catch (error) { - yield put( - fetchCollectionItemsFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchCollectionItemsFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } - function* handleFetchItemsRequest( - action: FetchItemsRequestAction - ): SagaIterator { + function* handleFetchItemsRequest(action: FetchItemsRequestAction): SagaIterator { const { filters, view } = action.payload try { // If the wallet is getting connected, wait until it finishes to fetch the wallet and generate the identity so it can fetch them with authentication yield call(waitForWalletConnectionAndIdentityIfConnecting) yield call(waitForFeatureFlagsToBeLoaded) - const isMarketplaceServerEnabled: boolean = yield select( - getIsMarketplaceServerEnabled - ) - const catalogViewAPI = isMarketplaceServerEnabled - ? marketplaceServerCatalogAPI - : catalogAPI + const isMarketplaceServerEnabled: boolean = yield select(getIsMarketplaceServerEnabled) + const catalogViewAPI = isMarketplaceServerEnabled ? marketplaceServerCatalogAPI : catalogAPI const api = isCatalogView(view) ? catalogViewAPI : itemAPI - const { data, total }: { data: Item[]; total: number } = yield call( - [api, 'get'], - filters - ) + const { data, total }: { data: Item[]; total: number } = yield call([api, 'get'], filters) yield put(fetchItemsSuccess(data, total, action.payload, Date.now())) } catch (error) { - yield put( - fetchItemsFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error'), - action.payload - ) - ) + yield put(fetchItemsFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'), action.payload)) } finally { if (yield cancelled()) { // if cancelled, we dispatch a failure action so it cleans the loading state - yield put( - fetchItemsFailure(FETCH_ITEMS_CANCELLED_ERROR_MESSAGE, action.payload) - ) + yield put(fetchItemsFailure(FETCH_ITEMS_CANCELLED_ERROR_MESSAGE, action.payload)) } } } @@ -240,23 +179,13 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { try { yield call(waitForWalletConnectionAndIdentityIfConnecting) - const item: Item = yield call( - [itemAPI, 'getOne'], - contractAddress, - tokenId - ) + const item: Item = yield call([itemAPI, 'getOne'], contractAddress, tokenId) yield put(fetchItemSuccess(item)) if (item.data?.wearable?.isSmart && item.urn) { yield put(fetchSmartWearableRequiredPermissionsRequest(item)) } } catch (error) { - yield put( - fetchItemFailure( - contractAddress, - tokenId, - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchItemFailure(contractAddress, tokenId, isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } @@ -272,63 +201,36 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { const contract = getContract(ContractName.CollectionStore, item.chainId) - const txHash: string = yield call( - sendTransaction, - contract, - collectionStore => - collectionStore.buy([ - [ - item.contractAddress, - [item.itemId], - [item.price], - [wallet.address] - ] - ]) + const txHash: string = yield call(sendTransaction, contract, collectionStore => + collectionStore.buy([[item.contractAddress, [item.itemId], [item.price], [wallet.address]]]) ) yield put(buyItemSuccess(wallet.chainId, txHash, item)) } catch (error) { - yield put( - buyItemFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(buyItemFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } - function* handleBuyItemCrossChainSuccess( - action: BuyItemCrossChainSuccessAction - ) { + function* handleBuyItemCrossChainSuccess(action: BuyItemCrossChainSuccessAction) { const { route, item, order, txHash } = action.payload // if it's an actual cross-chain interaction, we need to get the tx hash in the destination chain - if ( - route.requestId && - route.route.params.fromChain !== route.route.params.toChain - ) { + if (route.requestId && route.route.params.fromChain !== route.route.params.toChain) { let status: StatusResponse | undefined const crossChainModule = import('decentraland-transactions/crossChain') - const { - AxelarProvider - }: Awaited<typeof crossChainModule> = yield crossChainModule + const { AxelarProvider }: Awaited<typeof crossChainModule> = yield crossChainModule const crossChainProvider = new AxelarProvider(config.get('SQUID_API_URL')) const destinationChain = Number(route.route.params.toChain) as ChainId while (!status || !status?.toChain?.transactionId) { // wrapping in try-catch since it throws an error if the tx is not found (the first seconds after triggering it) try { - status = yield call( - [crossChainProvider, 'getStatus'], - route.requestId, - txHash - ) + status = yield call([crossChainProvider, 'getStatus'], route.requestId, txHash) } catch (error) { console.error('error: ', error) } yield delay(1000) } if (status?.toChain?.transactionId) { - yield put( - trackCrossChainTx(destinationChain, status?.toChain?.transactionId) - ) + yield put(trackCrossChainTx(destinationChain, status?.toChain?.transactionId)) yield put( push( locations.success({ @@ -336,20 +238,12 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { destinationTxHash: status?.toChain?.transactionId, tokenId: item.itemId, assetType: order ? AssetType.NFT : AssetType.ITEM, - contractAddress: order - ? order.contractAddress - : item.contractAddress, + contractAddress: order ? order.contractAddress : item.contractAddress, isCrossChain: ('route' in action.payload).toString() }) ) ) - yield put( - showToast( - getCrossChainTransactionSuccessToast( - AxelarProvider.getTxLink(txHash) - ) - ) - ) + yield put(showToast(getCrossChainTransactionSuccessToast(AxelarProvider.getTxLink(txHash)))) } } } @@ -367,27 +261,11 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { if (provider) { const crossChainModule = import('decentraland-transactions/crossChain') - const { - AxelarProvider - }: Awaited<typeof crossChainModule> = yield crossChainModule - const crossChainProvider = new AxelarProvider( - config.get('SQUID_API_URL') - ) - const txResponse: ethers.providers.TransactionReceipt = yield call( - [crossChainProvider, 'executeRoute'], - route, - provider - ) + const { AxelarProvider }: Awaited<typeof crossChainModule> = yield crossChainModule + const crossChainProvider = new AxelarProvider(config.get('SQUID_API_URL')) + const txResponse: ethers.providers.TransactionReceipt = yield call([crossChainProvider, 'executeRoute'], route, provider) - yield put( - buyItemCrossChainSuccess( - route, - Number(route.route.params.fromChain), - txResponse.transactionHash, - item, - order - ) - ) + yield put(buyItemCrossChainSuccess(route, Number(route.route.params.fromChain), txResponse.transactionHash, item, order)) } } catch (error) { yield put( @@ -406,11 +284,7 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { const { item } = action.payload yield call(buyAssetWithCard, item) } catch (error) { - yield put( - buyItemWithCardFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(buyItemWithCardFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } @@ -419,23 +293,13 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { const { purchase } = action.payload const { status, txHash } = purchase - if ( - isNFTPurchase(purchase) && - purchase.nft.itemId && - status === PurchaseStatus.COMPLETE && - txHash - ) { + if (isNFTPurchase(purchase) && purchase.nft.itemId && status === PurchaseStatus.COMPLETE && txHash) { const { nft: { contractAddress, itemId } } = purchase const items: ReturnType<typeof getItems> = yield select(getItems) - let item: ReturnType<typeof getItem> = yield call( - getItem, - contractAddress, - itemId, - items - ) + let item: ReturnType<typeof getItem> = yield call(getItem, contractAddress, itemId, items) if (!item) { yield put(fetchItemRequest(contractAddress, itemId)) @@ -459,11 +323,7 @@ export function* itemSaga(getIdentity: () => AuthIdentity | undefined) { yield put(buyItemWithCardSuccess(item.chainId, txHash, item, purchase)) } } catch (error) { - yield put( - buyItemWithCardFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(buyItemWithCardFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } } diff --git a/webapp/src/modules/item/selectors.spec.ts b/webapp/src/modules/item/selectors.spec.ts index 98ff8ef051..9243c98906 100644 --- a/webapp/src/modules/item/selectors.spec.ts +++ b/webapp/src/modules/item/selectors.spec.ts @@ -1,22 +1,9 @@ import { Item } from '@dcl/schemas' import { AuthorizationStepStatus } from 'decentraland-ui' import { RootState } from '../reducer' -import { - buyItemRequest, - fetchCollectionItemsRequest, - fetchItemRequest, - fetchItemsRequest -} from './actions' +import { buyItemRequest, fetchCollectionItemsRequest, fetchItemRequest, fetchItemsRequest } from './actions' import { INITIAL_STATE } from './reducer' -import { - getData, - getError, - getLoading, - getMintItemStatus, - getState, - isFetchingItem, - isFetchingItemsOfCollection -} from './selectors' +import { getData, getError, getLoading, getMintItemStatus, getState, isFetchingItem, isFetchingItemsOfCollection } from './selectors' let state: RootState @@ -132,9 +119,7 @@ describe('when getting if the items of a collection are being fetched', () => { describe("and they're being fetched", () => { beforeEach(() => { - state.item.loading.push( - fetchCollectionItemsRequest({ contractAddresses: [contractAddress] }) - ) + state.item.loading.push(fetchCollectionItemsRequest({ contractAddresses: [contractAddress] })) }) it('should return true', () => { diff --git a/webapp/src/modules/item/selectors.ts b/webapp/src/modules/item/selectors.ts index 27f4de265d..7150d664cf 100644 --- a/webapp/src/modules/item/selectors.ts +++ b/webapp/src/modules/item/selectors.ts @@ -5,12 +5,7 @@ import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors import { AuthorizationStepStatus } from 'decentraland-dapps/dist/containers/withAuthorizedAction/AuthorizationModal' import { locations } from '../routing/locations' import { RootState } from '../reducer' -import { - BUY_ITEM_REQUEST, - FETCH_COLLECTION_ITEMS_REQUEST, - FETCH_ITEM_REQUEST, - FetchCollectionItemsRequestAction -} from './actions' +import { BUY_ITEM_REQUEST, FETCH_COLLECTION_ITEMS_REQUEST, FETCH_ITEM_REQUEST, FetchCollectionItemsRequestAction } from './actions' export const getState = (state: RootState) => state.item export const getData = (state: RootState) => getState(state).data @@ -29,35 +24,19 @@ export const getMintItemStatus = (state: RootState) => { return AuthorizationStepStatus.PENDING } -export const isFetchingItem = ( - state: RootState, - contractAddress: string, - tokenId: string -) => +export const isFetchingItem = (state: RootState, contractAddress: string, tokenId: string) => getLoading(state).find( - action => - action.type === FETCH_ITEM_REQUEST && - action.payload.contractAddress === contractAddress && - action.payload.tokenId === tokenId + action => action.type === FETCH_ITEM_REQUEST && action.payload.contractAddress === contractAddress && action.payload.tokenId === tokenId ) !== undefined -export const isFetchingItemsOfCollection = ( - state: RootState, - contractAddress: string -) => +export const isFetchingItemsOfCollection = (state: RootState, contractAddress: string) => getLoading(state).find( action => action.type === FETCH_COLLECTION_ITEMS_REQUEST && - (action as FetchCollectionItemsRequestAction).payload?.contractAddresses?.includes( - contractAddress - ) + (action as FetchCollectionItemsRequestAction).payload?.contractAddresses?.includes(contractAddress) ) !== undefined -export const getItems = createSelector< - RootState, - ReturnType<typeof getData>, - Item[] ->(getData, itemsById => Object.values(itemsById)) +export const getItems = createSelector<RootState, ReturnType<typeof getData>, Item[]>(getData, itemsById => Object.values(itemsById)) const ItemDetailMatchSelector = createMatchSelector< RootState, @@ -67,26 +46,24 @@ const ItemDetailMatchSelector = createMatchSelector< } >(locations.item(':contractAddress', ':tokenId')) -export const getContractAddress = createSelector< - RootState, - ReturnType<typeof ItemDetailMatchSelector>, - string | null ->( +export const getContractAddress = createSelector<RootState, ReturnType<typeof ItemDetailMatchSelector>, string | null>( ItemDetailMatchSelector, match => match?.params.contractAddress.toLowerCase() || null ) -export const getTokenId = createSelector< - RootState, - ReturnType<typeof ItemDetailMatchSelector>, - string | null ->(ItemDetailMatchSelector, match => match?.params.tokenId || null) +export const getTokenId = createSelector<RootState, ReturnType<typeof ItemDetailMatchSelector>, string | null>( + ItemDetailMatchSelector, + match => match?.params.tokenId || null +) export const getItemsByContractAddress = createSelector(getItems, items => - items.reduce((acc, item) => { - const { contractAddress } = item - if (!acc[contractAddress]) acc[contractAddress] = [] - acc[contractAddress].push(item) - return acc - }, {} as Record<string, Item[]>) + items.reduce( + (acc, item) => { + const { contractAddress } = item + if (!acc[contractAddress]) acc[contractAddress] = [] + acc[contractAddress].push(item) + return acc + }, + {} as Record<string, Item[]> + ) ) diff --git a/webapp/src/modules/item/utils.ts b/webapp/src/modules/item/utils.ts index 6aa330fa70..2306947ee6 100644 --- a/webapp/src/modules/item/utils.ts +++ b/webapp/src/modules/item/utils.ts @@ -1,20 +1,11 @@ import { Item } from '@dcl/schemas' -export function getItem( - contractAddress: string | null, - tokenId: string | null, - items: Record<string, Item> -): Item | null { +export function getItem(contractAddress: string | null, tokenId: string | null, items: Record<string, Item>): Item | null { if (!contractAddress || !tokenId) { return null } - return ( - Object.values(items).find( - item => - item.itemId === tokenId && item.contractAddress === contractAddress - ) || null - ) + return Object.values(items).find(item => item.itemId === tokenId && item.contractAddress === contractAddress) || null } export function parseItemId(itemId: string) { diff --git a/webapp/src/modules/login/sagas.ts b/webapp/src/modules/login/sagas.ts index f7a689921b..d41330c4dc 100644 --- a/webapp/src/modules/login/sagas.ts +++ b/webapp/src/modules/login/sagas.ts @@ -1,15 +1,6 @@ -import { - ConnectWalletSuccessAction, - CONNECT_WALLET_SUCCESS, - CONNECT_WALLET_FAILURE -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { ConnectWalletSuccessAction, CONNECT_WALLET_SUCCESS, CONNECT_WALLET_FAILURE } from 'decentraland-dapps/dist/modules/wallet/actions' import { put, race, select, take, takeEvery } from 'redux-saga/effects' -import { - openModal, - CloseModalAction, - CLOSE_MODAL, - closeModal -} from 'decentraland-dapps/dist/modules/modal/actions' +import { openModal, CloseModalAction, CLOSE_MODAL, closeModal } from 'decentraland-dapps/dist/modules/modal/actions' import { OpenLoginAction, OPEN_LOGIN } from './actions' import { getAddress } from '../wallet/selectors' diff --git a/webapp/src/modules/modal/sagas.spec.ts b/webapp/src/modules/modal/sagas.spec.ts index e1c12bb76e..6a53d0f97c 100644 --- a/webapp/src/modules/modal/sagas.spec.ts +++ b/webapp/src/modules/modal/sagas.spec.ts @@ -1,10 +1,6 @@ import { RentalListing } from '@dcl/schemas' import { getOpenModals } from 'decentraland-dapps/dist/modules/modal/selectors' -import { - closeAllModals, - closeModal, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' +import { closeAllModals, closeModal, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { expectSaga } from 'redux-saga-test-plan' import { select } from 'redux-saga/effects' import { NFT } from '../nft/types' @@ -38,10 +34,7 @@ describe.each([ UPDATE_LIST_SUCCESS ])('when handling the success action of the %s action', actionType => { it('should put the action to close all modals', () => { - return expectSaga(modalSaga) - .put(closeAllModals()) - .dispatch({ type: actionType }) - .silentRun() + return expectSaga(modalSaga).put(closeAllModals()).dispatch({ type: actionType }).silentRun() }) }) @@ -55,10 +48,7 @@ describe('when handling the success action of the claim LAND', () => { }) it('should put the action to close all modals', () => { - return expectSaga(modalSaga) - .put(closeAllModals()) - .dispatch(claimAssetSuccess(nft, rental)) - .silentRun() + return expectSaga(modalSaga).put(closeAllModals()).dispatch(claimAssetSuccess(nft, rental)).silentRun() }) }) diff --git a/webapp/src/modules/modal/sagas.ts b/webapp/src/modules/modal/sagas.ts index b9453c74a2..7644ff203c 100644 --- a/webapp/src/modules/modal/sagas.ts +++ b/webapp/src/modules/modal/sagas.ts @@ -2,7 +2,7 @@ import { LOCATION_CHANGE } from 'connected-react-router' import { delay, put, select, takeEvery } from 'redux-saga/effects' import { ModalState } from 'decentraland-dapps/dist/modules/modal/reducer' import { getOpenModals } from 'decentraland-dapps/dist/modules/modal/selectors' -import { closeModal } from 'decentraland-dapps/dist/modules/modal/actions' +import { closeModal, closeAllModals, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { CLAIM_ASSET_SUCCESS, UPSERT_RENTAL_SUCCESS, @@ -18,10 +18,6 @@ import { DELETE_LIST_SUCCESS, UPDATE_LIST_SUCCESS } from '../favorites/actions' -import { - closeAllModals, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' export function* modalSaga() { yield takeEvery(LOCATION_CHANGE, handleLocationChange) @@ -39,10 +35,7 @@ export function* modalSaga() { handleCloseAllModals ) yield takeEvery(REMOVE_RENTAL_SUCCESS, handleCloseRemoveRentalModal) - yield takeEvery( - ACCEPT_RENTAL_LISTING_SUCCESS, - handleOpenRentConfirmationModal - ) + yield takeEvery(ACCEPT_RENTAL_LISTING_SUCCESS, handleOpenRentConfirmationModal) } function* handleLocationChange() { @@ -65,9 +58,7 @@ function* handleCloseRemoveRentalModal() { } } -function* handleOpenRentConfirmationModal( - action: AcceptRentalListingSuccessAction -) { +function* handleOpenRentConfirmationModal(action: AcceptRentalListingSuccessAction) { const { rental, periodIndexChosen } = action.payload yield put(closeModal('ConfirmRentModal')) yield put( diff --git a/webapp/src/modules/nft/actions.ts b/webapp/src/modules/nft/actions.ts index c4ac0dc761..0111f2ffc3 100644 --- a/webapp/src/modules/nft/actions.ts +++ b/webapp/src/modules/nft/actions.ts @@ -47,11 +47,8 @@ export const fetchNFTsSuccess = ( count, timestamp }) -export const fetchNFTsFailure = ( - options: NFTsFetchOptions, - error: string, - timestamp: number -) => action(FETCH_NFTS_FAILURE, { options, error, timestamp }) +export const fetchNFTsFailure = (options: NFTsFetchOptions, error: string, timestamp: number) => + action(FETCH_NFTS_FAILURE, { options, error, timestamp }) export type FetchNFTsRequestAction = ReturnType<typeof fetchNFTsRequest> export type FetchNFTsSuccessAction = ReturnType<typeof fetchNFTsSuccess> @@ -63,21 +60,12 @@ export const FETCH_NFT_REQUEST = '[Request] Fetch NFT' export const FETCH_NFT_SUCCESS = '[Success] Fetch NFT' export const FETCH_NFT_FAILURE = '[Failure] Fetch NFT' -export const fetchNFTRequest = ( - contractAddress: string, - tokenId: string, - options?: FetchOneOptions -) => action(FETCH_NFT_REQUEST, { contractAddress, tokenId, options }) -export const fetchNFTSuccess = ( - nft: NFT, - order: Order | null, - rental: RentalListing | null -) => action(FETCH_NFT_SUCCESS, { nft, order, rental }) -export const fetchNFTFailure = ( - contractAddress: string, - tokenId: string, - error: string -) => action(FETCH_NFT_FAILURE, { contractAddress, tokenId, error }) +export const fetchNFTRequest = (contractAddress: string, tokenId: string, options?: FetchOneOptions) => + action(FETCH_NFT_REQUEST, { contractAddress, tokenId, options }) +export const fetchNFTSuccess = (nft: NFT, order: Order | null, rental: RentalListing | null) => + action(FETCH_NFT_SUCCESS, { nft, order, rental }) +export const fetchNFTFailure = (contractAddress: string, tokenId: string, error: string) => + action(FETCH_NFT_FAILURE, { contractAddress, tokenId, error }) export type FetchNFTRequestAction = ReturnType<typeof fetchNFTRequest> export type FetchNFTSuccessAction = ReturnType<typeof fetchNFTSuccess> @@ -88,27 +76,17 @@ export type FetchNFTFailureAction = ReturnType<typeof fetchNFTFailure> export const TRANSFER_NFT_REQUEST = '[Request] Transfer NFT' export const TRANSFER_NFT_SUCCESS = '[Success] Transfer NFT' export const TRANSFER_NFT_FAILURE = '[Failure] Transfer NFT' -export const TRANSFER_NFT_TRANSACTION_SUBMITTED = - '[Submitted transaction] Transfer NFT' +export const TRANSFER_NFT_TRANSACTION_SUBMITTED = '[Submitted transaction] Transfer NFT' -export const transferNFTRequest = (nft: NFT, address: string) => - action(TRANSFER_NFT_REQUEST, { nft, address }) +export const transferNFTRequest = (nft: NFT, address: string) => action(TRANSFER_NFT_REQUEST, { nft, address }) export const transferNFTSuccess = (nft: NFT, address: string) => action(TRANSFER_NFT_SUCCESS, { nft, address }) -export const transferNFTFailure = ( - nft: NFT, - address: string, - error: string, - errorCode?: ErrorCode -) => action(TRANSFER_NFT_FAILURE, { nft, address, error, errorCode }) -export const transferNFTransactionSubmitted = ( - nft: NFT, - address: string, - txHash: string -) => +export const transferNFTFailure = (nft: NFT, address: string, error: string, errorCode?: ErrorCode) => + action(TRANSFER_NFT_FAILURE, { nft, address, error, errorCode }) +export const transferNFTransactionSubmitted = (nft: NFT, address: string, txHash: string) => action(TRANSFER_NFT_TRANSACTION_SUBMITTED, { nft, ...buildTransactionPayload(nft.chainId, txHash, { diff --git a/webapp/src/modules/nft/estate/utils.ts b/webapp/src/modules/nft/estate/utils.ts index dc61945315..839582fe83 100644 --- a/webapp/src/modules/nft/estate/utils.ts +++ b/webapp/src/modules/nft/estate/utils.ts @@ -1,8 +1,4 @@ -import { - getSigner, - getConnectedProvider, - getNetworkProvider -} from 'decentraland-dapps/dist/lib/eth' +import { getSigner, getConnectedProvider, getNetworkProvider } from 'decentraland-dapps/dist/lib/eth' import { EstateRegistry__factory } from '../../../contracts' import { Contract } from '../../vendor/services' import { NFT } from '../types' @@ -23,11 +19,7 @@ export const getCenter = (selection: { x: number; y: number }[]) => { return [x, y] } -export async function generateFingerprint( - estateId: string, - parcels: { x: number; y: number }[], - landContract: Contract -) { +export async function generateFingerprint(estateId: string, parcels: { x: number; y: number }[], landContract: Contract) { const provider = await getNetworkProvider(landContract.chainId) const contract = new ethers.Contract( landContract.address, @@ -54,32 +46,19 @@ export async function generateFingerprint( estateTokenIds.push(await contract.encodeTokenId(parcel.x, parcel.y)) } - let fingerprint = BigInt( - ethers.utils.solidityKeccak256( - ['string', 'uint256'], - ['estateId', estateId] - ) - ) + let fingerprint = BigInt(ethers.utils.solidityKeccak256(['string', 'uint256'], ['estateId', estateId])) for (const tokenId of estateTokenIds) { - fingerprint ^= BigInt( - ethers.utils.solidityKeccak256(['uint256'], [tokenId]) - ) + fingerprint ^= BigInt(ethers.utils.solidityKeccak256(['uint256'], [tokenId])) } return ethers.utils.hexlify(fingerprint) } -export async function getFingerprint( - estateId: string, - estateContract: Contract -) { +export async function getFingerprint(estateId: string, estateContract: Contract) { const provider = await getConnectedProvider() if (provider) { - const estateRegistry = EstateRegistry__factory.connect( - estateContract.address, - await getSigner() - ) + const estateRegistry = EstateRegistry__factory.connect(estateContract.address, await getSigner()) return estateRegistry.getFingerprint(estateId) } } diff --git a/webapp/src/modules/nft/hooks.spec.tsx b/webapp/src/modules/nft/hooks.spec.tsx index 437b9b0f0f..bfa1dcdc23 100644 --- a/webapp/src/modules/nft/hooks.spec.tsx +++ b/webapp/src/modules/nft/hooks.spec.tsx @@ -98,9 +98,7 @@ describe('when the nft is an estate', () => { ] } } - ;(useSelector as jest.Mock).mockImplementation((callback: Function) => - callback(appData) - ) + ;(useSelector as jest.Mock).mockImplementation((callback: Function) => callback(appData)) fingerprint = '0x123123' contractFingerprint = '0x456456' diff --git a/webapp/src/modules/nft/hooks.ts b/webapp/src/modules/nft/hooks.ts index a9e6fbbdc5..f92a4a5811 100644 --- a/webapp/src/modules/nft/hooks.ts +++ b/webapp/src/modules/nft/hooks.ts @@ -12,12 +12,8 @@ export const useFingerprint = (nft: NFT | null) => { const [contractFingerprint, setContractFingerprint] = useState<string>() const [isLoading, setIsLoading] = useState(false) const [isLoadingContract, setIsLoadingContract] = useState(false) - const estate = useSelector((state: RootState) => - getContract(state, { category: NFTCategory.ESTATE }) - ) - const landContract = useSelector((state: RootState) => - getContract(state, { category: NFTCategory.PARCEL }) - ) + const estate = useSelector((state: RootState) => getContract(state, { category: NFTCategory.ESTATE })) + const landContract = useSelector((state: RootState) => getContract(state, { category: NFTCategory.PARCEL })) const tilesByEstateId = useSelector(getTilesByEstateId) useEffect(() => { @@ -31,45 +27,22 @@ export const useFingerprint = (nft: NFT | null) => { if (parcels.length) { setIsLoading(true) generateFingerprint(nft.tokenId, parcels, landContract!) - .then((result) => setFingerprint(result)) + .then(result => setFingerprint(result)) .finally(() => setIsLoading(false)) - .catch(error => - console.error( - `Error generating fingerprint for nft ${nft.tokenId}`, - error - ) - ) - } + .catch(error => console.error(`Error generating fingerprint for nft ${nft.tokenId}`, error)) + } setIsLoadingContract(true) getFingerprint(nft.tokenId, estate) .then(result => setContractFingerprint(result)) .finally(() => setIsLoadingContract(false)) - .catch(error => - console.error( - `Error getting fingerprint for nft ${nft.tokenId}`, - error - ) - ) + .catch(error => console.error(`Error getting fingerprint for nft ${nft.tokenId}`, error)) break } default: break } } - }, [ - estate, - nft, - landContract, - tilesByEstateId, - setFingerprint, - setIsLoading, - setIsLoadingContract, - setContractFingerprint - ]) + }, [estate, nft, landContract, tilesByEstateId, setFingerprint, setIsLoading, setIsLoadingContract, setContractFingerprint]) - return [ - fingerprint, - isLoading || isLoadingContract, - contractFingerprint - ] as const + return [fingerprint, isLoading || isLoadingContract, contractFingerprint] as const } diff --git a/webapp/src/modules/nft/reducer.ts b/webapp/src/modules/nft/reducer.ts index 1142c41406..12ed727c4f 100644 --- a/webapp/src/modules/nft/reducer.ts +++ b/webapp/src/modules/nft/reducer.ts @@ -1,11 +1,5 @@ -import { - LoadingState, - loadingReducer -} from 'decentraland-dapps/dist/modules/loading/reducer' -import { - UpsertRentalSuccessAction, - UPSERT_RENTAL_SUCCESS -} from '../rental/actions' +import { LoadingState, loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' +import { UpsertRentalSuccessAction, UPSERT_RENTAL_SUCCESS } from '../rental/actions' import { NFT } from './types' import { @@ -56,10 +50,7 @@ type NFTReducerAction = | UpsertRentalSuccessAction | ClearNFTErrorsAction -export function nftReducer( - state: NFTState = INITIAL_STATE, - action: NFTReducerAction -) { +export function nftReducer(state: NFTState = INITIAL_STATE, action: NFTReducerAction) { switch (action.type) { case TRANSFER_NFT_REQUEST: case FETCH_NFTS_REQUEST: @@ -96,10 +87,13 @@ export function nftReducer( loading: loadingReducer(state.loading, action), data: { ...state.data, - ...action.payload.nfts.reduce((obj, nft) => { - obj[nft.id] = nft - return obj - }, {} as Record<string, NFT>) + ...action.payload.nfts.reduce( + (obj, nft) => { + obj[nft.id] = nft + return obj + }, + {} as Record<string, NFT> + ) } } } diff --git a/webapp/src/modules/nft/sagas.spec.ts b/webapp/src/modules/nft/sagas.spec.ts index bf8520ab98..d578c311a8 100644 --- a/webapp/src/modules/nft/sagas.spec.ts +++ b/webapp/src/modules/nft/sagas.spec.ts @@ -2,13 +2,7 @@ import { expectSaga } from 'redux-saga-test-plan' import { call, select } from 'redux-saga/effects' import { throwError } from 'redux-saga-test-plan/providers' import * as matchers from 'redux-saga-test-plan/matchers' -import { - ChainId, - NFTCategory, - Order, - RentalListing, - RentalStatus -} from '@dcl/schemas' +import { ChainId, NFTCategory, Order, RentalListing, RentalStatus } from '@dcl/schemas' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { waitForTx } from 'decentraland-dapps/dist/modules/transaction/utils' import { Vendor, VendorFactory, VendorName } from '../vendor' @@ -74,10 +68,7 @@ describe('when handling the fetch NFTs request action', () => { return expectSaga(nftSaga, getIdentity) .provide([ [select(getContracts), []], - [ - call(VendorFactory.build, options.vendor, API_OPTS), - throwError(new Error(error)) - ] + [call(VendorFactory.build, options.vendor, API_OPTS), throwError(new Error(error))] ]) .put(fetchNFTsFailure(options, error, timestamp)) .dispatch(fetchNFTsRequest(options)) @@ -133,26 +124,12 @@ describe('when handling the fetch NFTs request action', () => { .provide([ [call(VendorFactory.build, options.vendor, API_OPTS), vendor], [ - call( - [vendor.nftService, 'fetch'], - { ...DEFAULT_BASE_NFT_PARAMS, ...options.params }, - options.filters - ), + call([vendor.nftService, 'fetch'], { ...DEFAULT_BASE_NFT_PARAMS, ...options.params }, options.filters), [nfts, accounts, orders, rentals, count] ], [select(getContracts), []] ]) - .put( - fetchNFTsSuccess( - options, - nfts, - accounts, - orders, - rentals, - count, - timestamp - ) - ) + .put(fetchNFTsSuccess(options, nfts, accounts, orders, rentals, count, timestamp)) .dispatch(fetchNFTsRequest(options)) .run({ silenceTimeout: true }) }) @@ -174,23 +151,9 @@ describe('when handling the fetch NFT request action', () => { .provide([ [select(getLoading), []], [select(getContracts), []], - [ - select(getContract, { address: contractAddress.toLowerCase() }), - null - ], - [ - call(VendorFactory.build, contract.vendor as VendorName, API_OPTS), - vendor - ], - [ - call( - [vendor.nftService, 'fetchOne'], - contractAddress, - tokenId, - undefined - ), - Promise.resolve([nft, order, rental]) - ] + [select(getContract, { address: contractAddress.toLowerCase() }), null], + [call(VendorFactory.build, contract.vendor as VendorName, API_OPTS), vendor], + [call([vendor.nftService, 'fetchOne'], contractAddress, tokenId, undefined), Promise.resolve([nft, order, rental])] ]) .put(upsertContracts([contract])) .put(fetchNFTSuccess(nft, order, rental)) @@ -213,10 +176,7 @@ describe('when handling the fetch NFT request action', () => { .provide([ [select(getLoading), []], [select(getContracts), []], - [ - select(getContract, { address: contractAddress.toLowerCase() }), - contract - ] + [select(getContract, { address: contractAddress.toLowerCase() }), contract] ]) .put(fetchNFTFailure(contractAddress, tokenId, error)) .dispatch(fetchNFTRequest(contractAddress, tokenId)) @@ -238,14 +198,8 @@ describe('when handling the fetch NFT request action', () => { .provide([ [select(getLoading), []], [select(getContracts), []], - [ - select(getContract, { address: contractAddress.toLowerCase() }), - contract - ], - [ - call(VendorFactory.build, contract.vendor, API_OPTS), - throwError(new Error(error)) - ] + [select(getContract, { address: contractAddress.toLowerCase() }), contract], + [call(VendorFactory.build, contract.vendor, API_OPTS), throwError(new Error(error))] ]) .put(fetchNFTFailure(contractAddress, tokenId, error)) .dispatch(fetchNFTRequest(contractAddress, tokenId)) @@ -268,20 +222,9 @@ describe('when handling the fetch NFT request action', () => { .provide([ [select(getLoading), []], [select(getContracts), []], - [ - select(getContract, { address: contractAddress.toLowerCase() }), - contract - ], + [select(getContract, { address: contractAddress.toLowerCase() }), contract], [call(VendorFactory.build, contract.vendor, API_OPTS), vendor], - [ - call( - [vendor.nftService, 'fetchOne'], - contractAddress, - tokenId, - undefined - ), - Promise.reject(error) - ] + [call([vendor.nftService, 'fetchOne'], contractAddress, tokenId, undefined), Promise.reject(error)] ]) .put(fetchNFTFailure(contractAddress, tokenId, error.message)) .dispatch(fetchNFTRequest(contractAddress, tokenId)) @@ -307,10 +250,7 @@ describe('when handling the fetch NFT request action', () => { .provide([ [select(getLoading), []], [select(getContracts), []], - [ - select(getContract, { address: contractAddress.toLowerCase() }), - contract - ], + [select(getContract, { address: contractAddress.toLowerCase() }), contract], [call(VendorFactory.build, contract.vendor, API_OPTS), vendor], [ call([vendor.nftService, 'fetchOne'], contractAddress, tokenId, { @@ -350,10 +290,7 @@ describe('when handling the fetch NFT request action', () => { .provide([ [select(getLoading), []], [select(getContracts), []], - [ - select(getContract, { address: contractAddress.toLowerCase() }), - contract - ], + [select(getContract, { address: contractAddress.toLowerCase() }), contract], [call(VendorFactory.build, contract.vendor, API_OPTS), vendor], [ call([vendor.nftService, 'fetchOne'], contractAddress, tokenId, { @@ -385,9 +322,7 @@ describe('when handling the transfer NFT request action', () => { const error = 'someError' return expectSaga(nftSaga, getIdentity) - .provide([ - [call(VendorFactory.build, nft.vendor), throwError(new Error(error))] - ]) + .provide([[call(VendorFactory.build, nft.vendor), throwError(new Error(error))]]) .put(transferNFTFailure(nft, address, error)) .dispatch(transferNFTRequest(nft, address)) .run({ silenceTimeout: true }) @@ -404,10 +339,7 @@ describe('when handling the transfer NFT request action', () => { return expectSaga(nftSaga, getIdentity) .provide([ - [ - call(VendorFactory.build, nft.vendor), - VendorFactory.build(nft.vendor) - ], + [call(VendorFactory.build, nft.vendor), VendorFactory.build(nft.vendor)], [select(getWallet), null] ]) .put(transferNFTFailure(nft, address, error)) @@ -430,10 +362,7 @@ describe('when handling the transfer NFT request action', () => { .provide([ [call(VendorFactory.build, nft.vendor), vendor], [select(getWallet), wallet], - [ - call([vendor.nftService, 'transfer'], wallet, address, nft), - Promise.reject(error) - ] + [call([vendor.nftService, 'transfer'], wallet, address, nft), Promise.reject(error)] ]) .put(transferNFTFailure(nft, address, error.message)) .dispatch(transferNFTRequest(nft, address)) @@ -473,15 +402,9 @@ describe('when handling the transfer NFT request action', () => { [call(VendorFactory.build, nft.vendor), vendor], [select(getWallet), wallet], [select(getRentalById, nft.openRentalId!), rental], - [ - call([vendor.nftService, 'transfer'], wallet, address, nft), - Promise.resolve(txHash) - ], + [call([vendor.nftService, 'transfer'], wallet, address, nft), Promise.resolve(txHash)], [call(waitForTx, txHash), Promise.resolve()], - [ - call(waitUntilRentalChangesStatus, nft, RentalStatus.CANCELLED), - Promise.resolve() - ] + [call(waitUntilRentalChangesStatus, nft, RentalStatus.CANCELLED), Promise.resolve()] ]) .put(transferNFTSuccess(nft, address)) .put(transferNFTransactionSubmitted(nft, address, txHash)) @@ -499,10 +422,7 @@ describe('when handling the transfer NFT request action', () => { .provide([ [call(VendorFactory.build, nft.vendor), vendor], [select(getWallet), wallet], - [ - call([vendor.nftService, 'transfer'], wallet, address, nft), - Promise.resolve(txHash) - ], + [call([vendor.nftService, 'transfer'], wallet, address, nft), Promise.resolve(txHash)], [call(waitForTx, txHash), Promise.resolve()] ]) .put(transferNFTransactionSubmitted(nft, address, txHash)) @@ -518,10 +438,7 @@ describe('when handling the transfer NFT request action', () => { .provide([ [call(VendorFactory.build, nft.vendor), vendor], [select(getWallet), wallet], - [ - call([vendor.nftService, 'transfer'], wallet, address, nft), - Promise.resolve(txHash) - ], + [call([vendor.nftService, 'transfer'], wallet, address, nft), Promise.resolve(txHash)], [call(waitForTx, txHash), Promise.reject(new Error('anError'))] ]) .put(transferNFTFailure(nft, address, 'anError')) diff --git a/webapp/src/modules/nft/sagas.ts b/webapp/src/modules/nft/sagas.ts index b0fa5f219f..b2c44f93f7 100644 --- a/webapp/src/modules/nft/sagas.ts +++ b/webapp/src/modules/nft/sagas.ts @@ -10,16 +10,9 @@ import { Vendor, VendorFactory } from '../vendor/VendorFactory' import { getContract, getContracts } from '../contract/selectors' import { VendorName } from '../vendor/types' import { AwaitFn } from '../types' -import { - getContractKey, - getContractKeyFromNFT, - getStubMaticCollectionContract -} from '../contract/utils' +import { getContractKey, getContractKeyFromNFT, getStubMaticCollectionContract } from '../contract/utils' import { getRentalById } from '../rental/selectors' -import { - isRentalListingOpen, - waitUntilRentalChangesStatus -} from '../rental/utils' +import { isRentalListingOpen, waitUntilRentalChangesStatus } from '../rental/utils' import { upsertContracts } from '../contract/actions' import { Contract } from '../vendor/services' import { retryParams } from '../vendor/decentraland/utils' @@ -63,19 +56,9 @@ export function* nftSaga(getIdentity: () => AuthIdentity | undefined) { } try { - const vendor: Vendor<VendorName> = yield call( - VendorFactory.build, - vendorName, - API_OPTS - ) + const vendor: Vendor<VendorName> = yield call(VendorFactory.build, vendorName, API_OPTS) - const [ - nfts, - accounts, - orders, - rentals, - count - ]: AwaitFn<typeof vendor.nftService.fetch> = yield call( + const [nfts, accounts, orders, rentals, count]: AwaitFn<typeof vendor.nftService.fetch> = yield call( [vendor.nftService, 'fetch'], params, filters @@ -103,17 +86,7 @@ export function* nftSaga(getIdentity: () => AuthIdentity | undefined) { yield put(upsertContracts(newContracts)) } - yield put( - fetchNFTsSuccess( - options, - nfts as NFT[], - accounts, - orders, - rentals, - count, - timestamp - ) - ) + yield put(fetchNFTsSuccess(options, nfts as NFT[], accounts, orders, rentals, count, timestamp)) } catch (error) { yield put(fetchNFTsFailure(options, (error as Error).message, timestamp)) } @@ -136,22 +109,12 @@ export function* nftSaga(getIdentity: () => AuthIdentity | undefined) { } if (!contract.vendor) { - throw new Error( - `Couldn't find a valid vendor for contract ${contract?.address}` - ) + throw new Error(`Couldn't find a valid vendor for contract ${contract?.address}`) } - const vendor: Vendor<VendorName> = yield call( - VendorFactory.build, - contract.vendor, - API_OPTS - ) + const vendor: Vendor<VendorName> = yield call(VendorFactory.build, contract.vendor, API_OPTS) - const [ - nft, - order, - rental - ]: AwaitFn<typeof vendor.nftService.fetchOne> = yield call( + const [nft, order, rental]: AwaitFn<typeof vendor.nftService.fetchOne> = yield call( [vendor.nftService, 'fetchOne'], contractAddress, tokenId, @@ -163,38 +126,25 @@ export function* nftSaga(getIdentity: () => AuthIdentity | undefined) { yield put(fetchSmartWearableRequiredPermissionsRequest(nft as NFT)) } } catch (error) { - yield put( - fetchNFTFailure(contractAddress, tokenId, (error as Error).message) - ) + yield put(fetchNFTFailure(contractAddress, tokenId, (error as Error).message)) } } function* handleTransferNFTRequest(action: TransferNFTRequestAction) { const { nft, address } = action.payload try { - const vendor: Vendor<VendorName> = yield call( - VendorFactory.build, - nft.vendor - ) + const vendor: Vendor<VendorName> = yield call(VendorFactory.build, nft.vendor) const wallet: ReturnType<typeof getWallet> = yield select(getWallet) if (!wallet) { throw new Error('A wallet is needed to perform a NFT transfer request') } - const txHash: string = yield call( - [vendor.nftService, 'transfer'], - wallet, - address, - nft - ) + const txHash: string = yield call([vendor.nftService, 'transfer'], wallet, address, nft) yield put(transferNFTransactionSubmitted(nft, address, txHash)) if (nft?.openRentalId) { yield call(waitForTx, txHash) - const rental: RentalListing | null = yield select( - getRentalById, - nft.openRentalId - ) + const rental: RentalListing | null = yield select(getRentalById, nft.openRentalId) if (isRentalListingOpen(rental)) { yield call(waitUntilRentalChangesStatus, nft, RentalStatus.CANCELLED) } @@ -202,14 +152,9 @@ export function* nftSaga(getIdentity: () => AuthIdentity | undefined) { yield put(transferNFTSuccess(nft, address)) } catch (error) { - const errorMessage = isErrorWithMessage(error) - ? error.message - : t('global.unknown_error') + const errorMessage = isErrorWithMessage(error) ? error.message : t('global.unknown_error') const errorCode = - error !== undefined && - error !== null && - typeof error === 'object' && - 'code' in error + error !== undefined && error !== null && typeof error === 'object' && 'code' in error ? (error as { code: ErrorCode }).code : undefined yield put(transferNFTFailure(nft, address, errorMessage, errorCode)) diff --git a/webapp/src/modules/nft/selectors.ts b/webapp/src/modules/nft/selectors.ts index 5a169c0d2b..48d5531a05 100644 --- a/webapp/src/modules/nft/selectors.ts +++ b/webapp/src/modules/nft/selectors.ts @@ -20,42 +20,27 @@ const nftDetailMatchSelector = createMatchSelector< } >(locations.nft(':contractAddress', ':tokenId')) -export const getContractAddress = createSelector< - RootState, - ReturnType<typeof nftDetailMatchSelector>, - string | null ->( +export const getContractAddress = createSelector<RootState, ReturnType<typeof nftDetailMatchSelector>, string | null>( nftDetailMatchSelector, match => match?.params.contractAddress.toLowerCase() || null ) -export const getTokenId = createSelector< - RootState, - ReturnType<typeof nftDetailMatchSelector>, - string | null ->(nftDetailMatchSelector, match => match?.params.tokenId || null) +export const getTokenId = createSelector<RootState, ReturnType<typeof nftDetailMatchSelector>, string | null>( + nftDetailMatchSelector, + match => match?.params.tokenId || null +) -export const getCurrentNFT = createSelector< - RootState, - string | null, - string | null, - NFTState['data'], - NFT | null ->( +export const getCurrentNFT = createSelector<RootState, string | null, string | null, NFTState['data'], NFT | null>( state => getContractAddress(state), state => getTokenId(state), state => getData(state), (contractAddress, tokenId, nfts) => getNFT(contractAddress, tokenId, nfts) ) -export const getNFTsByOwner = createSelector< - RootState, - NFTState['data'], - Record<string, NFT[]> ->( +export const getNFTsByOwner = createSelector<RootState, NFTState['data'], Record<string, NFT[]>>( state => getData(state), data => { - let nftsByOwner: Record<string, NFT[]> = {} + const nftsByOwner: Record<string, NFT[]> = {} for (const id of Object.keys(data)) { const nft = data[id] const key = nft.owner.toLowerCase() @@ -68,12 +53,7 @@ export const getNFTsByOwner = createSelector< } ) -export const getWalletNFTs = createSelector< - RootState, - Record<string, NFT[]>, - string | undefined, - NFT[] ->( +export const getWalletNFTs = createSelector<RootState, Record<string, NFT[]>, string | undefined, NFT[]>( state => getNFTsByOwner(state), state => getAddress(state), (nftsByOwner, address) => { diff --git a/webapp/src/modules/nft/types.ts b/webapp/src/modules/nft/types.ts index 2195c7806e..95b4917ea0 100644 --- a/webapp/src/modules/nft/types.ts +++ b/webapp/src/modules/nft/types.ts @@ -16,16 +16,9 @@ export enum NFTSortBy { MIN_RENTAL_PRICE = 'min_rental_price' } -export type Data<V extends VendorName> = V extends VendorName.DECENTRALAND - ? DecentralandData - : V extends void - ? DecentralandData - : never +export type Data<V extends VendorName> = V extends VendorName.DECENTRALAND ? DecentralandData : V extends void ? DecentralandData : never -export type NFT<V extends VendorName = VendorName.DECENTRALAND> = Omit< - BaseNFT, - 'category' | 'data' -> & { +export type NFT<V extends VendorName = VendorName.DECENTRALAND> = Omit<BaseNFT, 'category' | 'data'> & { category: NFTCategory | 'art' vendor: VendorName data: Data<V> diff --git a/webapp/src/modules/nft/utils.spec.ts b/webapp/src/modules/nft/utils.spec.ts index 1c81b00b23..0381e39ddc 100644 --- a/webapp/src/modules/nft/utils.spec.ts +++ b/webapp/src/modules/nft/utils.spec.ts @@ -117,9 +117,7 @@ describe('when getting the Wearable BodyShapeUrn', () => { }) it('should return "urn:decentraland:off-chain:base-avatars:BaseMale"', () => { - const bodyShape: string = nft.data.wearable - ? nft.data.wearable.bodyShapes[0] - : '' + const bodyShape: string = nft.data.wearable ? nft.data.wearable.bodyShapes[0] : '' expect(getBodyShapeUrn(bodyShape)).toBe(BodyShape.MALE) }) }) @@ -132,9 +130,7 @@ describe('when getting the Wearable BodyShapeUrn', () => { }) it('should return "urn:decentraland:off-chain:base-avatars:BaseFemale"', () => { - const bodyShape: string = nft.data.wearable - ? nft.data.wearable.bodyShapes[0] - : '' + const bodyShape: string = nft.data.wearable ? nft.data.wearable.bodyShapes[0] : '' expect(getBodyShapeUrn(bodyShape)).toBe(BodyShape.FEMALE) }) }) @@ -159,18 +155,14 @@ describe('when checking that a Wearable is gender or unisex', () => { describe('and is comparing to "BodyShape.MALE"', () => { it('should return true', () => { - const bodyShape: BodyShape[] = nft.data.wearable - ? [nft.data.wearable.bodyShapes[0]] - : [] + const bodyShape: BodyShape[] = nft.data.wearable ? [nft.data.wearable.bodyShapes[0]] : [] expect(isGender(bodyShape, BodyShape.MALE)).toBe(true) }) }) describe('and is comparing to "BodyShape.FEMALE"', () => { it('should return false', () => { - const bodyShape: BodyShape[] = nft.data.wearable - ? [nft.data.wearable.bodyShapes[0]] - : [] + const bodyShape: BodyShape[] = nft.data.wearable ? [nft.data.wearable.bodyShapes[0]] : [] expect(isGender(bodyShape, BodyShape.FEMALE)).toBe(false) }) }) @@ -185,18 +177,14 @@ describe('when checking that a Wearable is gender or unisex', () => { describe('and is comparing to "BodyShape.FEMALE"', () => { it('should return true', () => { - const bodyShape: BodyShape[] = nft.data.wearable - ? [nft.data.wearable.bodyShapes[0]] - : [] + const bodyShape: BodyShape[] = nft.data.wearable ? [nft.data.wearable.bodyShapes[0]] : [] expect(isGender(bodyShape, BodyShape.FEMALE)).toBe(true) }) }) describe('and is comparing to "BodyShape.MALE"', () => { it('should return false', () => { - const bodyShape: BodyShape[] = nft.data.wearable - ? [nft.data.wearable.bodyShapes[0]] - : [] + const bodyShape: BodyShape[] = nft.data.wearable ? [nft.data.wearable.bodyShapes[0]] : [] expect(isGender(bodyShape, BodyShape.MALE)).toBe(false) }) }) @@ -205,27 +193,20 @@ describe('when checking that a Wearable is gender or unisex', () => { describe('and the Wearable bodyShape is "Unisex"', () => { beforeEach(() => { nft.data.wearable = { - bodyShapes: [ - 'BaseMale' as BodyShape.MALE, - 'BaseFemale' as BodyShape.FEMALE - ] + bodyShapes: ['BaseMale' as BodyShape.MALE, 'BaseFemale' as BodyShape.FEMALE] } as NFTData[NFTCategory.WEARABLE] }) describe('and is comparing to "BodyShape.FEMALE"', () => { it('should return false', () => { - const bodyShape: BodyShape[] = nft.data.wearable - ? nft.data.wearable.bodyShapes - : [] + const bodyShape: BodyShape[] = nft.data.wearable ? nft.data.wearable.bodyShapes : [] expect(isGender(bodyShape, BodyShape.FEMALE)).toBe(false) }) }) describe('and is comparing to "BodyShape.MALE"', () => { it('should return false', () => { - const bodyShape: BodyShape[] = nft.data.wearable - ? nft.data.wearable.bodyShapes - : [] + const bodyShape: BodyShape[] = nft.data.wearable ? nft.data.wearable.bodyShapes : [] expect(isGender(bodyShape, BodyShape.MALE)).toBe(false) }) }) diff --git a/webapp/src/modules/nft/utils.ts b/webapp/src/modules/nft/utils.ts index fd3a704ea4..18b67b82e9 100644 --- a/webapp/src/modules/nft/utils.ts +++ b/webapp/src/modules/nft/utils.ts @@ -9,11 +9,7 @@ export function getNFTId(contractAddress: string, tokenId: string) { // TODO: These methods are repeated on item/utils and can be moved to asset/utils: // - getNFT // - getNFTId -export function getNFT( - contractAddress: string | null, - tokenId: string | null, - nfts: Record<string, NFT> -): NFT | null { +export function getNFT(contractAddress: string | null, tokenId: string | null, nfts: Record<string, NFT>): NFT | null { if (!contractAddress || !tokenId) { return null } @@ -22,8 +18,7 @@ export function getNFT( return nftId in nfts ? nfts[nftId] : null } -export const getBodyShapeUrn = (bodyShape: string) => - `urn:decentraland:off-chain:base-avatars:${bodyShape}` +export const getBodyShapeUrn = (bodyShape: string) => `urn:decentraland:off-chain:base-avatars:${bodyShape}` export function isGender(bodyShapes: BodyShape[], gender: BodyShape) { if (bodyShapes.length !== 1) { @@ -37,9 +32,7 @@ export function isUnisex(bodyShapes: BodyShape[]) { } export function isLand(nft: Asset) { - return ( - nft.category === NFTCategory.PARCEL || nft.category === NFTCategory.ESTATE - ) + return nft.category === NFTCategory.PARCEL || nft.category === NFTCategory.ESTATE } export function isParcel(nft: Asset) { @@ -47,7 +40,5 @@ export function isParcel(nft: Asset) { } export function isPartOfEstate(nft: NFT): boolean { - return Boolean( - nft.category === NFTCategory.PARCEL && nft.data?.parcel?.estate - ) + return Boolean(nft.category === NFTCategory.PARCEL && nft.data?.parcel?.estate) } diff --git a/webapp/src/modules/order/actions.spec.ts b/webapp/src/modules/order/actions.spec.ts index 1ea5d265fc..adebdb5947 100644 --- a/webapp/src/modules/order/actions.spec.ts +++ b/webapp/src/modules/order/actions.spec.ts @@ -1,9 +1,6 @@ import { ChainId, Network, Order } from '@dcl/schemas' import { TradeType } from 'decentraland-dapps/dist/modules/gateway/transak/types' -import { - NFTPurchase, - PurchaseStatus -} from 'decentraland-dapps/dist/modules/gateway/types' +import { NFTPurchase, PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' import { buildTransactionPayload, buildTransactionWithFromPayload, @@ -89,9 +86,7 @@ beforeEach(() => { describe('when creating the action to signal the start of the create order request', () => { it('should return an object representing the action', () => { - expect( - createOrderRequest(nft, Number(order.price), order.expiresAt) - ).toEqual({ + expect(createOrderRequest(nft, Number(order.price), order.expiresAt)).toEqual({ type: CREATE_ORDER_REQUEST, meta: undefined, payload: { nft, price: Number(order.price), expiresAt: order.expiresAt } @@ -129,19 +124,17 @@ describe('when creating the action to signal a failure in the create order reque const { expiresAt } = order const errorCode = ErrorCode.EXPECTATION_FAILED - expect(createOrderFailure(nft, price, expiresAt, error, errorCode)).toEqual( - { - type: CREATE_ORDER_FAILURE, - meta: undefined, - payload: { - nft, - price, - expiresAt, - error, - errorCode - } + expect(createOrderFailure(nft, price, expiresAt, error, errorCode)).toEqual({ + type: CREATE_ORDER_FAILURE, + meta: undefined, + payload: { + nft, + price, + expiresAt, + error, + errorCode } - ) + }) }) }) @@ -222,18 +215,13 @@ describe('when creating the action to signal the submission of the executed orde payload: { purchase, nft, - ...buildTransactionWithFromPayload( - nft.chainId, - txHash, - purchase.address, - { - tokenId: nft.tokenId, - contractAddress: nft.contractAddress, - network: nft.network, - name: getAssetName(nft), - price: purchase.nft.cryptoAmount.toString() - } - ) + ...buildTransactionWithFromPayload(nft.chainId, txHash, purchase.address, { + tokenId: nft.tokenId, + contractAddress: nft.contractAddress, + network: nft.network, + name: getAssetName(nft), + price: purchase.nft.cryptoAmount.toString() + }) } }) }) diff --git a/webapp/src/modules/order/actions.ts b/webapp/src/modules/order/actions.ts index f66e757267..f3f542058e 100644 --- a/webapp/src/modules/order/actions.ts +++ b/webapp/src/modules/order/actions.ts @@ -18,17 +18,8 @@ export const CREATE_ORDER_REQUEST = '[Request] Create Order' export const CREATE_ORDER_SUCCESS = '[Success] Create Order' export const CREATE_ORDER_FAILURE = '[Failure] Create Order' -export const createOrderRequest = ( - nft: NFT, - price: number, - expiresAt: number -) => action(CREATE_ORDER_REQUEST, { nft, price, expiresAt }) -export const createOrderSuccess = ( - nft: NFT, - price: number, - expiresAt: number, - txHash: string -) => +export const createOrderRequest = (nft: NFT, price: number, expiresAt: number) => action(CREATE_ORDER_REQUEST, { nft, price, expiresAt }) +export const createOrderSuccess = (nft: NFT, price: number, expiresAt: number, txHash: string) => action(CREATE_ORDER_SUCCESS, { nft, price, @@ -41,13 +32,8 @@ export const createOrderSuccess = ( price }) }) -export const createOrderFailure = ( - nft: NFT, - price: number, - expiresAt: number, - error: string, - errorCode?: ErrorCode -) => action(CREATE_ORDER_FAILURE, { nft, price, expiresAt, error, errorCode }) +export const createOrderFailure = (nft: NFT, price: number, expiresAt: number, error: string, errorCode?: ErrorCode) => + action(CREATE_ORDER_FAILURE, { nft, price, expiresAt, error, errorCode }) export type CreateOrderRequestAction = ReturnType<typeof createOrderRequest> export type CreateOrderSuccessAction = ReturnType<typeof createOrderSuccess> @@ -58,20 +44,11 @@ export type CreateOrderFailureAction = ReturnType<typeof createOrderFailure> export const EXECUTE_ORDER_REQUEST = '[Request] Execute Order' export const EXECUTE_ORDER_SUCCESS = '[Success] Execute Order' export const EXECUTE_ORDER_FAILURE = '[Failure] Execute Order' -export const EXECUTE_ORDER_TRANSACTION_SUBMITTED = - '[Submitted transaction] Execute Order' - -export const executeOrderRequest = ( - order: Order, - nft: NFT, - fingerprint?: string, - silent?: boolean -) => action(EXECUTE_ORDER_REQUEST, { order, nft, fingerprint, silent }) -export const executeOrderTransactionSubmitted = ( - order: Order, - nft: NFT, - txHash: string -) => +export const EXECUTE_ORDER_TRANSACTION_SUBMITTED = '[Submitted transaction] Execute Order' + +export const executeOrderRequest = (order: Order, nft: NFT, fingerprint?: string, silent?: boolean) => + action(EXECUTE_ORDER_REQUEST, { order, nft, fingerprint, silent }) +export const executeOrderTransactionSubmitted = (order: Order, nft: NFT, txHash: string) => action(EXECUTE_ORDER_TRANSACTION_SUBMITTED, { order, nft, @@ -83,39 +60,23 @@ export const executeOrderTransactionSubmitted = ( price: formatWeiMANA(order.price) }) }) -export const executeOrderSuccess = (txHash: string, nft: NFT) => - action(EXECUTE_ORDER_SUCCESS, { txHash, nft }) -export const executeOrderFailure = ( - order: Order, - nft: NFT, - error: string, - errorCode?: ErrorCode, - silent?: boolean -) => action(EXECUTE_ORDER_FAILURE, { order, nft, error, errorCode, silent }) +export const executeOrderSuccess = (txHash: string, nft: NFT) => action(EXECUTE_ORDER_SUCCESS, { txHash, nft }) +export const executeOrderFailure = (order: Order, nft: NFT, error: string, errorCode?: ErrorCode, silent?: boolean) => + action(EXECUTE_ORDER_FAILURE, { order, nft, error, errorCode, silent }) export type ExecuteOrderRequestAction = ReturnType<typeof executeOrderRequest> export type ExecuteOrderSuccessAction = ReturnType<typeof executeOrderSuccess> -export type ExecuteOrderTransactionSubmittedAction = ReturnType< - typeof executeOrderTransactionSubmitted -> +export type ExecuteOrderTransactionSubmittedAction = ReturnType<typeof executeOrderTransactionSubmitted> export type ExecuteOrderFailureAction = ReturnType<typeof executeOrderFailure> // Execute Order With Card (aka Buy with Card) -export const EXECUTE_ORDER_WITH_CARD_REQUEST = - '[Request] Execute Order With Card' -export const EXECUTE_ORDER_WITH_CARD_SUCCESS = - '[Success] Execute Order With Card' -export const EXECUTE_ORDER_WITH_CARD_FAILURE = - '[Failure] Execute Order With Card' - -export const executeOrderWithCardRequest = (nft: NFT) => - action(EXECUTE_ORDER_WITH_CARD_REQUEST, { nft }) - -export const executeOrderWithCardSuccess = ( - purchase: NFTPurchase, - nft: NFT, - txHash: string -) => +export const EXECUTE_ORDER_WITH_CARD_REQUEST = '[Request] Execute Order With Card' +export const EXECUTE_ORDER_WITH_CARD_SUCCESS = '[Success] Execute Order With Card' +export const EXECUTE_ORDER_WITH_CARD_FAILURE = '[Failure] Execute Order With Card' + +export const executeOrderWithCardRequest = (nft: NFT) => action(EXECUTE_ORDER_WITH_CARD_REQUEST, { nft }) + +export const executeOrderWithCardSuccess = (purchase: NFTPurchase, nft: NFT, txHash: string) => action(EXECUTE_ORDER_WITH_CARD_SUCCESS, { purchase, nft, @@ -127,18 +88,11 @@ export const executeOrderWithCardSuccess = ( price: purchase.nft.cryptoAmount.toString() }) }) -export const executeOrderWithCardFailure = (error: string) => - action(EXECUTE_ORDER_WITH_CARD_FAILURE, { error }) - -export type ExecuteOrderWithCardRequestAction = ReturnType< - typeof executeOrderWithCardRequest -> -export type ExecuteOrderWithCardSuccessAction = ReturnType< - typeof executeOrderWithCardSuccess -> -export type ExecuteOrderWithCardFailureAction = ReturnType< - typeof executeOrderWithCardFailure -> +export const executeOrderWithCardFailure = (error: string) => action(EXECUTE_ORDER_WITH_CARD_FAILURE, { error }) + +export type ExecuteOrderWithCardRequestAction = ReturnType<typeof executeOrderWithCardRequest> +export type ExecuteOrderWithCardSuccessAction = ReturnType<typeof executeOrderWithCardSuccess> +export type ExecuteOrderWithCardFailureAction = ReturnType<typeof executeOrderWithCardFailure> // Cancel Order (aka Cancel Sale) @@ -146,8 +100,7 @@ export const CANCEL_ORDER_REQUEST = '[Request] Cancel Order' export const CANCEL_ORDER_SUCCESS = '[Success] Cancel Order' export const CANCEL_ORDER_FAILURE = '[Failure] Cancel Order' -export const cancelOrderRequest = (order: Order, nft: NFT) => - action(CANCEL_ORDER_REQUEST, { order, nft }) +export const cancelOrderRequest = (order: Order, nft: NFT) => action(CANCEL_ORDER_REQUEST, { order, nft }) export const cancelOrderSuccess = (order: Order, nft: NFT, txHash: string) => action(CANCEL_ORDER_SUCCESS, { order, @@ -160,12 +113,8 @@ export const cancelOrderSuccess = (order: Order, nft: NFT, txHash: string) => price: formatWeiMANA(order.price) }) }) -export const cancelOrderFailure = ( - order: Order, - nft: NFT, - error: string, - errorCode?: ErrorCode -) => action(CANCEL_ORDER_FAILURE, { order, nft, error, errorCode }) +export const cancelOrderFailure = (order: Order, nft: NFT, error: string, errorCode?: ErrorCode) => + action(CANCEL_ORDER_FAILURE, { order, nft, error, errorCode }) export type CancelOrderRequestAction = ReturnType<typeof cancelOrderRequest> export type CancelOrderSuccessAction = ReturnType<typeof cancelOrderSuccess> @@ -182,26 +131,16 @@ export const FETCH_LEGACY_ORDERS_REQUEST = '[Request] Fetch Legacy Orders' export const FETCH_LEGACY_ORDERS_SUCCESS = '[Success] Fetch Legacy Orders' export const FETCH_LEGACY_ORDERS_FAILURE = '[Failure] Fetch Legacy Orders' -export const fetchOrdersRequest = (address: string, filters?: OrderFilters) => - action(FETCH_LEGACY_ORDERS_REQUEST, { address, filters }) +export const fetchOrdersRequest = (address: string, filters?: OrderFilters) => action(FETCH_LEGACY_ORDERS_REQUEST, { address, filters }) export const fetchOrdersSuccess = (orders: LegacyOrderFragment[]) => action(FETCH_LEGACY_ORDERS_SUCCESS, { orders }) -export const fetchOrdersFailure = ( - address: string, - error: string, - errorCode?: ErrorCode -) => action(FETCH_LEGACY_ORDERS_FAILURE, { address, error, errorCode }) - -export type FetchLegacyOrdersRequestAction = ReturnType< - typeof fetchOrdersRequest -> -export type FetchLegacyOrdersSuccessAction = ReturnType< - typeof fetchOrdersSuccess -> -export type FetchLegacyOrdersFailureAction = ReturnType< - typeof fetchOrdersFailure -> +export const fetchOrdersFailure = (address: string, error: string, errorCode?: ErrorCode) => + action(FETCH_LEGACY_ORDERS_FAILURE, { address, error, errorCode }) + +export type FetchLegacyOrdersRequestAction = ReturnType<typeof fetchOrdersRequest> +export type FetchLegacyOrdersSuccessAction = ReturnType<typeof fetchOrdersSuccess> +export type FetchLegacyOrdersFailureAction = ReturnType<typeof fetchOrdersFailure> diff --git a/webapp/src/modules/order/reducer.spec.ts b/webapp/src/modules/order/reducer.spec.ts index b2bf3f2052..341c4f014c 100644 --- a/webapp/src/modules/order/reducer.spec.ts +++ b/webapp/src/modules/order/reducer.spec.ts @@ -1,20 +1,11 @@ import { Network, Order, RentalListing } from '@dcl/schemas' import { loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' -import { - NFTPurchase, - PurchaseStatus -} from 'decentraland-dapps/dist/modules/gateway/types' +import { NFTPurchase, PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' import { TradeType } from 'decentraland-dapps/dist/modules/gateway/transak/types' import { NetworkGatewayType } from 'decentraland-ui' import { acceptRentalListingSuccess } from '../rental/actions' import { NFT, NFTsFetchOptions, NFTsFetchParams } from '../nft/types' -import { - fetchNFTRequest, - fetchNFTsFailure, - fetchNFTsRequest, - fetchNFTsSuccess, - fetchNFTSuccess -} from '../nft/actions' +import { fetchNFTRequest, fetchNFTsFailure, fetchNFTsRequest, fetchNFTsSuccess, fetchNFTSuccess } from '../nft/actions' import { VendorName } from '../vendor' import { View } from '../ui/types' import { @@ -146,15 +137,7 @@ successActions.forEach(action => { describe('when reducing the successful action of fetching nfts', () => { const requestAction = fetchNFTsRequest(nftsFetchOptions) - const successAction = fetchNFTsSuccess( - nftsFetchOptions, - [nft], - [], - [order], - [], - 1, - timestamp - ) + const successAction = fetchNFTsSuccess(nftsFetchOptions, [nft], [], [order], [], 1, timestamp) const initialState = { ...INITIAL_STATE, @@ -174,12 +157,7 @@ describe('when reducing the successful action of fetching nfts', () => { const failureActions = [ { request: createOrderRequest(nft, Number(order.price), order.expiresAt), - failure: createOrderFailure( - nft, - Number(order.price), - order.expiresAt, - anErrorMessage - ) + failure: createOrderFailure(nft, Number(order.price), order.expiresAt, anErrorMessage) }, { request: executeOrderRequest(order, nft, fingerprint), @@ -263,9 +241,7 @@ describe('when reducing the successful action of accepting a rental', () => { }) it('should remove the order of the NFT that had the rental listing', () => { - expect( - orderReducer(state, acceptRentalListingSuccess(nft, rentalListing, 0)) - ).toEqual({ + expect(orderReducer(state, acceptRentalListingSuccess(nft, rentalListing, 0))).toEqual({ ...state, data: { ftOrder: { @@ -291,8 +267,6 @@ describe('when reducing a clear order errors action', () => { }) it('should set the error field as null', () => { - expect(orderReducer(state, clearOrderErrors())).toEqual( - expect.objectContaining({ error: null }) - ) + expect(orderReducer(state, clearOrderErrors())).toEqual(expect.objectContaining({ error: null })) }) }) diff --git a/webapp/src/modules/order/reducer.ts b/webapp/src/modules/order/reducer.ts index 9f18814d57..c1c44e3f33 100644 --- a/webapp/src/modules/order/reducer.ts +++ b/webapp/src/modules/order/reducer.ts @@ -1,8 +1,5 @@ import { Order } from '@dcl/schemas' -import { - LoadingState, - loadingReducer -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { LoadingState, loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchNFTsRequestAction, FetchNFTsSuccessAction, @@ -13,10 +10,7 @@ import { FetchNFTSuccessAction, FETCH_NFT_SUCCESS } from '../nft/actions' -import { - AcceptRentalListingSuccessAction, - ACCEPT_RENTAL_LISTING_SUCCESS -} from '../rental/actions' +import { AcceptRentalListingSuccessAction, ACCEPT_RENTAL_LISTING_SUCCESS } from '../rental/actions' import { CancelOrderFailureAction, CancelOrderRequestAction, @@ -90,10 +84,7 @@ type OrderReducerAction = | FetchLegacyOrdersSuccessAction | FetchLegacyOrdersFailureAction -export function orderReducer( - state: OrderState = INITIAL_STATE, - action: OrderReducerAction -): OrderState { +export function orderReducer(state: OrderState = INITIAL_STATE, action: OrderReducerAction): OrderState { switch (action.type) { case CREATE_ORDER_REQUEST: case EXECUTE_ORDER_REQUEST: @@ -121,10 +112,13 @@ export function orderReducer( ...state, data: { ...state.data, - ...action.payload.orders.reduce((obj, order) => { - obj[order.id] = order - return obj - }, {} as Record<string, Order>) + ...action.payload.orders.reduce( + (obj, order) => { + obj[order.id] = order + return obj + }, + {} as Record<string, Order> + ) }, loading: loadingReducer(state.loading, action), error: null @@ -162,11 +156,7 @@ export function orderReducer( ...state, data: Object.fromEntries( Object.entries(state.data).filter( - ([_key, value]) => - !( - value.contractAddress === rental.contractAddress && - value.tokenId === rental.tokenId - ) + ([_key, value]) => !(value.contractAddress === rental.contractAddress && value.tokenId === rental.tokenId) ) ) } @@ -179,10 +169,13 @@ export function orderReducer( ...state, dataLegacy: { ...state.dataLegacy, - ...orders.reduce((obj, order) => { - obj[order.id] = order - return obj - }, {} as Record<string, LegacyOrderFragment>) + ...orders.reduce( + (obj, order) => { + obj[order.id] = order + return obj + }, + {} as Record<string, LegacyOrderFragment> + ) }, loading: loadingReducer(state.loading, action) } diff --git a/webapp/src/modules/order/sagas.spec.ts b/webapp/src/modules/order/sagas.spec.ts index 2ef1b32d2e..f5175cf329 100644 --- a/webapp/src/modules/order/sagas.spec.ts +++ b/webapp/src/modules/order/sagas.spec.ts @@ -1,35 +1,16 @@ -import { - ChainId, - Network, - Order, - RentalListing, - RentalStatus -} from '@dcl/schemas' +import { ChainId, Network, Order, RentalListing, RentalStatus } from '@dcl/schemas' import { setPurchase } from 'decentraland-dapps/dist/modules/gateway/actions' import { TradeType } from 'decentraland-dapps/dist/modules/gateway/transak/types' -import { - ManaPurchase, - NFTPurchase, - PurchaseStatus -} from 'decentraland-dapps/dist/modules/gateway/types' +import { ManaPurchase, NFTPurchase, PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' import { waitForTx } from 'decentraland-dapps/dist/modules/transaction/utils' -import { - closeModal, - openModal -} from 'decentraland-dapps/dist/modules/modal/actions' -import { - ProviderType, - Wallet -} from 'decentraland-dapps/dist/modules/wallet/types' +import { closeModal, openModal } from 'decentraland-dapps/dist/modules/modal/actions' +import { ProviderType, Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { ErrorCode } from 'decentraland-transactions' import { NetworkGatewayType } from 'decentraland-ui' import { expectSaga } from 'redux-saga-test-plan' import { throwError } from 'redux-saga-test-plan/providers' import { call, select, take } from 'redux-saga/effects' -import { - buyAssetWithCard, - BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY -} from '../asset/utils' +import { buyAssetWithCard, BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY } from '../asset/utils' import { NFT } from '../nft/types' import { getData as getNFTs } from '../nft/selectors' import { getNFT } from '../nft/utils' @@ -121,9 +102,7 @@ describe('when handling the execute order request action', () => { it("should put the execute order failure with an error message saying that the order doesn't match the NFT", () => { return expectSaga(orderSaga) - .put( - executeOrderFailure(order, nft, 'The order does not match the NFT') - ) + .put(executeOrderFailure(order, nft, 'The order does not match the NFT')) .dispatch(executeOrderRequest(order, nft, fingerprint)) .run({ silenceTimeout: true }) }) @@ -136,9 +115,7 @@ describe('when handling the execute order request action', () => { it("should put the execute order failure with the an error message saying that the order doesn't match the NFT", () => { return expectSaga(orderSaga) - .put( - executeOrderFailure(order, nft, 'The order does not match the NFT') - ) + .put(executeOrderFailure(order, nft, 'The order does not match the NFT')) .dispatch(executeOrderRequest(order, nft, fingerprint)) .run({ silenceTimeout: true }) }) @@ -161,25 +138,9 @@ describe('when handling the execute order request action', () => { .provide([ [select(getWallet), wallet], [call([VendorFactory, 'build'], nft.vendor), vendor], - [ - call( - [vendor.orderService, 'execute'], - wallet, - nft, - order, - fingerprint - ), - throwError(error) - ] + [call([vendor.orderService, 'execute'], wallet, nft, order, fingerprint), throwError(error)] ]) - .put( - executeOrderFailure( - order, - nft, - errorMessage, - ErrorCode.SALE_PRICE_TOO_LOW - ) - ) + .put(executeOrderFailure(order, nft, errorMessage, ErrorCode.SALE_PRICE_TOO_LOW)) .dispatch(executeOrderRequest(order, nft, fingerprint)) .run({ silenceTimeout: true }) }) @@ -210,20 +171,8 @@ describe('when handling the execute order request action', () => { [select(getWallet), wallet], [call([VendorFactory, 'build'], nft.vendor), vendor], [select(getRentalById, nft.openRentalId!), rentalListing], - [ - call(waitUntilRentalChangesStatus, nft, RentalStatus.CANCELLED), - Promise.resolve() - ], - [ - call( - [vendor.orderService, 'execute'], - wallet, - nft, - order, - fingerprint - ), - Promise.resolve(txHash) - ], + [call(waitUntilRentalChangesStatus, nft, RentalStatus.CANCELLED), Promise.resolve()], + [call([vendor.orderService, 'execute'], wallet, nft, order, fingerprint), Promise.resolve(txHash)], [call(waitForTx, txHash), Promise.resolve()] ]) .put(executeOrderTransactionSubmitted(order, nft, txHash)) @@ -243,16 +192,7 @@ describe('when handling the execute order request action', () => { .provide([ [call([VendorFactory, 'build'], nft.vendor), vendor], [select(getWallet), wallet], - [ - call( - [vendor.orderService, 'execute'], - wallet, - nft, - order, - fingerprint - ), - Promise.resolve(txHash) - ] + [call([vendor.orderService, 'execute'], wallet, nft, order, fingerprint), Promise.resolve(txHash)] ]) .put(executeOrderTransactionSubmitted(order, nft, txHash)) .dispatch(executeOrderRequest(order, nft, fingerprint)) @@ -274,15 +214,7 @@ describe('when handling the execute order with card action', () => { describe('when the explanation modal has already been shown', () => { it('should open Transak widget', () => { return expectSaga(orderSaga) - .provide([ - [ - call( - [localStorage, 'getItem'], - BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY - ), - 'true' - ] - ]) + .provide([[call([localStorage, 'getItem'], BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY), 'true']]) .put(openTransak(nft)) .dispatch(executeOrderWithCardRequest(nft)) .run({ silenceTimeout: true }) @@ -295,15 +227,7 @@ describe('when handling the execute order with card action', () => { describe('when the explanation modal is shown and the user closes it', () => { it('should not set nft in the local storage to show the modal again later', () => { return expectSaga(orderSaga) - .provide([ - [ - call( - [localStorage, 'getItem'], - BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY - ), - null - ] - ]) + .provide([[call([localStorage, 'getItem'], BUY_NFTS_WITH_CARD_EXPLANATION_POPUP_KEY), null]]) .put(openModal('BuyWithCardExplanationModal', { asset: nft })) .dispatch(executeOrderWithCardRequest(nft)) .dispatch(closeModal('BuyWithCardExplanationModal')) @@ -323,9 +247,7 @@ describe('when handling the execute order with card action', () => { it('should dispatch an action signaling the failure of the action handling', () => { return expectSaga(orderSaga) - .provide([ - [call(buyAssetWithCard, nft), Promise.reject(new Error(errorMessage))] - ]) + .provide([[call(buyAssetWithCard, nft), Promise.reject(new Error(errorMessage))]]) .put(executeOrderWithCardFailure(errorMessage)) .dispatch(executeOrderWithCardRequest(nft)) .run({ silenceTimeout: true }) diff --git a/webapp/src/modules/order/sagas.ts b/webapp/src/modules/order/sagas.ts index 09c40f10dd..09bae490fe 100644 --- a/webapp/src/modules/order/sagas.ts +++ b/webapp/src/modules/order/sagas.ts @@ -1,26 +1,17 @@ import { put, call, takeEvery, select, race, take } from 'redux-saga/effects' import { ListingStatus, RentalListing, RentalStatus } from '@dcl/schemas' -import { - CONNECT_WALLET_SUCCESS, - ConnectWalletSuccessAction -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { CONNECT_WALLET_SUCCESS, ConnectWalletSuccessAction } from 'decentraland-dapps/dist/modules/wallet/actions' import { ErrorCode } from 'decentraland-transactions' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { waitForTx } from 'decentraland-dapps/dist/modules/transaction/utils' -import { - SetPurchaseAction, - SET_PURCHASE -} from 'decentraland-dapps/dist/modules/gateway/actions' +import { SetPurchaseAction, SET_PURCHASE } from 'decentraland-dapps/dist/modules/gateway/actions' import { isNFTPurchase } from 'decentraland-dapps/dist/modules/gateway/utils' import { PurchaseStatus } from 'decentraland-dapps/dist/modules/gateway/types' import { isErrorWithMessage } from '../../lib/error' import { getWallet } from '../wallet/selectors' import { Vendor, VendorFactory } from '../vendor/VendorFactory' import { getRentalById } from '../rental/selectors' -import { - isRentalListingOpen, - waitUntilRentalChangesStatus -} from '../rental/utils' +import { isRentalListingOpen, waitUntilRentalChangesStatus } from '../rental/utils' import { buyAssetWithCard } from '../asset/utils' import { VendorName } from '../vendor' import { getData as getNFTs } from '../nft/selectors' @@ -49,13 +40,7 @@ import { fetchOrdersRequest, fetchOrdersFailure } from './actions' -import { - FetchNFTFailureAction, - fetchNFTRequest, - FetchNFTSuccessAction, - FETCH_NFT_FAILURE, - FETCH_NFT_SUCCESS -} from '../nft/actions' +import { FetchNFTFailureAction, fetchNFTRequest, FetchNFTSuccessAction, FETCH_NFT_FAILURE, FETCH_NFT_SUCCESS } from '../nft/actions' import SubgraphService from '../vendor/decentraland/SubgraphService' import { getSubgraphOrdersQuery } from './utils' import { LegacyOrderFragment } from './types' @@ -63,10 +48,7 @@ import { LegacyOrderFragment } from './types' export function* orderSaga() { yield takeEvery(CREATE_ORDER_REQUEST, handleCreateOrderRequest) yield takeEvery(EXECUTE_ORDER_REQUEST, handleExecuteOrderRequest) - yield takeEvery( - EXECUTE_ORDER_WITH_CARD_REQUEST, - handleExecuteOrderWithCardRequest - ) + yield takeEvery(EXECUTE_ORDER_WITH_CARD_REQUEST, handleExecuteOrderWithCardRequest) yield takeEvery(SET_PURCHASE, handleSetNftPurchaseWithCard) yield takeEvery(CANCEL_ORDER_REQUEST, handleCancelOrderRequest) yield takeEvery(FETCH_LEGACY_ORDERS_REQUEST, handleFetchLegacyOrdersRequest) @@ -78,9 +60,7 @@ function* handleConnectWalletSuccess(action: ConnectWalletSuccessAction) { yield put(fetchOrdersRequest(address, { status: ListingStatus.OPEN })) } -function* handleFetchLegacyOrdersRequest( - action: FetchLegacyOrdersRequestAction -) { +function* handleFetchLegacyOrdersRequest(action: FetchLegacyOrdersRequestAction) { const { address, filters } = action.payload try { @@ -93,14 +73,9 @@ function* handleFetchLegacyOrdersRequest( ) yield put(fetchOrdersSuccess(response.data.orders)) } catch (error) { - const errorMessage = isErrorWithMessage(error) - ? error.message - : t('global.unknown_error') + const errorMessage = isErrorWithMessage(error) ? error.message : t('global.unknown_error') const errorCode = - error !== undefined && - error !== null && - typeof error === 'object' && - 'code' in error + error !== undefined && error !== null && typeof error === 'object' && 'code' in error ? (error as { code: ErrorCode }).code : undefined @@ -114,25 +89,16 @@ function* handleCreateOrderRequest(action: CreateOrderRequestAction) { const { orderService } = VendorFactory.build(nft.vendor) const wallet: ReturnType<typeof getWallet> = yield select(getWallet) - const txHash: string = yield call(() => - orderService.create(wallet, nft, price, expiresAt) - ) + const txHash: string = yield call(() => orderService.create(wallet, nft, price, expiresAt)) yield put(createOrderSuccess(nft, price, expiresAt, txHash)) } catch (error) { - const errorMessage = isErrorWithMessage(error) - ? error.message - : t('global.unknown_error') + const errorMessage = isErrorWithMessage(error) ? error.message : t('global.unknown_error') const errorCode = - error !== undefined && - error !== null && - typeof error === 'object' && - 'code' in error + error !== undefined && error !== null && typeof error === 'object' && 'code' in error ? (error as { code: ErrorCode }).code : undefined - yield put( - createOrderFailure(nft, price, expiresAt, errorMessage, errorCode) - ) + yield put(createOrderFailure(nft, price, expiresAt, errorMessage, errorCode)) } } @@ -140,33 +106,18 @@ function* handleExecuteOrderRequest(action: ExecuteOrderRequestAction) { const { order, nft, fingerprint, silent } = action.payload try { - if ( - nft.contractAddress !== order.contractAddress || - nft.tokenId !== order.tokenId - ) { + if (nft.contractAddress !== order.contractAddress || nft.tokenId !== order.tokenId) { throw new Error('The order does not match the NFT') } - const { orderService }: Vendor<VendorName> = yield call( - [VendorFactory, 'build'], - nft.vendor - ) + const { orderService }: Vendor<VendorName> = yield call([VendorFactory, 'build'], nft.vendor) const wallet: ReturnType<typeof getWallet> = yield select(getWallet) - const txHash: string = yield call( - [orderService, 'execute'], - wallet, - nft, - order, - fingerprint - ) + const txHash: string = yield call([orderService, 'execute'], wallet, nft, order, fingerprint) yield put(executeOrderTransactionSubmitted(order, nft, txHash)) if (nft.openRentalId) { yield call(waitForTx, txHash) - const rental: RentalListing = yield select( - getRentalById, - nft.openRentalId - ) + const rental: RentalListing = yield select(getRentalById, nft.openRentalId) if (isRentalListingOpen(rental)) { yield call(waitUntilRentalChangesStatus, nft, RentalStatus.CANCELLED) } @@ -174,14 +125,9 @@ function* handleExecuteOrderRequest(action: ExecuteOrderRequestAction) { yield put(executeOrderSuccess(txHash, nft)) } catch (error) { - const errorMessage = isErrorWithMessage(error) - ? error.message - : t('global.unknown_error') + const errorMessage = isErrorWithMessage(error) ? error.message : t('global.unknown_error') const errorCode = - error !== undefined && - error !== null && - typeof error === 'object' && - 'code' in error + error !== undefined && error !== null && typeof error === 'object' && 'code' in error ? (error as { code: ErrorCode }).code : undefined @@ -189,19 +135,13 @@ function* handleExecuteOrderRequest(action: ExecuteOrderRequestAction) { } } -function* handleExecuteOrderWithCardRequest( - action: ExecuteOrderWithCardRequestAction -) { +function* handleExecuteOrderWithCardRequest(action: ExecuteOrderWithCardRequestAction) { const { nft } = action.payload try { yield call(buyAssetWithCard, nft) } catch (error) { - yield put( - executeOrderWithCardFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(executeOrderWithCardFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } @@ -210,23 +150,13 @@ function* handleSetNftPurchaseWithCard(action: SetPurchaseAction) { const { purchase } = action.payload const { status, txHash } = purchase - if ( - isNFTPurchase(purchase) && - purchase.nft.tokenId && - status === PurchaseStatus.COMPLETE && - txHash - ) { + if (isNFTPurchase(purchase) && purchase.nft.tokenId && status === PurchaseStatus.COMPLETE && txHash) { const { nft: { contractAddress, tokenId } } = purchase const nfts: ReturnType<typeof getNFTs> = yield select(getNFTs) - let nft: ReturnType<typeof getNFT> = yield call( - getNFT, - contractAddress, - tokenId, - nfts - ) + let nft: ReturnType<typeof getNFT> = yield call(getNFT, contractAddress, tokenId, nfts) if (!nft) { yield put(fetchNFTRequest(contractAddress, tokenId)) @@ -250,21 +180,14 @@ function* handleSetNftPurchaseWithCard(action: SetPurchaseAction) { yield put(executeOrderWithCardSuccess(purchase, nft, txHash)) } } catch (error) { - yield put( - executeOrderWithCardFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(executeOrderWithCardFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } function* handleCancelOrderRequest(action: CancelOrderRequestAction) { const { order, nft } = action.payload try { - if ( - nft.contractAddress !== order.contractAddress && - nft.tokenId !== order.tokenId - ) { + if (nft.contractAddress !== order.contractAddress && nft.tokenId !== order.tokenId) { throw new Error('The order does not match the NFT') } const { orderService } = VendorFactory.build(nft.vendor) @@ -273,14 +196,9 @@ function* handleCancelOrderRequest(action: CancelOrderRequestAction) { const txHash: string = yield call(() => orderService.cancel(wallet, order)) yield put(cancelOrderSuccess(order, nft, txHash)) } catch (error) { - const errorMessage = isErrorWithMessage(error) - ? error.message - : t('global.unknown_error') + const errorMessage = isErrorWithMessage(error) ? error.message : t('global.unknown_error') const errorCode = - error !== undefined && - error !== null && - typeof error === 'object' && - 'code' in error + error !== undefined && error !== null && typeof error === 'object' && 'code' in error ? (error as { code: ErrorCode }).code : undefined diff --git a/webapp/src/modules/order/selectors.spec.ts b/webapp/src/modules/order/selectors.spec.ts index 81c3b0cf6b..e02f4a7e97 100644 --- a/webapp/src/modules/order/selectors.spec.ts +++ b/webapp/src/modules/order/selectors.spec.ts @@ -1,10 +1,10 @@ -import { Order } from "@dcl/schemas" -import { AuthorizationStepStatus } from "decentraland-ui" -import { LoadingState } from "decentraland-dapps/dist/modules/loading/reducer" -import { createOrderRequest, executeOrderRequest } from "./actions" -import { NFT } from "../nft/types" -import { RootState } from "../reducer" -import { getBuyItemStatus, getSellItemStatus } from "./selectors" +import { Order } from '@dcl/schemas' +import { AuthorizationStepStatus } from 'decentraland-ui' +import { LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' +import { createOrderRequest, executeOrderRequest } from './actions' +import { NFT } from '../nft/types' +import { RootState } from '../reducer' +import { getBuyItemStatus, getSellItemStatus } from './selectors' let rootState: RootState diff --git a/webapp/src/modules/order/selectors.ts b/webapp/src/modules/order/selectors.ts index 6b7717c73c..d50509c172 100644 --- a/webapp/src/modules/order/selectors.ts +++ b/webapp/src/modules/order/selectors.ts @@ -14,12 +14,7 @@ export const getData = (state: RootState) => getState(state).data export const getLegacyOrders = (state: RootState) => getState(state).dataLegacy export const getLoading = (state: RootState) => getState(state).loading export const getError = (state: RootState) => getState(state).error -export const getCurrentOrder = createSelector< - RootState, - NFT | null, - OrderState['data'], - Order | null ->( +export const getCurrentOrder = createSelector<RootState, NFT | null, OrderState['data'], Order | null>( state => getCurrentNFT(state), state => getData(state), (nft, orders) => getActiveOrder(nft, orders) diff --git a/webapp/src/modules/order/utils.spec.ts b/webapp/src/modules/order/utils.spec.ts index 3995c872c4..a2a4a313af 100644 --- a/webapp/src/modules/order/utils.spec.ts +++ b/webapp/src/modules/order/utils.spec.ts @@ -2,8 +2,6 @@ import { convertDateToDateInputValue } from './utils' describe('when converting a date to a date input value', () => { it('should return the converted date', () => { - expect(convertDateToDateInputValue(new Date(1663345462000))).toEqual( - '2022-09-16' - ) + expect(convertDateToDateInputValue(new Date(1663345462000))).toEqual('2022-09-16') }) }) diff --git a/webapp/src/modules/order/utils.ts b/webapp/src/modules/order/utils.ts index 21ef1b07b8..1baa2c2295 100644 --- a/webapp/src/modules/order/utils.ts +++ b/webapp/src/modules/order/utils.ts @@ -7,9 +7,7 @@ import { Asset } from '../asset/types' export const DEFAULT_EXPIRATION_IN_DAYS = 30 export const INPUT_FORMAT = 'yyyy-MM-dd' export const getDefaultExpirationDate = (date = Date.now()): string => - convertDateToDateInputValue( - addDays(new Date(date), DEFAULT_EXPIRATION_IN_DAYS) - ) + convertDateToDateInputValue(addDays(new Date(date), DEFAULT_EXPIRATION_IN_DAYS)) export const convertDateToDateInputValue = (date: Date): string => { return dateFnsFormat(date, INPUT_FORMAT) @@ -19,10 +17,7 @@ export function isExpired(expiresAt: string) { return parseInt(expiresAt, 10) < Date.now() } -export function getActiveOrder( - asset: Asset | null, - orders: Record<string, Order> -) { +export function getActiveOrder(asset: Asset | null, orders: Record<string, Order>) { if ( asset && 'activeOrderId' in asset && diff --git a/webapp/src/modules/proximity/actions.ts b/webapp/src/modules/proximity/actions.ts index 0c62abfc17..832aa03b60 100644 --- a/webapp/src/modules/proximity/actions.ts +++ b/webapp/src/modules/proximity/actions.ts @@ -6,17 +6,9 @@ export const FETCH_PROXIMITY_SUCCESS = '[Success] Fetch Proximity' export const FETCH_PROXIMITY_FAILURE = '[Failure] Fetch Proximity' export const fetchProximityRequest = () => action(FETCH_PROXIMITY_REQUEST) -export const fetchProximitySuccess = (proximity: Record<string, Proximity>) => - action(FETCH_PROXIMITY_SUCCESS, { proximity }) -export const fetchProximityFailure = (error: string) => - action(FETCH_PROXIMITY_FAILURE, { error }) +export const fetchProximitySuccess = (proximity: Record<string, Proximity>) => action(FETCH_PROXIMITY_SUCCESS, { proximity }) +export const fetchProximityFailure = (error: string) => action(FETCH_PROXIMITY_FAILURE, { error }) -export type FetchProximityRequestAction = ReturnType< - typeof fetchProximityRequest -> -export type FetchProximitySuccessAction = ReturnType< - typeof fetchProximitySuccess -> -export type FetchProximityFailureAction = ReturnType< - typeof fetchProximityFailure -> +export type FetchProximityRequestAction = ReturnType<typeof fetchProximityRequest> +export type FetchProximitySuccessAction = ReturnType<typeof fetchProximitySuccess> +export type FetchProximityFailureAction = ReturnType<typeof fetchProximityFailure> diff --git a/webapp/src/modules/proximity/hooks.ts b/webapp/src/modules/proximity/hooks.ts index ec89b6ef4d..8a3d5e8c5f 100644 --- a/webapp/src/modules/proximity/hooks.ts +++ b/webapp/src/modules/proximity/hooks.ts @@ -5,16 +5,13 @@ import { VendorName } from '../vendor/types' import { getParcelProximity, getEstateProximity } from './utils' import { Proximity } from './types' -export const useProximity = ( - nft: NFT<VendorName.DECENTRALAND>, - proximities: Record<string, Proximity> -) => +export const useProximity = (nft: NFT<VendorName.DECENTRALAND>, proximities: Record<string, Proximity>) => useMemo(() => { switch (nft.category) { case NFTCategory.PARCEL: - return getParcelProximity(nft.data.parcel!, proximities) + return getParcelProximity(nft.data.parcel, proximities) case NFTCategory.ESTATE: - return getEstateProximity(nft.data.estate!, proximities) + return getEstateProximity(nft.data.estate, proximities) default: return } diff --git a/webapp/src/modules/proximity/reducer.ts b/webapp/src/modules/proximity/reducer.ts index 5c443d28b7..344524f599 100644 --- a/webapp/src/modules/proximity/reducer.ts +++ b/webapp/src/modules/proximity/reducer.ts @@ -1,7 +1,4 @@ -import { - LoadingState, - loadingReducer -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { LoadingState, loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchProximityRequestAction, FetchProximitySuccessAction, @@ -24,15 +21,9 @@ const INITIAL_STATE: ProximityState = { error: null } -type ProximityReducerAction = - | FetchProximityRequestAction - | FetchProximitySuccessAction - | FetchProximityFailureAction +type ProximityReducerAction = FetchProximityRequestAction | FetchProximitySuccessAction | FetchProximityFailureAction -export function proximityReducer( - state = INITIAL_STATE, - action: ProximityReducerAction -) { +export function proximityReducer(state = INITIAL_STATE, action: ProximityReducerAction) { switch (action.type) { case FETCH_PROXIMITY_REQUEST: { return { diff --git a/webapp/src/modules/proximity/sagas.ts b/webapp/src/modules/proximity/sagas.ts index 44cac6d102..aa6e209686 100644 --- a/webapp/src/modules/proximity/sagas.ts +++ b/webapp/src/modules/proximity/sagas.ts @@ -24,11 +24,7 @@ function* handleFetchProximityRequest(_action: FetchProximityRequestAction) { }) yield put(fetchProximitySuccess(proximity)) } catch (error) { - yield put( - fetchProximityFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchProximityFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } diff --git a/webapp/src/modules/proximity/utils.ts b/webapp/src/modules/proximity/utils.ts index 2b0760d9ae..5b626248e8 100644 --- a/webapp/src/modules/proximity/utils.ts +++ b/webapp/src/modules/proximity/utils.ts @@ -3,23 +3,14 @@ import { getId } from '../nft/parcel/utils' import { NFT } from '../nft/types' import { Proximity } from './types' -export const getDistanceText = (distance: number) => - distance === 0 - ? t('proximity.adjacent') - : t('proximity.distance', { distance }) +export const getDistanceText = (distance: number) => (distance === 0 ? t('proximity.adjacent') : t('proximity.distance', { distance })) -export const getParcelProximity = ( - parcel: NFT['data']['parcel'], - proximities: Record<string, Proximity> -) => { +export const getParcelProximity = (parcel: NFT['data']['parcel'], proximities: Record<string, Proximity>) => { const id = getId(parcel!.x, parcel!.y) return proximities[id] } -export const getEstateProximity = ( - estate: NFT['data']['estate'], - proximities: Record<string, Proximity> -) => { +export const getEstateProximity = (estate: NFT['data']['estate'], proximities: Record<string, Proximity>) => { let estateProximity: Proximity | undefined for (const { x, y } of estate!.parcels) { const id = getId(x, y) @@ -30,23 +21,14 @@ export const getEstateProximity = ( } if ( parcelProximity.district !== undefined && - (estateProximity.district === undefined || - parcelProximity.district < estateProximity.district) + (estateProximity.district === undefined || parcelProximity.district < estateProximity.district) ) { estateProximity.district = parcelProximity.district } - if ( - parcelProximity.plaza !== undefined && - (estateProximity.plaza === undefined || - parcelProximity.plaza < estateProximity.plaza) - ) { + if (parcelProximity.plaza !== undefined && (estateProximity.plaza === undefined || parcelProximity.plaza < estateProximity.plaza)) { estateProximity.plaza = parcelProximity.plaza } - if ( - parcelProximity.road !== undefined && - (estateProximity.road === undefined || - parcelProximity.road < estateProximity.road) - ) { + if (parcelProximity.road !== undefined && (estateProximity.road === undefined || parcelProximity.road < estateProximity.road)) { estateProximity.road = parcelProximity.road } } diff --git a/webapp/src/modules/rental/actions.spec.ts b/webapp/src/modules/rental/actions.spec.ts index cd975a0ea9..b3efc896fb 100644 --- a/webapp/src/modules/rental/actions.spec.ts +++ b/webapp/src/modules/rental/actions.spec.ts @@ -27,14 +27,7 @@ describe('when creating the action to signal the start of the accept rental list addressOperator = '0xaddress' }) it('should return an object representing the action', () => { - expect( - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ).toEqual({ + expect(acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)).toEqual({ type: ACCEPT_RENTAL_LISTING_REQUEST, meta: undefined, payload: { @@ -94,14 +87,7 @@ describe('when creating the action to signal the submission of the accept rental }) it('should return an object representing the action', () => { - expect( - acceptRentalListingTransactionSubmitted( - nft, - rental, - txHash, - periodIndexChosen - ) - ).toEqual({ + expect(acceptRentalListingTransactionSubmitted(nft, rental, txHash, periodIndexChosen)).toEqual({ type: ACCEPT_RENTAL_LISTING_TRANSACTION_SUBMITTED, meta: undefined, payload: buildTransactionPayload(nft.chainId, txHash, { diff --git a/webapp/src/modules/rental/actions.ts b/webapp/src/modules/rental/actions.ts index 63a6308c45..81cb330dcc 100644 --- a/webapp/src/modules/rental/actions.ts +++ b/webapp/src/modules/rental/actions.ts @@ -22,23 +22,13 @@ export const upsertRentalRequest = ( expiresAt, operationType }) -export const upsertRentalSuccess = ( - nft: NFT, - rental: RentalListing, - operationType: UpsertRentalOptType -) => +export const upsertRentalSuccess = (nft: NFT, rental: RentalListing, operationType: UpsertRentalOptType) => action(UPSERT_RENTAL_SUCCESS, { nft, rental, operationType }) -export const upsertRentalFailure = ( - nft: NFT, - pricePerDay: number, - periods: PeriodOption[], - expiresAt: number, - error: string -) => +export const upsertRentalFailure = (nft: NFT, pricePerDay: number, periods: PeriodOption[], expiresAt: number, error: string) => action(UPSERT_RENTAL_FAILURE, { nft, pricePerDay, periods, expiresAt, error }) export type UpsertRentalRequestAction = ReturnType<typeof upsertRentalRequest> @@ -48,23 +38,16 @@ export type UpsertRentalFailureAction = ReturnType<typeof upsertRentalFailure> export const CLAIM_ASSET_REQUEST = '[Request] Claim Asset' export const CLAIM_ASSET_SUCCESS = '[Success] Claim Asset' export const CLAIM_ASSET_FAILURE = '[Failure] Claim Asset' -export const CLAIM_ASSET_TRANSACTION_SUBMITTED = - '[Submitted transaction] Claim Asset' +export const CLAIM_ASSET_TRANSACTION_SUBMITTED = '[Submitted transaction] Claim Asset' -export const claimAssetRequest = (nft: NFT, rental: RentalListing) => - action(CLAIM_ASSET_REQUEST, { nft, rental }) +export const claimAssetRequest = (nft: NFT, rental: RentalListing) => action(CLAIM_ASSET_REQUEST, { nft, rental }) export const claimAssetSuccess = (nft: NFT, rental: RentalListing) => action(CLAIM_ASSET_SUCCESS, { nft, rental }) -export const claimAssetFailure = (error: string) => - action(CLAIM_ASSET_FAILURE, { error }) -export const claimAssetTransactionSubmitted = ( - nft: NFT, - txHash: string, - rentalContractAddress: string -) => +export const claimAssetFailure = (error: string) => action(CLAIM_ASSET_FAILURE, { error }) +export const claimAssetTransactionSubmitted = (nft: NFT, txHash: string, rentalContractAddress: string) => action( CLAIM_ASSET_TRANSACTION_SUBMITTED, buildTransactionPayload(nft.chainId, txHash, { @@ -78,9 +61,7 @@ export const claimAssetTransactionSubmitted = ( export type ClaimAssetRequestAction = ReturnType<typeof claimAssetRequest> export type ClaimAssetSuccessAction = ReturnType<typeof claimAssetSuccess> export type ClaimAssetFailureAction = ReturnType<typeof claimAssetFailure> -export type ClaimAssetTransactionSubmitted = ReturnType< - typeof claimAssetTransactionSubmitted -> +export type ClaimAssetTransactionSubmitted = ReturnType<typeof claimAssetTransactionSubmitted> export const CLEAR_RENTAL_ERRORS = 'Clear rental errors' @@ -91,17 +72,14 @@ export type ClearRentalErrorsAction = ReturnType<typeof clearRentalErrors> export const REMOVE_RENTAL_REQUEST = '[Request] Remove Rental' export const REMOVE_RENTAL_SUCCESS = '[Success] Remove Rental' export const REMOVE_RENTAL_FAILURE = '[Failure] Remove Rental' -export const REMOVE_RENTAL_TRANSACTION_SUBMITTED = - '[Submitted transaction] Remove Rental' +export const REMOVE_RENTAL_TRANSACTION_SUBMITTED = '[Submitted transaction] Remove Rental' -export const removeRentalRequest = (nft: NFT) => - action(REMOVE_RENTAL_REQUEST, { nft }) +export const removeRentalRequest = (nft: NFT) => action(REMOVE_RENTAL_REQUEST, { nft }) export const removeRentalSuccess = (nft: NFT) => action(REMOVE_RENTAL_SUCCESS, { nft }) -export const removeRentalFailure = (error: string) => - action(REMOVE_RENTAL_FAILURE, { error }) +export const removeRentalFailure = (error: string) => action(REMOVE_RENTAL_FAILURE, { error }) export const removeRentalTransactionSubmitted = (nft: NFT, txHash: string) => action( REMOVE_RENTAL_TRANSACTION_SUBMITTED, @@ -114,46 +92,28 @@ export const removeRentalTransactionSubmitted = (nft: NFT, txHash: string) => export type RemoveRentalRequestAction = ReturnType<typeof removeRentalRequest> export type RemoveRentalSuccessAction = ReturnType<typeof removeRentalSuccess> export type RemoveRentalFailureAction = ReturnType<typeof removeRentalFailure> -export type RemoveRentalTransactionSubmitted = ReturnType< - typeof removeRentalTransactionSubmitted -> +export type RemoveRentalTransactionSubmitted = ReturnType<typeof removeRentalTransactionSubmitted> export const ACCEPT_RENTAL_LISTING_REQUEST = '[Request] Accept Rental Listing' export const ACCEPT_RENTAL_LISTING_SUCCESS = '[Success] Accept Rental Listing' export const ACCEPT_RENTAL_LISTING_FAILURE = '[Failure] Accept Rental Listing' -export const ACCEPT_RENTAL_LISTING_TRANSACTION_SUBMITTED = - '[Submitted transaction] Accept Rental Listing' +export const ACCEPT_RENTAL_LISTING_TRANSACTION_SUBMITTED = '[Submitted transaction] Accept Rental Listing' -export const acceptRentalListingRequest = ( - nft: NFT, - rental: RentalListing, - periodIndexChosen: number, - addressOperator: string -) => +export const acceptRentalListingRequest = (nft: NFT, rental: RentalListing, periodIndexChosen: number, addressOperator: string) => action(ACCEPT_RENTAL_LISTING_REQUEST, { nft, rental, periodIndexChosen, addressOperator }) -export const acceptRentalListingSuccess = ( - nft: NFT, - rental: RentalListing, - periodIndexChosen: number -) => +export const acceptRentalListingSuccess = (nft: NFT, rental: RentalListing, periodIndexChosen: number) => action(ACCEPT_RENTAL_LISTING_SUCCESS, { nft, periodIndexChosen, rental }) -export const acceptRentalListingFailure = (error: string) => - action(ACCEPT_RENTAL_LISTING_FAILURE, { error }) -export const acceptRentalListingTransactionSubmitted = ( - nft: NFT, - rental: RentalListing, - txHash: string, - periodIndexChosen: number -) => +export const acceptRentalListingFailure = (error: string) => action(ACCEPT_RENTAL_LISTING_FAILURE, { error }) +export const acceptRentalListingTransactionSubmitted = (nft: NFT, rental: RentalListing, txHash: string, periodIndexChosen: number) => action( ACCEPT_RENTAL_LISTING_TRANSACTION_SUBMITTED, buildTransactionPayload(nft.chainId, txHash, { @@ -164,15 +124,7 @@ export const acceptRentalListingTransactionSubmitted = ( }) ) -export type AcceptRentalListingRequestAction = ReturnType< - typeof acceptRentalListingRequest -> -export type AcceptRentalListingSuccessAction = ReturnType< - typeof acceptRentalListingSuccess -> -export type AcceptRentalListingFailureAction = ReturnType< - typeof acceptRentalListingFailure -> -export type AcceptRentalListingTransactionSubmitted = ReturnType< - typeof acceptRentalListingTransactionSubmitted -> +export type AcceptRentalListingRequestAction = ReturnType<typeof acceptRentalListingRequest> +export type AcceptRentalListingSuccessAction = ReturnType<typeof acceptRentalListingSuccess> +export type AcceptRentalListingFailureAction = ReturnType<typeof acceptRentalListingFailure> +export type AcceptRentalListingTransactionSubmitted = ReturnType<typeof acceptRentalListingTransactionSubmitted> diff --git a/webapp/src/modules/rental/contract.spec.ts b/webapp/src/modules/rental/contract.spec.ts index d4c32a32e2..2f6328851a 100644 --- a/webapp/src/modules/rental/contract.spec.ts +++ b/webapp/src/modules/rental/contract.spec.ts @@ -5,13 +5,11 @@ import { getRentalsContractInstance } from './contract' jest.mock('decentraland-dapps/dist/lib/eth') -const getConnectedProviderMock = getConnectedProvider as jest.MockedFunction< - typeof getConnectedProvider -> +const getConnectedProviderMock = getConnectedProvider as jest.MockedFunction<typeof getConnectedProvider> -const providerMock = ({ +const providerMock = { send: jest.fn() -} as unknown) as any +} as unknown as any describe('when getting a rental contract instance', () => { describe('and the provider is not connected', () => { @@ -19,9 +17,7 @@ describe('when getting a rental contract instance', () => { getConnectedProviderMock.mockResolvedValueOnce(null) }) it('should throw an error', async () => { - return expect( - getRentalsContractInstance(ChainId.ETHEREUM_GOERLI) - ).rejects.toThrow('Could not get connected provider') + return expect(getRentalsContractInstance(ChainId.ETHEREUM_GOERLI)).rejects.toThrow('Could not get connected provider') }) }) describe('and the provider is connected', () => { @@ -29,9 +25,7 @@ describe('when getting a rental contract instance', () => { getConnectedProviderMock.mockResolvedValueOnce(providerMock) }) it('should return an instance', () => { - expect( - getRentalsContractInstance(ChainId.ETHEREUM_GOERLI) - ).resolves.toBeInstanceOf(ethers.Contract) + expect(getRentalsContractInstance(ChainId.ETHEREUM_GOERLI)).resolves.toBeInstanceOf(ethers.Contract) }) }) }) diff --git a/webapp/src/modules/rental/contract.ts b/webapp/src/modules/rental/contract.ts index 13ec44c969..cc572b0ae5 100644 --- a/webapp/src/modules/rental/contract.ts +++ b/webapp/src/modules/rental/contract.ts @@ -11,10 +11,6 @@ export async function getRentalsContractInstance(chainId: ChainId) { throw new Error('Could not get connected provider') } const { address, abi } = getContract(ContractName.Rentals, chainId) - const instance = new ethers.Contract( - address, - abi, - new ethers.providers.Web3Provider(provider) - ) + const instance = new ethers.Contract(address, abi, new ethers.providers.Web3Provider(provider)) return instance } diff --git a/webapp/src/modules/rental/reducer.spec.ts b/webapp/src/modules/rental/reducer.spec.ts index efe95b447c..23d9052e90 100644 --- a/webapp/src/modules/rental/reducer.spec.ts +++ b/webapp/src/modules/rental/reducer.spec.ts @@ -52,13 +52,7 @@ describe('when reducing a UPSERT_RENTAL_REQUEST action', () => { error: 'some error', isSubmittingTransaction: false } - action = upsertRentalRequest( - nft, - 100, - [PeriodOption.ONE_WEEK], - 1976562675847, - UpsertRentalOptType.INSERT - ) + action = upsertRentalRequest(nft, 100, [PeriodOption.ONE_WEEK], 1976562675847, UpsertRentalOptType.INSERT) }) it('should add a the action to the loading state', () => { const newState = rentalReducer(state, action) @@ -75,39 +69,22 @@ describe('when reducing a UPSERT_RENTAL_SUCCESS action', () => { let state: RentalState beforeEach(() => { state = { - loading: [ - upsertRentalRequest( - nft, - 100, - [PeriodOption.ONE_WEEK], - 1976562675847, - UpsertRentalOptType.INSERT - ) - ], + loading: [upsertRentalRequest(nft, 100, [PeriodOption.ONE_WEEK], 1976562675847, UpsertRentalOptType.INSERT)], data: {}, error: 'Some error', isSubmittingTransaction: false } }) it('should remove the loading action', () => { - const newState = rentalReducer( - state, - upsertRentalSuccess(nft, rental, UpsertRentalOptType.INSERT) - ) + const newState = rentalReducer(state, upsertRentalSuccess(nft, rental, UpsertRentalOptType.INSERT)) expect(newState.loading).toHaveLength(0) }) it('should clear the error', () => { - const newState = rentalReducer( - state, - upsertRentalSuccess(nft, rental, UpsertRentalOptType.INSERT) - ) + const newState = rentalReducer(state, upsertRentalSuccess(nft, rental, UpsertRentalOptType.INSERT)) expect(newState.error).toBe(null) }) it('should add the rental to the data record', () => { - const newState = rentalReducer( - state, - upsertRentalSuccess(nft, rental, UpsertRentalOptType.INSERT) - ) + const newState = rentalReducer(state, upsertRentalSuccess(nft, rental, UpsertRentalOptType.INSERT)) expect(newState.data).toEqual({ [rental.id]: rental }) @@ -118,44 +95,18 @@ describe('when reducing a UPSERT_RENTAL_FAILURE action', () => { let state: RentalState beforeEach(() => { state = { - loading: [ - upsertRentalRequest( - nft, - 100, - [PeriodOption.ONE_WEEK], - 1976562675847, - UpsertRentalOptType.INSERT - ) - ], + loading: [upsertRentalRequest(nft, 100, [PeriodOption.ONE_WEEK], 1976562675847, UpsertRentalOptType.INSERT)], data: {}, error: null, isSubmittingTransaction: false } }) it('should remove the loading action', () => { - const newState = rentalReducer( - state, - upsertRentalFailure( - nft, - 100, - [PeriodOption.ONE_WEEK], - 1976562675847, - 'some error' - ) - ) + const newState = rentalReducer(state, upsertRentalFailure(nft, 100, [PeriodOption.ONE_WEEK], 1976562675847, 'some error')) expect(newState.loading).toHaveLength(0) }) it('should store the error', () => { - const newState = rentalReducer( - state, - upsertRentalFailure( - nft, - 100, - [PeriodOption.ONE_WEEK], - 1976562675847, - 'Some error' - ) - ) + const newState = rentalReducer(state, upsertRentalFailure(nft, 100, [PeriodOption.ONE_WEEK], 1976562675847, 'Some error')) expect(newState.error).toBe('Some error') }) }) @@ -186,18 +137,7 @@ describe('when reducing the success action of fetching NFTs', () => { it('should add the new rental listings to the stored rentals and overwrite rentals that that the same id', () => { expect( - rentalReducer( - rentalState, - fetchNFTsSuccess( - {} as NFTsFetchOptions, - [], - [], - [], - rentalListingsFromNFTServer, - 2, - Date.now() - ) - ) + rentalReducer(rentalState, fetchNFTsSuccess({} as NFTsFetchOptions, [], [], [], rentalListingsFromNFTServer, 2, Date.now())) ).toEqual({ ...rentalState, data: { @@ -220,12 +160,7 @@ describe('when reducing the success action of fetching a NFT', () => { }) it('should store the rental', () => { - expect( - rentalReducer( - rentalState, - fetchNFTSuccess({} as NFT, null, rentalListing) - ) - ).toEqual({ + expect(rentalReducer(rentalState, fetchNFTSuccess({} as NFT, null, rentalListing))).toEqual({ ...rentalState, data: { ...rentalState.data, @@ -241,12 +176,7 @@ describe('when reducing the success action of fetching a NFT', () => { }) it('should return the state unchanged', () => { - expect( - rentalReducer( - rentalState, - fetchNFTSuccess({} as NFT, null, rentalListing) - ) - ).toBe(rentalState) + expect(rentalReducer(rentalState, fetchNFTSuccess({} as NFT, null, rentalListing))).toBe(rentalState) }) }) }) @@ -260,12 +190,7 @@ describe('when reducing the action that signals that the claim land transaction }) it('should set the flag that defines that the transaction is being submitted to false', () => { - expect( - rentalReducer( - rentalState, - claimAssetTransactionSubmitted(nft, 'aTxHash', 'aRentalContractAddress') - ) - ).toEqual({ + expect(rentalReducer(rentalState, claimAssetTransactionSubmitted(nft, 'aTxHash', 'aRentalContractAddress'))).toEqual({ ...rentalState, isSubmittingTransaction: false }) @@ -415,27 +340,10 @@ describe('when reducing the action of the start of an accept rental listing', () }) it('should set the action into loading, the submitting transaction flag as true and clear the error', () => { - expect( - rentalReducer( - rentalState, - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ) - ).toEqual({ + expect(rentalReducer(rentalState, acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator))).toEqual({ ...rentalState, isSubmittingTransaction: true, - loading: [ - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ], + loading: [acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)], error: null }) }) @@ -454,26 +362,14 @@ describe('when reducing the action the success of accepting a rental', () => { [rental.id]: rental }, isSubmittingTransaction: true, - loading: [ - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ], + loading: [acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)], error: 'anError' } updatedRental = { ...rental, status: RentalStatus.EXECUTED } }) it('should set the submitting transaction flag as false, clear the error and put the updated listing in the data', () => { - expect( - rentalReducer( - rentalState, - acceptRentalListingSuccess(nft, updatedRental, periodIndexChosen) - ) - ).toEqual({ + expect(rentalReducer(rentalState, acceptRentalListingSuccess(nft, updatedRental, periodIndexChosen))).toEqual({ ...rentalState, data: { [rental.id]: updatedRental @@ -496,17 +392,7 @@ describe('when reducing the action that signals that the accept listing transact }) it('should set the flag that defines that the transaction is being submitted to false', () => { - expect( - rentalReducer( - rentalState, - acceptRentalListingTransactionSubmitted( - nft, - rental, - 'aTxHash', - periodIndexChosen - ) - ) - ).toEqual({ + expect(rentalReducer(rentalState, acceptRentalListingTransactionSubmitted(nft, rental, 'aTxHash', periodIndexChosen))).toEqual({ ...rentalState, isSubmittingTransaction: false }) @@ -521,23 +407,14 @@ describe('when reducing the failure action of accepting a rental', () => { addressOperator = '0xoperator' rentalState = { ...rentalState, - loading: [ - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ], + loading: [acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)], isSubmittingTransaction: true, error: null } }) it("should remove the loading, set the submitting transaction flag to false, set the error with the action's error", () => { - expect( - rentalReducer(rentalState, acceptRentalListingFailure('anError')) - ).toEqual({ + expect(rentalReducer(rentalState, acceptRentalListingFailure('anError'))).toEqual({ ...rentalState, loading: [], isSubmittingTransaction: false, diff --git a/webapp/src/modules/rental/reducer.ts b/webapp/src/modules/rental/reducer.ts index 3c68e3eff8..a1df6f64c2 100644 --- a/webapp/src/modules/rental/reducer.ts +++ b/webapp/src/modules/rental/reducer.ts @@ -1,14 +1,6 @@ import { RentalListing } from '@dcl/schemas' -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' -import { - FetchNFTsSuccessAction, - FetchNFTSuccessAction, - FETCH_NFTS_SUCCESS, - FETCH_NFT_SUCCESS -} from '../nft/actions' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' +import { FetchNFTsSuccessAction, FetchNFTSuccessAction, FETCH_NFTS_SUCCESS, FETCH_NFT_SUCCESS } from '../nft/actions' import { ClaimAssetFailureAction, ClaimAssetRequestAction, @@ -78,10 +70,7 @@ type RentalReducerAction = | AcceptRentalListingSuccessAction | AcceptRentalListingTransactionSubmitted -export function rentalReducer( - state = INITIAL_STATE, - action: RentalReducerAction -): RentalState { +export function rentalReducer(state = INITIAL_STATE, action: RentalReducerAction): RentalState { switch (action.type) { case REMOVE_RENTAL_TRANSACTION_SUBMITTED: case ACCEPT_RENTAL_LISTING_TRANSACTION_SUBMITTED: @@ -175,9 +164,7 @@ export function rentalReducer( ...state, data: { ...state.data, - ...Object.fromEntries( - action.payload.rentals.map(rental => [rental.id, rental]) - ) + ...Object.fromEntries(action.payload.rentals.map(rental => [rental.id, rental])) } } } diff --git a/webapp/src/modules/rental/sagas.spec.ts b/webapp/src/modules/rental/sagas.spec.ts index 8c9c162f8a..edf08f44f8 100644 --- a/webapp/src/modules/rental/sagas.spec.ts +++ b/webapp/src/modules/rental/sagas.spec.ts @@ -1,22 +1,11 @@ -import { - ChainId, - Network, - NFTCategory, - PeriodCreation, - RentalListing, - RentalStatus -} from '@dcl/schemas' +import { ChainId, Network, NFTCategory, PeriodCreation, RentalListing, RentalStatus } from '@dcl/schemas' import { call, select } from '@redux-saga/core/effects' import { AuthIdentity } from 'decentraland-crypto-fetch' import { getConnectedProvider } from 'decentraland-dapps/dist/lib/eth' import { waitForTx } from 'decentraland-dapps/dist/modules/transaction/utils' import { sendTransaction } from 'decentraland-dapps/dist/modules/wallet/utils' import { closeModal } from 'decentraland-dapps/dist/modules/modal/actions' -import { - ContractData, - ContractName, - getContract -} from 'decentraland-transactions' +import { ContractData, ContractName, getContract } from 'decentraland-transactions' import { ethers } from 'ethers' import { expectSaga } from 'redux-saga-test-plan' import { throwError } from 'redux-saga-test-plan/providers' @@ -128,24 +117,8 @@ describe('when handling the request action to upsert a rental listing', () => { it('should throw an "Invalid address" error', () => { return expectSaga(rentalSaga) .provide([[select(getAddress), undefined]]) - .put( - upsertRentalFailure( - nft, - 100, - [PeriodOption.ONE_WEEK], - 1234567, - 'Invalid address' - ) - ) - .dispatch( - upsertRentalRequest( - nft, - 100, - [PeriodOption.ONE_WEEK], - 1234567, - UpsertRentalOptType.INSERT - ) - ) + .put(upsertRentalFailure(nft, 100, [PeriodOption.ONE_WEEK], 1234567, 'Invalid address')) + .dispatch(upsertRentalRequest(nft, 100, [PeriodOption.ONE_WEEK], 1234567, UpsertRentalOptType.INSERT)) .run({ silenceTimeout: true }) }) }) @@ -168,28 +141,8 @@ describe('when handling the request action to upsert a rental listing', () => { return expectSaga(rentalSaga) .provide([ [select(getAddress), signerAddress], - [ - call( - getNonces, - nft.chainId, - nft.contractAddress, - nft.tokenId, - signerAddress - ), - nonces - ], - [ - call( - getSignature, - nft.chainId, - nft.contractAddress, - nft.tokenId, - nonces, - periods, - expiration - ), - signature - ], + [call(getNonces, nft.chainId, nft.contractAddress, nft.tokenId, signerAddress), nonces], + [call(getSignature, nft.chainId, nft.contractAddress, nft.tokenId, nonces, periods, expiration), signature], [select(getCurrentIdentity), identity], [ call( @@ -200,8 +153,7 @@ describe('when handling the request action to upsert a rental listing', () => { tokenId: nft.tokenId, network: nft.network as Network.ETHEREUM, expiration, - rentalContractAddress: - '0x92159c78f0f4523b9c60382bb888f30f10a46b3b', + rentalContractAddress: '0x92159c78f0f4523b9c60382bb888f30f10a46b3b', nonces, periods, signature, @@ -213,15 +165,7 @@ describe('when handling the request action to upsert a rental listing', () => { ] ]) .put(upsertRentalSuccess(nft, rental, UpsertRentalOptType.INSERT)) - .dispatch( - upsertRentalRequest( - nft, - 100, - [PeriodOption.ONE_WEEK], - expiration, - UpsertRentalOptType.INSERT - ) - ) + .dispatch(upsertRentalRequest(nft, 100, [PeriodOption.ONE_WEEK], expiration, UpsertRentalOptType.INSERT)) .run({ silenceTimeout: true }) }) }) @@ -242,28 +186,8 @@ describe('when handling the request action to upsert a rental listing', () => { return expectSaga(rentalSaga) .provide([ [select(getAddress), signerAddress], - [ - call( - getNonces, - nft.chainId, - nft.contractAddress, - nft.tokenId, - signerAddress - ), - nonces - ], - [ - call( - getSignature, - nft.chainId, - nft.contractAddress, - nft.tokenId, - nonces, - periods, - expiration - ), - signature - ], + [call(getNonces, nft.chainId, nft.contractAddress, nft.tokenId, signerAddress), nonces], + [call(getSignature, nft.chainId, nft.contractAddress, nft.tokenId, nonces, periods, expiration), signature], [select(getCurrentIdentity), identity], [ call( @@ -274,8 +198,7 @@ describe('when handling the request action to upsert a rental listing', () => { tokenId: nft.tokenId, network: nft.network as Network.ETHEREUM, expiration, - rentalContractAddress: - '0x92159c78f0f4523b9c60382bb888f30f10a46b3b', + rentalContractAddress: '0x92159c78f0f4523b9c60382bb888f30f10a46b3b', nonces, periods, signature, @@ -287,15 +210,7 @@ describe('when handling the request action to upsert a rental listing', () => { ] ]) .put(upsertRentalSuccess(nft, rental, UpsertRentalOptType.EDIT)) - .dispatch( - upsertRentalRequest( - nft, - 100, - [PeriodOption.ONE_WEEK], - expiration, - UpsertRentalOptType.EDIT - ) - ) + .dispatch(upsertRentalRequest(nft, 100, [PeriodOption.ONE_WEEK], expiration, UpsertRentalOptType.EDIT)) .run({ silenceTimeout: true }) }) }) @@ -306,35 +221,10 @@ describe('when handling the request action to upsert a rental listing', () => { return expectSaga(rentalSaga) .provide([ [select(getAddress), signerAddress], - [ - call( - getNonces, - nft.chainId, - nft.contractAddress, - nft.tokenId, - signerAddress - ), - throwError(new Error('Could not get provider')) - ] + [call(getNonces, nft.chainId, nft.contractAddress, nft.tokenId, signerAddress), throwError(new Error('Could not get provider'))] ]) - .put( - upsertRentalFailure( - nft, - 100, - [PeriodOption.ONE_WEEK], - 1234567, - 'Could not get provider' - ) - ) - .dispatch( - upsertRentalRequest( - nft, - 100, - [PeriodOption.ONE_WEEK], - expiration, - UpsertRentalOptType.INSERT - ) - ) + .put(upsertRentalFailure(nft, 100, [PeriodOption.ONE_WEEK], 1234567, 'Could not get provider')) + .dispatch(upsertRentalRequest(nft, 100, [PeriodOption.ONE_WEEK], expiration, UpsertRentalOptType.INSERT)) .run({ silenceTimeout: true }) }) }) @@ -353,47 +243,14 @@ describe('when handling the request action to upsert a rental listing', () => { return expectSaga(rentalSaga) .provide([ [select(getAddress), signerAddress], + [call(getNonces, nft.chainId, nft.contractAddress, nft.tokenId, signerAddress), nonces], [ - call( - getNonces, - nft.chainId, - nft.contractAddress, - nft.tokenId, - signerAddress - ), - nonces - ], - [ - call( - getSignature, - nft.chainId, - nft.contractAddress, - nft.tokenId, - nonces, - periods, - expiration - ), + call(getSignature, nft.chainId, nft.contractAddress, nft.tokenId, nonces, periods, expiration), throwError(new Error('Could not get provider')) ] ]) - .put( - upsertRentalFailure( - nft, - 100, - [PeriodOption.ONE_WEEK], - 1234567, - 'Could not get provider' - ) - ) - .dispatch( - upsertRentalRequest( - nft, - 100, - [PeriodOption.ONE_WEEK], - expiration, - UpsertRentalOptType.INSERT - ) - ) + .put(upsertRentalFailure(nft, 100, [PeriodOption.ONE_WEEK], 1234567, 'Could not get provider')) + .dispatch(upsertRentalRequest(nft, 100, [PeriodOption.ONE_WEEK], expiration, UpsertRentalOptType.INSERT)) .run({ silenceTimeout: true }) }) }) @@ -416,28 +273,8 @@ describe('when handling the request action to upsert a rental listing', () => { return expectSaga(rentalSaga) .provide([ [select(getAddress), signerAddress], - [ - call( - getNonces, - nft.chainId, - nft.contractAddress, - nft.tokenId, - signerAddress - ), - nonces - ], - [ - call( - getSignature, - nft.chainId, - nft.contractAddress, - nft.tokenId, - nonces, - periods, - expiration - ), - signatureWithWrongV - ], + [call(getNonces, nft.chainId, nft.contractAddress, nft.tokenId, signerAddress), nonces], + [call(getSignature, nft.chainId, nft.contractAddress, nft.tokenId, nonces, periods, expiration), signatureWithWrongV], [select(getCurrentIdentity), identity], [ call( @@ -448,8 +285,7 @@ describe('when handling the request action to upsert a rental listing', () => { tokenId: nft.tokenId, network: nft.network as Network.ETHEREUM, expiration, - rentalContractAddress: - '0x92159c78f0f4523b9c60382bb888f30f10a46b3b', + rentalContractAddress: '0x92159c78f0f4523b9c60382bb888f30f10a46b3b', nonces, periods, signature: fixedSignature, @@ -461,15 +297,7 @@ describe('when handling the request action to upsert a rental listing', () => { ] ]) .put(upsertRentalSuccess(nft, rental, UpsertRentalOptType.INSERT)) - .dispatch( - upsertRentalRequest( - nft, - 100, - [PeriodOption.ONE_WEEK], - expiration, - UpsertRentalOptType.INSERT - ) - ) + .dispatch(upsertRentalRequest(nft, 100, [PeriodOption.ONE_WEEK], expiration, UpsertRentalOptType.INSERT)) .run({ silenceTimeout: true }) }) }) @@ -518,10 +346,7 @@ describe('when handling the request action to claim a LAND', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - throwError(new Error('anError')) - ] + [call(getContract, ContractName.Rentals, nft.chainId), throwError(new Error('anError'))] ]) .put(claimAssetFailure('anError')) .dispatch(claimAssetRequest(nft, rental)) @@ -535,17 +360,10 @@ describe('when handling the request action to claim a LAND', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'claim(address[],uint256[])', [nft.contractAddress], @@ -569,17 +387,10 @@ describe('when handling the request action to claim a LAND', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'claim(address[],uint256[])', [nft.contractAddress], @@ -588,10 +399,7 @@ describe('when handling the request action to claim a LAND', () => { Promise.resolve(txHash) ], [call(waitForTx, txHash), Promise.resolve()], - [ - call(waitUntilRentalChangesStatus, nft, RentalStatus.CLAIMED), - Promise.resolve() - ], + [call(waitUntilRentalChangesStatus, nft, RentalStatus.CLAIMED), Promise.resolve()], [select(getCurrentNFT), { ...nft, owner: rental.lessor }], [take(FETCH_NFT_SUCCESS), {}], [delay(5000), void 0] @@ -608,17 +416,10 @@ describe('when handling the request action to claim a LAND', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'claim(address[],uint256[])', [nft.contractAddress], @@ -628,9 +429,7 @@ describe('when handling the request action to claim a LAND', () => { ], [call(waitForTx, txHash), Promise.reject(new Error('anError'))] ]) - .put( - claimAssetTransactionSubmitted(nft, txHash, rentalContract.address) - ) + .put(claimAssetTransactionSubmitted(nft, txHash, rentalContract.address)) .put(claimAssetFailure('anError')) .dispatch(claimAssetRequest(nft, rental)) .silentRun() @@ -670,19 +469,8 @@ describe('when handling the request action to accept a rental', () => { it('should put a accept rental listing failure action with the error', () => { return expectSaga(rentalSaga) .provide([[call(getConnectedProvider), null]]) - .put( - acceptRentalListingFailure( - 'The provided NFT does not have an open rental' - ) - ) - .dispatch( - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ) + .put(acceptRentalListingFailure('The provided NFT does not have an open rental')) + .dispatch(acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)) .silentRun() }) }) @@ -691,19 +479,8 @@ describe('when handling the request action to accept a rental', () => { it('should put a accept rental failure action with the error', () => { return expectSaga(rentalSaga) .provide([[call(getConnectedProvider), null]]) - .put( - acceptRentalListingFailure( - 'A provider is required to remove a rental' - ) - ) - .dispatch( - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ) + .put(acceptRentalListingFailure('A provider is required to remove a rental')) + .dispatch(acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)) .silentRun() }) }) @@ -715,19 +492,8 @@ describe('when handling the request action to accept a rental', () => { [call(getConnectedProvider), {}], [select(getAddress), undefined] ]) - .put( - acceptRentalListingFailure( - 'An address is required to remove a rental' - ) - ) - .dispatch( - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ) + .put(acceptRentalListingFailure('An address is required to remove a rental')) + .dispatch(acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)) .silentRun() }) }) @@ -738,20 +504,10 @@ describe('when handling the request action to accept a rental', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - throwError(new Error('anError')) - ] + [call(getContract, ContractName.Rentals, nft.chainId), throwError(new Error('anError'))] ]) .put(acceptRentalListingFailure('anError')) - .dispatch( - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ) + .dispatch(acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)) .silentRun() }) }) @@ -762,17 +518,10 @@ describe('when handling the request action to accept a rental', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'acceptListing((address,address,uint256,uint256,uint256[3],uint256[],uint256[],uint256[],address,bytes),address,uint256,uint256,bytes32)', [ @@ -796,14 +545,7 @@ describe('when handling the request action to accept a rental', () => { ] ]) .put(acceptRentalListingFailure('anError')) - .dispatch( - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ) + .dispatch(acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)) .silentRun() }) }) @@ -822,17 +564,10 @@ describe('when handling the request action to accept a rental', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'acceptListing((address,address,uint256,uint256,uint256[3],uint256[],uint256[],uint256[],address,bytes),address,uint256,uint256,bytes32)', [ @@ -855,34 +590,11 @@ describe('when handling the request action to accept a rental', () => { Promise.resolve(txHash) ], [call(waitForTx, txHash), Promise.resolve()], - [ - call(waitUntilRentalChangesStatus, nft, RentalStatus.EXECUTED), - Promise.resolve(updatedRentalListing) - ] + [call(waitUntilRentalChangesStatus, nft, RentalStatus.EXECUTED), Promise.resolve(updatedRentalListing)] ]) - .dispatch( - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ) - .put( - acceptRentalListingTransactionSubmitted( - nft, - rental, - txHash, - periodIndexChosen - ) - ) - .put( - acceptRentalListingSuccess( - nft, - updatedRentalListing, - periodIndexChosen - ) - ) + .dispatch(acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)) + .put(acceptRentalListingTransactionSubmitted(nft, rental, txHash, periodIndexChosen)) + .put(acceptRentalListingSuccess(nft, updatedRentalListing, periodIndexChosen)) .silentRun() }) }) @@ -900,17 +612,10 @@ describe('when handling the request action to accept a rental', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'acceptListing((address,address,uint256,uint256,uint256[3],uint256[],uint256[],uint256[],address,bytes),address,uint256,uint256,bytes32)', [ @@ -933,34 +638,11 @@ describe('when handling the request action to accept a rental', () => { Promise.resolve(txHash) ], [call(waitForTx, txHash), Promise.resolve()], - [ - call(waitUntilRentalChangesStatus, nft, RentalStatus.EXECUTED), - Promise.resolve(updatedRentalListing) - ] + [call(waitUntilRentalChangesStatus, nft, RentalStatus.EXECUTED), Promise.resolve(updatedRentalListing)] ]) - .dispatch( - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ) - .put( - acceptRentalListingTransactionSubmitted( - nft, - rental, - txHash, - periodIndexChosen - ) - ) - .put( - acceptRentalListingSuccess( - nft, - updatedRentalListing, - periodIndexChosen - ) - ) + .dispatch(acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)) + .put(acceptRentalListingTransactionSubmitted(nft, rental, txHash, periodIndexChosen)) + .put(acceptRentalListingSuccess(nft, updatedRentalListing, periodIndexChosen)) .silentRun() }) }) @@ -971,21 +653,11 @@ describe('when handling the request action to accept a rental', () => { expectSaga(rentalSaga) .provide([ [call(getConnectedProvider), {}], - [ - select(getAddress), - '0xEf924C0611035DF4DecfAb7300320c92f68B0F45' - ], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'acceptListing((address,address,uint256,uint256,uint256[3],uint256[],uint256[],uint256[],address,bytes),address,uint256,uint256,bytes32)', [ @@ -1011,14 +683,7 @@ describe('when handling the request action to accept a rental', () => { ]) // .put(accept(nft, txHash)) .put(acceptRentalListingFailure('anError')) - .dispatch( - acceptRentalListingRequest( - nft, - rental, - periodIndexChosen, - addressOperator - ) - ) + .dispatch(acceptRentalListingRequest(nft, rental, periodIndexChosen, addressOperator)) .silentRun() ) }) @@ -1053,9 +718,7 @@ describe('when handling the request action to remove a rental', () => { it('should put a remove rental failure action with the error', () => { return expectSaga(rentalSaga) .provide([[call(getConnectedProvider), null]]) - .put( - removeRentalFailure('The provided NFT does not have an open rental') - ) + .put(removeRentalFailure('The provided NFT does not have an open rental')) .dispatch(removeRentalRequest(nft)) .silentRun() }) @@ -1090,10 +753,7 @@ describe('when handling the request action to remove a rental', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - throwError(new Error('anError')) - ] + [call(getContract, ContractName.Rentals, nft.chainId), throwError(new Error('anError'))] ]) .put(removeRentalFailure('anError')) .dispatch(removeRentalRequest(nft)) @@ -1107,17 +767,10 @@ describe('when handling the request action to remove a rental', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'bumpAssetIndex(address,uint256)', nft.contractAddress, @@ -1141,17 +794,10 @@ describe('when handling the request action to remove a rental', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'bumpAssetIndex(address,uint256)', nft.contractAddress, @@ -1178,17 +824,10 @@ describe('when handling the request action to remove a rental', () => { .provide([ [call(getConnectedProvider), {}], [select(getAddress), '0xEf924C0611035DF4DecfAb7300320c92f68B0F45'], - [ - call(getContract, ContractName.Rentals, nft.chainId), - rentalContract - ], + [call(getContract, ContractName.Rentals, nft.chainId), rentalContract], [ call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalContract, 'bumpAssetIndex(address,uint256)', nft.contractAddress, @@ -1209,18 +848,12 @@ describe('when handling the request action to remove a rental', () => { describe('when handling the action to close the claim LAND modal', () => { it('should put the action to clear the rental errors', () => { - return expectSaga(rentalSaga) - .put(clearRentalErrors()) - .dispatch(closeModal('ClaimLandModal')) - .silentRun() + return expectSaga(rentalSaga).put(clearRentalErrors()).dispatch(closeModal('ClaimLandModal')).silentRun() }) }) describe('when handling the action to close the remove rental modal', () => { it('should put the action to clear the rental errors', () => { - return expectSaga(rentalSaga) - .put(clearRentalErrors()) - .dispatch(closeModal('RemoveRentalModal')) - .silentRun() + return expectSaga(rentalSaga).put(clearRentalErrors()).dispatch(closeModal('RemoveRentalModal')).silentRun() }) }) diff --git a/webapp/src/modules/rental/sagas.ts b/webapp/src/modules/rental/sagas.ts index 95d13d9002..976f51a350 100644 --- a/webapp/src/modules/rental/sagas.ts +++ b/webapp/src/modules/rental/sagas.ts @@ -1,26 +1,10 @@ -import { - NFT, - NFTCategory, - Network, - PeriodCreation, - RentalListing, - RentalListingCreation, - RentalStatus -} from '@dcl/schemas' +import { NFT, NFTCategory, Network, PeriodCreation, RentalListing, RentalListingCreation, RentalStatus } from '@dcl/schemas' import { AuthIdentity } from 'decentraland-crypto-fetch' -import { - ContractData, - ContractName, - getContract, - Provider -} from 'decentraland-transactions' +import { ContractData, ContractName, getContract, Provider } from 'decentraland-transactions' import { getConnectedProvider } from 'decentraland-dapps/dist/lib/eth' import { waitForTx } from 'decentraland-dapps/dist/modules/transaction/utils' import { sendTransaction } from 'decentraland-dapps/dist/modules/wallet/utils' -import { - CloseModalAction, - CLOSE_MODAL -} from 'decentraland-dapps/dist/modules/modal/actions' +import { CloseModalAction, CLOSE_MODAL } from 'decentraland-dapps/dist/modules/modal/actions' import { ethers } from 'ethers' import { call, delay, put, select, take, takeEvery } from 'redux-saga/effects' import { getIdentity } from '../identity/utils' @@ -53,23 +37,14 @@ import { acceptRentalListingFailure, acceptRentalListingTransactionSubmitted } from './actions' -import { - daysByPeriod, - generateECDSASignatureWithValidV, - getNonces, - getSignature, - waitUntilRentalChangesStatus -} from './utils' +import { daysByPeriod, generateECDSASignatureWithValidV, getNonces, getSignature, waitUntilRentalChangesStatus } from './utils' export function* rentalSaga() { yield takeEvery(UPSERT_RENTAL_REQUEST, handleCreateOrEditRentalRequest) yield takeEvery(CLAIM_ASSET_REQUEST, handleClaimLandRequest) yield takeEvery(CLOSE_MODAL, handleModalClose) yield takeEvery(REMOVE_RENTAL_REQUEST, handleRemoveRentalRequest) - yield takeEvery( - ACCEPT_RENTAL_LISTING_REQUEST, - handleAcceptRentalListingRequest - ) + yield takeEvery(ACCEPT_RENTAL_LISTING_REQUEST, handleAcceptRentalListingRequest) } function* handleCreateOrEditRentalRequest(action: UpsertRentalRequestAction) { @@ -87,30 +62,13 @@ function* handleCreateOrEditRentalRequest(action: UpsertRentalRequestAction) { throw new Error(`Invalid address`) } - const nonces: string[] = yield call( - getNonces, - nft.chainId, - nft.contractAddress, - nft.tokenId, - address - ) + const nonces: string[] = yield call(getNonces, nft.chainId, nft.contractAddress, nft.tokenId, address) - let signature: string = yield call( - getSignature, - nft.chainId, - nft.contractAddress, - nft.tokenId, - nonces, - periods, - expiresAt - ) + let signature: string = yield call(getSignature, nft.chainId, nft.contractAddress, nft.tokenId, nonces, periods, expiresAt) signature = yield call(generateECDSASignatureWithValidV, signature) - const rentalsContract: ContractData = getContract( - ContractName.Rentals, - nft.chainId - ) + const rentalsContract: ContractData = getContract(ContractName.Rentals, nft.chainId) const rentalListingCreation: RentalListingCreation = { chainId: nft.chainId, @@ -127,23 +85,11 @@ function* handleCreateOrEditRentalRequest(action: UpsertRentalRequestAction) { const identity: AuthIdentity = yield getIdentity() - const rental: RentalListing = yield call( - [rentalsAPI, 'createRentalListing'], - rentalListingCreation, - identity - ) + const rental: RentalListing = yield call([rentalsAPI, 'createRentalListing'], rentalListingCreation, identity) yield put(upsertRentalSuccess(nft, rental, operationType)) } catch (error) { - yield put( - upsertRentalFailure( - nft, - pricePerDay, - action.payload.periods, - expiresAt, - (error as Error).message - ) - ) + yield put(upsertRentalFailure(nft, pricePerDay, action.payload.periods, expiresAt, (error as Error).message)) } } @@ -161,26 +107,16 @@ function* handleClaimLandRequest(action: ClaimAssetRequestAction) { throw new Error('An address is required to claim LAND') } - const rentalsContract: ContractData = yield call( - getContract, - ContractName.Rentals, - nft.chainId - ) + const rentalsContract: ContractData = yield call(getContract, ContractName.Rentals, nft.chainId) const txHash: string = yield call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalsContract, 'claim(address[],uint256[])', [nft.contractAddress], [nft.tokenId] ) - yield put( - claimAssetTransactionSubmitted(nft, txHash, rentalsContract.address) - ) + yield put(claimAssetTransactionSubmitted(nft, txHash, rentalsContract.address)) yield call(waitForTx, txHash) yield call(waitUntilRentalChangesStatus, nft, RentalStatus.CLAIMED) let hasAssetBack = addressEquals(nft.owner, rental.lessor!) @@ -198,10 +134,7 @@ function* handleClaimLandRequest(action: ClaimAssetRequestAction) { } function* handleModalClose(action: CloseModalAction) { - if ( - action.payload.name === 'ClaimLandModal' || - action.payload.name === 'RemoveRentalModal' - ) { + if (action.payload.name === 'ClaimLandModal' || action.payload.name === 'RemoveRentalModal') { yield put(clearRentalErrors()) } } @@ -224,18 +157,10 @@ function* handleRemoveRentalRequest(action: RemoveRentalRequestAction) { throw new Error('An address is required to remove a rental') } - const rentalsContract: ContractData = yield call( - getContract, - ContractName.Rentals, - nft.chainId - ) + const rentalsContract: ContractData = yield call(getContract, ContractName.Rentals, nft.chainId) const txHash: string = yield call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalsContract, 'bumpAssetIndex(address,uint256)', nft.contractAddress, @@ -250,9 +175,7 @@ function* handleRemoveRentalRequest(action: RemoveRentalRequestAction) { } } -function* handleAcceptRentalListingRequest( - action: AcceptRentalListingRequestAction -) { +function* handleAcceptRentalListingRequest(action: AcceptRentalListingRequestAction) { const { nft, rental, periodIndexChosen, addressOperator } = action.payload try { @@ -270,11 +193,7 @@ function* handleAcceptRentalListingRequest( throw new Error('An address is required to remove a rental') } - const rentalsContract: ContractData = yield call( - getContract, - ContractName.Rentals, - nft.chainId - ) + const rentalsContract: ContractData = yield call(getContract, ContractName.Rentals, nft.chainId) // the contract expects these as arrays of values const [pricePerDay, maxDays, minDays] = rental.periods.reduce( @@ -287,10 +206,7 @@ function* handleAcceptRentalListingRequest( [[], [], []] as [string[], number[], number[]] ) - const signature: string = yield call( - generateECDSASignatureWithValidV, - rental.signature - ) + const signature: string = yield call(generateECDSASignatureWithValidV, rental.signature) const listing = { signer: rental.lessor, @@ -307,52 +223,26 @@ function* handleAcceptRentalListingRequest( let fingerprint = ethers.utils.randomBytes(32).map(() => 0) if (nft.category === NFTCategory.ESTATE) { - const estateContract: ReturnType<typeof getContractByQuery> = yield select( - getContractByQuery, - { - category: NFTCategory.ESTATE - } - ) + const estateContract: ReturnType<typeof getContractByQuery> = yield select(getContractByQuery, { + category: NFTCategory.ESTATE + }) if (estateContract) { fingerprint = yield call(getFingerprint, nft.tokenId, estateContract) } } - const txParams = [ - Object.values(listing), - addressOperator, - periodIndexChosen, - rental.periods[periodIndexChosen].maxDays, - fingerprint - ] + const txParams = [Object.values(listing), addressOperator, periodIndexChosen, rental.periods[periodIndexChosen].maxDays, fingerprint] const txHash: string = yield call( - sendTransaction as ( - contract: ContractData, - contractMethodName: string, - ...contractArguments: any[] - ) => Promise<string>, + sendTransaction as (contract: ContractData, contractMethodName: string, ...contractArguments: any[]) => Promise<string>, rentalsContract, 'acceptListing((address,address,uint256,uint256,uint256[3],uint256[],uint256[],uint256[],address,bytes),address,uint256,uint256,bytes32)', ...txParams ) - yield put( - acceptRentalListingTransactionSubmitted( - nft, - rental, - txHash, - periodIndexChosen - ) - ) + yield put(acceptRentalListingTransactionSubmitted(nft, rental, txHash, periodIndexChosen)) yield call(waitForTx, txHash) - const rentalListingUpdated: RentalListing = yield call( - waitUntilRentalChangesStatus, - nft, - RentalStatus.EXECUTED - ) - yield put( - acceptRentalListingSuccess(nft, rentalListingUpdated, periodIndexChosen) - ) + const rentalListingUpdated: RentalListing = yield call(waitUntilRentalChangesStatus, nft, RentalStatus.EXECUTED) + yield put(acceptRentalListingSuccess(nft, rentalListingUpdated, periodIndexChosen)) } catch (error) { yield put(acceptRentalListingFailure((error as Error).message)) } diff --git a/webapp/src/modules/rental/selector.spec.ts b/webapp/src/modules/rental/selector.spec.ts index 665305bfb3..d2eaf79017 100644 --- a/webapp/src/modules/rental/selector.spec.ts +++ b/webapp/src/modules/rental/selector.spec.ts @@ -72,9 +72,7 @@ describe('when getting a rental by id', () => { describe('when getting if a LAND is being claimed', () => { describe('and the LAND is being claimed', () => { beforeEach(() => { - rootState.rental.loading = [ - claimAssetRequest({} as NFT, {} as RentalListing) - ] + rootState.rental.loading = [claimAssetRequest({} as NFT, {} as RentalListing)] }) it('should return true', () => { @@ -137,38 +135,38 @@ describe('when getting if the transaction is being submitted', () => { }) }) -describe("when getting a rental confirmation status", () => { - describe("and there is a transaction submitting", () => { +describe('when getting a rental confirmation status', () => { + describe('and there is a transaction submitting', () => { beforeEach(() => { rootState.rental.isSubmittingTransaction = true }) - + it('should return an authorization status WAITING', () => { expect(getRentConfirmationStatus(rootState)).toEqual(AuthorizationStepStatus.WAITING) }) }) - describe("and there is a rental being accepted", () => { + describe('and there is a rental being accepted', () => { beforeEach(() => { rootState.rental.loading = [acceptRentalListingRequest({} as NFT, {} as RentalListing, 0, '')] }) - + it('should return an authorization status PROCESSING', () => { expect(getRentConfirmationStatus(rootState)).toEqual(AuthorizationStepStatus.PROCESSING) }) }) - describe("and there is an error", () => { + describe('and there is an error', () => { beforeEach(() => { rootState.rental.error = 'error' }) - + it('should return an authorization status ERROR', () => { expect(getRentConfirmationStatus(rootState)).toEqual(AuthorizationStepStatus.ERROR) }) }) - describe("and there is no error and no transaction is being processed", () => { + describe('and there is no error and no transaction is being processed', () => { it('should return an authorization status PENDING', () => { expect(getRentConfirmationStatus(rootState)).toEqual(AuthorizationStepStatus.PENDING) }) diff --git a/webapp/src/modules/rental/selectors.ts b/webapp/src/modules/rental/selectors.ts index f4c828a54d..42769d0aa2 100644 --- a/webapp/src/modules/rental/selectors.ts +++ b/webapp/src/modules/rental/selectors.ts @@ -2,28 +2,17 @@ import { RentalListing } from '@dcl/schemas' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { AuthorizationStepStatus } from 'decentraland-dapps/dist/containers/withAuthorizedAction/AuthorizationModal' import { RootState } from '../reducer' -import { - ACCEPT_RENTAL_LISTING_REQUEST, - CLAIM_ASSET_REQUEST, - REMOVE_RENTAL_REQUEST -} from './actions' +import { ACCEPT_RENTAL_LISTING_REQUEST, CLAIM_ASSET_REQUEST, REMOVE_RENTAL_REQUEST } from './actions' export const getState = (state: RootState) => state.rental export const getData = (state: RootState) => getState(state).data export const getLoading = (state: RootState) => getState(state).loading export const getError = (state: RootState) => getState(state).error -export const getRentalById = ( - state: RootState, - id: string -): RentalListing | null => getData(state)[id] ?? null -export const isClaimingAsset = (state: RootState) => - isLoadingType(getLoading(state), CLAIM_ASSET_REQUEST) -export const isRemovingRental = (state: RootState) => - isLoadingType(getLoading(state), REMOVE_RENTAL_REQUEST) -export const isAcceptingRental = (state: RootState) => - isLoadingType(getLoading(state), ACCEPT_RENTAL_LISTING_REQUEST) -export const isSubmittingTransaction = (state: RootState) => - getState(state).isSubmittingTransaction +export const getRentalById = (state: RootState, id: string): RentalListing | null => getData(state)[id] ?? null +export const isClaimingAsset = (state: RootState) => isLoadingType(getLoading(state), CLAIM_ASSET_REQUEST) +export const isRemovingRental = (state: RootState) => isLoadingType(getLoading(state), REMOVE_RENTAL_REQUEST) +export const isAcceptingRental = (state: RootState) => isLoadingType(getLoading(state), ACCEPT_RENTAL_LISTING_REQUEST) +export const isSubmittingTransaction = (state: RootState) => getState(state).isSubmittingTransaction export const getRentConfirmationStatus = (state: RootState) => { if (isSubmittingTransaction(state)) { diff --git a/webapp/src/modules/rental/utils.spec.ts b/webapp/src/modules/rental/utils.spec.ts index 02e9bb3b1c..3f786b4861 100644 --- a/webapp/src/modules/rental/utils.spec.ts +++ b/webapp/src/modules/rental/utils.spec.ts @@ -1,12 +1,7 @@ -import { RentalListing, RentalListingPeriod, RentalStatus } from '@dcl/schemas' +import { RentalListing, RentalListingPeriod, RentalStatus, ChainId } from '@dcl/schemas' import { BigNumber, ethers } from 'ethers' import { getSigner } from 'decentraland-dapps/dist/lib/eth' -import { - ContractData, - ContractName, - getContract -} from 'decentraland-transactions' -import { ChainId } from '@dcl/schemas' +import { ContractData, ContractName, getContract } from 'decentraland-transactions' import { Asset } from '../asset/types' import { rentalsAPI } from '../vendor/decentraland/rentals/api' import { NFT } from '../nft/types' @@ -35,12 +30,10 @@ jest.useFakeTimers() jest.mock('decentraland-dapps/dist/lib/eth') jest.mock('./contract') jest.mock('../vendor/decentraland/rentals/api') -;((globalThis.setTimeout as unknown) as jest.Mock) = jest.fn() +;(globalThis.setTimeout as unknown as jest.Mock) = jest.fn() const runTimerAutomaticallyOnce = () => { - ;((setTimeout as unknown) as jest.Mock).mockImplementationOnce(callback => - callback() - ) + ;(setTimeout as unknown as jest.Mock).mockImplementationOnce(callback => callback()) } const getSignerMock = getSigner as jest.MockedFunction<typeof getSigner> @@ -48,14 +41,12 @@ const signerMock = { getAddress: jest.fn(), _signTypedData: jest.fn() } -const getRentalsContractInstanceMock = getRentalsContractInstance as jest.MockedFunction< - typeof getRentalsContractInstance -> -const rentalsMock = ({ +const getRentalsContractInstanceMock = getRentalsContractInstance as jest.MockedFunction<typeof getRentalsContractInstance> +const rentalsMock = { getContractIndex: jest.fn(), getAssetIndex: jest.fn(), getSignerIndex: jest.fn() -} as unknown) as ethers.Contract +} as unknown as ethers.Contract const aDay = 24 * 60 * 60 * 1000 describe('when getting a signature', () => { @@ -80,9 +71,7 @@ describe('when getting a signature', () => { }) describe('and the signer can be retrieved', () => { beforeEach(() => { - getSignerMock.mockResolvedValueOnce( - (signerMock as unknown) as ethers.providers.JsonRpcSigner - ) + getSignerMock.mockResolvedValueOnce(signerMock as unknown as ethers.providers.JsonRpcSigner) }) describe('and can not get the address', () => { let error: Error @@ -105,9 +94,7 @@ describe('when getting a signature', () => { }) describe('and the address can be retrieved', () => { beforeEach(() => { - signerMock.getAddress.mockResolvedValueOnce( - '0xB6E9c0a25aA6b10Fa4fe0AA8d1097D2A6136bf98' - ) + signerMock.getAddress.mockResolvedValueOnce('0xB6E9c0a25aA6b10Fa4fe0AA8d1097D2A6136bf98') }) describe('and the signature fails to be generated', () => { @@ -152,8 +139,7 @@ describe('when getting a signature', () => { expect(signerMock._signTypedData).toHaveBeenCalledWith( { name: 'Rentals', - chainId: - '0x0000000000000000000000000000000000000000000000000000000000000005', + chainId: '0x0000000000000000000000000000000000000000000000000000000000000005', verifyingContract: '0x92159c78f0f4523b9c60382bb888f30f10a46b3b', version: '1' }, @@ -195,9 +181,7 @@ describe('when getting the contract index', () => { }) it('should return the contract nonce and use the right chain id to the instance helper', async () => { await expect(getContractNonce(ChainId.ETHEREUM_GOERLI)).resolves.toBe('0') - expect(getRentalsContractInstanceMock).toHaveBeenCalledWith( - ChainId.ETHEREUM_GOERLI - ) + expect(getRentalsContractInstanceMock).toHaveBeenCalledWith(ChainId.ETHEREUM_GOERLI) expect(rentalsMock.getContractIndex).toHaveBeenCalled() }) }) @@ -216,9 +200,7 @@ describe('when getting the asset nonce', () => { '0xB6E9c0a25aA6b10Fa4fe0AA8d1097D2A6136bf98' ) ).resolves.toBe('0') - expect(getRentalsContractInstanceMock).toHaveBeenCalledWith( - ChainId.ETHEREUM_GOERLI - ) + expect(getRentalsContractInstanceMock).toHaveBeenCalledWith(ChainId.ETHEREUM_GOERLI) expect(rentalsMock.getAssetIndex).toHaveBeenCalledWith( '0x25b6B4bac4aDB582a0ABd475439dA6730777Fbf7', '27562871720596015540533343201973225127790', @@ -233,18 +215,9 @@ describe('when getting the signer nonce', () => { rentalsMock.getSignerIndex.mockResolvedValueOnce(BigNumber.from(0)) }) it('should return the signer nonce and use the correct chain id and signer address', async () => { - await expect( - getSignerNonce( - ChainId.ETHEREUM_GOERLI, - '0xB6E9c0a25aA6b10Fa4fe0AA8d1097D2A6136bf98' - ) - ).resolves.toBe('0') - expect(getRentalsContractInstanceMock).toHaveBeenCalledWith( - ChainId.ETHEREUM_GOERLI - ) - expect(rentalsMock.getSignerIndex).toHaveBeenCalledWith( - '0xB6E9c0a25aA6b10Fa4fe0AA8d1097D2A6136bf98' - ) + await expect(getSignerNonce(ChainId.ETHEREUM_GOERLI, '0xB6E9c0a25aA6b10Fa4fe0AA8d1097D2A6136bf98')).resolves.toBe('0') + expect(getRentalsContractInstanceMock).toHaveBeenCalledWith(ChainId.ETHEREUM_GOERLI) + expect(rentalsMock.getSignerIndex).toHaveBeenCalledWith('0xB6E9c0a25aA6b10Fa4fe0AA8d1097D2A6136bf98') }) }) @@ -268,9 +241,7 @@ describe('when getting all the nonces', () => { ) ).resolves.toEqual(['0', '1', '2']) expect(rentalsMock.getContractIndex).toHaveBeenCalled() - expect(rentalsMock.getSignerIndex).toHaveBeenCalledWith( - '0xB6E9c0a25aA6b10Fa4fe0AA8d1097D2A6136bf98' - ) + expect(rentalsMock.getSignerIndex).toHaveBeenCalledWith('0xB6E9c0a25aA6b10Fa4fe0AA8d1097D2A6136bf98') expect(rentalsMock.getAssetIndex).toHaveBeenCalledWith( '0x25b6B4bac4aDB582a0ABd475439dA6730777Fbf7', '27562871720596015540533343201973225127790', @@ -372,9 +343,7 @@ describe('when checking if a rental is being rented', () => { }) it(`should return ${rentalStatus === RentalStatus.EXECUTED}`, () => { - expect(isRentalListingExecuted(rental)).toBe( - rentalStatus === RentalStatus.EXECUTED - ) + expect(isRentalListingExecuted(rental)).toBe(rentalStatus === RentalStatus.EXECUTED) }) }) }) @@ -452,9 +421,7 @@ describe("when getting a rental's end date", () => { }) it('should return the started date plus the rented days', () => { - expect(getRentalEndDate(rental)).toEqual( - new Date(rental.startedAt! + 2 * aDay) - ) + expect(getRentalEndDate(rental)).toEqual(new Date(rental.startedAt! + 2 * aDay)) }) }) }) @@ -478,9 +445,7 @@ describe('when getting the rental chosen period', () => { }) it('should throw signaling that the rental period was not found', () => { - expect(() => getRentalChosenPeriod(rental)).toThrowError( - 'Rental period was not found' - ) + expect(() => getRentalChosenPeriod(rental)).toThrowError('Rental period was not found') }) }) @@ -522,9 +487,7 @@ describe('when checking if a rental listing is open', () => { }) it(`should return ${rentalStatus === RentalStatus.OPEN}`, () => { - expect(isRentalListingOpen(rental)).toBe( - rentalStatus === RentalStatus.OPEN - ) + expect(isRentalListingOpen(rental)).toBe(rentalStatus === RentalStatus.OPEN) }) }) }) @@ -553,9 +516,7 @@ describe('when checking if a rental listing is cancelled', () => { }) it(`should return ${rentalStatus === RentalStatus.OPEN}`, () => { - expect(isRentalListingCancelled(rental)).toBe( - rentalStatus === RentalStatus.CANCELLED - ) + expect(isRentalListingCancelled(rental)).toBe(rentalStatus === RentalStatus.CANCELLED) }) }) }) @@ -842,9 +803,7 @@ describe('when waiting until the rental changes the status', () => { openRentalId: 'rentalId' } as NFT desiredStatus = RentalStatus.CANCELLED - ;(rentalsAPI.refreshRentalListing as jest.Mock).mockResolvedValueOnce( - listing - ) + ;(rentalsAPI.refreshRentalListing as jest.Mock).mockResolvedValueOnce(listing) runTimerAutomaticallyOnce() ;(rentalsAPI.refreshRentalListing as jest.Mock).mockResolvedValueOnce({ ...listing, @@ -853,9 +812,7 @@ describe('when waiting until the rental changes the status', () => { runTimerAutomaticallyOnce() }) it('should call the rentalsAPI refreshRentalListing endpoint until it returns the rental in the status desired', async () => { - expect( - await waitUntilRentalChangesStatus(nft, desiredStatus) - ).toStrictEqual({ + expect(await waitUntilRentalChangesStatus(nft, desiredStatus)).toStrictEqual({ ...listing, status: desiredStatus }) diff --git a/webapp/src/modules/rental/utils.ts b/webapp/src/modules/rental/utils.ts index 75e96396b9..a127841758 100644 --- a/webapp/src/modules/rental/utils.ts +++ b/webapp/src/modules/rental/utils.ts @@ -1,19 +1,9 @@ import { BigNumber, ethers } from 'ethers' import add from 'date-fns/add' -import { - ChainId, - PeriodCreation, - RentalListing, - RentalListingPeriod, - RentalStatus -} from '@dcl/schemas' +import { ChainId, PeriodCreation, RentalListing, RentalListingPeriod, RentalStatus } from '@dcl/schemas' import { TypedDataDomain, TypedDataField } from '@ethersproject/abstract-signer' import { getSigner } from 'decentraland-dapps/dist/lib/eth' -import { - ContractData, - ContractName, - getContract -} from 'decentraland-transactions' +import { ContractData, ContractName, getContract } from 'decentraland-transactions' import { config } from '../../config' import { VendorName } from '../vendor' import { rentalsAPI } from '../vendor/decentraland/rentals/api' @@ -33,12 +23,13 @@ export const daysByPeriod: Record<PeriodOption, number> = { [PeriodOption.ONE_YEAR]: 365 } -export const periodsByDays = (Object.keys( - daysByPeriod -) as PeriodOption[]).reduce((acc, period) => { - acc[daysByPeriod[period]] = period - return acc -}, {} as Record<number, PeriodOption>) +export const periodsByDays = (Object.keys(daysByPeriod) as PeriodOption[]).reduce( + (acc, period) => { + acc[daysByPeriod[period]] = period + return acc + }, + {} as Record<number, PeriodOption> +) export async function getSignature( chainId: ChainId, @@ -51,10 +42,7 @@ export async function getSignature( const signer = (await getSigner()) as ethers.providers.JsonRpcSigner const address = await signer.getAddress() - const rentalsContract: ContractData = getContract( - ContractName.Rentals, - chainId - ) + const rentalsContract: ContractData = getContract(ContractName.Rentals, chainId) const domain: TypedDataDomain = { name: rentalsContract.name, @@ -94,18 +82,9 @@ export async function getSignature( return signature } -export async function getAssetNonce( - chainId: ChainId, - contractAddress: string, - tokenId: string, - signerAddress: string -) { +export async function getAssetNonce(chainId: ChainId, contractAddress: string, tokenId: string, signerAddress: string) { const rentals = await getRentalsContractInstance(chainId) - const nonce: BigNumber = await rentals.getAssetIndex( - contractAddress, - tokenId, - signerAddress - ) + const nonce: BigNumber = await rentals.getAssetIndex(contractAddress, tokenId, signerAddress) return nonce.toString() } @@ -121,12 +100,7 @@ export async function getContractNonce(chainId: ChainId) { return nonce.toString() } -export async function getNonces( - chainId: ChainId, - contractAddress: string, - tokenId: string, - signerAddress: string -) { +export async function getNonces(chainId: ChainId, contractAddress: string, tokenId: string, signerAddress: string) { return Promise.all([ getContractNonce(chainId), getSignerNonce(chainId, signerAddress), @@ -138,14 +112,9 @@ export function getOpenRentalId(asset: Asset | null): string | null { return (asset as NFT | null)?.openRentalId ?? null } -export function getMaxPriceOfPeriods< - T extends { periods: RentalListing['periods'] } ->(rental: T): string { +export function getMaxPriceOfPeriods<T extends { periods: RentalListing['periods'] }>(rental: T): string { return rental.periods.reduce( - (maxPeriodPrice, period) => - BigNumber.from(maxPeriodPrice).gte(period.pricePerDay) - ? maxPeriodPrice - : period.pricePerDay, + (maxPeriodPrice, period) => (BigNumber.from(maxPeriodPrice).gte(period.pricePerDay) ? maxPeriodPrice : period.pricePerDay), '0' ) } @@ -155,12 +124,8 @@ export function getMaxPriceOfPeriods< * @throws Will throw if the rental hasn't started yet. * @param rental - A rental listing. */ -export function getRentalChosenPeriod( - rental: RentalListing -): RentalListingPeriod { - const rentalPeriod = rental.periods.find( - period => period.maxDays === rental.rentedDays - ) +export function getRentalChosenPeriod(rental: RentalListing): RentalListingPeriod { + const rentalPeriod = rental.periods.find(period => period.maxDays === rental.rentedDays) if (!rentalPeriod) { throw Error('Rental period was not found') } @@ -175,9 +140,7 @@ export function getRentalChosenPeriod( * @returns the end date of the rental or null if the rental has not started. */ export function getRentalEndDate(rental: RentalListing): Date | null { - return rental.startedAt && rental.rentedDays - ? add(rental.startedAt, { days: rental.rentedDays }) - : null + return rental.startedAt && rental.rentedDays ? add(rental.startedAt, { days: rental.rentedDays }) : null } /** @@ -210,9 +173,7 @@ export function isRentalListingCancelled(rental: RentalListing | null) { export function canCreateANewRental(rental: RentalListing | null) { return ( rental === null || - (rental !== null && - (isRentalListingCancelled(rental) || - (isRentalListingExecuted(rental) && hasRentalEnded(rental)))) + (rental !== null && (isRentalListingCancelled(rental) || (isRentalListingExecuted(rental) && hasRentalEnded(rental)))) ) } @@ -232,25 +193,15 @@ export function hasRentalEnded(rental: RentalListing): boolean { * @returns true if the rental if the Rental has status `EXECUTED` and the rental ended or if the Rental has status `OPEN` OR `CANCELLED` * but the rental contract is still owning the NFT from a past rental */ -export function canBeClaimed( - userAddress: string, - rental: RentalListing, - asset: Asset -): boolean { +export function canBeClaimed(userAddress: string, rental: RentalListing, asset: Asset): boolean { if (addressEquals(userAddress, (asset as NFT).owner)) { return false // the user is the owner, there's nothing to be claimed } if (rental.status === RentalStatus.EXECUTED) { const endDate = getRentalEndDate(rental) return endDate ? endDate.getTime() <= Date.now() : false - } else if ( - (isRentalListingOpen(rental) || isRentalListingCancelled(rental)) && - userAddress === rental.lessor - ) { - const rentalsContract: ContractData = getContract( - ContractName.Rentals, - (asset as NFT).chainId - ) + } else if ((isRentalListingOpen(rental) || isRentalListingCancelled(rental)) && userAddress === rental.lessor) { + const rentalsContract: ContractData = getContract(ContractName.Rentals, (asset as NFT).chainId) // can only be claimed from the contract address // this avoids the case where the asset was transfer with an open rental return addressEquals(rentalsContract.address, (asset as NFT).owner) @@ -263,25 +214,15 @@ export function canBeClaimed( * @param rental - A rental listing. * @returns true if the rental if the Rental has status `EXECUTED` or if the Rental can be claimed. */ -export function isLandLocked( - userAddress: string, - rental: RentalListing, - asset: Asset -) { - return ( - rental.status === RentalStatus.EXECUTED || - canBeClaimed(userAddress, rental, asset) - ) +export function isLandLocked(userAddress: string, rental: RentalListing, asset: Asset) { + return rental.status === RentalStatus.EXECUTED || canBeClaimed(userAddress, rental, asset) } async function delay(milliseconds: number) { return await new Promise<void>(resolve => setTimeout(resolve, milliseconds)) } -export async function waitUntilRentalChangesStatus( - nft: NFT<VendorName>, - status: RentalStatus -) { +export async function waitUntilRentalChangesStatus(nft: NFT<VendorName>, status: RentalStatus) { let hasChanged = false let listing: RentalListing while (!hasChanged) { @@ -318,8 +259,5 @@ function hasECDSASignatureAValidV(signature: string): boolean { */ export function generateECDSASignatureWithValidV(signature: string): string { const isSignatureVValid = hasECDSASignatureAValidV(signature) - return isSignatureVValid - ? signature - : signature.slice(0, -2) + - (getLastECDSASignatureByte(signature) + 27).toString(16) + return isSignatureVValid ? signature : signature.slice(0, -2) + (getLastECDSASignatureByte(signature) + 27).toString(16) } diff --git a/webapp/src/modules/routing/actions.ts b/webapp/src/modules/routing/actions.ts index a7e01fa102..a7617f2c90 100644 --- a/webapp/src/modules/routing/actions.ts +++ b/webapp/src/modules/routing/actions.ts @@ -14,8 +14,7 @@ export type BrowseAction = ReturnType<typeof browse> export const FETCH_ASSETS_FROM_ROUTE = 'Fetch assets from route' -export const fetchAssetsFromRoute = (options: BrowseOptions) => - action(FETCH_ASSETS_FROM_ROUTE, { options }) +export const fetchAssetsFromRoute = (options: BrowseOptions) => action(FETCH_ASSETS_FROM_ROUTE, { options }) export type FetchAssetsFromRouteAction = ReturnType<typeof fetchAssetsFromRoute> @@ -35,7 +34,6 @@ export const GO_BACK = 'Go back' * @param defaultLocation location to which the router will navigate in case there is no more back history. * defaults to root. */ -export const goBack = (defaultLocation?: string) => - action(GO_BACK, { defaultLocation }) +export const goBack = (defaultLocation?: string) => action(GO_BACK, { defaultLocation }) export type GoBackAction = ReturnType<typeof goBack> diff --git a/webapp/src/modules/routing/locations.ts b/webapp/src/modules/routing/locations.ts index 07aed22f0e..db9f915d1b 100644 --- a/webapp/src/modules/routing/locations.ts +++ b/webapp/src/modules/routing/locations.ts @@ -9,9 +9,7 @@ import { BrowseOptions } from './types' export const locations = { root: () => '/', signIn: (redirectTo?: string) => { - return `/sign-in${ - redirectTo ? `?redirectTo=${encodeURIComponent(redirectTo)}` : '' - }` + return `/sign-in${redirectTo ? `?redirectTo=${encodeURIComponent(redirectTo)}` : ''}` }, settings: () => '/settings', lands: (options?: BrowseOptions) => { @@ -25,8 +23,7 @@ export const locations = { claimName: () => { return '/names/claim' }, - collection: (contractAddress: string = ':contractAddress') => - `/collections/${contractAddress}`, + collection: (contractAddress: string = ':contractAddress') => `/collections/${contractAddress}`, browse: (options?: BrowseOptions) => { const params = getSearchParams(options) return params ? `/browse?${params.toString()}` : '/browse' @@ -40,7 +37,7 @@ export const locations = { const params = getSearchParams(options) return params ? `/account?${params.toString()}` : '/account' }, - defaultCurrentAccount: function() { + defaultCurrentAccount: function () { return this.currentAccount({ section: Section.COLLECTIONS }) @@ -50,7 +47,7 @@ export const locations = { const params = getSearchParams(options) return params ? `/lists/${listId}?${params.toString()}` : `/lists/${listId}` }, - defaultList: function() { + defaultList: function () { return this.list(DEFAULT_FAVORITES_LIST_ID, { assetType: AssetType.ITEM, page: 1, @@ -60,42 +57,19 @@ export const locations = { }, account: (address: string = ':address', options?: BrowseOptions) => { const params = getSearchParams(options) - return params - ? `/accounts/${address}?${params.toString()}` - : `/accounts/${address}` + return params ? `/accounts/${address}?${params.toString()}` : `/accounts/${address}` }, - nft: ( - contractAddress: string = ':contractAddress', - tokenId: string = ':tokenId' - ) => `/contracts/${contractAddress}/tokens/${tokenId}`, - manage: ( - contractAddress: string = ':contractAddress', - tokenId: string = ':tokenId' - ) => `/contracts/${contractAddress}/tokens/${tokenId}/manage`, - item: ( - contractAddress: string = ':contractAddress', - itemId: string = ':itemId' - ) => `/contracts/${contractAddress}/items/${itemId}`, + nft: (contractAddress: string = ':contractAddress', tokenId: string = ':tokenId') => `/contracts/${contractAddress}/tokens/${tokenId}`, + manage: (contractAddress: string = ':contractAddress', tokenId: string = ':tokenId') => + `/contracts/${contractAddress}/tokens/${tokenId}/manage`, + item: (contractAddress: string = ':contractAddress', itemId: string = ':itemId') => `/contracts/${contractAddress}/items/${itemId}`, parcel: (x: string = ':x', y: string = ':y') => `/parcels/${x}/${y}/detail`, estate: (estateId: string = ':estateId') => `/estates/${estateId}/detail`, - buy: ( - type: AssetType, - contractAddress: string = ':contractAddress', - tokenId: string = ':tokenId' - ) => `/contracts/${contractAddress}/${getResource(type)}/${tokenId}/buy`, - buyWithCard: ( - type: AssetType, - contractAddress: string = ':contractAddress', - tokenId: string = ':tokenId' - ) => - `/contracts/${contractAddress}/${getResource( - type - )}/${tokenId}/buy?withCard=true`, - buyStatusPage: ( - type: AssetType, - contractAddress: string = ':contractAddress', - tokenId: string = ':tokenId' - ) => + buy: (type: AssetType, contractAddress: string = ':contractAddress', tokenId: string = ':tokenId') => + `/contracts/${contractAddress}/${getResource(type)}/${tokenId}/buy`, + buyWithCard: (type: AssetType, contractAddress: string = ':contractAddress', tokenId: string = ':tokenId') => + `/contracts/${contractAddress}/${getResource(type)}/${tokenId}/buy?withCard=true`, + buyStatusPage: (type: AssetType, contractAddress: string = ':contractAddress', tokenId: string = ':tokenId') => `/contracts/${contractAddress}/${getResource(type)}/${tokenId}/buy/status`, sell: ( contractAddress: string = ':contractAddress', @@ -103,28 +77,18 @@ export const locations = { options?: { redirectTo?: string } - ) => - `/contracts/${contractAddress}/tokens/${tokenId}/sell${ - options ? `?${new URLSearchParams(options).toString()}` : '' - }`, + ) => `/contracts/${contractAddress}/tokens/${tokenId}/sell${options ? `?${new URLSearchParams(options).toString()}` : ''}`, cancel: ( contractAddress: string = ':contractAddress', tokenId: string = ':tokenId', options?: { redirectTo?: string } - ) => - `/contracts/${contractAddress}/tokens/${tokenId}/cancel${ - options ? `?${new URLSearchParams(options).toString()}` : '' - }`, - transfer: ( - contractAddress: string = ':contractAddress', - tokenId: string = ':tokenId' - ) => `/contracts/${contractAddress}/tokens/${tokenId}/transfer`, - bid: ( - contractAddress: string = ':contractAddress', - tokenId: string = ':tokenId' - ) => `/contracts/${contractAddress}/tokens/${tokenId}/bid`, + ) => `/contracts/${contractAddress}/tokens/${tokenId}/cancel${options ? `?${new URLSearchParams(options).toString()}` : ''}`, + transfer: (contractAddress: string = ':contractAddress', tokenId: string = ':tokenId') => + `/contracts/${contractAddress}/tokens/${tokenId}/transfer`, + bid: (contractAddress: string = ':contractAddress', tokenId: string = ':tokenId') => + `/contracts/${contractAddress}/tokens/${tokenId}/bid`, activity: () => `/activity`, success: (searchOptions?: { txHash: string @@ -134,10 +98,7 @@ export const locations = { subdomain?: string isCrossChain?: string destinationTxHash?: string - }) => - `/success${ - searchOptions ? `?${new URLSearchParams(searchOptions).toString()}` : '' - }` + }) => `/success${searchOptions ? `?${new URLSearchParams(searchOptions).toString()}` : ''}` } function getResource(type: AssetType) { diff --git a/webapp/src/modules/routing/reducer.ts b/webapp/src/modules/routing/reducer.ts index 445fa22211..051317ff9b 100644 --- a/webapp/src/modules/routing/reducer.ts +++ b/webapp/src/modules/routing/reducer.ts @@ -1,8 +1,4 @@ -import { - LocationChangeAction, - LOCATION_CHANGE, - RouterLocation -} from 'connected-react-router' +import { LocationChangeAction, LOCATION_CHANGE, RouterLocation } from 'connected-react-router' export type RoutingState = { isLoadMore: boolean @@ -16,18 +12,12 @@ const INITIAL_STATE: RoutingState = { type RoutingReducerAction = LocationChangeAction -export function routingReducer( - state: RoutingState = INITIAL_STATE, - action: RoutingReducerAction -) { +export function routingReducer(state: RoutingState = INITIAL_STATE, action: RoutingReducerAction) { switch (action.type) { case LOCATION_CHANGE: { return { ...state, - visitedLocations: [ - action.payload.location, - ...state.visitedLocations - ].slice(0, 2) // only save last 2 locations + visitedLocations: [action.payload.location, ...state.visitedLocations].slice(0, 2) // only save last 2 locations } } default: diff --git a/webapp/src/modules/routing/sagas.spec.ts b/webapp/src/modules/routing/sagas.spec.ts index 4fd87e486d..09bd3c7214 100644 --- a/webapp/src/modules/routing/sagas.spec.ts +++ b/webapp/src/modules/routing/sagas.spec.ts @@ -1,13 +1,7 @@ import { expectSaga } from 'redux-saga-test-plan' import { call, select } from 'redux-saga/effects' import { BigNumber, ethers } from 'ethers' -import { - getLocation, - LOCATION_CHANGE, - LocationChangeAction, - push, - RouterLocation -} from 'connected-react-router' +import { getLocation, LOCATION_CHANGE, LocationChangeAction, push, RouterLocation } from 'connected-react-router' import { ChainId, EmotePlayMode, @@ -29,23 +23,14 @@ import { AssetStatusFilter } from '../../utils/filters' import { AssetType } from '../asset/types' import { getData as getEventData } from '../event/selectors' import { fetchFavoritedItemsRequest } from '../favorites/actions' -import { - buyItemCrossChainSuccess, - buyItemSuccess, - fetchItemsRequest, - fetchTrendingItemsRequest -} from '../item/actions' +import { buyItemCrossChainSuccess, buyItemSuccess, fetchItemsRequest, fetchTrendingItemsRequest } from '../item/actions' import { ItemBrowseOptions } from '../item/types' import { getPage, getView } from '../ui/browse/selectors' import { MAX_QUERY_SIZE, PAGE_SIZE } from '../vendor/api' import { View } from '../ui/types' import { VendorName } from '../vendor' import { Section } from '../vendor/decentraland' -import { - cancelOrderSuccess, - createOrderSuccess, - executeOrderSuccess -} from '../order/actions' +import { cancelOrderSuccess, createOrderSuccess, executeOrderSuccess } from '../order/actions' import { NFT } from '../nft/types' import { fetchNFTsRequest, fetchNFTsSuccess } from '../nft/actions' import { getWallet } from '../wallet/selectors' @@ -53,17 +38,9 @@ import { ENS } from '../ens/types' import { claimNameSuccess, claimNameTransactionSubmitted } from '../ens/actions' import { REGISTRAR_ADDRESS } from '../ens/sagas' import { EXPIRED_LISTINGS_MODAL_KEY } from '../ui/utils' -import { - browse, - clearFilters, - fetchAssetsFromRoute as fetchAssetsFromRouteAction -} from './actions' +import { browse, clearFilters, fetchAssetsFromRoute as fetchAssetsFromRouteAction } from './actions' import { fetchAssetsFromRoute, getNewBrowseOptions, routingSaga } from './sagas' -import { - getCurrentBrowseOptions, - getLatestVisitedLocation, - getSection -} from './selectors' +import { getCurrentBrowseOptions, getLatestVisitedLocation, getSection } from './selectors' import { BrowseOptions, SortBy } from './types' import { buildBrowseURL } from './utils' import { locations } from './locations' @@ -126,10 +103,7 @@ describe('when handling the clear filters request action', () => { [select(getCurrentBrowseOptions), browseOptions], [select(getLocation), { pathname }], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, browseOptionsWithoutFilters), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, browseOptionsWithoutFilters), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, browseOptionsWithoutFilters))) .dispatch(clearFilters()) @@ -144,10 +118,7 @@ describe('when handling the clear filters request action', () => { [select(getCurrentBrowseOptions), browseOptions], [select(getLocation), { pathname }], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, browseOptionsWithoutFilters), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, browseOptionsWithoutFilters), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, browseOptionsWithoutFilters))) .dispatch(clearFilters()) @@ -171,10 +142,7 @@ describe('when handling the clear filters request action', () => { [select(getPage), 1], [select(getLocation), { pathname }], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, browseOptionsWithoutFilters), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, browseOptionsWithoutFilters), Promise.resolve()] ]) .put( push( @@ -207,10 +175,7 @@ describe('when handling the clear filters request action', () => { [select(getPage), 1], [select(getLocation), { pathname }], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, browseOptionsWithoutFilters), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, browseOptionsWithoutFilters), Promise.resolve()] ]) .put( push( @@ -370,10 +335,7 @@ describe('when handling the fetchAssetsFromRoute request action', () => { it('should fetch assets with the correct skip size', () => { return expectSaga(routingSaga) .provide([ - [ - select(getCurrentBrowseOptions), - { ...browseOptions, section: Section.WEARABLES_TRENDING } - ], + [select(getCurrentBrowseOptions), { ...browseOptions, section: Section.WEARABLES_TRENDING }], [select(getPage), pageInState], [select(getSection), Section.WEARABLES_TRENDING] ]) @@ -423,10 +385,7 @@ describe('when handling the fetchAssetsFromRoute request action', () => { it('should fetch assets with the correct skip size', () => { return expectSaga(routingSaga) .provide([ - [ - select(getCurrentBrowseOptions), - { ...browseOptions, section: Section.WEARABLES_TRENDING } - ], + [select(getCurrentBrowseOptions), { ...browseOptions, section: Section.WEARABLES_TRENDING }], [select(getPage), undefined], [select(getSection), Section.WEARABLES_TRENDING] ]) @@ -490,10 +449,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -518,10 +474,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -546,10 +499,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -574,10 +524,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -613,10 +560,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -641,10 +585,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -675,10 +616,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -702,10 +640,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -729,10 +664,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -757,10 +689,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -796,10 +725,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -824,10 +750,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -852,10 +775,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -880,10 +800,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -919,10 +836,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -947,10 +861,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -981,10 +892,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -1008,10 +916,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -1035,10 +940,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -1063,10 +965,7 @@ describe('when handling the browse action', () => { [select(getLocation), { pathname }], [select(getSection), Section.WEARABLES], [select(getEventData), {}], - [ - call(fetchAssetsFromRoute, expectedBrowseOptions), - Promise.resolve() - ] + [call(fetchAssetsFromRoute, expectedBrowseOptions), Promise.resolve()] ]) .put(push(buildBrowseURL(pathname, expectedBrowseOptions))) .dispatch(browse(newBrowseOptions)) @@ -1168,9 +1067,7 @@ describe('when handling the browse action', () => { }) describe('when handling the location change action', () => { - let browseOptions: BrowseOptions, - location: RouterLocation<unknown>, - locationChangeAction: LocationChangeAction<unknown> + let browseOptions: BrowseOptions, location: RouterLocation<unknown>, locationChangeAction: LocationChangeAction<unknown> beforeEach(() => { browseOptions = { view: View.MARKET, @@ -1365,12 +1262,12 @@ describe('handleRedirectToSuccessPage saga', () => { } } } as Route - item = ({ + item = { id: 'anItemId', contractAddress: 'aContractAddress', itemId: 'aTokenId', price: '100000000' - } as unknown) as Item + } as unknown as Item }) describe('and its buying an existing NFT', () => { @@ -1393,15 +1290,7 @@ describe('handleRedirectToSuccessPage saga', () => { it('should redirect to success page with the correct query params', () => { return expectSaga(routingSaga) .put(push(locations.success(searchParams))) - .dispatch( - buyItemCrossChainSuccess( - route, - ChainId.ETHEREUM_MAINNET, - searchParams.txHash, - item, - order - ) - ) + .dispatch(buyItemCrossChainSuccess(route, ChainId.ETHEREUM_MAINNET, searchParams.txHash, item, order)) .run({ silenceTimeout: true }) }) }) @@ -1419,14 +1308,7 @@ describe('handleRedirectToSuccessPage saga', () => { it('should redirect to success page with the correct query params', () => { return expectSaga(routingSaga) .put(push(locations.success(searchParams))) - .dispatch( - buyItemCrossChainSuccess( - route, - ChainId.ETHEREUM_MAINNET, - searchParams.txHash, - item - ) - ) + .dispatch(buyItemCrossChainSuccess(route, ChainId.ETHEREUM_MAINNET, searchParams.txHash, item)) .run({ silenceTimeout: true }) }) }) @@ -1530,9 +1412,7 @@ describe('when handling the fetch nfts success action', () => { }) describe('and the are some legacy orders among those NFTs and do not belong to the wallet connected', () => { beforeEach(() => { - orders = [ - { expiresAt: Date.now(), owner: 'some other address' } as Order - ] + orders = [{ expiresAt: Date.now(), owner: 'some other address' } as Order] }) it('should not open the ExpiresListingsModal', () => { return expectSaga(routingSaga) @@ -1633,13 +1513,7 @@ describe('when handling the fetch nfts success action', () => { describe.each([ ['CREATE_ORDER_SUCCESS', createOrderSuccess, {} as NFT, 123, 123, ''], - [ - 'CANCEL_ORDER_SUCCESS', - cancelOrderSuccess, - { price: '1000000000000' } as Order, - {} as NFT, - '' - ] + ['CANCEL_ORDER_SUCCESS', cancelOrderSuccess, { price: '1000000000000' } as Order, {} as NFT, ''] ])('%s action', (_name, action, ...args) => { it('should redirect to the location when redirectTo is present', () => { const redirectTo = '/account?section=on_sale' @@ -1711,9 +1585,7 @@ describe('when handling the claim name transaction submitted action', () => { } ] ]) - .dispatch( - claimNameTransactionSubmitted(subdomain, address, chainId, txHash) - ) + .dispatch(claimNameTransactionSubmitted(subdomain, address, chainId, txHash)) .run({ silenceTimeout: true }) }) }) diff --git a/webapp/src/modules/routing/sagas.ts b/webapp/src/modules/routing/sagas.ts index 89f5b3191a..3dad8f7bd4 100644 --- a/webapp/src/modules/routing/sagas.ts +++ b/webapp/src/modules/routing/sagas.ts @@ -1,36 +1,9 @@ -import { - takeEvery, - put, - select, - call, - take, - delay, - race, - spawn -} from 'redux-saga/effects' +import { takeEvery, put, select, call, take, delay, race, spawn } from 'redux-saga/effects' import { ethers } from 'ethers' import { matchPath } from 'react-router-dom' -import { - push, - getLocation, - goBack, - LOCATION_CHANGE, - replace, - LocationChangeAction -} from 'connected-react-router' -import { - CatalogFilters, - CatalogSortBy, - NFTCategory, - RentalStatus, - Sale, - SaleSortBy, - SaleType -} from '@dcl/schemas' -import { - CONNECT_WALLET_SUCCESS, - ConnectWalletSuccessAction -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { push, getLocation, goBack, LOCATION_CHANGE, replace, LocationChangeAction } from 'connected-react-router' +import { CatalogFilters, CatalogSortBy, NFTCategory, RentalStatus, Sale, SaleSortBy, SaleType } from '@dcl/schemas' +import { CONNECT_WALLET_SUCCESS, ConnectWalletSuccessAction } from 'decentraland-dapps/dist/modules/wallet/actions' import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { TRANSACTION_ACTION_FLAG } from 'decentraland-dapps/dist/modules/transaction/utils' import { getSigner } from 'decentraland-dapps/dist/lib/eth' @@ -59,23 +32,16 @@ import { getMinPrice, getStatus, getEmotePlayMode, - getLatestVisitedLocation + getLatestVisitedLocation, + getRarities, + getWearableGenders, + getContracts, + getSearch } from '../routing/selectors' -import { - fetchNFTRequest, - fetchNFTsRequest, - FetchNFTsSuccessAction, - FETCH_NFTS_SUCCESS, - TRANSFER_NFT_SUCCESS -} from '../nft/actions' +import { fetchNFTRequest, fetchNFTsRequest, FetchNFTsSuccessAction, FETCH_NFTS_SUCCESS, TRANSFER_NFT_SUCCESS } from '../nft/actions' import { setView } from '../ui/actions' import { getFilters } from '../vendor/utils' -import { - MAX_PAGE, - PAGE_SIZE, - getMaxQuerySize, - MAX_QUERY_SIZE -} from '../vendor/api' +import { MAX_PAGE, PAGE_SIZE, getMaxQuerySize, MAX_QUERY_SIZE } from '../vendor/api' import { locations } from './locations' import { getCategoryFromSection, @@ -86,12 +52,6 @@ import { getAssetOrderBy, getCatalogSortBy } from './search' -import { - getRarities, - getWearableGenders, - getContracts, - getSearch -} from './selectors' import { BROWSE, BrowseAction, @@ -104,31 +64,11 @@ import { } from './actions' import { BrowseOptions, Sections } from './types' import { Section } from '../vendor/decentraland' -import { - getClearedBrowseOptions, - isCatalogView, - rentalFilters, - SALES_PER_PAGE, - sellFilters -} from './utils' -import { - FetchSalesFailureAction, - fetchSalesRequest, - FETCH_SALES_FAILURE, - FETCH_SALES_SUCCESS -} from '../sale/actions' +import { getClearedBrowseOptions, isCatalogView, rentalFilters, SALES_PER_PAGE, sellFilters, buildBrowseURL } from './utils' +import { FetchSalesFailureAction, fetchSalesRequest, FETCH_SALES_FAILURE, FETCH_SALES_SUCCESS } from '../sale/actions' import { getSales } from '../sale/selectors' -import { - CANCEL_ORDER_SUCCESS, - CREATE_ORDER_SUCCESS, - EXECUTE_ORDER_SUCCESS, - ExecuteOrderSuccessAction -} from '../order/actions' -import { - ACCEPT_BID_SUCCESS, - CANCEL_BID_SUCCESS, - PLACE_BID_SUCCESS -} from '../bid/actions' +import { CANCEL_ORDER_SUCCESS, CREATE_ORDER_SUCCESS, EXECUTE_ORDER_SUCCESS, ExecuteOrderSuccessAction } from '../order/actions' +import { ACCEPT_BID_SUCCESS, CANCEL_BID_SUCCESS, PLACE_BID_SUCCESS } from '../bid/actions' import { getData } from '../event/selectors' import { getWallet } from '../wallet/selectors' import { EXPIRED_LISTINGS_MODAL_KEY } from '../ui/utils' @@ -145,7 +85,6 @@ import { } from '../ens/actions' import { DCLRegistrar__factory } from '../../contracts/factories/DCLRegistrar__factory' import { REGISTRAR_ADDRESS } from '../ens/sagas' -import { buildBrowseURL } from './utils' export function* routingSaga() { yield takeEvery(LOCATION_CHANGE, handleLocationChange) @@ -154,44 +93,23 @@ export function* routingSaga() { yield takeEvery(CLEAR_FILTERS, handleClearFilters) yield takeEvery(GO_BACK, handleGoBack) yield takeEvery( - [ - CREATE_ORDER_SUCCESS, - CANCEL_ORDER_SUCCESS, - PLACE_BID_SUCCESS, - ACCEPT_BID_SUCCESS, - CANCEL_BID_SUCCESS, - TRANSFER_NFT_SUCCESS - ], + [CREATE_ORDER_SUCCESS, CANCEL_ORDER_SUCCESS, PLACE_BID_SUCCESS, ACCEPT_BID_SUCCESS, CANCEL_BID_SUCCESS, TRANSFER_NFT_SUCCESS], handleRedirectToActivity ) yield takeEvery( - [ - EXECUTE_ORDER_SUCCESS, - BUY_ITEM_SUCCESS, - BUY_ITEM_CROSS_CHAIN_SUCCESS, - CLAIM_NAME_SUCCESS, - CLAIM_NAME_CROSS_CHAIN_SUCCESS - ], + [EXECUTE_ORDER_SUCCESS, BUY_ITEM_SUCCESS, BUY_ITEM_CROSS_CHAIN_SUCCESS, CLAIM_NAME_SUCCESS, CLAIM_NAME_CROSS_CHAIN_SUCCESS], handleRedirectToSuccessPage ) - yield takeEvery( - CLAIM_NAME_TRANSACTION_SUBMITTED, - handleRedirectClaimingNameToSuccessPage - ) + yield takeEvery(CLAIM_NAME_TRANSACTION_SUBMITTED, handleRedirectClaimingNameToSuccessPage) yield takeEvery(CONNECT_WALLET_SUCCESS, handleConnectWalletSuccess) yield takeEvery(FETCH_NFTS_SUCCESS, handleFetchOnSaleNFTsSuccess) } function* handleLocationChange(action: LocationChangeAction) { // Re-triggers fetchAssetsFromRoute action when the user goes back - if ( - action.payload.action === 'POP' && - matchPath(action.payload.location.pathname, { path: locations.browse() }) - ) { - const latestVisitedLocation: ReturnType<typeof getLocation> = yield select( - getLatestVisitedLocation - ) + if (action.payload.action === 'POP' && matchPath(action.payload.location.pathname, { path: locations.browse() })) { + const latestVisitedLocation: ReturnType<typeof getLocation> = yield select(getLatestVisitedLocation) const isComingFromBrowse = !!matchPath(latestVisitedLocation?.pathname, { path: locations.browse() }) @@ -203,10 +121,7 @@ function* handleLocationChange(action: LocationChangeAction) { } function* handleFetchAssetsFromRoute(action: FetchAssetsFromRouteAction) { - const newOptions: BrowseOptions = yield call( - getNewBrowseOptions, - action.payload.options - ) + const newOptions: BrowseOptions = yield call(getNewBrowseOptions, action.payload.options) yield call(fetchAssetsFromRoute, newOptions) } @@ -219,23 +134,15 @@ function* handleClearFilters() { } export function* handleBrowse(action: BrowseAction) { - const options: BrowseOptions = yield call( - getNewBrowseOptions, - action.payload.options - ) + const options: BrowseOptions = yield call(getNewBrowseOptions, action.payload.options) const { pathname }: ReturnType<typeof getLocation> = yield select(getLocation) const eventsContracts: Record<string, string[]> = yield select(getData) - const isAnEventRoute = Object.keys(eventsContracts).includes( - pathname.slice(1) - ) + const isAnEventRoute = Object.keys(eventsContracts).includes(pathname.slice(1)) yield call(fetchAssetsFromRoute, { ...options, ...(isAnEventRoute && { - contracts: - options.contracts && options.contracts.length > 0 - ? options.contracts - : eventsContracts[pathname.slice(1)] + contracts: options.contracts && options.contracts.length > 0 ? options.contracts : eventsContracts[pathname.slice(1)] }) }) yield put(push(buildBrowseURL(pathname, options))) @@ -280,8 +187,7 @@ export function* fetchAssetsFromRoute(options: BrowseOptions) { emoteHasSound } = options - const address = - options.address || ((yield select(getCurrentLocationAddress)) as string) + const address = options.address || ((yield select(getCurrentLocationAddress)) as string) if (isMap) { yield put(setView(view)) @@ -299,18 +205,13 @@ export function* fetchAssetsFromRoute(options: BrowseOptions) { case Section.STORE_SETTINGS: break case Section.ON_SALE: - yield handleFetchOnSale( - Array.isArray(address) ? address[0] : address, - options.view! - ) + yield handleFetchOnSale(Array.isArray(address) ? address[0] : address, options.view!) break case Section.ON_RENT: yield handleFetchOnRent( options.view!, [RentalStatus.OPEN, RentalStatus.EXECUTED], - View.ACCOUNT - ? { tenant } - : { ownerAddress: Array.isArray(address) ? address[0] : address } + View.ACCOUNT ? { tenant } : { ownerAddress: Array.isArray(address) ? address[0] : address } ) break case Section.WEARABLES_TRENDING: @@ -339,33 +240,20 @@ export function* fetchAssetsFromRoute(options: BrowseOptions) { ) break default: - const isWearableHead = - section === Sections[VendorName.DECENTRALAND].WEARABLES_HEAD - const isWearableAccessory = - section === Sections[VendorName.DECENTRALAND].WEARABLES_ACCESSORIES + const isWearableHead = section === Sections[VendorName.DECENTRALAND].WEARABLES_HEAD + const isWearableAccessory = section === Sections[VendorName.DECENTRALAND].WEARABLES_ACCESSORIES - const wearableCategory = !isWearableAccessory - ? getSearchWearableCategory(section) - : undefined + const wearableCategory = !isWearableAccessory ? getSearchWearableCategory(section) : undefined - const emoteCategory = - category === NFTCategory.EMOTE - ? getSearchEmoteCategory(section) - : undefined + const emoteCategory = category === NFTCategory.EMOTE ? getSearchEmoteCategory(section) : undefined const { rarities, wearableGenders, emotePlayMode } = options const statusParameters: Partial<Omit<CatalogFilters, 'sortBy'>> = { ...(status === AssetStatusFilter.ON_SALE ? { isOnSale: true } : {}), - ...(status === AssetStatusFilter.NOT_FOR_SALE - ? { isOnSale: false } - : {}), - ...(status === AssetStatusFilter.ONLY_LISTING - ? { onlyListing: true } - : {}), - ...(status === AssetStatusFilter.ONLY_MINTING - ? { onlyMinting: true } - : {}) + ...(status === AssetStatusFilter.NOT_FOR_SALE ? { isOnSale: false } : {}), + ...(status === AssetStatusFilter.ONLY_LISTING ? { onlyListing: true } : {}), + ...(status === AssetStatusFilter.ONLY_MINTING ? { onlyMinting: true } : {}) } if (isItems) { yield put( @@ -428,15 +316,11 @@ export function* fetchAssetsFromRoute(options: BrowseOptions) { } } -export function* getNewBrowseOptions( - current: BrowseOptions -): Generator<unknown, BrowseOptions, any> { +export function* getNewBrowseOptions(current: BrowseOptions): Generator<unknown, BrowseOptions, any> { let previous: BrowseOptions = yield select(getCurrentBrowseOptions) current = yield deriveCurrentOptions(previous, current) const view = deriveView(previous, current) - const section: Section = current.section - ? current.section - : yield select(getSection) + const section: Section = current.section ? current.section : yield select(getSection) const vendor = deriveVendor(previous, current) if (shouldResetOptions(previous, current)) { @@ -469,10 +353,7 @@ function* handleConnectWalletSuccess(action: ConnectWalletSuccessAction) { } = action const view: View = yield select(getView) - const hasShownTheExpiredListingsModalBefore: string | null = yield call( - [localStorage, 'getItem'], - EXPIRED_LISTINGS_MODAL_KEY - ) + const hasShownTheExpiredListingsModalBefore: string | null = yield call([localStorage, 'getItem'], EXPIRED_LISTINGS_MODAL_KEY) if (hasShownTheExpiredListingsModalBefore !== 'true') { yield handleFetchNFTsOnSale(address, view) @@ -494,11 +375,7 @@ function* handleFetchOnSaleNFTsSuccess(action: FetchNFTsSuccessAction) { wallet?.address === options.params.address && options.params.onlyOnSale ) { - if ( - orders.some( - order => isLegacyOrder(order) && order.owner === wallet.address - ) - ) { + if (orders.some(order => isLegacyOrder(order) && order.owner === wallet.address)) { yield put(openModal('ExpiredListingsModal')) } } @@ -529,11 +406,7 @@ function* handleFetchNFTsOnSale(address: string, view: View) { ) } -function* handleFetchOnRent( - view: View, - rentalStatus: RentalStatus[], - options: { ownerAddress?: string; tenant?: string } -) { +function* handleFetchOnRent(view: View, rentalStatus: RentalStatus[], options: { ownerAddress?: string; tenant?: string }) { const { ownerAddress: address, tenant } = options yield put( @@ -609,10 +482,7 @@ function* handleFetchSales({ } // TODO: Consider moving this should live to each vendor -function* deriveCurrentOptions( - previous: BrowseOptions, - current: BrowseOptions -) { +function* deriveCurrentOptions(previous: BrowseOptions, current: BrowseOptions) { let newOptions: BrowseOptions = { ...current, assetType: current.assetType || previous.assetType, @@ -623,35 +493,21 @@ function* deriveCurrentOptions( newOptions = { ...newOptions, - onlyOnRent: current.hasOwnProperty('onlyOnRent') - ? current.onlyOnRent - : previous.onlyOnRent, + onlyOnRent: current.hasOwnProperty('onlyOnRent') ? current.onlyOnRent : previous.onlyOnRent, onlyOnSale: - current.assetType === AssetType.ITEM - ? undefined - : current.hasOwnProperty('onlyOnSale') - ? current.onlyOnSale - : previous.onlyOnSale + current.assetType === AssetType.ITEM ? undefined : current.hasOwnProperty('onlyOnSale') ? current.onlyOnSale : previous.onlyOnSale } // Checks if the sorting categories are correctly set for the onlyOnRental and the onlyOnSell filters - const previousSortExistsAndIsNotARentalSort = - previous.sortBy && !rentalFilters.includes(previous.sortBy) - const previousSortExistsAndIsNotASellSort = - previous.sortBy && !sellFilters.includes(previous.sortBy) - const newSortExistsAndIsNotARentalSort = - current.sortBy && !rentalFilters.includes(current.sortBy) - const newSortExistsAndIsNotASellSort = - current.sortBy && !sellFilters.includes(current.sortBy) + const previousSortExistsAndIsNotARentalSort = previous.sortBy && !rentalFilters.includes(previous.sortBy) + const previousSortExistsAndIsNotASellSort = previous.sortBy && !sellFilters.includes(previous.sortBy) + const newSortExistsAndIsNotARentalSort = current.sortBy && !rentalFilters.includes(current.sortBy) + const newSortExistsAndIsNotASellSort = current.sortBy && !sellFilters.includes(current.sortBy) const hasWrongRentalFilter = - newOptions.onlyOnRent && - (newSortExistsAndIsNotARentalSort || - (!current.sortBy && previousSortExistsAndIsNotARentalSort)) + newOptions.onlyOnRent && (newSortExistsAndIsNotARentalSort || (!current.sortBy && previousSortExistsAndIsNotARentalSort)) const hasWrongSellFilter = - newOptions.onlyOnSale && - (newSortExistsAndIsNotASellSort || - (!current.sortBy && previousSortExistsAndIsNotASellSort)) + newOptions.onlyOnSale && (newSortExistsAndIsNotASellSort || (!current.sortBy && previousSortExistsAndIsNotASellSort)) if (hasWrongRentalFilter || hasWrongSellFilter) { newOptions.sortBy = undefined @@ -705,8 +561,7 @@ function* deriveCurrentOptions( // Only if the user is not in their own page, show ens on sale by default. if (window.location.pathname !== locations.currentAccount()) { - newOptions.onlyOnSale = - previous.onlyOnSale === undefined ? true : current.onlyOnSale + newOptions.onlyOnSale = previous.onlyOnSale === undefined ? true : current.onlyOnSale } break @@ -744,16 +599,10 @@ function* handleRedirectToActivity() { } } -function* handleRedirectClaimingNameToSuccessPage( - action: ClaimNameTransactionSubmittedAction -) { +function* handleRedirectClaimingNameToSuccessPage(action: ClaimNameTransactionSubmittedAction) { const data = action.payload[TRANSACTION_ACTION_FLAG] const signer: ethers.Signer = yield call(getSigner) - const dclRegistrarContract: DCLRegistrar = yield call( - [DCLRegistrar__factory, 'connect'], - REGISTRAR_ADDRESS, - signer - ) + const dclRegistrarContract: DCLRegistrar = yield call([DCLRegistrar__factory, 'connect'], REGISTRAR_ADDRESS, signer) const contractAddress = dclRegistrarContract.address yield put( push( @@ -777,39 +626,35 @@ function* handleRedirectToSuccessPage( | ClaimNameCrossChainSuccessAction ) { const payload = action.payload - const isCrossChainAction = - 'route' in payload && - payload.route.route.params.fromChain !== payload.route.route.params.toChain // it's cross chain only if the fromChain is different from the toChain + const isCrossChainAction = 'route' in payload && payload.route.route.params.fromChain !== payload.route.route.params.toChain // it's cross chain only if the fromChain is different from the toChain const successParams = { txHash: payload.txHash, tokenId: 'order' in payload && payload.order?.tokenId ? payload.order.tokenId : 'item' in payload - ? payload.item.itemId - : 'nft' in payload - ? payload.nft.tokenId - : 'ens' in payload - ? payload.ens.tokenId - : '', + ? payload.item.itemId + : 'nft' in payload + ? payload.nft.tokenId + : 'ens' in payload + ? payload.ens.tokenId + : '', assetType: isCrossChainAction ? 'order' in payload && !!payload.order // if cross chain check for the order object ? AssetType.NFT : AssetType.ITEM : 'item' in payload // for the rest of the action, check for the item object - ? AssetType.ITEM - : AssetType.NFT, + ? AssetType.ITEM + : AssetType.NFT, contractAddress: 'item' in payload ? payload.item.contractAddress : 'nft' in payload - ? payload.nft.contractAddress - : 'ens' in payload - ? payload.ens.contractAddress - : '', - ...(isCrossChainAction - ? { isCrossChain: isCrossChainAction.toString() } - : {}) + ? payload.nft.contractAddress + : 'ens' in payload + ? payload.ens.contractAddress + : '', + ...(isCrossChainAction ? { isCrossChain: isCrossChainAction.toString() } : {}) } yield put(push(locations.success(successParams))) } diff --git a/webapp/src/modules/routing/search.ts b/webapp/src/modules/routing/search.ts index 2d05856aba..8e0b87b465 100644 --- a/webapp/src/modules/routing/search.ts +++ b/webapp/src/modules/routing/search.ts @@ -1,12 +1,4 @@ -import { - CatalogSortBy, - EmoteCategory, - EmotePlayMode, - ItemSortBy, - Network, - NFTCategory, - WearableCategory -} from '@dcl/schemas' +import { CatalogSortBy, EmoteCategory, EmotePlayMode, ItemSortBy, Network, NFTCategory, WearableCategory } from '@dcl/schemas' import { View } from '../ui/types' import { BrowseOptions, SortBy, SortDirection } from './types' import { Section } from '../vendor/decentraland' @@ -18,29 +10,16 @@ import { isCatalogView, isCatalogViewWithStatusFilter } from './utils' export const SEARCH_ARRAY_PARAM_SEPARATOR = '_' -export function getDefaultOptionsByView( - view?: View, - section?: Section -): BrowseOptions { +export function getDefaultOptionsByView(view?: View, section?: Section): BrowseOptions { if (section === Section.LISTS) return {} let defaultOptions: Partial<BrowseOptions> = { onlyOnSale: view && isAccountView(view) ? false : undefined, - sortBy: - view && isAccountView(view) - ? SortBy.NEWEST - : section && isLandSection(section) - ? SortBy.NEWEST - : SortBy.RECENTLY_LISTED + sortBy: view && isAccountView(view) ? SortBy.NEWEST : section && isLandSection(section) ? SortBy.NEWEST : SortBy.RECENTLY_LISTED } if (section && isCatalogView(view)) { const currentCategoryBySection = getCategoryFromSection(section) - if ( - currentCategoryBySection && - [NFTCategory.EMOTE, NFTCategory.WEARABLE].includes( - currentCategoryBySection - ) - ) { + if (currentCategoryBySection && [NFTCategory.EMOTE, NFTCategory.WEARABLE].includes(currentCategoryBySection)) { defaultOptions = { ...defaultOptions, onlyOnSale: view === View.CURRENT_ACCOUNT ? false : undefined, // current account shows on sale false as default @@ -96,26 +75,17 @@ export function getSearchParams(options?: BrowseOptions) { params.set('onlyOnRent', options.onlyOnRent.toString()) } if (options.rarities && options.rarities.length > 0) { - params.set( - 'rarities', - options.rarities.join(SEARCH_ARRAY_PARAM_SEPARATOR) - ) + params.set('rarities', options.rarities.join(SEARCH_ARRAY_PARAM_SEPARATOR)) } if (options.status) { params.set('status', options.status.toString()) } if (options.wearableGenders && options.wearableGenders.length > 0) { - params.set( - 'genders', - options.wearableGenders.join(SEARCH_ARRAY_PARAM_SEPARATOR) - ) + params.set('genders', options.wearableGenders.join(SEARCH_ARRAY_PARAM_SEPARATOR)) } if (options.contracts && options.contracts.length > 0) { - params.set( - 'contracts', - options.contracts.join(SEARCH_ARRAY_PARAM_SEPARATOR) - ) + params.set('contracts', options.contracts.join(SEARCH_ARRAY_PARAM_SEPARATOR)) } if (options.creators && options.creators.length > 0) { @@ -132,12 +102,7 @@ export function getSearchParams(options?: BrowseOptions) { params.set('network', options.network) } - if ( - options.emotePlayMode?.length && - options.emotePlayMode?.every(option => - Object.values(EmotePlayMode).includes(option) - ) - ) { + if (options.emotePlayMode?.length && options.emotePlayMode?.every(option => Object.values(EmotePlayMode).includes(option))) { for (const emotePlayMode of options.emotePlayMode) { params.append('emotePlayMode', emotePlayMode) } @@ -453,11 +418,7 @@ export function getNFTSortBy(orderBy: NFTSortBy) { return sortBy } -export function getURLParamArray<T extends string>( - search: string, - paramName: string, - validValues: string[] = [] -) { +export function getURLParamArray<T extends string>(search: string, paramName: string, validValues: string[] = []) { let params = new URLSearchParams(search).getAll(paramName) as T[] if (validValues.length > 0) { @@ -472,23 +433,12 @@ export function getURLParamArray<T extends string>( // from the URL are parsed from rarities=common_uncommon instead of // rarities=common&rarities=uncommon I'll leave it as it is for now to prevent // further refactoring but should be changed in the future. -export function getURLParamArray_nonStandard<T extends string>( - search: string, - paramName: string, - validValues: string[] = [] -) { +export function getURLParamArray_nonStandard<T extends string>(search: string, paramName: string, validValues: string[] = []) { const param = getURLParam<T>(search, paramName) - return param === null - ? [] - : (param - .split(SEARCH_ARRAY_PARAM_SEPARATOR) - .filter(item => validValues.includes(item as T)) as T[]) + return param === null ? [] : (param.split(SEARCH_ARRAY_PARAM_SEPARATOR).filter(item => validValues.includes(item as T)) as T[]) } -export function getURLParam<T extends string>( - search: string, - paramName: string -) { +export function getURLParam<T extends string>(search: string, paramName: string) { const param = new URLSearchParams(search).get(paramName) as T | null return param } diff --git a/webapp/src/modules/routing/selectors.spec.ts b/webapp/src/modules/routing/selectors.spec.ts index bbea21c5a2..86e993b0cc 100644 --- a/webapp/src/modules/routing/selectors.spec.ts +++ b/webapp/src/modules/routing/selectors.spec.ts @@ -1,10 +1,5 @@ import { RouterLocation } from 'connected-react-router' -import { - EmotePlayMode, - GenderFilterOption, - Network, - Rarity -} from '@dcl/schemas' +import { EmotePlayMode, GenderFilterOption, Network, Rarity } from '@dcl/schemas' import { AssetStatusFilter } from '../../utils/filters' import { AssetType } from '../asset/types' import { VendorName } from '../vendor' @@ -50,12 +45,7 @@ describe('when getting the latest visited location', () => { } as RouterLocation<unknown> }) it('should return the location', () => { - expect( - getLatestVisitedLocation.resultFunc([ - { ...prevLocation, pathname: 'an oldest location' }, - prevLocation - ]) - ).toBe(prevLocation) + expect(getLatestVisitedLocation.resultFunc([{ ...prevLocation, pathname: 'an oldest location' }, prevLocation])).toBe(prevLocation) }) }) }) @@ -72,17 +62,13 @@ describe('when getting if the are filters set', () => { describe('when the creator filter is set', () => { it('should return true', () => { - expect(hasFiltersEnabled.resultFunc({ creators: ['anAddress'] })).toBe( - true - ) + expect(hasFiltersEnabled.resultFunc({ creators: ['anAddress'] })).toBe(true) }) }) describe('when the network filter is set', () => { it('should return true', () => { - expect( - hasFiltersEnabled.resultFunc({ network: 'aNetwork' as Network }) - ).toBe(true) + expect(hasFiltersEnabled.resultFunc({ network: 'aNetwork' as Network })).toBe(true) }) }) @@ -98,25 +84,19 @@ describe('when getting if the are filters set', () => { describe('when the rarities filter is set', () => { it('should return true', () => { - expect(hasFiltersEnabled.resultFunc({ rarities: [Rarity.COMMON] })).toBe( - true - ) + expect(hasFiltersEnabled.resultFunc({ rarities: [Rarity.COMMON] })).toBe(true) }) }) describe('when the contracts filter is set', () => { it('should return true', () => { - expect(hasFiltersEnabled.resultFunc({ contracts: ['0x.....'] })).toBe( - true - ) + expect(hasFiltersEnabled.resultFunc({ contracts: ['0x.....'] })).toBe(true) }) }) describe('when the playmode filter is set', () => { it('should return true', () => { - expect( - hasFiltersEnabled.resultFunc({ emotePlayMode: [EmotePlayMode.LOOP] }) - ).toBe(true) + expect(hasFiltersEnabled.resultFunc({ emotePlayMode: [EmotePlayMode.LOOP] })).toBe(true) }) }) @@ -167,19 +147,18 @@ describe('when getting if the are filters set', () => { }) }) - describe.each([ - [AssetStatusFilter.NOT_FOR_SALE], - [AssetStatusFilter.ONLY_LISTING], - [AssetStatusFilter.ONLY_MINTING] - ])('and the status is %s', status => { - it('should return true', () => { - expect( - hasFiltersEnabled.resultFunc({ - status - }) - ).toBe(true) - }) - }) + describe.each([[AssetStatusFilter.NOT_FOR_SALE], [AssetStatusFilter.ONLY_LISTING], [AssetStatusFilter.ONLY_MINTING]])( + 'and the status is %s', + status => { + it('should return true', () => { + expect( + hasFiltersEnabled.resultFunc({ + status + }) + ).toBe(true) + }) + } + ) }) describe('and it is the lists section', () => { @@ -202,106 +181,62 @@ describe('when getting if the are filters set', () => { describe('when getting the section', () => { describe("when there's no section URL param and the location is related to lands", () => { it("should return the decentraland's LAND section", () => { - expect( - getSection.resultFunc('', locations.lands(), VendorName.DECENTRALAND) - ).toBe(Sections.decentraland.LAND) + expect(getSection.resultFunc('', locations.lands(), VendorName.DECENTRALAND)).toBe(Sections.decentraland.LAND) }) }) describe("when there's no section URL param, the vendor is Decentraland and the pathname is browse", () => { it("should return the decentraland's WEARABLES section", () => { - expect( - getSection.resultFunc('', locations.browse(), VendorName.DECENTRALAND) - ).toBe(Sections.decentraland.WEARABLES) + expect(getSection.resultFunc('', locations.browse(), VendorName.DECENTRALAND)).toBe(Sections.decentraland.WEARABLES) }) }) describe('when the section URL param is ALL, the vendor is Decentraland and the pathname is browse', () => { it("should return the decentraland's WEARABLES section", () => { - expect( - getSection.resultFunc( - 'section=all', - locations.browse(), - VendorName.DECENTRALAND - ) - ).toBe(Sections.decentraland.WEARABLES) + expect(getSection.resultFunc('section=all', locations.browse(), VendorName.DECENTRALAND)).toBe(Sections.decentraland.WEARABLES) }) }) describe("when there's no section URL param, the vendor is Decentraland and the pathname is not browse but account", () => { it("should return the decentraland's ALL section", () => { - expect( - getSection.resultFunc('', locations.account(), VendorName.DECENTRALAND) - ).toBe(Sections.decentraland.ALL) + expect(getSection.resultFunc('', locations.account(), VendorName.DECENTRALAND)).toBe(Sections.decentraland.ALL) }) }) describe('when the section URL param is ALL, the vendor is Decentraland and the pathname is not browse but account', () => { it("should return the decentraland's ALL section", () => { - expect( - getSection.resultFunc( - 'section=all', - locations.account(), - VendorName.DECENTRALAND - ) - ).toBe(Sections.decentraland.ALL) + expect(getSection.resultFunc('section=all', locations.account(), VendorName.DECENTRALAND)).toBe(Sections.decentraland.ALL) }) }) describe('when the section URL param exists in the vendor', () => { it("should return the vendor's section", () => { - expect( - getSection.resultFunc( - 'section=land', - locations.lands(), - VendorName.DECENTRALAND - ) - ).toBe(Sections.decentraland.LAND) + expect(getSection.resultFunc('section=land', locations.lands(), VendorName.DECENTRALAND)).toBe(Sections.decentraland.LAND) }) }) }) describe("when there's no assetType URL param and the vendor is DECENTRALAND and the location is in browse", () => { it('should return ITEM as the assetType', () => { - expect( - getAssetType.resultFunc('', locations.browse(), VendorName.DECENTRALAND) - ).toBe(AssetType.ITEM) + expect(getAssetType.resultFunc('', locations.browse(), VendorName.DECENTRALAND)).toBe(AssetType.ITEM) }) }) describe("when there's assetType URL param, the assetType is not NFT or ITEM and the vendor is DECENTRALAND but the location is not in browse", () => { it('should return NFT as the assetType', () => { - expect( - getAssetType.resultFunc( - 'assetType=something', - locations.lands(), - VendorName.DECENTRALAND - ) - ).toBe(AssetType.NFT) + expect(getAssetType.resultFunc('assetType=something', locations.lands(), VendorName.DECENTRALAND)).toBe(AssetType.NFT) }) }) describe("when there's assetType URL param, the assetType is not NFT or ITEM and the vendor is DECENTRALAND and the location is in browse", () => { it('should return CATALOG_ITEM as the assetType', () => { - expect( - getAssetType.resultFunc( - 'assetType=something', - locations.browse(), - VendorName.DECENTRALAND - ) - ).toBe(AssetType.ITEM) + expect(getAssetType.resultFunc('assetType=something', locations.browse(), VendorName.DECENTRALAND)).toBe(AssetType.ITEM) }) }) describe("when there's assetType URL param and the assetType is NFT", () => { it('should return NFT as the assetType', () => { - expect( - getAssetType.resultFunc( - 'assetType=nft', - locations.browse(), - VendorName.DECENTRALAND - ) - ).toBe(AssetType.NFT) + expect(getAssetType.resultFunc('assetType=nft', locations.browse(), VendorName.DECENTRALAND)).toBe(AssetType.NFT) }) }) @@ -536,9 +471,7 @@ describe('when getting if the SortBy parameter is set', () => { url = '' }) it('should return RECENTLY_LISTED as the default value', () => { - expect(getSortBy.resultFunc(url, view, section)).toBe( - SortBy.RECENTLY_LISTED - ) + expect(getSortBy.resultFunc(url, view, section)).toBe(SortBy.RECENTLY_LISTED) }) }) }) @@ -615,9 +548,7 @@ describe('when getting if it should filter for guests', () => { describe('when getting if the page name', () => { describe('and the page is not one of the known ones', () => { it('should throw an error', () => { - expect(() => getPageName.resultFunc('/unknown')).toThrowError( - 'Unknown page' - ) + expect(() => getPageName.resultFunc('/unknown')).toThrowError('Unknown page') }) }) @@ -640,14 +571,8 @@ describe('when getting if the page name', () => { [locations.estate('anId'), PageName.ESTATE_DETAIL], [locations.buy(AssetType.NFT, 'anAddress', 'anId'), PageName.BUY_NFT], [locations.buy(AssetType.ITEM, 'anAddress', 'anId'), PageName.BUY_ITEM], - [ - locations.buyStatusPage(AssetType.NFT, 'anAddress', 'anId'), - PageName.BUY_NFT_STATUS - ], - [ - locations.buyStatusPage(AssetType.ITEM, 'anAddress', 'anId'), - PageName.BUY_ITEM_STATUS - ], + [locations.buyStatusPage(AssetType.NFT, 'anAddress', 'anId'), PageName.BUY_NFT_STATUS], + [locations.buyStatusPage(AssetType.ITEM, 'anAddress', 'anId'), PageName.BUY_ITEM_STATUS], [locations.cancel('anAddress', 'anId'), PageName.CANCEL_NFT_SALE], [locations.transfer('anAddress', 'anId'), PageName.TRANSFER_NFT], [locations.bid('anAddress', 'anId'), PageName.BID_NFT], @@ -686,9 +611,7 @@ describe('when getting the Sort By options', () => { status = AssetStatusFilter.ON_SALE }) it('should return the base sort options array', () => { - expect(getSortByOptions.resultFunc(true, true, status)).toEqual( - baseSortByOptions - ) + expect(getSortByOptions.resultFunc(true, true, status)).toEqual(baseSortByOptions) }) }) describe('and the status is ONLY_MINTING', () => { @@ -696,9 +619,7 @@ describe('when getting the Sort By options', () => { status = AssetStatusFilter.ONLY_MINTING }) it('should return the base sort options array', () => { - expect(getSortByOptions.resultFunc(true, true, status)).toEqual( - baseSortByOptions - ) + expect(getSortByOptions.resultFunc(true, true, status)).toEqual(baseSortByOptions) }) }) describe('and the status is ONLY_LISTING', () => { @@ -706,9 +627,7 @@ describe('when getting the Sort By options', () => { status = AssetStatusFilter.ONLY_LISTING }) it('should return the base sort options', () => { - expect(getSortByOptions.resultFunc(true, true, status)).toEqual( - baseSortByOptions - ) + expect(getSortByOptions.resultFunc(true, true, status)).toEqual(baseSortByOptions) }) }) describe('and the status is NOT_FOR_SALE', () => { @@ -716,9 +635,7 @@ describe('when getting the Sort By options', () => { status = AssetStatusFilter.NOT_FOR_SALE }) it('should return an array with just the newest option', () => { - expect(getSortByOptions.resultFunc(true, true, status)).toEqual([ - getAllSortByOptions()[SortBy.NEWEST] - ]) + expect(getSortByOptions.resultFunc(true, true, status)).toEqual([getAllSortByOptions()[SortBy.NEWEST]]) }) }) }) diff --git a/webapp/src/modules/routing/selectors.ts b/webapp/src/modules/routing/selectors.ts index f20de84203..826a452cd8 100644 --- a/webapp/src/modules/routing/selectors.ts +++ b/webapp/src/modules/routing/selectors.ts @@ -1,15 +1,7 @@ import { createSelector } from 'reselect' import { matchPath } from 'react-router' -import { - getSearch as getRouterSearch, - getLocation -} from 'connected-react-router' -import { - EmotePlayMode, - GenderFilterOption, - Network, - Rarity -} from '@dcl/schemas' +import { getSearch as getRouterSearch, getLocation } from 'connected-react-router' +import { EmotePlayMode, GenderFilterOption, Network, Rarity } from '@dcl/schemas' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { AssetStatusFilter } from '../../utils/filters' import { getView } from '../ui/browse/selectors' @@ -34,108 +26,77 @@ import { locations } from './locations' export const getState = (state: RootState) => state.routing -export const getVisitedLocations = (state: RootState) => - getState(state).visitedLocations +export const getVisitedLocations = (state: RootState) => getState(state).visitedLocations -export const getLatestVisitedLocation = createSelector< - RootState, - ReturnType<typeof getLocation>[], - ReturnType<typeof getLocation> ->( +export const getLatestVisitedLocation = createSelector<RootState, ReturnType<typeof getLocation>[], ReturnType<typeof getLocation>>( getVisitedLocations, visitedLocations => visitedLocations[visitedLocations.length - 1] ) -const getPathName = createSelector< - RootState, - ReturnType<typeof getLocation>, - string ->(getLocation, location => location.pathname) +const getPathName = createSelector<RootState, ReturnType<typeof getLocation>, string>(getLocation, location => location.pathname) + +export const getVendor = createSelector<RootState, string, VendorName>(getRouterSearch, search => { + const vendor = getURLParam<VendorName>(search, 'vendor') + if (vendor && isVendor(vendor)) { + return vendor + } + return VendorName.DECENTRALAND +}) -export const getVendor = createSelector<RootState, string, VendorName>( +export const getSection = createSelector<RootState, string, ReturnType<typeof getPathName>, VendorName, Section>( getRouterSearch, - search => { - const vendor = getURLParam<VendorName>(search, 'vendor') - if (vendor && isVendor(vendor)) { - return vendor + getPathName, + getVendor, + (search, pathname, vendor) => { + const section = getURLParam<string>(search, 'section') ?? '' + if (!section && pathname === locations.lands()) { + return Sections.decentraland.LAND } - return VendorName.DECENTRALAND - } -) -export const getSection = createSelector< - RootState, - string, - ReturnType<typeof getPathName>, - VendorName, - Section ->(getRouterSearch, getPathName, getVendor, (search, pathname, vendor) => { - const section = getURLParam<string>(search, 'section') ?? '' - if (!section && pathname === locations.lands()) { - return Sections.decentraland.LAND - } + if ((!section || section === Sections[vendor].ALL) && pathname === locations.browse() && vendor === VendorName.DECENTRALAND) { + return Sections.decentraland.WEARABLES + } - if ( - (!section || section === Sections[vendor].ALL) && - pathname === locations.browse() && - vendor === VendorName.DECENTRALAND - ) { - return Sections.decentraland.WEARABLES - } + if (!section || !(section.toUpperCase() in Sections[vendor])) { + return Sections[vendor].ALL + } - if (!section || !(section.toUpperCase() in Sections[vendor])) { - return Sections[vendor].ALL + return section as Section } +) - return section as Section +export const getPageNumber = createSelector<RootState, string, number>(getRouterSearch, search => { + const page = getURLParam(search, 'page') + return page === null || isNaN(+page) ? 1 : +page }) -export const getPageNumber = createSelector<RootState, string, number>( +export const getSortBy = createSelector<RootState, string, View | undefined, Section, SortBy | undefined>( getRouterSearch, - search => { - const page = getURLParam(search, 'page') - return page === null || isNaN(+page) ? 1 : +page + getView, + getSection, + (search, view, section) => { + return getURLParam<SortBy>(search, 'sortBy') || getDefaultOptionsByView(view, section).sortBy } ) -export const getSortBy = createSelector< - RootState, - string, - View | undefined, - Section, - SortBy | undefined ->(getRouterSearch, getView, getSection, (search, view, section) => { - return ( - getURLParam<SortBy>(search, 'sortBy') || - getDefaultOptionsByView(view, section).sortBy - ) -}) - -export const getOnlyOnSale = createSelector< - RootState, - string, - View | undefined, - Section | undefined, - boolean | undefined ->(getRouterSearch, getView, getSection, (search, view, section) => { - const onlyOnSale = getURLParam(search, 'onlyOnSale') - switch (onlyOnSale) { - case 'true': - return true - case 'false': - return false - default: - return isLandSection(section) - ? undefined - : getDefaultOptionsByView(view, section).onlyOnSale! +export const getOnlyOnSale = createSelector<RootState, string, View | undefined, Section | undefined, boolean | undefined>( + getRouterSearch, + getView, + getSection, + (search, view, section) => { + const onlyOnSale = getURLParam(search, 'onlyOnSale') + switch (onlyOnSale) { + case 'true': + return true + case 'false': + return false + default: + return isLandSection(section) ? undefined : getDefaultOptionsByView(view, section).onlyOnSale! + } } -}) +) -export const getOnlyOnRent = createSelector< - RootState, - string, - boolean | undefined ->(getRouterSearch, search => { +export const getOnlyOnRent = createSelector<RootState, string, boolean | undefined>(getRouterSearch, search => { const onlyOnRent = getURLParam(search, 'onlyOnRent') switch (onlyOnRent) { case 'true': @@ -176,210 +137,150 @@ export const getAllSortByOptions = () => ({ } }) -export const getStatus = createSelector<RootState, string, string>( - getRouterSearch, - search => getURLParam(search, 'status') || '' -) +export const getStatus = createSelector<RootState, string, string>(getRouterSearch, search => getURLParam(search, 'status') || '') -export const getSortByOptions = createSelector< - RootState, - boolean | undefined, - boolean | undefined, - string, - SortByOption[] ->(getOnlyOnRent, getOnlyOnSale, getStatus, (onlyOnRent, onlyOnSale, status) => { - const SORT_BY_MAP = getAllSortByOptions() - let orderByDropdownOptions: SortByOption[] = [] - if (status) { - const baseFilters = [ - SORT_BY_MAP[SortBy.NEWEST], - SORT_BY_MAP[SortBy.RECENTLY_LISTED], - SORT_BY_MAP[SortBy.RECENTLY_SOLD], - SORT_BY_MAP[SortBy.CHEAPEST], - SORT_BY_MAP[SortBy.MOST_EXPENSIVE] - ] - switch (status) { - case AssetStatusFilter.ON_SALE: - case AssetStatusFilter.ONLY_MINTING: - case AssetStatusFilter.ONLY_LISTING: - orderByDropdownOptions = baseFilters - break - case AssetStatusFilter.NOT_FOR_SALE: - orderByDropdownOptions = [SORT_BY_MAP[SortBy.NEWEST]] - break +export const getSortByOptions = createSelector<RootState, boolean | undefined, boolean | undefined, string, SortByOption[]>( + getOnlyOnRent, + getOnlyOnSale, + getStatus, + (onlyOnRent, onlyOnSale, status) => { + const SORT_BY_MAP = getAllSortByOptions() + let orderByDropdownOptions: SortByOption[] = [] + if (status) { + const baseFilters = [ + SORT_BY_MAP[SortBy.NEWEST], + SORT_BY_MAP[SortBy.RECENTLY_LISTED], + SORT_BY_MAP[SortBy.RECENTLY_SOLD], + SORT_BY_MAP[SortBy.CHEAPEST], + SORT_BY_MAP[SortBy.MOST_EXPENSIVE] + ] + switch (status) { + case AssetStatusFilter.ON_SALE: + case AssetStatusFilter.ONLY_MINTING: + case AssetStatusFilter.ONLY_LISTING: + orderByDropdownOptions = baseFilters + break + case AssetStatusFilter.NOT_FOR_SALE: + orderByDropdownOptions = [SORT_BY_MAP[SortBy.NEWEST]] + break + } + return orderByDropdownOptions + } + if (onlyOnRent) { + orderByDropdownOptions = [ + { + value: SortBy.RENTAL_LISTING_DATE, + text: t('filters.recently_listed_for_rent') + }, + { value: SortBy.NAME, text: t('filters.name') }, + { value: SortBy.NEWEST, text: t('filters.newest') }, + { value: SortBy.MAX_RENTAL_PRICE, text: t('filters.cheapest') } + ] + } else { + orderByDropdownOptions = [ + { value: SortBy.NEWEST, text: t('filters.newest') }, + { value: SortBy.NAME, text: t('filters.name') } + ] } - return orderByDropdownOptions - } - if (onlyOnRent) { - orderByDropdownOptions = [ - { - value: SortBy.RENTAL_LISTING_DATE, - text: t('filters.recently_listed_for_rent') - }, - { value: SortBy.NAME, text: t('filters.name') }, - { value: SortBy.NEWEST, text: t('filters.newest') }, - { value: SortBy.MAX_RENTAL_PRICE, text: t('filters.cheapest') } - ] - } else { - orderByDropdownOptions = [ - { value: SortBy.NEWEST, text: t('filters.newest') }, - { value: SortBy.NAME, text: t('filters.name') } - ] - } - if (onlyOnSale) { - orderByDropdownOptions = [ - { - value: SortBy.RECENTLY_LISTED, - text: t('filters.recently_listed') - }, - { - value: SortBy.RECENTLY_SOLD, - text: t('filters.recently_sold') - }, - { - value: SortBy.CHEAPEST, - text: t('filters.cheapest') - }, - ...orderByDropdownOptions - ] - } + if (onlyOnSale) { + orderByDropdownOptions = [ + { + value: SortBy.RECENTLY_LISTED, + text: t('filters.recently_listed') + }, + { + value: SortBy.RECENTLY_SOLD, + text: t('filters.recently_sold') + }, + { + value: SortBy.CHEAPEST, + text: t('filters.cheapest') + }, + ...orderByDropdownOptions + ] + } - return orderByDropdownOptions -}) + return orderByDropdownOptions + } +) -export const getIsSoldOut = createSelector< - RootState, - string, - boolean | undefined ->(getRouterSearch, search => { +export const getIsSoldOut = createSelector<RootState, string, boolean | undefined>(getRouterSearch, search => { const isSoldOut = getURLParam(search, 'isSoldOut') return isSoldOut === 'true' }) -export const getIsMap = createSelector<RootState, string, boolean | undefined>( - getRouterSearch, - search => { - const isMap = getURLParam(search, 'isMap') - return isMap === null ? undefined : isMap === 'true' - } -) +export const getIsMap = createSelector<RootState, string, boolean | undefined>(getRouterSearch, search => { + const isMap = getURLParam(search, 'isMap') + return isMap === null ? undefined : isMap === 'true' +}) + +export const getItemId = createSelector<RootState, string, string | undefined>(getRouterSearch, search => { + const itemId = getURLParam(search, 'itemId') + return itemId ? itemId : undefined +}) -export const getItemId = createSelector<RootState, string, string | undefined>( +export const getIsFullscreen = createSelector<RootState, string, boolean | undefined, boolean | undefined>( getRouterSearch, - search => { - const itemId = getURLParam(search, 'itemId') - return itemId ? itemId : undefined + getIsMap, + (search, isMap) => { + const isFullscreen = getURLParam(search, 'isFullscreen') + return isFullscreen === null ? undefined : isMap && isFullscreen === 'true' } ) -export const getIsFullscreen = createSelector< - RootState, - string, - boolean | undefined, - boolean | undefined ->(getRouterSearch, getIsMap, (search, isMap) => { - const isFullscreen = getURLParam(search, 'isFullscreen') - return isFullscreen === null ? undefined : isMap && isFullscreen === 'true' -}) - -export const getRarities = createSelector<RootState, string, Rarity[]>( - getRouterSearch, - search => - getURLParamArray_nonStandard<Rarity>( - search, - 'rarities', - Object.values(Rarity).filter( - value => typeof value === 'string' - ) as string[] - ) +export const getRarities = createSelector<RootState, string, Rarity[]>(getRouterSearch, search => + getURLParamArray_nonStandard<Rarity>(search, 'rarities', Object.values(Rarity).filter(value => typeof value === 'string') as string[]) ) -export const getWearableGenders = createSelector< - RootState, - string, - GenderFilterOption[] ->(getRouterSearch, search => - getURLParamArray_nonStandard<GenderFilterOption>( - search, - 'genders', - Object.values(GenderFilterOption) - ) +export const getWearableGenders = createSelector<RootState, string, GenderFilterOption[]>(getRouterSearch, search => + getURLParamArray_nonStandard<GenderFilterOption>(search, 'genders', Object.values(GenderFilterOption)) ) export const getContracts = createSelector<RootState, string, string[]>( getRouterSearch, - search => - getURLParam<string>(search, 'contracts')?.split( - SEARCH_ARRAY_PARAM_SEPARATOR - ) || [] + search => getURLParam<string>(search, 'contracts')?.split(SEARCH_ARRAY_PARAM_SEPARATOR) || [] ) -export const getCreators = createSelector<RootState, string, string[]>( - getRouterSearch, - search => getURLParamArray<string>(search, 'creators') +export const getCreators = createSelector<RootState, string, string[]>(getRouterSearch, search => + getURLParamArray<string>(search, 'creators') ) -export const getSearch = createSelector<RootState, string, string>( - getRouterSearch, - search => getURLParam(search, 'search') || '' -) +export const getSearch = createSelector<RootState, string, string>(getRouterSearch, search => getURLParam(search, 'search') || '') -export const getNetwork = createSelector< - RootState, - string, - Network | undefined ->( +export const getNetwork = createSelector<RootState, string, Network | undefined>( getRouterSearch, search => (getURLParam(search, 'network') as Network) || undefined ) -export const getAssetType = createSelector< - RootState, - string, - string, - VendorName, - AssetType ->(getRouterSearch, getPathName, getVendor, (search, pathname, vendor) => { - let assetTypeParam = getURLParam(search, 'assetType') ?? '' - - if (!assetTypeParam || !(assetTypeParam.toUpperCase() in AssetType)) { - if (vendor === VendorName.DECENTRALAND && pathname === locations.browse()) { - return AssetType.ITEM - } +export const getAssetType = createSelector<RootState, string, string, VendorName, AssetType>( + getRouterSearch, + getPathName, + getVendor, + (search, pathname, vendor) => { + const assetTypeParam = getURLParam(search, 'assetType') ?? '' + + if (!assetTypeParam || !(assetTypeParam.toUpperCase() in AssetType)) { + if (vendor === VendorName.DECENTRALAND && pathname === locations.browse()) { + return AssetType.ITEM + } - return AssetType.NFT + return AssetType.NFT + } + return assetTypeParam as AssetType } - return assetTypeParam as AssetType -}) +) -export const getEmotePlayMode = createSelector< - RootState, - string, - EmotePlayMode[] | undefined ->( +export const getEmotePlayMode = createSelector<RootState, string, EmotePlayMode[] | undefined>( getRouterSearch, - search => - getURLParamArray<EmotePlayMode>(search, 'emotePlayMode') || undefined + search => getURLParamArray<EmotePlayMode>(search, 'emotePlayMode') || undefined ) -export const getViewAsGuest = createSelector< - RootState, - string, - boolean | undefined ->(getRouterSearch, search => - getURLParam(search, 'viewAsGuest') - ? getURLParam(search, 'viewAsGuest') === 'true' - : undefined +export const getViewAsGuest = createSelector<RootState, string, boolean | undefined>(getRouterSearch, search => + getURLParam(search, 'viewAsGuest') ? getURLParam(search, 'viewAsGuest') === 'true' : undefined ) -export const getOnlySmart = createSelector< - RootState, - string, - boolean | undefined ->(getRouterSearch, search => - getURLParam(search, 'onlySmart') - ? getURLParam(search, 'onlySmart') === 'true' - : undefined +export const getOnlySmart = createSelector<RootState, string, boolean | undefined>(getRouterSearch, search => + getURLParam(search, 'onlySmart') ? getURLParam(search, 'onlySmart') === 'true' : undefined ) export const getMinPrice = createSelector<RootState, string, string>( @@ -402,12 +303,8 @@ export const getMaxEstateSize = createSelector<RootState, string, string>( search => (getURLParam(search, 'maxEstateSize') as string) || '' ) -export const getRentalDays = createSelector<RootState, string, number[]>( - getRouterSearch, - search => - getURLParamArray(search, 'rentalDays').map(value => - Number.parseInt(value) - ) as number[] +export const getRentalDays = createSelector<RootState, string, number[]>(getRouterSearch, search => + getURLParamArray(search, 'rentalDays').map(value => Number.parseInt(value)) ) export const getMinDistanceToPlaza = createSelector<RootState, string, string>( @@ -435,13 +332,7 @@ export const getEmoteHasGeometry = createSelector<RootState, string, boolean>( search => getURLParam(search, 'emoteHasGeometry') === 'true' ) -export const getCurrentLocationAddress = createSelector< - RootState, - string, - string | undefined, - string | undefined, - string | undefined ->( +export const getCurrentLocationAddress = createSelector<RootState, string, string | undefined, string | undefined, string | undefined>( getPathName, getWalletAddress, getAccountAddress, @@ -458,12 +349,11 @@ export const getCurrentLocationAddress = createSelector< } ) -export const getPaginationUrlParams = createSelector( - getPageNumber, - getSortBy, - getSearch, - (page, sortBy, search) => ({ page, sortBy, search }) -) +export const getPaginationUrlParams = createSelector(getPageNumber, getSortBy, getSearch, (page, sortBy, search) => ({ + page, + sortBy, + search +})) export const getAssetsUrlParams = createSelector( getOnlyOnSale, @@ -493,16 +383,7 @@ export const getLandsUrlParams = createSelector( getMaxDistanceToPlaza, getAdjacentToRoad, getRentalDays, - ( - isMap, - isFullscreen, - minEstateSize, - maxEstateSize, - minDistanceToPlaza, - maxDistanceToPlaza, - adjacentToRoad, - rentalDays - ) => ({ + (isMap, isFullscreen, minEstateSize, maxEstateSize, minDistanceToPlaza, maxDistanceToPlaza, adjacentToRoad, rentalDays) => ({ isMap, isFullscreen, minEstateSize, @@ -522,15 +403,7 @@ export const getWearablesUrlParams = createSelector( getMinPrice, getMaxPrice, getStatus, - ( - rarities, - wearableGenders, - view, - viewAsGuest, - minPrice, - maxPrice, - status - ) => ({ + (rarities, wearableGenders, view, viewAsGuest, minPrice, maxPrice, status) => ({ rarities, wearableGenders, view, @@ -592,22 +465,15 @@ export const getCurrentBrowseOptions = createSelector( ...wearablesUrlParams, onlyOnRent, onlyOnSale - } as BrowseOptions) + }) as BrowseOptions ) -export const getCurrentSearch = createSelector( - [getAssetsUrlParams], - AssetsUrlParams => { - const { search } = AssetsUrlParams - return search - } -) +export const getCurrentSearch = createSelector([getAssetsUrlParams], AssetsUrlParams => { + const { search } = AssetsUrlParams + return search +}) -export const hasFiltersEnabled = createSelector< - RootState, - BrowseOptions, - boolean ->(getCurrentBrowseOptions, browseOptions => { +export const hasFiltersEnabled = createSelector<RootState, BrowseOptions, boolean>(getCurrentBrowseOptions, browseOptions => { const { network, wearableGenders, @@ -677,86 +543,66 @@ export const hasFiltersEnabled = createSelector< ) }) -export const getIsBuyWithCardPage = createSelector<RootState, string, boolean>( - getRouterSearch, - search => { - const withCard = getURLParam(search, 'withCard') - return withCard !== null && withCard === 'true' - } -) +export const getIsBuyWithCardPage = createSelector<RootState, string, boolean>(getRouterSearch, search => { + const withCard = getURLParam(search, 'withCard') + return withCard !== null && withCard === 'true' +}) const buildExactMatchProps = (path: string) => { return { path, exact: true } } -export const getPageName = createSelector<RootState, string, PageName>( - getPathName, - pathname => { - if (pathname === '/') { - return PageName.HOME - } else if ( - matchPath( - pathname, - buildExactMatchProps(locations.manage('anAddress', 'anId')) - ) - ) { - return PageName.MANAGE_NFT - } else if ( - matchPath(pathname, buildExactMatchProps(locations.buy(AssetType.NFT))) - ) { - return PageName.BUY_NFT - } else if ( - matchPath(pathname, buildExactMatchProps(locations.buy(AssetType.ITEM))) - ) { - return PageName.BUY_ITEM - } else if ( - matchPath( - pathname, - buildExactMatchProps(locations.buyStatusPage(AssetType.NFT)) - ) - ) { - return PageName.BUY_NFT_STATUS - } else if (matchPath(pathname, locations.buyStatusPage(AssetType.ITEM))) { - return PageName.BUY_ITEM_STATUS - } else if (matchPath(pathname, locations.cancel())) { - return PageName.CANCEL_NFT_SALE - } else if (matchPath(pathname, locations.transfer())) { - return PageName.TRANSFER_NFT - } else if (matchPath(pathname, locations.bid())) { - return PageName.BID_NFT - } else if (matchPath(pathname, locations.signIn())) { - return PageName.SIGN_IN - } else if (matchPath(pathname, locations.settings())) { - return PageName.SETTINGS - } else if (matchPath(pathname, locations.lands())) { - return PageName.LANDS - } else if (matchPath(pathname, locations.names())) { - return PageName.NAMES - } else if (matchPath(pathname, locations.collection())) { - return PageName.COLLECTION - } else if (matchPath(pathname, locations.browse())) { - return PageName.BROWSE - } else if (matchPath(pathname, locations.campaign())) { - return PageName.CAMPAIGN - } else if (matchPath(pathname, locations.currentAccount())) { - return PageName.ACCOUNT - } else if (matchPath(pathname, locations.list())) { - return PageName.LIST - } else if (matchPath(pathname, locations.lists())) { - return PageName.LISTS - } else if (matchPath(pathname, locations.account())) { - return PageName.ACCOUNTS - } else if (matchPath(pathname, locations.nft())) { - return PageName.NFT_DETAIL - } else if (matchPath(pathname, locations.item())) { - return PageName.ITEM_DETAIL - } else if (matchPath(pathname, locations.parcel())) { - return PageName.PARCEL_DETAIL - } else if (matchPath(pathname, locations.estate())) { - return PageName.ESTATE_DETAIL - } else if (matchPath(pathname, locations.activity())) { - return PageName.ACTIVITY - } - throw new Error('Unknown page') +export const getPageName = createSelector<RootState, string, PageName>(getPathName, pathname => { + if (pathname === '/') { + return PageName.HOME + } else if (matchPath(pathname, buildExactMatchProps(locations.manage('anAddress', 'anId')))) { + return PageName.MANAGE_NFT + } else if (matchPath(pathname, buildExactMatchProps(locations.buy(AssetType.NFT)))) { + return PageName.BUY_NFT + } else if (matchPath(pathname, buildExactMatchProps(locations.buy(AssetType.ITEM)))) { + return PageName.BUY_ITEM + } else if (matchPath(pathname, buildExactMatchProps(locations.buyStatusPage(AssetType.NFT)))) { + return PageName.BUY_NFT_STATUS + } else if (matchPath(pathname, locations.buyStatusPage(AssetType.ITEM))) { + return PageName.BUY_ITEM_STATUS + } else if (matchPath(pathname, locations.cancel())) { + return PageName.CANCEL_NFT_SALE + } else if (matchPath(pathname, locations.transfer())) { + return PageName.TRANSFER_NFT + } else if (matchPath(pathname, locations.bid())) { + return PageName.BID_NFT + } else if (matchPath(pathname, locations.signIn())) { + return PageName.SIGN_IN + } else if (matchPath(pathname, locations.settings())) { + return PageName.SETTINGS + } else if (matchPath(pathname, locations.lands())) { + return PageName.LANDS + } else if (matchPath(pathname, locations.names())) { + return PageName.NAMES + } else if (matchPath(pathname, locations.collection())) { + return PageName.COLLECTION + } else if (matchPath(pathname, locations.browse())) { + return PageName.BROWSE + } else if (matchPath(pathname, locations.campaign())) { + return PageName.CAMPAIGN + } else if (matchPath(pathname, locations.currentAccount())) { + return PageName.ACCOUNT + } else if (matchPath(pathname, locations.list())) { + return PageName.LIST + } else if (matchPath(pathname, locations.lists())) { + return PageName.LISTS + } else if (matchPath(pathname, locations.account())) { + return PageName.ACCOUNTS + } else if (matchPath(pathname, locations.nft())) { + return PageName.NFT_DETAIL + } else if (matchPath(pathname, locations.item())) { + return PageName.ITEM_DETAIL + } else if (matchPath(pathname, locations.parcel())) { + return PageName.PARCEL_DETAIL + } else if (matchPath(pathname, locations.estate())) { + return PageName.ESTATE_DETAIL + } else if (matchPath(pathname, locations.activity())) { + return PageName.ACTIVITY } -) + throw new Error('Unknown page') +}) diff --git a/webapp/src/modules/routing/types.ts b/webapp/src/modules/routing/types.ts index 8351e15da4..335f203d35 100644 --- a/webapp/src/modules/routing/types.ts +++ b/webapp/src/modules/routing/types.ts @@ -1,12 +1,4 @@ -import { - EmotePlayMode, - Network, - NFTCategory, - Rarity, - RentalStatus, - WearableGender, - GenderFilterOption -} from '@dcl/schemas' +import { EmotePlayMode, Network, NFTCategory, Rarity, RentalStatus, WearableGender, GenderFilterOption } from '@dcl/schemas' import { AssetStatusFilter } from '../../utils/filters' import { AssetType } from '../asset/types' import { VendorName } from '../vendor/types' diff --git a/webapp/src/modules/routing/utils.spec.ts b/webapp/src/modules/routing/utils.spec.ts index 7e93692f17..d75aec3615 100644 --- a/webapp/src/modules/routing/utils.spec.ts +++ b/webapp/src/modules/routing/utils.spec.ts @@ -2,18 +2,11 @@ import { AssetStatusFilter } from '../../utils/filters' import { Section } from '../vendor/decentraland/routing' import { getPersistedIsMapProperty } from '../ui/utils' import { View } from '../ui/types' -import { - CATALOG_VIEWS, - getClearedBrowseOptions, - isCatalogView, - isMapSet -} from './utils' +import { CATALOG_VIEWS, getClearedBrowseOptions, isCatalogView, isMapSet } from './utils' import { BrowseOptions } from './types' jest.mock('../ui/utils') -const mockedGetPersistedIsMapProperty = (getPersistedIsMapProperty as unknown) as jest.MockedFunction< - typeof getPersistedIsMapProperty -> +const mockedGetPersistedIsMapProperty = getPersistedIsMapProperty as unknown as jest.MockedFunction<typeof getPersistedIsMapProperty> describe('when checking if the map is set', () => { let isMap: boolean | undefined diff --git a/webapp/src/modules/routing/utils.ts b/webapp/src/modules/routing/utils.ts index 814979f962..043d049cb0 100644 --- a/webapp/src/modules/routing/utils.ts +++ b/webapp/src/modules/routing/utils.ts @@ -2,11 +2,7 @@ import { NFTCategory } from '@dcl/schemas' import { BrowseOptions, SortBy } from './types' import { Section } from '../vendor/decentraland' import { AssetStatusFilter } from '../../utils/filters' -import { - getPersistedIsMapProperty, - isAccountView, - isLandSection -} from '../ui/utils' +import { getPersistedIsMapProperty, isAccountView, isLandSection } from '../ui/utils' import { omit, reset } from '../../lib/utils' import { View } from '../ui/types' import { getCategoryFromSection, getSearchParams } from './search' @@ -49,25 +45,16 @@ export function isCatalogViewWithStatusFilter(view: View | undefined) { return view && view === View.MARKET } -export function isCatalogViewAndSection( - view: View | undefined, - section: Section | undefined -) { +export function isCatalogViewAndSection(view: View | undefined, section: Section | undefined) { return ( view && CATALOG_VIEWS.includes(view) && section && - [getCategoryFromSection(section)].some( - category => - category === NFTCategory.EMOTE || category === NFTCategory.WEARABLE - ) + [getCategoryFromSection(section)].some(category => category === NFTCategory.EMOTE || category === NFTCategory.WEARABLE) ) } -export function buildBrowseURL( - pathname: string, - browseOptions: BrowseOptions -): string { +export function buildBrowseURL(pathname: string, browseOptions: BrowseOptions): string { let params: URLSearchParams | undefined if (browseOptions.section === Section.ON_SALE) { params = getSearchParams({ section: Section.ON_SALE }) @@ -78,27 +65,18 @@ export function buildBrowseURL( return params ? `${pathname}?${params.toString()}` : pathname } -export function isMapSet( - isMap: boolean | undefined, - section: Section, - view: View | undefined -): boolean { +export function isMapSet(isMap: boolean | undefined, section: Section, view: View | undefined): boolean { const isMapPropertyPersisted = getPersistedIsMapProperty() return ( isMap ?? - (section === Section.LAND && - (view === undefined || (view && !isAccountView(view))) && - isMapPropertyPersisted !== null - ? isMapPropertyPersisted! + (section === Section.LAND && (view === undefined || (view && !isAccountView(view))) && isMapPropertyPersisted !== null + ? isMapPropertyPersisted : false) ) } -export function getClearedBrowseOptions( - browseOptions: BrowseOptions, - fillWithUndefined = false -): BrowseOptions { +export function getClearedBrowseOptions(browseOptions: BrowseOptions, fillWithUndefined = false): BrowseOptions { const keys = [ 'rarities', 'wearableGenders', @@ -126,9 +104,7 @@ export function getClearedBrowseOptions( 'emoteHasGeometry' ] - const clearedBrowseOptions = fillWithUndefined - ? reset(browseOptions, keys) - : omit(browseOptions, keys) + const clearedBrowseOptions = fillWithUndefined ? reset(browseOptions, keys) : omit(browseOptions, keys) // The status as only on sale filter is ON by default. The clear should remove it if it's off so it's back on (default state) if ( diff --git a/webapp/src/modules/sagas.ts b/webapp/src/modules/sagas.ts index f00121f0ce..e6ab145b67 100644 --- a/webapp/src/modules/sagas.ts +++ b/webapp/src/modules/sagas.ts @@ -45,8 +45,7 @@ import { loginSaga } from './login/sagas' import { ensSaga } from './ens/sagas' const analyticsSaga = createAnalyticsSaga() -const profileSaga = (getIdentity: () => AuthIdentity | undefined) => - createProfileSaga({ getIdentity, peerUrl }) +const profileSaga = (getIdentity: () => AuthIdentity | undefined) => createProfileSaga({ getIdentity, peerUrl }) const lambdasClient = createLambdasClient({ url: `${peerUrl}/lambdas`, fetcher: createFetchComponent() diff --git a/webapp/src/modules/sale/actions.ts b/webapp/src/modules/sale/actions.ts index f3b792dab7..e49fa6cc8c 100644 --- a/webapp/src/modules/sale/actions.ts +++ b/webapp/src/modules/sale/actions.ts @@ -5,12 +5,9 @@ export const FETCH_SALES_REQUEST = '[Request] Fetch sales' export const FETCH_SALES_SUCCESS = '[Success] Fetch sales' export const FETCH_SALES_FAILURE = '[Failure] Fetch sales' -export const fetchSalesRequest = (filters: SaleFilters) => - action(FETCH_SALES_REQUEST, { filters }) -export const fetchSalesSuccess = (sales: Sale[], count: number) => - action(FETCH_SALES_SUCCESS, { sales, count }) -export const fetchSalesFailure = (error: string) => - action(FETCH_SALES_FAILURE, { error }) +export const fetchSalesRequest = (filters: SaleFilters) => action(FETCH_SALES_REQUEST, { filters }) +export const fetchSalesSuccess = (sales: Sale[], count: number) => action(FETCH_SALES_SUCCESS, { sales, count }) +export const fetchSalesFailure = (error: string) => action(FETCH_SALES_FAILURE, { error }) export type FetchSalesRequestAction = ReturnType<typeof fetchSalesRequest> export type FetchSalesSuccessAction = ReturnType<typeof fetchSalesSuccess> diff --git a/webapp/src/modules/sale/reducer.ts b/webapp/src/modules/sale/reducer.ts index ef32396992..352e3523db 100644 --- a/webapp/src/modules/sale/reducer.ts +++ b/webapp/src/modules/sale/reducer.ts @@ -1,8 +1,5 @@ import { Sale } from '@dcl/schemas' -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchSalesFailureAction, FetchSalesRequestAction, @@ -26,15 +23,9 @@ export const INITIAL_STATE: SaleState = { error: null } -type SaleReducerAction = - | FetchSalesRequestAction - | FetchSalesSuccessAction - | FetchSalesFailureAction +type SaleReducerAction = FetchSalesRequestAction | FetchSalesSuccessAction | FetchSalesFailureAction -export function saleReducer( - state = INITIAL_STATE, - action: SaleReducerAction -): SaleState { +export function saleReducer(state = INITIAL_STATE, action: SaleReducerAction): SaleState { switch (action.type) { case FETCH_SALES_REQUEST: return { @@ -47,10 +38,13 @@ export function saleReducer( ...state, loading: loadingReducer(state.loading, action), error: null, - data: sales.reduce((acc, sale) => { - acc[sale.id] = sale - return acc - }, {} as Record<string, Sale>), + data: sales.reduce( + (acc, sale) => { + acc[sale.id] = sale + return acc + }, + {} as Record<string, Sale> + ), count } case FETCH_SALES_FAILURE: diff --git a/webapp/src/modules/sale/sagas.ts b/webapp/src/modules/sale/sagas.ts index ff5e2217f2..cf9b193d57 100644 --- a/webapp/src/modules/sale/sagas.ts +++ b/webapp/src/modules/sale/sagas.ts @@ -3,12 +3,7 @@ import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { isErrorWithMessage } from '../../lib/error' import { saleAPI } from '../vendor/decentraland' import { SaleResponse } from '../vendor/decentraland/sale/types' -import { - fetchSalesFailure, - FetchSalesRequestAction, - fetchSalesSuccess, - FETCH_SALES_REQUEST -} from './actions' +import { fetchSalesFailure, FetchSalesRequestAction, fetchSalesSuccess, FETCH_SALES_REQUEST } from './actions' export function* saleSaga() { yield takeEvery(FETCH_SALES_REQUEST, handleFetchSalesRequest) @@ -18,17 +13,10 @@ export function* handleFetchSalesRequest(action: FetchSalesRequestAction) { const { filters } = action.payload try { - const { data: sales, total }: SaleResponse = yield call( - [saleAPI, saleAPI.fetch], - filters - ) + const { data: sales, total }: SaleResponse = yield call([saleAPI, saleAPI.fetch], filters) yield put(fetchSalesSuccess(sales, total)) } catch (error) { - yield put( - fetchSalesFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchSalesFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } diff --git a/webapp/src/modules/sale/selectors.ts b/webapp/src/modules/sale/selectors.ts index 0eaa61a6b8..39e046f551 100644 --- a/webapp/src/modules/sale/selectors.ts +++ b/webapp/src/modules/sale/selectors.ts @@ -8,10 +8,6 @@ export const getCount = (state: RootState) => getState(state).count export const getLoading = (state: RootState) => getState(state).loading export const getError = (state: RootState) => getState(state).error -export const getSales = createSelector< - RootState, - ReturnType<typeof getData>, - Sale[] ->(getData, data => { +export const getSales = createSelector<RootState, ReturnType<typeof getData>, Sale[]>(getData, data => { return Object.values(data) }) diff --git a/webapp/src/modules/store.ts b/webapp/src/modules/store.ts index 960f06cd7d..bc63d6d5c1 100644 --- a/webapp/src/modules/store.ts +++ b/webapp/src/modules/store.ts @@ -19,9 +19,7 @@ import { getCurrentIdentity } from './identity/selectors' import { AuthIdentity } from 'decentraland-crypto-fetch' import { createMemoryHistory, createBrowserHistory, History } from 'history' -const basename = /^decentraland.(zone|org|today)$/.test(window.location.host) - ? '/marketplace' - : undefined +const basename = /^decentraland.(zone|org|today)$/.test(window.location.host) ? '/marketplace' : undefined export const createHistory = () => createBrowserHistory({ basename }) @@ -57,9 +55,7 @@ export function initStore(history: History) { actions: [CLEAR_TRANSACTIONS, ARCHIVE_BID, UNARCHIVE_BID, SET_IS_TRYING_ON], // array of actions types that will trigger a SAVE (optional) migrations: {} // migration object that will migrate your localstorage (optional) }) - const analyticsMiddleware = createAnalyticsMiddleware( - config.get('SEGMENT_API_KEY')! - ) + const analyticsMiddleware = createAnalyticsMiddleware(config.get('SEGMENT_API_KEY')) const middleware = applyMiddleware( sagasMiddleware, @@ -70,14 +66,9 @@ export function initStore(history: History) { analyticsMiddleware ) const enhancer = composeEnhancers(middleware) - const store = createStore( - (rootReducer as unknown) as ReturnType<typeof createRootReducer>, - enhancer - ) + const store = createStore(rootReducer as unknown as ReturnType<typeof createRootReducer>, enhancer) const getIdentity = () => { - return ( - (getCurrentIdentity(store.getState()) as AuthIdentity | null) ?? undefined - ) + return (getCurrentIdentity(store.getState()) as AuthIdentity | null) ?? undefined } sagasMiddleware.run(rootSaga, getIdentity) loadStorageMiddleware(store) @@ -108,12 +99,7 @@ export function initTestStore(preloadedState = {}) { migrations: {} // migration object that will migrate your localstorage (optional) }) - const middleware = applyMiddleware( - sagasMiddleware, - routerMiddleware(testHistory), - transactionMiddleware, - storageMiddleware - ) + const middleware = applyMiddleware(sagasMiddleware, routerMiddleware(testHistory), transactionMiddleware, storageMiddleware) const enhancer = compose(middleware) const store = createStore(rootReducer, preloadedState, enhancer) sagasMiddleware.run(rootSaga, () => undefined) diff --git a/webapp/src/modules/store/actions.ts b/webapp/src/modules/store/actions.ts index fe15db3537..767b7582f7 100644 --- a/webapp/src/modules/store/actions.ts +++ b/webapp/src/modules/store/actions.ts @@ -7,12 +7,9 @@ export const FETCH_STORE_REQUEST = '[Request] Fetch store' export const FETCH_STORE_SUCCESS = '[Success] Fetch store' export const FETCH_STORE_FAILURE = '[Failure] Fetch store' -export const fetchStoreRequest = (address: string) => - action(FETCH_STORE_REQUEST, { address }) -export const fetchStoreSuccess = (store?: Store) => - action(FETCH_STORE_SUCCESS, { store }) -export const fetchStoreFailure = (error: string) => - action(FETCH_STORE_FAILURE, { error }) +export const fetchStoreRequest = (address: string) => action(FETCH_STORE_REQUEST, { address }) +export const fetchStoreSuccess = (store?: Store) => action(FETCH_STORE_SUCCESS, { store }) +export const fetchStoreFailure = (error: string) => action(FETCH_STORE_FAILURE, { error }) export type FetchStoreRequestAction = ReturnType<typeof fetchStoreRequest> export type FetchStoreSuccessAction = ReturnType<typeof fetchStoreSuccess> @@ -24,12 +21,9 @@ export const UPDATE_STORE_REQUEST = '[Request] Update store' export const UPDATE_STORE_SUCCESS = '[Success] Update store' export const UPDATE_STORE_FAILURE = '[Failure] Update store' -export const updateStoreRequest = (store: Store) => - action(UPDATE_STORE_REQUEST, { store }) -export const updateStoreSuccess = (store: Store) => - action(UPDATE_STORE_SUCCESS, { store }) -export const updateStoreFailure = (error: string) => - action(UPDATE_STORE_FAILURE, { error }) +export const updateStoreRequest = (store: Store) => action(UPDATE_STORE_REQUEST, { store }) +export const updateStoreSuccess = (store: Store) => action(UPDATE_STORE_SUCCESS, { store }) +export const updateStoreFailure = (error: string) => action(UPDATE_STORE_FAILURE, { error }) export type UpdateStoreRequestAction = ReturnType<typeof updateStoreRequest> export type UpdateStoreSuccessAction = ReturnType<typeof updateStoreSuccess> @@ -39,8 +33,7 @@ export type UpdateStoreFailureAction = ReturnType<typeof updateStoreFailure> export const UPDATE_LOCAL_STORE = 'Update local store' -export const updateLocalStore = (store: Store | null) => - action(UPDATE_LOCAL_STORE, { store: store }) +export const updateLocalStore = (store: Store | null) => action(UPDATE_LOCAL_STORE, { store: store }) export type UpdateLocalStoreAction = ReturnType<typeof updateLocalStore> @@ -48,7 +41,6 @@ export type UpdateLocalStoreAction = ReturnType<typeof updateLocalStore> export const REVERT_LOCAL_STORE = 'Revert local store' -export const revertLocalStore = (address: string) => - action(REVERT_LOCAL_STORE, { address }) +export const revertLocalStore = (address: string) => action(REVERT_LOCAL_STORE, { address }) export type RevertLocalStoreAction = ReturnType<typeof revertLocalStore> diff --git a/webapp/src/modules/store/reducer.spec.ts b/webapp/src/modules/store/reducer.spec.ts index 5d4b477b47..475c730437 100644 --- a/webapp/src/modules/store/reducer.spec.ts +++ b/webapp/src/modules/store/reducer.spec.ts @@ -1,10 +1,4 @@ -import { - fetchStoreFailure, - fetchStoreRequest, - fetchStoreSuccess, - revertLocalStore, - updateLocalStore -} from './actions' +import { fetchStoreFailure, fetchStoreRequest, fetchStoreSuccess, revertLocalStore, updateLocalStore } from './actions' import { StoreState, storeReducer } from './reducer' import { Store } from './types' diff --git a/webapp/src/modules/store/reducer.ts b/webapp/src/modules/store/reducer.ts index d347b4075b..0568e61b67 100644 --- a/webapp/src/modules/store/reducer.ts +++ b/webapp/src/modules/store/reducer.ts @@ -1,7 +1,4 @@ -import { - loadingReducer, - LoadingState -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { loadingReducer, LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchStoreFailureAction, FetchStoreRequestAction, @@ -46,10 +43,7 @@ type StoreReducerAction = | FetchStoreSuccessAction | FetchStoreFailureAction -export function storeReducer( - state = INITIAL_STATE, - action: StoreReducerAction -): StoreState { +export function storeReducer(state = INITIAL_STATE, action: StoreReducerAction): StoreState { switch (action.type) { case FETCH_STORE_REQUEST: case UPDATE_STORE_REQUEST: { diff --git a/webapp/src/modules/store/sagas.spec.ts b/webapp/src/modules/store/sagas.spec.ts index 90a051d78b..90e1650116 100644 --- a/webapp/src/modules/store/sagas.spec.ts +++ b/webapp/src/modules/store/sagas.spec.ts @@ -6,21 +6,10 @@ import { expectSaga } from 'redux-saga-test-plan' import { call, select } from 'redux-saga/effects' import { getIdentity } from '../identity/utils' import { getAddress } from '../wallet/selectors' -import { - fetchStoreFailure, - fetchStoreRequest, - fetchStoreSuccess, - updateStoreRequest, - updateStoreSuccess -} from './actions' +import { fetchStoreFailure, fetchStoreRequest, fetchStoreSuccess, updateStoreRequest, updateStoreSuccess } from './actions' import { storeSaga } from './sagas' import { Store, StoreEntityMetadata } from './types' -import { - deployStoreEntity, - fetchStoreEntity, - getEmptyStore, - getPeerCoverUrl -} from './utils' +import { deployStoreEntity, fetchStoreEntity, getEmptyStore, getPeerCoverUrl } from './utils' jest.mock('../../lib/environment', () => ({ peerUrl: 'http://peer.com' @@ -42,12 +31,7 @@ describe('when handling the fetch of a user store', () => { const error = new Error('Failed to fetch') return expectSaga(storeSaga, mockClient) - .provide([ - [ - call(fetchStoreEntity, mockClient, mockAddress), - Promise.reject(error) - ] - ]) + .provide([[call(fetchStoreEntity, mockClient, mockAddress), Promise.reject(error)]]) .dispatch(fetchStoreRequest(mockAddress)) .put(fetchStoreFailure(error.message)) .silentRun() diff --git a/webapp/src/modules/store/sagas.ts b/webapp/src/modules/store/sagas.ts index 14a8619f93..23347a2b2a 100644 --- a/webapp/src/modules/store/sagas.ts +++ b/webapp/src/modules/store/sagas.ts @@ -18,11 +18,7 @@ import { UPDATE_STORE_REQUEST, revertLocalStore } from './actions' -import { - deployStoreEntity, - fetchStoreEntity, - getStoreFromEntity -} from './utils' +import { deployStoreEntity, fetchStoreEntity, getStoreFromEntity } from './utils' import { getIsLocalStoreDirty } from './selectors' export function* storeSaga(client: ContentClient) { @@ -30,9 +26,7 @@ export function* storeSaga(client: ContentClient) { yield takeEvery(UPDATE_STORE_REQUEST, handleUpdateStoreRequest) yield takeEvery(LOCATION_CHANGE, handleLocationChange) - function* handleLocationChange({ - payload: { location } - }: LocationChangeAction) { + function* handleLocationChange({ payload: { location } }: LocationChangeAction) { const isLocalStoreDirty: boolean = yield select(getIsLocalStoreDirty) if (!isLocalStoreDirty) { return @@ -45,33 +39,17 @@ export function* storeSaga(client: ContentClient) { } } - function* handleFetchStoreRequest({ - payload: { address } - }: FetchStoreRequestAction) { + function* handleFetchStoreRequest({ payload: { address } }: FetchStoreRequestAction) { try { - const storeEntity: Entity | null = yield call( - fetchStoreEntity, - client, - address - ) + const storeEntity: Entity | null = yield call(fetchStoreEntity, client, address) - yield put( - fetchStoreSuccess( - storeEntity ? getStoreFromEntity(storeEntity) : undefined - ) - ) + yield put(fetchStoreSuccess(storeEntity ? getStoreFromEntity(storeEntity) : undefined)) } catch (error) { - yield put( - fetchStoreFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchStoreFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } - function* handleUpdateStoreRequest({ - payload: { store } - }: UpdateStoreRequestAction) { + function* handleUpdateStoreRequest({ payload: { store } }: UpdateStoreRequestAction) { try { const identity: AuthIdentity = yield call(getIdentity) @@ -79,11 +57,7 @@ export function* storeSaga(client: ContentClient) { yield put(updateStoreSuccess(store)) } catch (error) { - yield put( - updateStoreFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(updateStoreFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } } diff --git a/webapp/src/modules/store/selectors.spec.ts b/webapp/src/modules/store/selectors.spec.ts index 4831355bf3..5dc537dde5 100644 --- a/webapp/src/modules/store/selectors.spec.ts +++ b/webapp/src/modules/store/selectors.spec.ts @@ -1,12 +1,6 @@ import { RootState } from '../reducer' import { StoreState } from './reducer' -import { - getLocalStore, - getState, - getError, - getLoading, - getData -} from './selectors' +import { getLocalStore, getState, getError, getLoading, getData } from './selectors' let state: RootState diff --git a/webapp/src/modules/store/selectors.ts b/webapp/src/modules/store/selectors.ts index ddd2a8c616..a4d32c7a2c 100644 --- a/webapp/src/modules/store/selectors.ts +++ b/webapp/src/modules/store/selectors.ts @@ -9,14 +9,10 @@ export const getLoading = (state: RootState) => getState(state).loading export const getLocalStore = (state: RootState) => getState(state).localStore export const getError = (state: RootState) => getState(state).error -export const getIsLocalStoreDirty = createSelector< - RootState, - Record<string, Store>, - Store | null, - boolean ->(getData, getLocalStore, (storeData, localStore) => { - return ( - !!localStore && - !Object.values(storeData).some(store => store === localStore) - ) -}) +export const getIsLocalStoreDirty = createSelector<RootState, Record<string, Store>, Store | null, boolean>( + getData, + getLocalStore, + (storeData, localStore) => { + return !!localStore && !Object.values(storeData).some(store => store === localStore) + } +) diff --git a/webapp/src/modules/store/utils.spec.ts b/webapp/src/modules/store/utils.spec.ts index 67d179b521..5c87874d96 100644 --- a/webapp/src/modules/store/utils.spec.ts +++ b/webapp/src/modules/store/utils.spec.ts @@ -1,13 +1,7 @@ import { Entity } from '@dcl/schemas' import { EntityVersion } from 'dcl-catalyst-commons' import { Store, StoreEntityMetadata } from './types' -import { - getPeerCoverUrl, - getStoreUrn, - getEntityMetadataFromStore, - getStoreFromEntity, - getEntityMetadataFilesFromStore -} from './utils' +import { getPeerCoverUrl, getStoreUrn, getEntityMetadataFromStore, getStoreFromEntity, getEntityMetadataFilesFromStore } from './utils' global.fetch = jest.fn() const mockFetch = fetch as jest.MockedFunction<typeof fetch> @@ -215,9 +209,7 @@ describe('when getting entity files from store', () => { it('should return a map with an entry with the store coverName as key', async () => { const result = await getEntityMetadataFilesFromStore(mockStore) - expect(result).toEqual( - new Map<string, Buffer>([['some-cover-name', expect.anything()]]) - ) + expect(result).toEqual(new Map<string, Buffer>([['some-cover-name', expect.anything()]])) }) }) }) diff --git a/webapp/src/modules/store/utils.ts b/webapp/src/modules/store/utils.ts index 5685ce107a..a360516fe2 100644 --- a/webapp/src/modules/store/utils.ts +++ b/webapp/src/modules/store/utils.ts @@ -7,14 +7,11 @@ import { EntityContentItemReference } from 'dcl-catalyst-commons' import { LinkType, Store, StoreEntityMetadata } from './types' import { peerUrl } from '../../lib/environment' -export const getPeerCoverUrl = (hash: string) => - `${peerUrl}/content/contents/${hash}` +export const getPeerCoverUrl = (hash: string) => `${peerUrl}/content/contents/${hash}` -export const getStoreUrn = (address: string) => - `urn:decentraland:off-chain:marketplace-stores:${address}` +export const getStoreUrn = (address: string) => `urn:decentraland:off-chain:marketplace-stores:${address}` -export const getPrefixedCoverName = (coverName: string) => - coverName.startsWith('cover/') ? coverName : `cover/${coverName}` +export const getPrefixedCoverName = (coverName: string) => (coverName.startsWith('cover/') ? coverName : `cover/${coverName}`) export const getEmptyStore = (props: Partial<Store> = {}): Store => ({ owner: '', @@ -43,18 +40,14 @@ export const getStoreFromEntity = (entity: Entity): Store => { const image = metadata.images.find(image => image.name === 'cover') - const reference = - image && content - ? content.find((cont: any) => cont.file === image.file) - : undefined + const reference = image && content ? content.find((cont: any) => cont.file === image.file) : undefined if (reference) { cover = getPeerCoverUrl(reference.hash) coverName = reference.file } - const getLink = (type: LinkType) => - metadata.links.find(link => link.name === type)?.url || '' + const getLink = (type: LinkType) => metadata.links.find(link => link.name === type)?.url || '' return { cover, @@ -68,9 +61,7 @@ export const getStoreFromEntity = (entity: Entity): Store => { } } -export const getEntityMetadataFromStore = ( - store: Store -): StoreEntityMetadata => { +export const getEntityMetadataFromStore = (store: Store): StoreEntityMetadata => { const links: StoreEntityMetadata['links'] = [] const pushLink = (type: LinkType) => { @@ -118,20 +109,13 @@ export const getEntityMetadataFilesFromStore = async (store: Store) => { // Requests -export const fetchStoreEntity = async ( - client: ContentClient, - address: string -): Promise<Entity | null> => { +export const fetchStoreEntity = async (client: ContentClient, address: string): Promise<Entity | null> => { const urn = getStoreUrn(address) const entities = await client.fetchEntitiesByPointers([urn]) return entities.length === 0 ? null : entities[0] } -export const deployStoreEntity = async ( - client: ContentClient, - identity: AuthIdentity, - store: Store -) => { +export const deployStoreEntity = async (client: ContentClient, identity: AuthIdentity, store: Store) => { const { owner } = store const metadata = getEntityMetadataFromStore(store) const files = await getEntityMetadataFilesFromStore(store) diff --git a/webapp/src/modules/tile/actions.ts b/webapp/src/modules/tile/actions.ts index 4000ee6121..17b5181fae 100644 --- a/webapp/src/modules/tile/actions.ts +++ b/webapp/src/modules/tile/actions.ts @@ -8,8 +8,7 @@ export const FETCH_TILES_FAILURE = '[Failure] Fetch Tiles' export const fetchTilesRequest = () => action(FETCH_TILES_REQUEST) export const fetchTilesSuccess = (tiles: Record<string, AtlasTile>, lastModified: Date) => action(FETCH_TILES_SUCCESS, { tiles, lastModified }) -export const fetchTilesFailure = (error: string) => - action(FETCH_TILES_FAILURE, { error }) +export const fetchTilesFailure = (error: string) => action(FETCH_TILES_FAILURE, { error }) export type FetchTilesRequestAction = ReturnType<typeof fetchTilesRequest> export type FetchTilesSuccessAction = ReturnType<typeof fetchTilesSuccess> diff --git a/webapp/src/modules/tile/reducer.ts b/webapp/src/modules/tile/reducer.ts index ddae7f41f6..1dd7813ce7 100644 --- a/webapp/src/modules/tile/reducer.ts +++ b/webapp/src/modules/tile/reducer.ts @@ -1,8 +1,5 @@ import { AtlasTile } from 'decentraland-ui' -import { - LoadingState, - loadingReducer -} from 'decentraland-dapps/dist/modules/loading/reducer' +import { LoadingState, loadingReducer } from 'decentraland-dapps/dist/modules/loading/reducer' import { FetchTilesRequestAction, FetchTilesSuccessAction, @@ -26,10 +23,7 @@ const INITIAL_STATE: TileState = { error: null } -type TileReducerAction = - | FetchTilesRequestAction - | FetchTilesSuccessAction - | FetchTilesFailureAction +type TileReducerAction = FetchTilesRequestAction | FetchTilesSuccessAction | FetchTilesFailureAction export function tileReducer(state = INITIAL_STATE, action: TileReducerAction) { switch (action.type) { diff --git a/webapp/src/modules/tile/sagas.ts b/webapp/src/modules/tile/sagas.ts index 9733d73c00..1686114578 100644 --- a/webapp/src/modules/tile/sagas.ts +++ b/webapp/src/modules/tile/sagas.ts @@ -2,16 +2,8 @@ import { takeEvery, call, put } from 'redux-saga/effects' import { RentalStatus } from '@dcl/schemas' import { AxiosResponse } from 'axios' import { atlasAPI } from '../../modules/vendor/decentraland' -import { - FETCH_TILES_REQUEST, - FetchTilesRequestAction, - fetchTilesSuccess, - fetchTilesFailure -} from './actions' -import { - ConnectWalletSuccessAction, - CONNECT_WALLET_SUCCESS -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { FETCH_TILES_REQUEST, FetchTilesRequestAction, fetchTilesSuccess, fetchTilesFailure } from './actions' +import { ConnectWalletSuccessAction, CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { isErrorWithMessage } from '../../lib/error' import { fetchNFTsRequest } from '../nft/actions' @@ -33,11 +25,7 @@ function* handleFetchTilesRequest(_action: FetchTilesRequestAction) { const lastModified = response.headers['last-modified'] yield put(fetchTilesSuccess(tiles, new Date(lastModified))) } catch (error) { - yield put( - fetchTilesFailure( - isErrorWithMessage(error) ? error.message : t('global.unknown_error') - ) - ) + yield put(fetchTilesFailure(isErrorWithMessage(error) ? error.message : t('global.unknown_error'))) } } @@ -53,11 +41,7 @@ function* handleConnectWalletSuccess(action: ConnectWalletSuccessAction) { }, filters: { isLand: true, - rentalStatus: [ - RentalStatus.OPEN, - RentalStatus.CANCELLED, - RentalStatus.EXECUTED - ] + rentalStatus: [RentalStatus.OPEN, RentalStatus.CANCELLED, RentalStatus.EXECUTED] } }) ) diff --git a/webapp/src/modules/tile/selectors.ts b/webapp/src/modules/tile/selectors.ts index dde0dde39b..6fbd1dcd47 100644 --- a/webapp/src/modules/tile/selectors.ts +++ b/webapp/src/modules/tile/selectors.ts @@ -9,11 +9,7 @@ export const getLoading = (state: RootState) => getState(state).loading export const getError = (state: RootState) => getState(state).error export const getLastModifiedDate = (state: RootState) => getState(state).lastModified -export const getTilesByEstateId = createSelector< - RootState, - TileState['data'], - Record<string, Tile[]> ->(getTiles, tiles => { +export const getTilesByEstateId = createSelector<RootState, TileState['data'], Record<string, Tile[]>>(getTiles, tiles => { const tilesByEstateId: Record<string, Tile[]> = {} for (const tile of Object.values(tiles) as Tile[]) { if (tile.estate_id) { diff --git a/webapp/src/modules/toast/sagas.spec.ts b/webapp/src/modules/toast/sagas.spec.ts index 2e589ac753..ea4b4d7b37 100644 --- a/webapp/src/modules/toast/sagas.spec.ts +++ b/webapp/src/modules/toast/sagas.spec.ts @@ -1,8 +1,5 @@ import { Item, Order, RentalListing } from '@dcl/schemas' -import { - hideAllToasts, - showToast -} from 'decentraland-dapps/dist/modules/toast/actions' +import { hideAllToasts, showToast } from 'decentraland-dapps/dist/modules/toast/actions' import { getState } from 'decentraland-dapps/dist/modules/toast/selectors' import { expectSaga } from 'redux-saga-test-plan' import { select } from 'redux-saga/effects' @@ -14,21 +11,10 @@ import { deleteListSuccess, updateListSuccess } from '../favorites/actions' -import { - FetchItemsFailureAction, - buyItemWithCardFailure, - fetchItemsFailure -} from '../item/actions' +import { FetchItemsFailureAction, buyItemWithCardFailure, fetchItemsFailure } from '../item/actions' import { NFT, NFTsFetchOptions } from '../nft/types' -import { - executeOrderFailure, - executeOrderWithCardFailure -} from '../order/actions' -import { - claimAssetSuccess, - removeRentalSuccess, - upsertRentalSuccess -} from '../rental/actions' +import { executeOrderFailure, executeOrderWithCardFailure } from '../order/actions' +import { claimAssetSuccess, removeRentalSuccess, upsertRentalSuccess } from '../rental/actions' import { UpsertRentalOptType } from '../rental/types' import { updateStoreSuccess } from '../store/actions' import { getEmptyStore } from '../store/utils' @@ -50,10 +36,7 @@ import { import { ItemBrowseOptions } from '../item/types' import { FetchNFTsFailureAction, fetchNFTsFailure } from '../nft/actions' import { List } from '../favorites/types' -import { - ListOfLists, - UpdateOrCreateList -} from '../vendor/decentraland/favorites/types' +import { ListOfLists, UpdateOrCreateList } from '../vendor/decentraland/favorites/types' import { toastSaga } from './sagas' import { toastDispatchableActionsChannel } from './utils' import { claimNameSuccess } from '../ens/actions' @@ -108,9 +91,7 @@ describe('when handling the success of a rental listing update', () => { it('should show a toast signaling the success of a rental listing update', () => { return expectSaga(toastSaga) .provide([[select(getState), []]]) - .put( - showToast(getUpsertRentalSuccessToast(nft, UpsertRentalOptType.EDIT)) - ) + .put(showToast(getUpsertRentalSuccessToast(nft, UpsertRentalOptType.EDIT))) .dispatch(upsertRentalSuccess(nft, rental, UpsertRentalOptType.EDIT)) .silentRun() }) @@ -120,9 +101,7 @@ describe('when handling the success of a rental listing creation', () => { it('should show a toast signaling the success of a rental listing creation', () => { return expectSaga(toastSaga) .provide([[select(getState), []]]) - .put( - showToast(getUpsertRentalSuccessToast(nft, UpsertRentalOptType.INSERT)) - ) + .put(showToast(getUpsertRentalSuccessToast(nft, UpsertRentalOptType.INSERT))) .dispatch(upsertRentalSuccess(nft, rental, UpsertRentalOptType.INSERT)) .silentRun() }) @@ -222,18 +201,15 @@ const actions: [string, FetchItemsFailureAction | FetchNFTsFailureAction][] = [ ['NFTs', fetchNFTsFailure({} as NFTsFetchOptions, error, 123456789)] ] -describe.each(actions)( - 'when handling the failure of fetching %s', - (_, action) => { - it('should show a toast signaling the failure ', () => { - return expectSaga(toastSaga) - .provide([[select(getState), []]]) - .put(showToast(getFetchAssetsFailureToast(error), 'bottom right')) - .dispatch(action) - .silentRun() - }) - } -) +describe.each(actions)('when handling the failure of fetching %s', (_, action) => { + it('should show a toast signaling the failure ', () => { + return expectSaga(toastSaga) + .provide([[select(getState), []]]) + .put(showToast(getFetchAssetsFailureToast(error), 'bottom right')) + .dispatch(action) + .silentRun() + }) +}) describe('when handling the success of a bulk pick and unpick action', () => { let item: Item @@ -252,15 +228,8 @@ describe('when handling the success of a bulk pick and unpick action', () => { return expectSaga(toastSaga) .provide([[select(getState), []]]) .put(hideAllToasts()) - .put( - showToast( - getBulkPickItemSuccessToast(item, pickedFor, unpickedFrom), - 'bottom center' - ) - ) - .dispatch( - bulkPickUnpickSuccess(item, pickedFor, unpickedFrom, true, true) - ) + .put(showToast(getBulkPickItemSuccessToast(item, pickedFor, unpickedFrom), 'bottom center')) + .dispatch(bulkPickUnpickSuccess(item, pickedFor, unpickedFrom, true, true)) .silentRun() }) }) @@ -282,15 +251,8 @@ describe('when handling the failure of a bulk pick and unpick action', () => { return expectSaga(toastSaga) .provide([[select(getState), []]]) .put(hideAllToasts()) - .put( - showToast( - getBulkPickItemFailureToast(item, pickedFor, unpickedFrom), - 'bottom center' - ) - ) - .dispatch( - bulkPickUnpickFailure(item, pickedFor, unpickedFrom, 'anErrorMessage') - ) + .put(showToast(getBulkPickItemFailureToast(item, pickedFor, unpickedFrom), 'bottom center')) + .dispatch(bulkPickUnpickFailure(item, pickedFor, unpickedFrom, 'anErrorMessage')) .silentRun() }) }) diff --git a/webapp/src/modules/toast/sagas.ts b/webapp/src/modules/toast/sagas.ts index 50991a5185..6f89db2807 100644 --- a/webapp/src/modules/toast/sagas.ts +++ b/webapp/src/modules/toast/sagas.ts @@ -1,27 +1,15 @@ import { all, takeEvery, put } from 'redux-saga/effects' import { toastSaga as baseToastSaga } from 'decentraland-dapps/dist/modules/toast/sagas' -import { - showToast, - hideAllToasts -} from 'decentraland-dapps/dist/modules/toast/actions' +import { showToast, hideAllToasts } from 'decentraland-dapps/dist/modules/toast/actions' import { UPDATE_STORE_SUCCESS } from '../store/actions' -import { - CLAIM_ASSET_SUCCESS, - REMOVE_RENTAL_SUCCESS, - UpsertRentalSuccessAction, - UPSERT_RENTAL_SUCCESS -} from '../rental/actions' +import { CLAIM_ASSET_SUCCESS, REMOVE_RENTAL_SUCCESS, UpsertRentalSuccessAction, UPSERT_RENTAL_SUCCESS } from '../rental/actions' import { BUY_ITEM_WITH_CARD_FAILURE, FETCH_ITEMS_CANCELLED_ERROR_MESSAGE, FETCH_ITEMS_FAILURE, FetchItemsFailureAction } from '../item/actions' -import { - EXECUTE_ORDER_WITH_CARD_FAILURE, - EXECUTE_ORDER_FAILURE, - ExecuteOrderFailureAction -} from '../order/actions' +import { EXECUTE_ORDER_WITH_CARD_FAILURE, EXECUTE_ORDER_FAILURE, ExecuteOrderFailureAction } from '../order/actions' import { getBulkPickItemFailureToast, getBulkPickItemSuccessToast, @@ -76,16 +64,11 @@ function* successToastSagas() { yield takeEvery(EXECUTE_ORDER_FAILURE, handleExecuteOrderFailure) yield takeEvery(FETCH_ITEMS_FAILURE, handleFetchAssetsFailure) yield takeEvery(FETCH_NFTS_FAILURE, handleFetchAssetsFailure) - yield takeEvery( - toastDispatchableActionsChannel, - handleToastTryAgainActionChannel - ) + yield takeEvery(toastDispatchableActionsChannel, handleToastTryAgainActionChannel) yield takeEvery(BULK_PICK_SUCCESS, handleBulkPickUnpickSuccess) yield takeEvery(BULK_PICK_FAILURE, handleBulkPickUnpickFailure) - function* handleToastTryAgainActionChannel( - action: DispatchableFromToastActions - ) { + function* handleToastTryAgainActionChannel(action: DispatchableFromToastActions) { yield put(action) yield put(hideAllToasts()) } @@ -108,32 +91,19 @@ function* handleClaimLandBackSuccess() { } function* handleUpsertRentalSuccess(action: UpsertRentalSuccessAction) { - yield put( - showToast( - getUpsertRentalSuccessToast( - action.payload.nft, - action.payload.operationType - ) - ) - ) + yield put(showToast(getUpsertRentalSuccessToast(action.payload.nft, action.payload.operationType))) } function* handleUpdateListSuccess(action: UpdateListSuccessAction) { - yield put( - showToast(getUpdateListSuccessToast(action.payload.list), 'bottom center') - ) + yield put(showToast(getUpdateListSuccessToast(action.payload.list), 'bottom center')) } function* handleDeleteListSuccess(action: DeleteListSuccessAction) { - yield put( - showToast(getDeleteListSuccessToast(action.payload.list), 'bottom center') - ) + yield put(showToast(getDeleteListSuccessToast(action.payload.list), 'bottom center')) } function* handleDeleteListFailure(action: DeleteListFailureAction) { - yield put( - showToast(getDeleteListFailureToast(action.payload.list), 'bottom center') - ) + yield put(showToast(getDeleteListFailureToast(action.payload.list), 'bottom center')) } function* handleBuyNFTWithCardFailure() { @@ -147,9 +117,7 @@ function* handleExecuteOrderFailure(action: ExecuteOrderFailureAction) { } } -function* handleFetchAssetsFailure( - action: FetchItemsFailureAction | FetchNFTsFailureAction -) { +function* handleFetchAssetsFailure(action: FetchItemsFailureAction | FetchNFTsFailureAction) { const { error } = action.payload if (error !== FETCH_ITEMS_CANCELLED_ERROR_MESSAGE) { yield put(showToast(getFetchAssetsFailureToast(error), 'bottom right')) @@ -159,21 +127,11 @@ function* handleFetchAssetsFailure( function* handleBulkPickUnpickSuccess(action: BulkPickUnpickSuccessAction) { const { item, pickedFor, unpickedFrom } = action.payload yield put(hideAllToasts()) - yield put( - showToast( - getBulkPickItemSuccessToast(item, pickedFor, unpickedFrom), - 'bottom center' - ) - ) + yield put(showToast(getBulkPickItemSuccessToast(item, pickedFor, unpickedFrom), 'bottom center')) } function* handleBulkPickUnpickFailure(action: BulkPickUnpickFailureAction) { const { item, pickedFor, unpickedFrom } = action.payload yield put(hideAllToasts()) - yield put( - showToast( - getBulkPickItemFailureToast(item, pickedFor, unpickedFrom), - 'bottom center' - ) - ) + yield put(showToast(getBulkPickItemFailureToast(item, pickedFor, unpickedFrom), 'bottom center')) } diff --git a/webapp/src/modules/toast/toasts.tsx b/webapp/src/modules/toast/toasts.tsx index ac82550563..441250e70b 100644 --- a/webapp/src/modules/toast/toasts.tsx +++ b/webapp/src/modules/toast/toasts.tsx @@ -15,32 +15,16 @@ import { AssetType } from '../asset/types' import { Section } from '../vendor/decentraland' import { View } from '../ui/types' import { List } from '../favorites/types' -import { - ListOfLists, - UpdateOrCreateList -} from '../vendor/decentraland/favorites/types' +import { ListOfLists, UpdateOrCreateList } from '../vendor/decentraland/favorites/types' import { SortBy } from '../routing/types' import { VendorName } from '../vendor' import { toastDispatchableActionsChannel } from './utils' -import { - BulkPickUnpickMessageType, - BulkPickUnpickSuccessOrFailureType, - DispatchableFromToastActions -} from './types' +import { BulkPickUnpickMessageType, BulkPickUnpickSuccessOrFailureType, DispatchableFromToastActions } from './types' const DEFAULT_TIMEOUT = 6000 -const ToastCTA = ({ - action, - description -}: { - action: DispatchableFromToastActions - description: string -}) => { - const onClick = useCallback( - () => toastDispatchableActionsChannel.put(action), - [action] - ) +const ToastCTA = ({ action, description }: { action: DispatchableFromToastActions; description: string }) => { + const onClick = useCallback(() => toastDispatchableActionsChannel.put(action), [action]) return ( <Button as="a" className="no-padding" basic onClick={onClick}> {description} @@ -95,23 +79,13 @@ export function getListingRemoveSuccessToast(): Omit<Toast, 'id'> { } } -export function getUpsertRentalSuccessToast( - nft: NFT, - type: UpsertRentalOptType -): Omit<Toast, 'id'> { +export function getUpsertRentalSuccessToast(nft: NFT, type: UpsertRentalOptType): Omit<Toast, 'id'> { return { type: ToastType.INFO, - title: - type === UpsertRentalOptType.INSERT - ? t('toast.create_rental_success.title') - : t('toast.update_rental_success.title'), + title: type === UpsertRentalOptType.INSERT ? t('toast.create_rental_success.title') : t('toast.update_rental_success.title'), body: ( <div> - <p> - {type === UpsertRentalOptType.INSERT - ? t('toast.create_rental_success.body') - : t('toast.update_rental_success.body')} - </p> + <p>{type === UpsertRentalOptType.INSERT ? t('toast.create_rental_success.body') : t('toast.update_rental_success.body')}</p> <Button as={Link} to={locations.nft(nft.contractAddress, nft.tokenId)}> {t('toast.upsert_rental_success.show_listing')} </Button> @@ -146,9 +120,7 @@ export function getExecuteOrderFailureToast(): Omit<Toast, 'id'> { body: ( <p> {t('toast.meta_transaction_failure.body', { - discord_link: ( - <a href={config.get('DISCORD_URL')}>{t('global.discord_server')}</a> - ), + discord_link: <a href={config.get('DISCORD_URL')}>{t('global.discord_server')}</a>, br: <br /> })} </p> @@ -165,11 +137,7 @@ export function getFetchAssetsFailureToast(error: string): Omit<Toast, 'id'> { error: error.toLowerCase() }), body: t('toast.fetch_assets_failure.body', { - reload_page: ( - <a href={window.location.href}> - {t('toast.fetch_assets_failure.reload_page')} - </a> - ) + reload_page: <a href={window.location.href}>{t('toast.fetch_assets_failure.reload_page')}</a> }), icon: <Icon size="big" name="exclamation circle" />, closable: true, @@ -177,9 +145,7 @@ export function getFetchAssetsFailureToast(error: string): Omit<Toast, 'id'> { } } -export function getUpdateListSuccessToast( - list: UpdateOrCreateList -): Omit<Toast, 'id'> { +export function getUpdateListSuccessToast(list: UpdateOrCreateList): Omit<Toast, 'id'> { return { type: ToastType.INFO, title: t('toast.update_list_success.title'), @@ -271,11 +237,7 @@ function buildBulkPickItemBodyMessage( ) } -export function getBulkPickItemSuccessToast( - item: Item, - pickedFor: ListOfLists[], - unpickedFrom: ListOfLists[] -): Omit<Toast, 'id'> { +export function getBulkPickItemSuccessToast(item: Item, pickedFor: ListOfLists[], unpickedFrom: ListOfLists[]): Omit<Toast, 'id'> { return { type: ToastType.INFO, title: t('toast.bulk_pick.success.title'), @@ -283,27 +245,14 @@ export function getBulkPickItemSuccessToast( <div className="list-flow-toast"> <p> {pickedFor.length > 0 - ? buildBulkPickItemBodyMessage( - BulkPickUnpickMessageType.ADD, - BulkPickUnpickSuccessOrFailureType.SUCCESS, - item, - pickedFor - ) + ? buildBulkPickItemBodyMessage(BulkPickUnpickMessageType.ADD, BulkPickUnpickSuccessOrFailureType.SUCCESS, item, pickedFor) : undefined} {pickedFor.length > 0 && unpickedFrom.length > 0 ? ' ' : undefined} {unpickedFrom.length > 0 - ? buildBulkPickItemBodyMessage( - BulkPickUnpickMessageType.REMOVE, - BulkPickUnpickSuccessOrFailureType.SUCCESS, - item, - unpickedFrom - ) + ? buildBulkPickItemBodyMessage(BulkPickUnpickMessageType.REMOVE, BulkPickUnpickSuccessOrFailureType.SUCCESS, item, unpickedFrom) : undefined} </p> - <ToastCTA - action={bulkPickUnpickRequest(item, unpickedFrom, pickedFor)} - description={t('toast.bulk_pick.success.undo')} - /> + <ToastCTA action={bulkPickUnpickRequest(item, unpickedFrom, pickedFor)} description={t('toast.bulk_pick.success.undo')} /> </div> ), closable: true, @@ -312,11 +261,7 @@ export function getBulkPickItemSuccessToast( } } -export function getBulkPickItemFailureToast( - item: Item, - pickedFor: ListOfLists[], - unpickedFrom: ListOfLists[] -): Omit<Toast, 'id'> { +export function getBulkPickItemFailureToast(item: Item, pickedFor: ListOfLists[], unpickedFrom: ListOfLists[]): Omit<Toast, 'id'> { return { type: ToastType.ERROR, title: t('toast.bulk_pick.failure.title'), @@ -324,27 +269,14 @@ export function getBulkPickItemFailureToast( <div className="list-flow-toast"> <p> {pickedFor.length > 0 - ? buildBulkPickItemBodyMessage( - BulkPickUnpickMessageType.ADD, - BulkPickUnpickSuccessOrFailureType.FAILURE, - item, - pickedFor - ) + ? buildBulkPickItemBodyMessage(BulkPickUnpickMessageType.ADD, BulkPickUnpickSuccessOrFailureType.FAILURE, item, pickedFor) : undefined} {pickedFor.length > 0 && unpickedFrom.length > 0 ? ' ' : undefined} {unpickedFrom.length > 0 - ? buildBulkPickItemBodyMessage( - BulkPickUnpickMessageType.REMOVE, - BulkPickUnpickSuccessOrFailureType.FAILURE, - item, - unpickedFrom - ) + ? buildBulkPickItemBodyMessage(BulkPickUnpickMessageType.REMOVE, BulkPickUnpickSuccessOrFailureType.FAILURE, item, unpickedFrom) : undefined} </p> - <ToastCTA - action={bulkPickUnpickRequest(item, pickedFor, unpickedFrom)} - description={t('toast.bulk_pick.failure.try_again')} - /> + <ToastCTA action={bulkPickUnpickRequest(item, pickedFor, unpickedFrom)} description={t('toast.bulk_pick.failure.try_again')} /> </div> ), closable: true, @@ -353,9 +285,7 @@ export function getBulkPickItemFailureToast( } } -export function getCrossChainTransactionSuccessToast( - txLink: string -): Omit<Toast, 'id'> { +export function getCrossChainTransactionSuccessToast(txLink: string): Omit<Toast, 'id'> { return { type: ToastType.INFO, title: '', @@ -365,9 +295,7 @@ export function getCrossChainTransactionSuccessToast( {t('toast.cross_chain_tx.body', { br: () => <br />, highlight: (text: string) => <span>{text}</span>, - link: (text: string) => ( - <Link to={locations.activity()}>{text}</Link> - ) + link: (text: string) => <Link to={locations.activity()}>{text}</Link> })} </p> <Button as="a" href={locations.activity()} target="_blank"> diff --git a/webapp/src/modules/transaction/selectors.ts b/webapp/src/modules/transaction/selectors.ts index a17f670dbd..53c987ec3f 100644 --- a/webapp/src/modules/transaction/selectors.ts +++ b/webapp/src/modules/transaction/selectors.ts @@ -3,50 +3,25 @@ import { Transaction } from 'decentraland-dapps/dist/modules/transaction/types' import { RootState } from '../reducer' import { createSelector } from 'reselect' import { getAddress } from '../wallet/selectors' -import { - GRANT_TOKEN_SUCCESS, - REVOKE_TOKEN_SUCCESS -} from 'decentraland-dapps/dist/modules/authorization/actions' +import { GRANT_TOKEN_SUCCESS, REVOKE_TOKEN_SUCCESS } from 'decentraland-dapps/dist/modules/authorization/actions' import { isPending } from 'decentraland-dapps/dist/modules/transaction/utils' -export const getTransactionsByType = ( - state: RootState, - address: string, - type: string -): Transaction[] => - getData(state).filter( - tx => tx.from.toLowerCase() === address && tx.actionType === type - ) +export const getTransactionsByType = (state: RootState, address: string, type: string): Transaction[] => + getData(state).filter(tx => tx.from.toLowerCase() === address && tx.actionType === type) -export const getTransactions = createSelector< - RootState, - Transaction[], - string | undefined, - Transaction[] ->(getData, getAddress, (transactions, address) => - transactions.filter( - transaction => - !!address && transaction.from.toLowerCase() === address.toLowerCase() - ) +export const getTransactions = createSelector<RootState, Transaction[], string | undefined, Transaction[]>( + getData, + getAddress, + (transactions, address) => transactions.filter(transaction => !!address && transaction.from.toLowerCase() === address.toLowerCase()) ) -export const getPendingAuthorizationTransactions = createSelector< - RootState, - Transaction[], - Transaction[] ->(getTransactions, transactions => +export const getPendingAuthorizationTransactions = createSelector<RootState, Transaction[], Transaction[]>(getTransactions, transactions => transactions.filter( transaction => - isPending(transaction.status) && - (transaction.actionType === GRANT_TOKEN_SUCCESS || - transaction.actionType === REVOKE_TOKEN_SUCCESS) + isPending(transaction.status) && (transaction.actionType === GRANT_TOKEN_SUCCESS || transaction.actionType === REVOKE_TOKEN_SUCCESS) ) ) -export const getPendingTransactions = createSelector< - RootState, - Transaction[], - Transaction[] ->(getTransactions, transactions => +export const getPendingTransactions = createSelector<RootState, Transaction[], Transaction[]>(getTransactions, transactions => transactions.filter(transaction => isPending(transaction.status)) ) diff --git a/webapp/src/modules/transaction/utils.ts b/webapp/src/modules/transaction/utils.ts index 57186559e2..b1617ccf85 100644 --- a/webapp/src/modules/transaction/utils.ts +++ b/webapp/src/modules/transaction/utils.ts @@ -1,23 +1,12 @@ -import { - GrantTokenRequestAction, - RevokeTokenRequestAction -} from 'decentraland-dapps/dist/modules/authorization/actions' +import { GrantTokenRequestAction, RevokeTokenRequestAction } from 'decentraland-dapps/dist/modules/authorization/actions' import { Transaction } from 'decentraland-dapps/dist/modules/transaction/types' -export function hasTransactionPending( - transactions: Transaction[], - authorizedAddress: string, - contractAddress: string -) { +export function hasTransactionPending(transactions: Transaction[], authorizedAddress: string, contractAddress: string) { return transactions.some((transaction: any) => { - const { authorization } = transaction.payload as - | GrantTokenRequestAction['payload'] - | RevokeTokenRequestAction['payload'] + const { authorization } = transaction.payload as GrantTokenRequestAction['payload'] | RevokeTokenRequestAction['payload'] return ( - authorization.authorizedAddress.toLowerCase() === - authorizedAddress.toLowerCase() && - authorization.contractAddress.toLowerCase() === - contractAddress.toLowerCase() + authorization.authorizedAddress.toLowerCase() === authorizedAddress.toLowerCase() && + authorization.contractAddress.toLowerCase() === contractAddress.toLowerCase() ) }) } @@ -28,11 +17,7 @@ export function isUserCanceled(error: string) { } export function isUserDeniedSignatureError(error: string) { - return ( - error.search( - /User (denied|rejected) (transaction|message)( signature)?/ - ) !== -1 - ) + return error.search(/User (denied|rejected) (transaction|message)( signature)?/) !== -1 } export function isUserRejectedTransactionError(error: string) { diff --git a/webapp/src/modules/transak/sagas.ts b/webapp/src/modules/transak/sagas.ts index 901be95598..5fd405cbea 100644 --- a/webapp/src/modules/transak/sagas.ts +++ b/webapp/src/modules/transak/sagas.ts @@ -2,10 +2,7 @@ import { put, select, takeEvery } from 'redux-saga/effects' import { Network } from '@dcl/schemas' import { getAddress } from 'decentraland-dapps/dist/modules/wallet/selectors' import { Transak } from 'decentraland-dapps/dist/modules/gateway/transak' -import { - ProductsAvailed, - TradeType -} from 'decentraland-dapps/dist/modules/gateway/transak/types' +import { ProductsAvailed, TradeType } from 'decentraland-dapps/dist/modules/gateway/transak/types' import { TransakConfig } from 'decentraland-dapps/dist/modules/gateway/types' import { isMobile } from 'decentraland-dapps/dist/lib/utils' import { closeAllModals } from 'decentraland-dapps/dist/modules/modal/actions' @@ -43,8 +40,5 @@ function* handleOpenTransak(action: OpenTransakAction) { yield put(closeAllModals()) - new Transak(transakConfig, customizationOptions).openWidget( - address, - Network.MATIC - ) + new Transak(transakConfig, customizationOptions).openWidget(address, Network.MATIC) } diff --git a/webapp/src/modules/ui/asset/homepage/reducer.ts b/webapp/src/modules/ui/asset/homepage/reducer.ts index 5af49b30c0..7c82205b07 100644 --- a/webapp/src/modules/ui/asset/homepage/reducer.ts +++ b/webapp/src/modules/ui/asset/homepage/reducer.ts @@ -4,10 +4,7 @@ import { FETCH_ITEMS_SUCCESS, FETCH_TRENDING_ITEMS_SUCCESS } from '../../../item/actions' -import { - FetchNFTsSuccessAction, - FETCH_NFTS_SUCCESS -} from '../../../nft/actions' +import { FetchNFTsSuccessAction, FETCH_NFTS_SUCCESS } from '../../../nft/actions' import { View } from '../../types' export type HomepageUIState = { @@ -28,15 +25,9 @@ export const INITIAL_STATE: HomepageUIState = { [View.HOME_ENS]: [] } -type UIReducerAction = - | FetchItemsSuccessAction - | FetchTrendingItemsSuccessAction - | FetchNFTsSuccessAction +type UIReducerAction = FetchItemsSuccessAction | FetchTrendingItemsSuccessAction | FetchNFTsSuccessAction -export function homepageReducer( - state: HomepageUIState = INITIAL_STATE, - action: UIReducerAction -) { +export function homepageReducer(state: HomepageUIState = INITIAL_STATE, action: UIReducerAction) { switch (action.type) { case FETCH_ITEMS_SUCCESS: { const { items, options } = action.payload diff --git a/webapp/src/modules/ui/asset/homepage/selectors.ts b/webapp/src/modules/ui/asset/homepage/selectors.ts index a5e3c98933..4396861f4d 100644 --- a/webapp/src/modules/ui/asset/homepage/selectors.ts +++ b/webapp/src/modules/ui/asset/homepage/selectors.ts @@ -4,18 +4,9 @@ import { LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer' import { NFTState } from '../../../nft/reducer' import { ItemState } from '../../../item/reducer' import { FETCH_NFTS_REQUEST } from '../../../nft/actions' -import { - FETCH_ITEMS_REQUEST, - FETCH_TRENDING_ITEMS_REQUEST -} from '../../../item/actions' -import { - getData as getNFTData, - getLoading as getNFTLoading -} from '../../../nft/selectors' -import { - getData as getItemData, - getLoading as getItemLoading -} from '../../../item/selectors' +import { FETCH_ITEMS_REQUEST, FETCH_TRENDING_ITEMS_REQUEST } from '../../../item/actions' +import { getData as getNFTData, getLoading as getNFTLoading } from '../../../nft/selectors' +import { getData as getItemData, getLoading as getItemLoading } from '../../../item/selectors' import { Asset } from '../../../asset/types' import { RootState } from '../../../reducer' import { View } from '../../types' @@ -24,30 +15,23 @@ import { HomepageUIState } from './reducer' export const getState = (state: RootState) => state.ui.asset.homepage -export const getHomepage = createSelector< - RootState, - HomepageUIState, - NFTState['data'], - ItemState['data'], - Record<HomepageView, Asset[]> ->(getState, getNFTData, getItemData, (homepage, nftsById, itemsById) => { - const result: Record<string, Asset[]> = {} +export const getHomepage = createSelector<RootState, HomepageUIState, NFTState['data'], ItemState['data'], Record<HomepageView, Asset[]>>( + getState, + getNFTData, + getItemData, + (homepage, nftsById, itemsById) => { + const result: Record<string, Asset[]> = {} + + let view: HomepageView + for (view in homepage) { + result[view] = homepage[view].map(id => nftsById[id] || itemsById[id]) + } - let view: HomepageView - for (view in homepage) { - result[view] = homepage[view].map(id => nftsById[id] || itemsById[id]) + return result as Record<HomepageView, Asset[]> } +) - return result as Record<HomepageView, Asset[]> -}) - -export const getHomepageLoading = createSelector< - RootState, - HomepageUIState, - LoadingState, - LoadingState, - Record<HomepageView, boolean> ->( +export const getHomepageLoading = createSelector<RootState, HomepageUIState, LoadingState, LoadingState, Record<HomepageView, boolean>>( getState, getNFTLoading, getItemLoading, @@ -61,8 +45,7 @@ export const getHomepageLoading = createSelector< return ( (type === FETCH_NFTS_REQUEST && payload.options.view === view) || (type === FETCH_ITEMS_REQUEST && payload.view === view) || - (type === FETCH_TRENDING_ITEMS_REQUEST && - view === View.HOME_TRENDING_ITEMS) + (type === FETCH_TRENDING_ITEMS_REQUEST && view === View.HOME_TRENDING_ITEMS) ) }) } diff --git a/webapp/src/modules/ui/asset/reducer.ts b/webapp/src/modules/ui/asset/reducer.ts index d43c492e9c..f1d9b3af5a 100644 --- a/webapp/src/modules/ui/asset/reducer.ts +++ b/webapp/src/modules/ui/asset/reducer.ts @@ -1,8 +1,5 @@ import { combineReducers } from 'redux' -import { - homepageReducer as homepage, - HomepageUIState -} from './homepage/reducer' +import { homepageReducer as homepage, HomepageUIState } from './homepage/reducer' export type AssetUIState = { homepage: HomepageUIState diff --git a/webapp/src/modules/ui/browse/reducer.spec.ts b/webapp/src/modules/ui/browse/reducer.spec.ts index 4c1363d088..e6685da5f4 100644 --- a/webapp/src/modules/ui/browse/reducer.spec.ts +++ b/webapp/src/modules/ui/browse/reducer.spec.ts @@ -35,9 +35,7 @@ describe('when reducing the action of setting a view', () => { describe('and the payload view is the same as the state current one', () => { it('should return the same state', () => { - expect(browseReducer(initialState, setView(View.MARKET))).toEqual( - initialState - ) + expect(browseReducer(initialState, setView(View.MARKET))).toEqual(initialState) }) }) @@ -63,20 +61,16 @@ describe('when reducing the browse action', () => { describe('when the view is set in the browser options', () => { it('should clear the nftIds array in the state', () => { - expect(browseReducer(initialState, browse({ view: View.LISTS }))).toEqual( - { - ...initialState, - nftIds: [] - } - ) + expect(browseReducer(initialState, browse({ view: View.LISTS }))).toEqual({ + ...initialState, + nftIds: [] + }) }) }) describe('when the view is not set in the browser options', () => { it('should keep the nftIds', () => { - expect(browseReducer(initialState, browse({ view: undefined }))).toEqual( - initialState - ) + expect(browseReducer(initialState, browse({ view: undefined }))).toEqual(initialState) }) }) }) @@ -104,97 +98,84 @@ const fetchRequestActions: [ ] ] -describe.each(fetchRequestActions)( - 'when reducing the request action of %s', - (_, { action, assetType }) => { - let initialState: BrowseUIState = { - ...INITIAL_STATE, - page: 1, - [`${assetType}Ids`]: assetIds, - count: assetIds.length - } +describe.each(fetchRequestActions)('when reducing the request action of %s', (_, { action, assetType }) => { + let initialState: BrowseUIState = { + ...INITIAL_STATE, + page: 1, + [`${assetType}Ids`]: assetIds, + count: assetIds.length + } - let fetchOptions: NFTsFetchOptions & ItemBrowseOptions = { - vendor: VendorName.DECENTRALAND, - params: { first: 10, skip: 0 }, - view: View.MARKET - } + let fetchOptions: NFTsFetchOptions & ItemBrowseOptions = { + vendor: VendorName.DECENTRALAND, + params: { first: 10, skip: 0 }, + view: View.MARKET + } + + describe('when the view is atlas', () => { + beforeEach(() => { + fetchOptions = { + ...fetchOptions, + view: View.ATLAS + } + initialState = { + ...initialState, + view: View.ATLAS + } + }) + + it('should return the state as it was before', () => { + expect(browseReducer(initialState, action(fetchOptions))).toEqual(initialState) + }) + }) + + const views = { + [AssetType.NFT]: [View.MARKET, View.ACCOUNT, View.CURRENT_ACCOUNT], + [AssetType.ITEM]: [View.MARKET, View.ACCOUNT, View.CURRENT_ACCOUNT, View.LISTS] + } + + describe.each(views[assetType])('when it is loading more AND view is %s', view => { + beforeEach(() => { + fetchOptions = { + ...fetchOptions, + view, + page: 2 + } + }) - describe('when the view is atlas', () => { + describe('and it is the same view', () => { beforeEach(() => { - fetchOptions = { - ...fetchOptions, - view: View.ATLAS - } initialState = { ...initialState, - view: View.ATLAS + view } }) - - it('should return the state as it was before', () => { - expect(browseReducer(initialState, action(fetchOptions))).toEqual( - initialState - ) + it(`should keep the ${assetType} ids and clear the count`, () => { + expect(browseReducer(initialState, action(fetchOptions))).toEqual({ + ...initialState, + count: undefined + }) }) }) - const views = { - [AssetType.NFT]: [View.MARKET, View.ACCOUNT, View.CURRENT_ACCOUNT], - [AssetType.ITEM]: [ - View.MARKET, - View.ACCOUNT, - View.CURRENT_ACCOUNT, - View.LISTS - ] - } - - describe.each(views[assetType])( - 'when it is loading more AND view is %s', - view => { - beforeEach(() => { - fetchOptions = { - ...fetchOptions, - view, - page: 2 - } - }) - - describe('and it is the same view', () => { - beforeEach(() => { - initialState = { - ...initialState, - view - } - }) - it(`should keep the ${assetType} ids and clear the count`, () => { - expect(browseReducer(initialState, action(fetchOptions))).toEqual({ - ...initialState, - count: undefined - }) - }) - }) - - describe('and it is a different view', () => { - beforeEach(() => { - fetchOptions = { - ...fetchOptions, - view: 'another view' as View - } - }) + describe('and it is a different view', () => { + beforeEach(() => { + fetchOptions = { + ...fetchOptions, + view: 'another view' as View + } + }) - it(`should clear the ${assetType} ids and count`, () => { - expect(browseReducer(initialState, action(fetchOptions))).toEqual({ - ...initialState, - [`${assetType}Ids`]: [], - count: undefined - }) - }) + it(`should clear the ${assetType} ids and count`, () => { + expect(browseReducer(initialState, action(fetchOptions))).toEqual({ + ...initialState, + [`${assetType}Ids`]: [], + count: undefined }) - } - ) - } -) + }) + }) + }) +}) describe('when reducing the fetch NFTs success action', () => { let initialState: BrowseUIState = { ...INITIAL_STATE } @@ -225,12 +206,7 @@ describe('when reducing the fetch NFTs success action', () => { }) it('should return the state as it was before', () => { - expect( - browseReducer( - initialState, - fetchNFTsSuccess(nftsFetchOptions, nfts, [], [], [], 1, 1) - ) - ).toEqual(initialState) + expect(browseReducer(initialState, fetchNFTsSuccess(nftsFetchOptions, nfts, [], [], [], 1, 1))).toEqual(initialState) }) }) @@ -243,41 +219,25 @@ describe('when reducing the fetch NFTs success action', () => { timestamp = 3 }) - describe.each([View.MARKET, View.CURRENT_ACCOUNT, View.ACCOUNT])( - 'and the view is %s', - (view: View) => { - beforeEach(() => { - initialState = { ...initialState, lastTimestamp: 2, view } - nftsFetchOptions = { - ...nftsFetchOptions, - view - } - }) + describe.each([View.MARKET, View.CURRENT_ACCOUNT, View.ACCOUNT])('and the view is %s', (view: View) => { + beforeEach(() => { + initialState = { ...initialState, lastTimestamp: 2, view } + nftsFetchOptions = { + ...nftsFetchOptions, + view + } + }) - it('should return the state with the view, the nft ids, the count and the last timestamp that comes in the action payload', () => { - expect( - browseReducer( - initialState, - fetchNFTsSuccess( - nftsFetchOptions, - nfts, - [], - [], - [], - count, - timestamp - ) - ) - ).toEqual({ - ...initialState, - view, - nftIds: [nft.id], - count, - lastTimestamp: timestamp - }) + it('should return the state with the view, the nft ids, the count and the last timestamp that comes in the action payload', () => { + expect(browseReducer(initialState, fetchNFTsSuccess(nftsFetchOptions, nfts, [], [], [], count, timestamp))).toEqual({ + ...initialState, + view, + nftIds: [nft.id], + count, + lastTimestamp: timestamp }) - } - ) + }) + }) describe('and is loading more results', () => { let view: View @@ -300,20 +260,7 @@ describe('when reducing the fetch NFTs success action', () => { }) it('should return the state with the nft ids concatenated with the previous ones, the count, the last timestamp that comes in the action payload and increment the page', () => { - expect( - browseReducer( - initialState, - fetchNFTsSuccess( - nftsFetchOptions, - nfts, - [], - [], - [], - count, - timestamp - ) - ) - ).toEqual({ + expect(browseReducer(initialState, fetchNFTsSuccess(nftsFetchOptions, nfts, [], [], [], count, timestamp))).toEqual({ ...initialState, nftIds: [...initialState.nftIds, nft.id], count, @@ -339,20 +286,7 @@ describe('when reducing the fetch NFTs success action', () => { }) it('should return the previous state', () => { - expect( - browseReducer( - initialState, - fetchNFTsSuccess( - nftsFetchOptions, - nfts, - [], - [], - [], - count, - timestamp - ) - ) - ).toEqual(initialState) + expect(browseReducer(initialState, fetchNFTsSuccess(nftsFetchOptions, nfts, [], [], [], count, timestamp))).toEqual(initialState) }) }) }) @@ -384,18 +318,7 @@ describe('when reducing the success action of fetching favorited items', () => { }) it('should return the state as it was before', () => { - expect( - browseReducer( - initialState, - fetchFavoritedItemsSuccess( - items, - {}, - 1, - browseOptions, - actionTimestamp - ) - ) - ).toEqual(initialState) + expect(browseReducer(initialState, fetchFavoritedItemsSuccess(items, {}, 1, browseOptions, actionTimestamp))).toEqual(initialState) }) }) @@ -413,18 +336,7 @@ describe('when reducing the success action of fetching favorited items', () => { }) it('should return a state overwriting the ids and the total of the favorited items', () => { - expect( - browseReducer( - initialState, - fetchFavoritedItemsSuccess( - items, - {}, - total, - browseOptions, - actionTimestamp - ) - ) - ).toEqual({ + expect(browseReducer(initialState, fetchFavoritedItemsSuccess(items, {}, total, browseOptions, actionTimestamp))).toEqual({ ...initialState, itemIds: items.map(item => item.id), page: 1, @@ -441,18 +353,7 @@ describe('when reducing the success action of fetching favorited items', () => { }) it('should return a state where the ids are appended to the new ones and the total of the favorited items and the page updated', () => { - expect( - browseReducer( - initialState, - fetchFavoritedItemsSuccess( - items, - {}, - total, - browseOptions, - actionTimestamp - ) - ) - ).toEqual({ + expect(browseReducer(initialState, fetchFavoritedItemsSuccess(items, {}, total, browseOptions, actionTimestamp))).toEqual({ ...initialState, itemIds: [...initialState.itemIds, ...items.map(item => item.id)], page: browseOptions.page, @@ -468,18 +369,7 @@ describe('when reducing the success action of fetching favorited items', () => { }) it('should return a state overwriting the ids and the total of the favorited items', () => { - expect( - browseReducer( - initialState, - fetchFavoritedItemsSuccess( - items, - {}, - total, - browseOptions, - actionTimestamp - ) - ) - ).toEqual({ + expect(browseReducer(initialState, fetchFavoritedItemsSuccess(items, {}, total, browseOptions, actionTimestamp))).toEqual({ ...initialState, itemIds: items.map(item => item.id), page: 1, @@ -496,19 +386,7 @@ describe('when reducing the success action of fetching favorited items', () => { }) it('should return a state where the ids are appended to the new ones and the total of the favorited items updated', () => { - expect( - browseReducer( - initialState, - fetchFavoritedItemsSuccess( - items, - {}, - total, - browseOptions, - actionTimestamp, - true - ) - ) - ).toEqual({ + expect(browseReducer(initialState, fetchFavoritedItemsSuccess(items, {}, total, browseOptions, actionTimestamp, true))).toEqual({ ...initialState, itemIds: [...initialState.itemIds, ...items.map(item => item.id)], count: total @@ -542,12 +420,7 @@ describe('when reducing the fetch items success action', () => { }) it('should return the state as it was before', () => { - expect( - browseReducer( - initialState, - fetchItemsSuccess(items, items.length, itemsBrowserOptions, 1) - ) - ).toEqual(initialState) + expect(browseReducer(initialState, fetchItemsSuccess(items, items.length, itemsBrowserOptions, 1))).toEqual(initialState) }) }) @@ -560,33 +433,25 @@ describe('when reducing the fetch items success action', () => { timestamp = 3 }) - describe.each([View.MARKET, View.CURRENT_ACCOUNT, View.ACCOUNT])( - 'and the view is %s', - view => { - beforeEach(() => { - initialState = { ...initialState, lastTimestamp: 2 } - itemsBrowserOptions = { - ...itemsBrowserOptions, - view - } - }) + describe.each([View.MARKET, View.CURRENT_ACCOUNT, View.ACCOUNT])('and the view is %s', view => { + beforeEach(() => { + initialState = { ...initialState, lastTimestamp: 2 } + itemsBrowserOptions = { + ...itemsBrowserOptions, + view + } + }) - it('should return the state with the view, the item ids, the count and the last timestamp that comes in the action payload', () => { - expect( - browseReducer( - initialState, - fetchItemsSuccess(items, count, itemsBrowserOptions, timestamp) - ) - ).toEqual({ - ...initialState, - view, - itemIds: [item.id], - count, - lastTimestamp: timestamp - }) + it('should return the state with the view, the item ids, the count and the last timestamp that comes in the action payload', () => { + expect(browseReducer(initialState, fetchItemsSuccess(items, count, itemsBrowserOptions, timestamp))).toEqual({ + ...initialState, + view, + itemIds: [item.id], + count, + lastTimestamp: timestamp }) - } - ) + }) + }) describe('and is loading more results', () => { let view: View @@ -617,12 +482,7 @@ describe('when reducing the fetch items success action', () => { }) it('should return the state with the item ids concatenated with the previous ones, page and the last timestamp that comes in the action payload', () => { - expect( - browseReducer( - initialState, - fetchItemsSuccess(items, count, itemsBrowserOptions, timestamp) - ) - ).toEqual({ + expect(browseReducer(initialState, fetchItemsSuccess(items, count, itemsBrowserOptions, timestamp))).toEqual({ ...initialState, itemIds: [...initialState.itemIds, item.id], lastTimestamp: timestamp, @@ -641,12 +501,7 @@ describe('when reducing the fetch items success action', () => { }) it('should return the state with the item ids concatenated with the previous ones, and the count and last timestamp that comes in the action payload', () => { - expect( - browseReducer( - initialState, - fetchItemsSuccess(items, count, itemsBrowserOptions, timestamp) - ) - ).toEqual({ + expect(browseReducer(initialState, fetchItemsSuccess(items, count, itemsBrowserOptions, timestamp))).toEqual({ ...initialState, itemIds: [...initialState.itemIds, item.id], count, @@ -669,12 +524,7 @@ describe('when reducing the fetch items success action', () => { }) it('should return the previous state', () => { - expect( - browseReducer( - initialState, - fetchItemsSuccess(items, count, itemsBrowserOptions, timestamp) - ) - ).toEqual(initialState) + expect(browseReducer(initialState, fetchItemsSuccess(items, count, itemsBrowserOptions, timestamp))).toEqual(initialState) }) }) }) @@ -712,12 +562,7 @@ describe('when reducing the action of the success of getting the lists', () => { }) it('should return a state with its count set and the list ids of the new lists appended to the existent ones', () => { - expect( - browseReducer( - initialState, - fetchListsSuccess(lists, [], total, browseOptions) - ) - ).toEqual({ + expect(browseReducer(initialState, fetchListsSuccess(lists, [], total, browseOptions))).toEqual({ ...initialState, listIds: ['aListId', 'anotherListId'], page: 2, @@ -743,12 +588,7 @@ describe('when reducing the action of the success of getting the lists', () => { }) it('should return a state with its count set and the list ids of the new lists', () => { - expect( - browseReducer( - initialState, - fetchListsSuccess(lists, [], total, browseOptions) - ) - ).toEqual({ + expect(browseReducer(initialState, fetchListsSuccess(lists, [], total, browseOptions))).toEqual({ ...initialState, listIds: ['anotherListId'], page: 1, @@ -775,9 +615,7 @@ describe('when reducing the action of the request of getting the lists', () => { }) it('should return a state with the list ids cleared', () => { - expect( - browseReducer(initialState, fetchListsRequest({ page, first: 1 })) - ).toEqual({ + expect(browseReducer(initialState, fetchListsRequest({ page, first: 1 }))).toEqual({ ...initialState, listIds: [] }) @@ -790,9 +628,7 @@ describe('when reducing the action of the request of getting the lists', () => { }) it('should return the state unchanged', () => { - expect( - browseReducer(initialState, fetchListsRequest({ page, first: 1 })) - ).toEqual(initialState) + expect(browseReducer(initialState, fetchListsRequest({ page, first: 1 }))).toEqual(initialState) }) }) }) @@ -853,16 +689,7 @@ describe('when reducing the action of the success of an item picking and unpicki it('should return the state unchanged', () => { expect( - browseReducer( - initialState, - bulkPickUnpickSuccess( - item, - pickedFor, - unpickedFrom, - pickedByUser, - ownerRemovedFromCurrentList - ) - ) + browseReducer(initialState, bulkPickUnpickSuccess(item, pickedFor, unpickedFrom, pickedByUser, ownerRemovedFromCurrentList)) ).toEqual({ ...INITIAL_STATE }) }) }) @@ -874,16 +701,7 @@ describe('when reducing the action of the success of an item picking and unpicki it('should return a state with the count decreased by one', () => { expect( - browseReducer( - initialState, - bulkPickUnpickSuccess( - item, - pickedFor, - unpickedFrom, - pickedByUser, - ownerRemovedFromCurrentList - ) - ) + browseReducer(initialState, bulkPickUnpickSuccess(item, pickedFor, unpickedFrom, pickedByUser, ownerRemovedFromCurrentList)) ).toEqual({ ...INITIAL_STATE, count: 0 }) }) }) @@ -897,16 +715,7 @@ describe('when reducing the action of the success of an item picking and unpicki it('should return the state unchanged', () => { expect( - browseReducer( - initialState, - bulkPickUnpickSuccess( - item, - pickedFor, - unpickedFrom, - pickedByUser, - ownerRemovedFromCurrentList - ) - ) + browseReducer(initialState, bulkPickUnpickSuccess(item, pickedFor, unpickedFrom, pickedByUser, ownerRemovedFromCurrentList)) ).toEqual({ ...INITIAL_STATE, count: 1 }) }) }) @@ -930,12 +739,7 @@ describe('when reducing the action of requesting favorited items', () => { }) it('should return the state unchanged', () => { - expect( - browseReducer( - initialState, - fetchFavoritedItemsRequest(browseOptions, forceLoadMore) - ) - ).toEqual(initialState) + expect(browseReducer(initialState, fetchFavoritedItemsRequest(browseOptions, forceLoadMore))).toEqual(initialState) }) }) @@ -950,12 +754,10 @@ describe('when reducing the action of requesting favorited items', () => { }) it('should return the state with the itemIds cleared', () => { - expect( - browseReducer( - initialState, - fetchFavoritedItemsRequest(browseOptions, forceLoadMore) - ) - ).toEqual({ ...initialState, itemIds: [] }) + expect(browseReducer(initialState, fetchFavoritedItemsRequest(browseOptions, forceLoadMore))).toEqual({ + ...initialState, + itemIds: [] + }) }) }) @@ -968,12 +770,7 @@ describe('when reducing the action of requesting favorited items', () => { }) it('should return the state without changes', () => { - expect( - browseReducer( - initialState, - fetchFavoritedItemsRequest(browseOptions, forceLoadMore) - ) - ).toEqual(initialState) + expect(browseReducer(initialState, fetchFavoritedItemsRequest(browseOptions, forceLoadMore))).toEqual(initialState) }) }) }) diff --git a/webapp/src/modules/ui/browse/reducer.ts b/webapp/src/modules/ui/browse/reducer.ts index 6cfe9388b4..90626d339f 100644 --- a/webapp/src/modules/ui/browse/reducer.ts +++ b/webapp/src/modules/ui/browse/reducer.ts @@ -14,18 +14,8 @@ import { FetchListsRequestAction, FetchListsSuccessAction } from '../../favorites/actions' -import { - FetchItemsRequestAction, - FetchItemsSuccessAction, - FETCH_ITEMS_REQUEST, - FETCH_ITEMS_SUCCESS -} from '../../item/actions' -import { - FetchNFTsRequestAction, - FetchNFTsSuccessAction, - FETCH_NFTS_REQUEST, - FETCH_NFTS_SUCCESS -} from '../../nft/actions' +import { FetchItemsRequestAction, FetchItemsSuccessAction, FETCH_ITEMS_REQUEST, FETCH_ITEMS_SUCCESS } from '../../item/actions' +import { FetchNFTsRequestAction, FetchNFTsSuccessAction, FETCH_NFTS_REQUEST, FETCH_NFTS_SUCCESS } from '../../nft/actions' import { BrowseAction, BROWSE } from '../../routing/actions' import { SetViewAction, SET_VIEW } from '../actions' import { View } from '../types' @@ -68,10 +58,7 @@ type UIReducerAction = | CreateListSuccessAction | BulkPickUnpickSuccessAction -export function browseReducer( - state: BrowseUIState = INITIAL_STATE, - action: UIReducerAction -): BrowseUIState { +export function browseReducer(state: BrowseUIState = INITIAL_STATE, action: UIReducerAction): BrowseUIState { switch (action.type) { case SET_VIEW: { if (action.payload.view === state.view) { @@ -92,10 +79,7 @@ export function browseReducer( return { ...state, - count: - state.count !== undefined && ownerRemovedFromCurrentList - ? --state.count - : state.count + count: state.count !== undefined && ownerRemovedFromCurrentList ? --state.count : state.count } case BROWSE: { @@ -117,9 +101,7 @@ export function browseReducer( return state } const newNftIds = nfts.map(nft => nft.id) - const nftIds = isLoadingMoreResults(state, page) - ? [...state.nftIds, ...newNftIds] - : newNftIds + const nftIds = isLoadingMoreResults(state, page) ? [...state.nftIds, ...newNftIds] : newNftIds if (view === state.view) { switch (view) { case View.MARKET: @@ -144,10 +126,7 @@ export function browseReducer( case FETCH_NFTS_REQUEST: case FETCH_ITEMS_REQUEST: { const key = action.type === FETCH_NFTS_REQUEST ? 'nftIds' : 'itemIds' - const { view, page } = - action.type === FETCH_NFTS_REQUEST - ? action.payload.options - : action.payload + const { view, page } = action.type === FETCH_NFTS_REQUEST ? action.payload.options : action.payload const isDifferentView = view !== state.view if ( @@ -186,9 +165,7 @@ export function browseReducer( return { ...state, - itemIds: isLoadingMoreResults(state, action.payload.options.page) - ? state.itemIds - : [] + itemIds: isLoadingMoreResults(state, action.payload.options.page) ? state.itemIds : [] } case FETCH_FAVORITED_ITEMS_SUCCESS: @@ -204,10 +181,7 @@ export function browseReducer( } const newItemIds = items.map(item => item.id) - const itemIds = - isLoadingMoreResults(state, page) || forceLoadMore - ? [...state.itemIds, ...newItemIds] - : newItemIds + const itemIds = isLoadingMoreResults(state, page) || forceLoadMore ? [...state.itemIds, ...newItemIds] : newItemIds return { ...state, @@ -228,9 +202,7 @@ export function browseReducer( } const newItemIds = items.map(item => item.id) - const itemIds = isLoadingMoreResults(state, page) - ? [...state.itemIds, ...newItemIds] - : newItemIds + const itemIds = isLoadingMoreResults(state, page) ? [...state.itemIds, ...newItemIds] : newItemIds switch (view) { case View.MARKET: @@ -274,9 +246,7 @@ export function browseReducer( options: { page } } = action.payload const newListIds = lists.map(list => list.id) - const listIds = isLoadingMoreResults(state, page) - ? [...state.listIds, ...newListIds] - : newListIds + const listIds = isLoadingMoreResults(state, page) ? [...state.listIds, ...newListIds] : newListIds return { ...state, diff --git a/webapp/src/modules/ui/browse/sagas.spec.ts b/webapp/src/modules/ui/browse/sagas.spec.ts index 79e8601a21..3d93f90e0c 100644 --- a/webapp/src/modules/ui/browse/sagas.spec.ts +++ b/webapp/src/modules/ui/browse/sagas.spec.ts @@ -2,11 +2,7 @@ import { expectSaga } from 'redux-saga-test-plan' import { select } from 'redux-saga/effects' import { Item } from '@dcl/schemas' import { getPageNumber } from '../../routing/selectors' -import { - FETCH_FAVORITED_ITEMS_REQUEST, - bulkPickUnpickSuccess, - fetchFavoritedItemsRequest -} from '../../favorites/actions' +import { FETCH_FAVORITED_ITEMS_REQUEST, bulkPickUnpickSuccess, fetchFavoritedItemsRequest } from '../../favorites/actions' import { isOwnerUnpickingFromCurrentList } from '../../favorites/selectors' import { PAGE_SIZE } from '../../vendor/api' import { getCount, getItemsPickedByUserOrCreator } from './selectors' @@ -19,10 +15,10 @@ describe('when handling the success action of a bulk item pick and unpick', () = let count: number beforeEach(() => { - list = ({ + list = { id: 'aListId', userAddress: 'anAddress' - } as unknown) as ListOfLists + } as unknown as ListOfLists }) describe('and the length of the loaded favorites is less than the length of the total existing favorites', () => { @@ -54,9 +50,7 @@ describe('when handling the success action of a bulk item pick and unpick', () = true ) ) - .dispatch( - bulkPickUnpickSuccess({} as Item, [], unpickedFrom, true, true) - ) + .dispatch(bulkPickUnpickSuccess({} as Item, [], unpickedFrom, true, true)) .run({ silenceTimeout: true }) }) }) @@ -75,9 +69,7 @@ describe('when handling the success action of a bulk item pick and unpick', () = [select(getCount), count] ]) .not.put.like({ action: { type: FETCH_FAVORITED_ITEMS_REQUEST } }) - .dispatch( - bulkPickUnpickSuccess({} as Item, [], unpickedFrom, true, true) - ) + .dispatch(bulkPickUnpickSuccess({} as Item, [], unpickedFrom, true, true)) .run({ silenceTimeout: true }) }) }) diff --git a/webapp/src/modules/ui/browse/sagas.ts b/webapp/src/modules/ui/browse/sagas.ts index 5ea19ac096..c00cb084b0 100644 --- a/webapp/src/modules/ui/browse/sagas.ts +++ b/webapp/src/modules/ui/browse/sagas.ts @@ -1,10 +1,6 @@ import { Item } from '@dcl/schemas' import { put, select, takeEvery } from 'redux-saga/effects' -import { - BULK_PICK_SUCCESS, - BulkPickUnpickSuccessAction, - fetchFavoritedItemsRequest -} from '../../favorites/actions' +import { BULK_PICK_SUCCESS, BulkPickUnpickSuccessAction, fetchFavoritedItemsRequest } from '../../favorites/actions' import { PAGE_SIZE } from '../../vendor/api' import { getPageNumber } from '../../routing/selectors' import { isOwnerUnpickingFromCurrentList } from '../../favorites/selectors' @@ -25,10 +21,7 @@ function* handleBulkPickSuccess(action: BulkPickUnpickSuccessAction) { const favoritedAssets: Item[] = yield select(getItemsPickedByUserOrCreator) const totalFavoritedAssets: number = yield select(getCount) - if ( - favoritedAssets.length < totalFavoritedAssets && - isOwnerUnpickingFromListInView - ) { + if (favoritedAssets.length < totalFavoritedAssets && isOwnerUnpickingFromListInView) { yield put( fetchFavoritedItemsRequest( { diff --git a/webapp/src/modules/ui/browse/selector.spec.ts b/webapp/src/modules/ui/browse/selector.spec.ts index 4098c84144..03d05b92f9 100644 --- a/webapp/src/modules/ui/browse/selector.spec.ts +++ b/webapp/src/modules/ui/browse/selector.spec.ts @@ -1,16 +1,6 @@ import { RouterState } from 'connected-react-router' -import { - ChainId, - Item, - NFTCategory, - Order, - RentalListing, - RentalStatus -} from '@dcl/schemas' -import { - Transaction, - TransactionStatus -} from 'decentraland-dapps/dist/modules/transaction/types' +import { ChainId, Item, NFTCategory, Order, RentalListing, RentalStatus } from '@dcl/schemas' +import { Transaction, TransactionStatus } from 'decentraland-dapps/dist/modules/transaction/types' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { NFT } from '../../nft/types' import { RootState } from '../../reducer' @@ -235,28 +225,19 @@ describe('when getting the NFTs on rent by lessor', () => { describe('when getting the NFTs on rent by tenant', () => { it('should get all the NFTs rented by the given tenant', () => { - expect(getOnRentNFTsByTenant(rootState, address)).toEqual([ - [nftWithExecutedRentByTenant, rentalExecutedByTenant] - ]) + expect(getOnRentNFTsByTenant(rootState, address)).toEqual([[nftWithExecutedRentByTenant, rentalExecutedByTenant]]) }) }) describe('when getting all owned land', () => { it('should return all owned lands', () => { - expect(getWalletOwnedLands(rootState)).toEqual([ - nftWithLandCategory, - nftWithOpenRent, - nftWithExecutedRentByLessor - ]) + expect(getWalletOwnedLands(rootState)).toEqual([nftWithLandCategory, nftWithOpenRent, nftWithExecutedRentByLessor]) }) }) describe('when getting the Elements on sale of the ui browse state', () => { it('should retrieve the NFTs on sale of the ui browse state', () => { - expect(getOnSaleElements(rootState)).toStrictEqual([ - itemOnSale, - [nftOnSale, order] - ]) + expect(getOnSaleElements(rootState)).toStrictEqual([itemOnSale, [nftOnSale, order]]) }) }) @@ -272,7 +253,7 @@ describe('when getting if the claiming back transaction is pending', () => { beforeEach(() => { nft = { id: '567', tokenId, contractAddress, chainId } as NFT - state = ({ + state = { wallet: { data: { address: null @@ -281,7 +262,7 @@ describe('when getting if the claiming back transaction is pending', () => { transaction: { data: [] as Transaction[] } - } as unknown) as RootState + } as unknown as RootState }) describe('and there is no address', () => { @@ -350,9 +331,7 @@ describe('when getting if the claiming back transaction is pending', () => { }) it(`should return ${element.expectedResult}`, () => { - expect(isClaimingBackLandTransactionPending(state, nft)).toBe( - element.expectedResult - ) + expect(isClaimingBackLandTransactionPending(state, nft)).toBe(element.expectedResult) }) }) }) @@ -407,12 +386,7 @@ describe('when getting the user favorited items of the ui browse state', () => { describe('and is the owner of the list', () => { it('should retrieve the items that were favorited by them', () => { expect( - getItemsPickedByUserOrCreator.resultFunc( - favoritedItems, - [item, itemOnSale], - list, - { address: list.userAddress } as Wallet - ) + getItemsPickedByUserOrCreator.resultFunc(favoritedItems, [item, itemOnSale], list, { address: list.userAddress } as Wallet) ).toEqual([item]) }) }) @@ -420,12 +394,7 @@ describe('when getting the user favorited items of the ui browse state', () => { describe('and is not the owner of the list', () => { it('should retrieve the items that were favorited by the owner of the list', () => { expect( - getItemsPickedByUserOrCreator.resultFunc( - favoritedItems, - [item, itemOnSale], - list, - { address: '0xanotherAddress' } as Wallet - ) + getItemsPickedByUserOrCreator.resultFunc(favoritedItems, [item, itemOnSale], list, { address: '0xanotherAddress' } as Wallet) ).toEqual([item, itemOnSale]) }) }) @@ -433,14 +402,7 @@ describe('when getting the user favorited items of the ui browse state', () => { describe('and the user is not logged in', () => { it('should retrieve the items that were favorited by owner of the list', () => { - expect( - getItemsPickedByUserOrCreator.resultFunc( - favoritedItems, - [item, itemOnSale], - list, - null - ) - ).toEqual([item, itemOnSale]) + expect(getItemsPickedByUserOrCreator.resultFunc(favoritedItems, [item, itemOnSale], list, null)).toEqual([item, itemOnSale]) }) }) }) @@ -465,9 +427,7 @@ describe('when getting the browse assets', () => { }) it('should return all browsable items picked by the user', () => { - expect(getBrowseAssets(rootState, section, assetType)).toStrictEqual([ - item - ]) + expect(getBrowseAssets(rootState, section, assetType)).toStrictEqual([item]) }) }) @@ -477,10 +437,7 @@ describe('when getting the browse assets', () => { }) it('should return all the browsable items', () => { - expect(getBrowseAssets(rootState, section, assetType)).toStrictEqual([ - item, - itemOnSale - ]) + expect(getBrowseAssets(rootState, section, assetType)).toStrictEqual([item, itemOnSale]) }) }) }) diff --git a/webapp/src/modules/ui/browse/selectors.ts b/webapp/src/modules/ui/browse/selectors.ts index 482a2309f9..7dd21a845c 100644 --- a/webapp/src/modules/ui/browse/selectors.ts +++ b/webapp/src/modules/ui/browse/selectors.ts @@ -1,25 +1,12 @@ import { createSelector } from 'reselect' -import { - Item, - NFTCategory, - Order, - RentalListing, - RentalStatus -} from '@dcl/schemas' -import { - Transaction, - TransactionStatus -} from 'decentraland-dapps/dist/modules/transaction/types' +import { Item, NFTCategory, Order, RentalListing, RentalStatus } from '@dcl/schemas' +import { Transaction, TransactionStatus } from 'decentraland-dapps/dist/modules/transaction/types' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { getData as getNFTData, getWalletNFTs } from '../../nft/selectors' import { getData as getItemData } from '../../item/selectors' import { getData as getOrderData } from '../../order/selectors' import { getData as getRentalData } from '../../rental/selectors' -import { - getFavoritedItems as getFavoritedItemsFromState, - getListId, - getLists -} from '../../favorites/selectors' +import { getFavoritedItems as getFavoritedItemsFromState, getListId, getLists } from '../../favorites/selectors' import { FavoritesData, List } from '../../favorites/types' import { CLAIM_ASSET_TRANSACTION_SUBMITTED } from '../../rental/actions' import { NFTState } from '../../nft/reducer' @@ -37,26 +24,15 @@ import { OnRentNFT, OnSaleElement, OnSaleNFT } from './types' import { byFavoriteCreatedAtAsc } from './utils' export const getState = (state: RootState) => state.ui.browse -export const getView = (state: RootState): View | undefined => - getState(state).view +export const getView = (state: RootState): View | undefined => getState(state).view export const getCount = (state: RootState) => getState(state).count export const getPage = (state: RootState) => getState(state).page -const getNFTs = createSelector< - RootState, - BrowseUIState, - NFTState['data'], - NFT[] ->(getState, getNFTData, (browse, nftsById) => +const getNFTs = createSelector<RootState, BrowseUIState, NFTState['data'], NFT[]>(getState, getNFTData, (browse, nftsById) => browse.nftIds.map(id => nftsById[id]) ) -const getItems = createSelector< - RootState, - BrowseUIState, - ItemState['data'], - Item[] ->(getState, getItemData, (browse, itemsById) => +const getItems = createSelector<RootState, BrowseUIState, ItemState['data'], Item[]>(getState, getItemData, (browse, itemsById) => browse.itemIds.map(id => itemsById[id]) ) @@ -69,47 +45,30 @@ const getItems = createSelector< // browse.catalogIds.map(id => catalogsById[id]) // ) -export const getOnSaleItems = createSelector< - RootState, - ReturnType<typeof getAddress>, - ReturnType<typeof getItemData>, - Item[] ->(getAddress, getItemData, (address, itemsById) => - Object.values(itemsById).filter( - item => item.isOnSale && item.creator === address - ) +export const getOnSaleItems = createSelector<RootState, ReturnType<typeof getAddress>, ReturnType<typeof getItemData>, Item[]>( + getAddress, + getItemData, + (address, itemsById) => Object.values(itemsById).filter(item => item.isOnSale && item.creator === address) ) -export const getBrowseAssets = ( - state: RootState, - section: Section, - assetType: AssetType -): Asset[] => { +export const getBrowseAssets = (state: RootState, section: Section, assetType: AssetType): Asset[] => { if (assetType === AssetType.ITEM) { - return section === Sections.decentraland.LISTS - ? getItemsPickedByUserOrCreator(state) - : getItems(state) + return section === Sections.decentraland.LISTS ? getItemsPickedByUserOrCreator(state) : getItems(state) } else { return getNFTs(state) } } -export const getBrowseLists = createSelector< - RootState, - BrowseUIState, - Record<string, List>, - List[] ->(getState, getLists, (browse, listsById) => - browse.listIds.map(id => listsById[id]).filter(Boolean) +export const getBrowseLists = createSelector<RootState, BrowseUIState, Record<string, List>, List[]>( + getState, + getLists, + (browse, listsById) => browse.listIds.map(id => listsById[id]).filter(Boolean) ) -const getCurrentList = createSelector< - RootState, - string | null, - Record<string, List>, - List | null ->(getListId, getLists, (listId, listsById) => - listId ? listsById[listId] : null +const getCurrentList = createSelector<RootState, string | null, Record<string, List>, List | null>( + getListId, + getLists, + (listId, listsById) => (listId ? listsById[listId] : null) ) export const getItemsPickedByUserOrCreator = createSelector< @@ -119,19 +78,11 @@ export const getItemsPickedByUserOrCreator = createSelector< List | null, Wallet | null, Item[] ->( - getFavoritedItemsFromState, - getItems, - getCurrentList, - getWallet, - (favoritedItems, items, list, wallet) => { - const filteredItems = - wallet && list && wallet.address === list.userAddress - ? items.filter(item => favoritedItems[item.id]?.pickedByUser) - : items - return filteredItems.sort(byFavoriteCreatedAtAsc(favoritedItems)) - } -) +>(getFavoritedItemsFromState, getItems, getCurrentList, getWallet, (favoritedItems, items, list, wallet) => { + const filteredItems = + wallet && list && wallet.address === list.userAddress ? items.filter(item => favoritedItems[item.id]?.pickedByUser) : items + return filteredItems.sort(byFavoriteCreatedAtAsc(favoritedItems)) +}) export const getOnSaleNFTs = createSelector< RootState, @@ -141,34 +92,35 @@ export const getOnSaleNFTs = createSelector< OnSaleNFT[] >(getAddress, getNFTData, getOrderData, (address, nftsById, ordersById) => Object.values(nftsById) - .reduce((acc, nft) => { - const { activeOrderId } = nft - const order = activeOrderId ? ordersById[activeOrderId] : undefined - if (order) { - acc.push([nft, order]) - } - return acc - }, [] as [NFT<VendorName.DECENTRALAND>, Order][]) + .reduce( + (acc, nft) => { + const { activeOrderId } = nft + const order = activeOrderId ? ordersById[activeOrderId] : undefined + if (order) { + acc.push([nft, order]) + } + return acc + }, + [] as [NFT<VendorName.DECENTRALAND>, Order][] + ) .filter(([nft]) => nft.owner === address) ) -const getOnRentNFTs = createSelector< - RootState, - ReturnType<typeof getNFTData>, - ReturnType<typeof getRentalData>, - OnRentNFT[] ->(getNFTData, getRentalData, (nftsById, rentalsById) => - Object.values(nftsById).reduce((acc, nft) => { - const { openRentalId } = nft - const rental = openRentalId ? rentalsById[openRentalId] : undefined - if ( - rental && - [RentalStatus.EXECUTED, RentalStatus.OPEN].includes(rental.status) - ) { - acc.push([nft, rental]) - } - return acc - }, [] as [NFT<VendorName.DECENTRALAND>, RentalListing][]) +const getOnRentNFTs = createSelector<RootState, ReturnType<typeof getNFTData>, ReturnType<typeof getRentalData>, OnRentNFT[]>( + getNFTData, + getRentalData, + (nftsById, rentalsById) => + Object.values(nftsById).reduce( + (acc, nft) => { + const { openRentalId } = nft + const rental = openRentalId ? rentalsById[openRentalId] : undefined + if (rental && [RentalStatus.EXECUTED, RentalStatus.OPEN].includes(rental.status)) { + acc.push([nft, rental]) + } + return acc + }, + [] as [NFT<VendorName.DECENTRALAND>, RentalListing][] + ) ) export const getOnRentNFTsByLessor = (state: RootState, address: string) => { @@ -179,23 +131,12 @@ export const getOnRentNFTsByTenant = (state: RootState, address: string) => { return getOnRentNFTs(state).filter(([, rental]) => rental.tenant === address) } -export const getWalletOwnedLands = createSelector( - getWallet, - getWalletNFTs, - getOnRentNFTs, - (wallet, nfts, onRentNFTs) => { - return [ - ...nfts.filter(nft => - [NFTCategory.ESTATE, NFTCategory.PARCEL].includes( - nft.category as NFTCategory - ) - ), - ...onRentNFTs - .filter(([, rental]) => rental.lessor === wallet?.address) - .map(([nft]) => nft) - ] - } -) +export const getWalletOwnedLands = createSelector(getWallet, getWalletNFTs, getOnRentNFTs, (wallet, nfts, onRentNFTs) => { + return [ + ...nfts.filter(nft => [NFTCategory.ESTATE, NFTCategory.PARCEL].includes(nft.category as NFTCategory)), + ...onRentNFTs.filter(([, rental]) => rental.lessor === wallet?.address).map(([nft]) => nft) + ] +}) export const getOnSaleElements = createSelector< RootState, @@ -204,19 +145,12 @@ export const getOnSaleElements = createSelector< OnSaleElement[] >(getOnSaleItems, getOnSaleNFTs, (items, nfts) => [...items, ...nfts]) -export const getLastTransactionForClaimingBackLand = ( - state: RootState, - nft: NFT -): Transaction | null => { +export const getLastTransactionForClaimingBackLand = (state: RootState, nft: NFT): Transaction | null => { const userAddress = getAddress(state) if (!userAddress) return null - const transactionsClaimedLand = getTransactionsByType( - state, - userAddress, - CLAIM_ASSET_TRANSACTION_SUBMITTED - ) + const transactionsClaimedLand = getTransactionsByType(state, userAddress, CLAIM_ASSET_TRANSACTION_SUBMITTED) const transactions = transactionsClaimedLand .filter( @@ -234,14 +168,8 @@ export const getLastTransactionForClaimingBackLand = ( return transactions[0] ?? null } -export const isClaimingBackLandTransactionPending = ( - state: RootState, - nft: NFT -): boolean => { +export const isClaimingBackLandTransactionPending = (state: RootState, nft: NFT): boolean => { const transaction = getLastTransactionForClaimingBackLand(state, nft) - return transaction - ? transaction.status === TransactionStatus.QUEUED || - transaction.status === TransactionStatus.PENDING - : false + return transaction ? transaction.status === TransactionStatus.QUEUED || transaction.status === TransactionStatus.PENDING : false } diff --git a/webapp/src/modules/ui/browse/utils.spec.ts b/webapp/src/modules/ui/browse/utils.spec.ts index 7366f48ee9..4c7f326387 100644 --- a/webapp/src/modules/ui/browse/utils.spec.ts +++ b/webapp/src/modules/ui/browse/utils.spec.ts @@ -7,12 +7,7 @@ describe('when ordering items by the creation date of their favorites', () => { let favoritedItems: Record<string, FavoritesData> beforeEach(() => { - items = [ - { id: '1' } as Item, - { id: '2' } as Item, - { id: '3' } as Item, - { id: '4' } as Item - ] + items = [{ id: '1' } as Item, { id: '2' } as Item, { id: '3' } as Item, { id: '4' } as Item] favoritedItems = { '1': { createdAt: 0, count: 0 }, '2': { createdAt: 1, count: 0 }, diff --git a/webapp/src/modules/ui/browse/utils.ts b/webapp/src/modules/ui/browse/utils.ts index 88e278582b..d6ad430dfc 100644 --- a/webapp/src/modules/ui/browse/utils.ts +++ b/webapp/src/modules/ui/browse/utils.ts @@ -1,10 +1,4 @@ -import { - ChainId, - Item, - ListingStatus, - NFTCategory, - Network -} from '@dcl/schemas' +import { ChainId, Item, ListingStatus, NFTCategory, Network } from '@dcl/schemas' import { FavoritesData } from '../../favorites/types' import { BrowseUIState } from './reducer' import { LegacyOrderFragment } from '../../order/types' @@ -17,9 +11,7 @@ export function orderById(ids: string[], items: Item[]) { return ids.map(id => itemsById[id]) } -export const byFavoriteCreatedAtAsc = ( - favoritedItems: Record<string, FavoritesData> -) => (a: Item, b: Item) => { +export const byFavoriteCreatedAtAsc = (favoritedItems: Record<string, FavoritesData>) => (a: Item, b: Item) => { const favoriteACreatedAt = favoritedItems[a.id]?.createdAt ?? 0 const favoriteBCreatedAt = favoritedItems[b.id]?.createdAt ?? 0 if (favoriteACreatedAt < favoriteBCreatedAt) { @@ -34,9 +26,7 @@ export const isLoadingMoreResults = (state: BrowseUIState, page?: number) => { return !!state.page && !!page && page > state.page } -export function legacyOrderToOnSaleElement( - legacyOrder: LegacyOrderFragment -): OnSaleElement { +export function legacyOrderToOnSaleElement(legacyOrder: LegacyOrderFragment): OnSaleElement { return [ { category: NFTCategory.PARCEL, diff --git a/webapp/src/modules/ui/nft/bid/reducer.ts b/webapp/src/modules/ui/nft/bid/reducer.ts index d7947132b9..d350d799ad 100644 --- a/webapp/src/modules/ui/nft/bid/reducer.ts +++ b/webapp/src/modules/ui/nft/bid/reducer.ts @@ -23,16 +23,9 @@ const INITIAL_STATE: BidUIState = { nft: [] } -type UIReducerAction = - | FetchBidsByAddressSuccessAction - | FetchBidsByNFTSuccessAction - | ArchiveBidAction - | UnarchiveBidAction +type UIReducerAction = FetchBidsByAddressSuccessAction | FetchBidsByNFTSuccessAction | ArchiveBidAction | UnarchiveBidAction -export function bidReducer( - state: BidUIState = INITIAL_STATE, - action: UIReducerAction -) { +export function bidReducer(state: BidUIState = INITIAL_STATE, action: UIReducerAction) { switch (action.type) { case FETCH_BIDS_BY_ADDRESS_SUCCESS: { const { sellerBids, bidderBids } = action.payload diff --git a/webapp/src/modules/ui/nft/bid/selectors.ts b/webapp/src/modules/ui/nft/bid/selectors.ts index d4febfdb57..a6361c15be 100644 --- a/webapp/src/modules/ui/nft/bid/selectors.ts +++ b/webapp/src/modules/ui/nft/bid/selectors.ts @@ -7,25 +7,16 @@ import { BidUIState } from './reducer' export const getState = (state: RootState) => state.ui.nft.bid -export const getSellerBids = createSelector< - RootState, - BidUIState, - BidState['data'], - Bid[] ->(getState, getBidData, (bid, bidsById) => bid.seller.map(id => bidsById[id])) +export const getSellerBids = createSelector<RootState, BidUIState, BidState['data'], Bid[]>(getState, getBidData, (bid, bidsById) => + bid.seller.map(id => bidsById[id]) +) -export const getBidderBids = createSelector< - RootState, - BidUIState, - BidState['data'], - Bid[] ->(getState, getBidData, (ui, bidsById) => ui.bidder.map(id => bidsById[id])) +export const getBidderBids = createSelector<RootState, BidUIState, BidState['data'], Bid[]>(getState, getBidData, (ui, bidsById) => + ui.bidder.map(id => bidsById[id]) +) export const getArchivedBidIds = (state: RootState) => getState(state).archived -export const getNFTBids = createSelector< - RootState, - BidUIState, - BidState['data'], - Bid[] ->(getState, getBidData, (bid, bidsById) => bid.nft.map(id => bidsById[id])) +export const getNFTBids = createSelector<RootState, BidUIState, BidState['data'], Bid[]>(getState, getBidData, (bid, bidsById) => + bid.nft.map(id => bidsById[id]) +) diff --git a/webapp/src/modules/ui/preview/actions.ts b/webapp/src/modules/ui/preview/actions.ts index 0cbd27804b..c32eb3a5f4 100644 --- a/webapp/src/modules/ui/preview/actions.ts +++ b/webapp/src/modules/ui/preview/actions.ts @@ -2,18 +2,13 @@ import { action } from 'typesafe-actions' import { IPreviewController } from '@dcl/schemas' export const SET_IS_TRYING_ON = 'Set is trying on' -export const setIsTryingOn = (value: boolean) => - action(SET_IS_TRYING_ON, { value }) +export const setIsTryingOn = (value: boolean) => action(SET_IS_TRYING_ON, { value }) export type SetIsTryingOnAction = ReturnType<typeof setIsTryingOn> export const SET_EMOTE_PLAYING = 'Set emote playing' export const SET_WEARABLE_PREVIEW_CONTROLLER = 'Set wearable preview controller' -export const setEmotePlaying = (isPlayingEmote: boolean) => - action(SET_EMOTE_PLAYING, { isPlayingEmote }) -export const setWearablePreviewController = ( - controller: IPreviewController | null -) => action(SET_WEARABLE_PREVIEW_CONTROLLER, { controller }) +export const setEmotePlaying = (isPlayingEmote: boolean) => action(SET_EMOTE_PLAYING, { isPlayingEmote }) +export const setWearablePreviewController = (controller: IPreviewController | null) => + action(SET_WEARABLE_PREVIEW_CONTROLLER, { controller }) export type SetEmotePlayingAction = ReturnType<typeof setEmotePlaying> -export type SetWearablePreviewControllerAction = ReturnType< - typeof setWearablePreviewController -> +export type SetWearablePreviewControllerAction = ReturnType<typeof setWearablePreviewController> diff --git a/webapp/src/modules/ui/preview/reducer.spec.ts b/webapp/src/modules/ui/preview/reducer.spec.ts index d1e842c4d0..3781da080a 100644 --- a/webapp/src/modules/ui/preview/reducer.spec.ts +++ b/webapp/src/modules/ui/preview/reducer.spec.ts @@ -11,9 +11,7 @@ beforeEach(() => { describe('when reducing action of setting the wearable preview', () => { it('should return a state with the created wearable preview', () => { const controller = { scene: {}, emote: {} } as IPreviewController - expect( - previewReducer(state, setWearablePreviewController(controller)) - ).toEqual({ + expect(previewReducer(state, setWearablePreviewController(controller))).toEqual({ ...INITIAL_STATE, wearablePreviewController: controller }) diff --git a/webapp/src/modules/ui/preview/reducer.ts b/webapp/src/modules/ui/preview/reducer.ts index 1bc0c50153..7c790d391c 100644 --- a/webapp/src/modules/ui/preview/reducer.ts +++ b/webapp/src/modules/ui/preview/reducer.ts @@ -18,15 +18,9 @@ export const INITIAL_STATE: PreviewState = { isTryingOn: false } -type PreviewReducerAction = - | SetIsTryingOnAction - | SetEmotePlayingAction - | SetWearablePreviewControllerAction +type PreviewReducerAction = SetIsTryingOnAction | SetEmotePlayingAction | SetWearablePreviewControllerAction -export function previewReducer( - state = INITIAL_STATE, - action: PreviewReducerAction -): PreviewState { +export function previewReducer(state = INITIAL_STATE, action: PreviewReducerAction): PreviewState { switch (action.type) { case SET_IS_TRYING_ON: { return { diff --git a/webapp/src/modules/ui/preview/selectors.ts b/webapp/src/modules/ui/preview/selectors.ts index 678c4c962c..6b3a649969 100644 --- a/webapp/src/modules/ui/preview/selectors.ts +++ b/webapp/src/modules/ui/preview/selectors.ts @@ -2,7 +2,5 @@ import { RootState } from '../../reducer' export const getState = (state: RootState) => state.ui.preview export const getIsTryingOn = (state: RootState) => getState(state).isTryingOn -export const getIsPlayingEmote = (state: RootState) => - getState(state).isPlayingEmote -export const getWearablePreviewController = (state: RootState) => - getState(state).wearablePreviewController +export const getIsPlayingEmote = (state: RootState) => getState(state).isPlayingEmote +export const getWearablePreviewController = (state: RootState) => getState(state).wearablePreviewController diff --git a/webapp/src/modules/ui/sagas.ts b/webapp/src/modules/ui/sagas.ts index c62af486d5..7e01c858bc 100644 --- a/webapp/src/modules/ui/sagas.ts +++ b/webapp/src/modules/ui/sagas.ts @@ -1,25 +1,15 @@ import { takeEvery, put, select, take, spawn } from 'redux-saga/effects' import { eventChannel } from 'redux-saga' import { IPreviewController, PreviewEmoteEventType } from '@dcl/schemas' -import { - CONNECT_WALLET_SUCCESS, - ConnectWalletSuccessAction -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { CONNECT_WALLET_SUCCESS, ConnectWalletSuccessAction } from 'decentraland-dapps/dist/modules/wallet/actions' import { push, getLocation } from 'connected-react-router' import { locations } from '../routing/locations' -import { - setEmotePlaying, - SetWearablePreviewControllerAction, - SET_WEARABLE_PREVIEW_CONTROLLER -} from './preview/actions' +import { setEmotePlaying, SetWearablePreviewControllerAction, SET_WEARABLE_PREVIEW_CONTROLLER } from './preview/actions' import { browseSaga } from './browse/sagas' export function* uiSaga() { yield takeEvery(CONNECT_WALLET_SUCCESS, handleConnectWalletSuccess) - yield takeEvery( - SET_WEARABLE_PREVIEW_CONTROLLER, - handleSetWearablePreviewController - ) + yield takeEvery(SET_WEARABLE_PREVIEW_CONTROLLER, handleSetWearablePreviewController) yield spawn(browseSaga) } @@ -51,27 +41,16 @@ function createWearablePreviewChannel(controller: IPreviewController) { handleEvent(PreviewEmoteEventType.ANIMATION_END) const unsubscribe = () => { - controller.emote.events.off( - PreviewEmoteEventType.ANIMATION_PLAY, - eventEmit - ) - controller.emote.events.off( - PreviewEmoteEventType.ANIMATION_PAUSE, - eventEmit - ) - controller.emote.events.off( - PreviewEmoteEventType.ANIMATION_END, - eventEmit - ) + controller.emote.events.off(PreviewEmoteEventType.ANIMATION_PLAY, eventEmit) + controller.emote.events.off(PreviewEmoteEventType.ANIMATION_PAUSE, eventEmit) + controller.emote.events.off(PreviewEmoteEventType.ANIMATION_END, eventEmit) } return unsubscribe }) } -function* handleSetWearablePreviewController( - action: SetWearablePreviewControllerAction -) { +function* handleSetWearablePreviewController(action: SetWearablePreviewControllerAction) { const controller: IPreviewController | null = action.payload.controller if (controller) { diff --git a/webapp/src/modules/ui/types.ts b/webapp/src/modules/ui/types.ts index b693e7ea9a..c2eb6bac69 100644 --- a/webapp/src/modules/ui/types.ts +++ b/webapp/src/modules/ui/types.ts @@ -16,4 +16,4 @@ export const View = { } as const // eslint-disable-next-line @typescript-eslint/no-redeclare -- Intentionally naming the variable the same as the type -export type View = typeof View[keyof typeof View] +export type View = (typeof View)[keyof typeof View] diff --git a/webapp/src/modules/ui/utils.ts b/webapp/src/modules/ui/utils.ts index f872035052..f56a7790ec 100644 --- a/webapp/src/modules/ui/utils.ts +++ b/webapp/src/modules/ui/utils.ts @@ -4,17 +4,11 @@ import { Section, Sections } from '../vendor/routing/types' import { View } from './types' const accountViews = new Set<View>([View.ACCOUNT, View.CURRENT_ACCOUNT]) -const landSections = new Set<Section>([ - Sections.decentraland.LAND, - Sections.decentraland.PARCELS, - Sections.decentraland.ESTATES -]) +const landSections = new Set<Section>([Sections.decentraland.LAND, Sections.decentraland.PARCELS, Sections.decentraland.ESTATES]) export const isAccountView = (view: View) => accountViews.has(view) -export const isListsSection = (section?: Section) => - Sections.decentraland.LISTS === section -export const isLandSection = (section?: Section) => - !!section && landSections.has(section) +export const isListsSection = (section?: Section) => Sections.decentraland.LISTS === section +export const isLandSection = (section?: Section) => !!section && landSections.has(section) export const useScrollSectionIntoView = <T>( ref: React.RefObject<HTMLDivElement>, @@ -26,7 +20,7 @@ export const useScrollSectionIntoView = <T>( useEffect(() => { if (location.hash && location.hash.includes(prefix)) { ref.current?.scrollIntoView({ behavior: behavior || 'smooth' }) - setter?.((location.hash.replace(prefix, '') as unknown) as T) + setter?.(location.hash.replace(prefix, '') as unknown as T) } // we only want this behavior after the first render // eslint-disable-next-line react-hooks/exhaustive-deps @@ -41,8 +35,7 @@ export const persistIsMapProperty = (val: boolean) => { } export const getPersistedIsMapProperty = (): boolean | null => { - const persistedIsMapProperty = - localStorage.getItem(PERSISTED_IS_MAP_STORAGE_KEY) || '' + const persistedIsMapProperty = localStorage.getItem(PERSISTED_IS_MAP_STORAGE_KEY) || '' if (['true', 'false'].includes(persistedIsMapProperty)) { return persistedIsMapProperty === 'true' diff --git a/webapp/src/modules/vendor/MarketplacePrice.ts b/webapp/src/modules/vendor/MarketplacePrice.ts index 18da2dbe8b..f69f319145 100644 --- a/webapp/src/modules/vendor/MarketplacePrice.ts +++ b/webapp/src/modules/vendor/MarketplacePrice.ts @@ -10,18 +10,14 @@ export class MarketplacePrice { constructor() { const feePerMillion = config.get('MARKETPLACE_ADAPTER_FEE_PER_MILLION') - const maxPriceIncreasePercentage = Number( - config.get('MAX_PRICE_INCREASE_PERCENTAGE') - ) + const maxPriceIncreasePercentage = Number(config.get('MAX_PRICE_INCREASE_PERCENTAGE')) if (!feePerMillion) { throw new Error(`Invalid adapter fee ${feePerMillion}`) } if (!maxPriceIncreasePercentage || isNaN(maxPriceIncreasePercentage)) { - throw new Error( - `Invalid max price increase percentage ${maxPriceIncreasePercentage}` - ) + throw new Error(`Invalid max price increase percentage ${maxPriceIncreasePercentage}`) } this.feePerMillion = ethers.BigNumber.from(feePerMillion) @@ -33,15 +29,11 @@ export class MarketplacePrice { addFee(manaWeiAmount: string | number) { const bnAmount = ethers.BigNumber.from(manaWeiAmount.toString()) - return bnAmount - .add(bnAmount.mul(this.feePerMillion).div(this.oneMillion)) - .toString() + return bnAmount.add(bnAmount.mul(this.feePerMillion).div(this.oneMillion)).toString() } addMaxSlippage(manaWeiAmount: string | number) { - return ethers.BigNumber.from(manaWeiAmount) - .mul(110) - .div(100) // 10 percent increase + return ethers.BigNumber.from(manaWeiAmount).mul(110).div(100) // 10 percent increase } isAboveMaxIncreasePercentage(percentage: number) { diff --git a/webapp/src/modules/vendor/TokenConverter.ts b/webapp/src/modules/vendor/TokenConverter.ts index ea32399d04..21aab63973 100644 --- a/webapp/src/modules/vendor/TokenConverter.ts +++ b/webapp/src/modules/vendor/TokenConverter.ts @@ -19,10 +19,7 @@ const pricesCache: Record<string, Record<number, number>> = {} // { coinId: {tickerKey: result } } const coinTickersCache: Record<string, Record<string, number>> = {} -const coinTickersPromiseCache: Record< - string, - Record<string, Promise<CoinTickers>> -> = {} +const coinTickersPromiseCache: Record<string, Record<string, Promise<CoinTickers>>> = {} export class TokenConverter { apiURL: string @@ -30,9 +27,9 @@ export class TokenConverter { converterExchange: string constructor() { - const apiURL = config.get('COINGECKO_API_URL')! - const converterAddress = config.get('CONVERTER_ADDRESS')! - const converterExchange = config.get('CONVERTER_EXCHANGE')! + const apiURL = config.get('COINGECKO_API_URL') + const converterAddress = config.get('CONVERTER_ADDRESS') + const converterExchange = config.get('CONVERTER_EXCHANGE') if (!apiURL) { throw new Error(`Invalid converter API URL "${apiURL}"`) @@ -50,26 +47,16 @@ export class TokenConverter { } async marketEthToMANA(ethAmount: number) { - return this.marketEthToToken( - ethAmount, - 'decentraland', - this.converterExchange - ) + return this.marketEthToToken(ethAmount, 'decentraland', this.converterExchange) } - async marketEthToToken( - ethAmount: number, - coinId: string, - exchange: string = '' - ) { + async marketEthToToken(ethAmount: number, coinId: string, exchange: string = '') { if (!pricesCache[coinId]) { pricesCache[coinId] = {} } if (!pricesCache[coinId][ethAmount]) { - const response = await window.fetch( - `${this.apiURL}/coins/${coinId}/tickers?exchange_ids=${exchange}` - ) + const response = await window.fetch(`${this.apiURL}/coins/${coinId}/tickers?exchange_ids=${exchange}`) const coinTickers: CoinTickers = await response.json() const ticker = coinTickers.tickers[0] @@ -91,43 +78,29 @@ export class TokenConverter { } const ongoingPromise = coinTickersPromiseCache[coinId][usdTicker] if (!ongoingPromise) { - coinTickersPromiseCache[coinId][usdTicker] = new Promise<CoinTickers>( - async (res, rej) => { - try { - const response = await window.fetch( - `${this.apiURL}/coins/decentraland/tickers?exchange_ids=${this.converterExchange}` - ) - res(response.json()) - } catch (error) { - rej(error) - } + coinTickersPromiseCache[coinId][usdTicker] = new Promise<CoinTickers>(async (res, rej) => { + try { + const response = await window.fetch(`${this.apiURL}/coins/decentraland/tickers?exchange_ids=${this.converterExchange}`) + res(response.json()) + } catch (error) { + rej(error) } - ) + }) } const coinTickers = await coinTickersPromiseCache[coinId][usdTicker] - coinTickersCache[coinId][usdTicker] = - coinTickers.tickers[0].converted_last[usdTicker] + coinTickersCache[coinId][usdTicker] = coinTickers.tickers[0].converted_last[usdTicker] } return coinTickersCache[coinId][usdTicker] * amount } async contractEthToMANA(ethAmount: string) { - const manaAddress = config.get('MANA_ADDRESS')! + const manaAddress = config.get('MANA_ADDRESS') return this.contractEthToToken(ethAmount, manaAddress) } - async contractEthToToken( - ethAmount: string, - tokenAddress: string - ): Promise<string> { - const converter = Converter__factory.connect( - this.converterAddress, - await getSigner() - ) - const tokens = await converter.calcNeededTokensForEther( - tokenAddress, - ethAmount - ) + async contractEthToToken(ethAmount: string, tokenAddress: string): Promise<string> { + const converter = Converter__factory.connect(this.converterAddress, await getSigner()) + const tokens = await converter.calcNeededTokensForEther(tokenAddress, ethAmount) return tokens.toString() } } diff --git a/webapp/src/modules/vendor/VendorFactory.ts b/webapp/src/modules/vendor/VendorFactory.ts index d9cbfad33f..e11481ba90 100644 --- a/webapp/src/modules/vendor/VendorFactory.ts +++ b/webapp/src/modules/vendor/VendorFactory.ts @@ -1,18 +1,9 @@ import { BaseClientConfig } from 'decentraland-dapps/dist/lib/BaseClient' -import { - ContractService, - NFTService, - OrderService, - BidService, - AnalyticsService -} from './decentraland' +import { ContractService, NFTService, OrderService, BidService, AnalyticsService } from './decentraland' import { VendorName } from './types' export class VendorFactory { - static build( - vendor: VendorName, - config?: BaseClientConfig | undefined - ): Vendor<VendorName> { + static build(vendor: VendorName, config?: BaseClientConfig | undefined): Vendor<VendorName> { switch (vendor) { case VendorName.DECENTRALAND: return new Vendor<VendorName.DECENTRALAND>( diff --git a/webapp/src/modules/vendor/decentraland/AnalyticsService.ts b/webapp/src/modules/vendor/decentraland/AnalyticsService.ts index 18c2d1fb03..1fb8fb8b7f 100644 --- a/webapp/src/modules/vendor/decentraland/AnalyticsService.ts +++ b/webapp/src/modules/vendor/decentraland/AnalyticsService.ts @@ -16,17 +16,11 @@ export class AnalyticsService implements AnalyticsServiceInterface { return { sales: data.sales, volume: parseFloat(utils.formatEther(data.volume)), - volumeUSD: await this.tokenConverter.marketMANAToUSD( - parseFloat(utils.formatEther(data.volume)) - ), + volumeUSD: await this.tokenConverter.marketMANAToUSD(parseFloat(utils.formatEther(data.volume))), creatorsEarnings: parseFloat(utils.formatEther(data.creatorsEarnings)), - creatorsEarningsUSD: await this.tokenConverter.marketMANAToUSD( - parseFloat(utils.formatEther(data.creatorsEarnings)) - ), + creatorsEarningsUSD: await this.tokenConverter.marketMANAToUSD(parseFloat(utils.formatEther(data.creatorsEarnings))), daoEarnings: parseFloat(utils.formatEther(data.daoEarnings)), - daoEarningsUSD: await this.tokenConverter.marketMANAToUSD( - parseFloat(utils.formatEther(data.daoEarnings)) - ) + daoEarningsUSD: await this.tokenConverter.marketMANAToUSD(parseFloat(utils.formatEther(data.daoEarnings))) } } } diff --git a/webapp/src/modules/vendor/decentraland/BidService.spec.ts b/webapp/src/modules/vendor/decentraland/BidService.spec.ts index 5637bfe00a..2b1bef329d 100644 --- a/webapp/src/modules/vendor/decentraland/BidService.spec.ts +++ b/webapp/src/modules/vendor/decentraland/BidService.spec.ts @@ -7,9 +7,7 @@ import { BidService } from './BidService' jest.mock('decentraland-dapps/dist/modules/wallet/utils') -const mockSendTransaction = sendTransaction as jest.MockedFunction< - typeof sendTransaction -> +const mockSendTransaction = sendTransaction as jest.MockedFunction<typeof sendTransaction> let bidService: BidService const expectedHash = '0xhash' @@ -21,58 +19,36 @@ beforeEach(() => { describe('when placing a bid', () => { describe('when the wallet is not connected', () => { it('should throw an error signaling that the wallet is not available', async () => { - await expect(bidService.place(null, {} as NFT, 0, 0)).rejects.toThrow( - 'Invalid address. Wallet must be connected.' - ) + await expect(bidService.place(null, {} as NFT, 0, 0)).rejects.toThrow('Invalid address. Wallet must be connected.') }) }) describe('when the nft.network is ETHEREUM', () => { it('should send an Ethereum transaction to the Bid contract', async () => { mockSendTransaction.mockResolvedValueOnce(expectedHash) - const hash = await bidService.place( - {} as Wallet, - { network: Network.ETHEREUM, chainId: ChainId.ETHEREUM_MAINNET } as NFT, - 0, - 0 - ) + const hash = await bidService.place({} as Wallet, { network: Network.ETHEREUM, chainId: ChainId.ETHEREUM_MAINNET } as NFT, 0, 0) const callParameters = mockSendTransaction.mock.calls[0] expect(hash).toBe(expectedHash) - expect(callParameters[0]).toBe( - getContract(ContractName.Bid, ChainId.ETHEREUM_MAINNET) - ) - expect(callParameters[1]).toBe( - 'placeBid(address,uint256,uint256,uint256)' - ) + expect(callParameters[0]).toBe(getContract(ContractName.Bid, ChainId.ETHEREUM_MAINNET)) + expect(callParameters[1]).toBe('placeBid(address,uint256,uint256,uint256)') }) }) describe('when the nft.network is MATIC', () => { it('should send an Polygon transaction to the BidV2 contract', async () => { mockSendTransaction.mockResolvedValueOnce(expectedHash) - const hash = await bidService.place( - {} as Wallet, - { network: Network.MATIC, chainId: ChainId.MATIC_MAINNET } as NFT, - 0, - 0 - ) + const hash = await bidService.place({} as Wallet, { network: Network.MATIC, chainId: ChainId.MATIC_MAINNET } as NFT, 0, 0) const callParameters = mockSendTransaction.mock.calls[0] expect(hash).toBe(expectedHash) - expect(callParameters[0]).toBe( - getContract(ContractName.BidV2, ChainId.MATIC_MAINNET) - ) - expect(callParameters[1]).toBe( - 'placeBid(address,uint256,uint256,uint256)' - ) + expect(callParameters[0]).toBe(getContract(ContractName.BidV2, ChainId.MATIC_MAINNET)) + expect(callParameters[1]).toBe('placeBid(address,uint256,uint256,uint256)') }) }) }) describe('when accepting a bid', () => { describe('when the wallet is not connected', () => { it('should throw an error signaling that the wallet is not available', async () => { - await expect(bidService.accept(null, {} as Bid)).rejects.toThrow( - 'Invalid address. Wallet must be connected.' - ) + await expect(bidService.accept(null, {} as Bid)).rejects.toThrow('Invalid address. Wallet must be connected.') }) }) describe('when the wallet is connected', () => { @@ -95,9 +71,7 @@ describe('when accepting a bid', () => { ...getContract(ContractName.ERC721, ChainId.ETHEREUM_MAINNET), address: contractAddress }) - expect(callParameters[1]).toBe( - 'safeTransferFrom(address,address,uint256,bytes)' - ) + expect(callParameters[1]).toBe('safeTransferFrom(address,address,uint256,bytes)') }) }) describe('when the bid.network is MATIC', () => { @@ -115,15 +89,10 @@ describe('when accepting a bid', () => { expect(hash).toBe(expectedHash) expect(callParameters[0]).toEqual({ - ...getContract( - ContractName.ERC721CollectionV2, - ChainId.MATIC_MAINNET - ), + ...getContract(ContractName.ERC721CollectionV2, ChainId.MATIC_MAINNET), address: contractAddress }) - expect(callParameters[1]).toBe( - 'safeTransferFrom(address,address,uint256,bytes)' - ) + expect(callParameters[1]).toBe('safeTransferFrom(address,address,uint256,bytes)') }) }) }) @@ -132,9 +101,7 @@ describe('when accepting a bid', () => { describe('when canceling a bid', () => { describe('when the wallet is not connected', () => { it('should throw an error signaling that the wallet is not available', async () => { - await expect(bidService.cancel(null, {} as Bid)).rejects.toThrow( - 'Invalid address. Wallet must be connected.' - ) + await expect(bidService.cancel(null, {} as Bid)).rejects.toThrow('Invalid address. Wallet must be connected.') }) }) describe('when the wallet is connected', () => { @@ -151,9 +118,7 @@ describe('when canceling a bid', () => { const callParameters = mockSendTransaction.mock.calls[0] expect(hash).toBe(expectedHash) - expect(callParameters[0]).toBe( - getContract(ContractName.Bid, ChainId.ETHEREUM_MAINNET) - ) + expect(callParameters[0]).toBe(getContract(ContractName.Bid, ChainId.ETHEREUM_MAINNET)) expect(callParameters[1]).toBe('cancelBid(address,uint256)') }) }) @@ -170,9 +135,7 @@ describe('when canceling a bid', () => { const callParameters = mockSendTransaction.mock.calls[0] expect(hash).toBe(expectedHash) - expect(callParameters[0]).toBe( - getContract(ContractName.BidV2, ChainId.MATIC_MAINNET) - ) + expect(callParameters[0]).toBe(getContract(ContractName.BidV2, ChainId.MATIC_MAINNET)) expect(callParameters[1]).toBe('cancelBid(address,uint256)') }) }) diff --git a/webapp/src/modules/vendor/decentraland/BidService.ts b/webapp/src/modules/vendor/decentraland/BidService.ts index 2287a44847..835645c451 100644 --- a/webapp/src/modules/vendor/decentraland/BidService.ts +++ b/webapp/src/modules/vendor/decentraland/BidService.ts @@ -1,10 +1,6 @@ import { parseUnits } from '@ethersproject/units' import { Bid, ListingStatus, Network } from '@dcl/schemas' -import { - ContractData, - ContractName, - getContract -} from 'decentraland-transactions' +import { ContractData, ContractName, getContract } from 'decentraland-transactions' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { sendTransaction } from 'decentraland-dapps/dist/modules/wallet/utils' import { NFT } from '../../nft/types' @@ -13,8 +9,7 @@ import { BidService as BidServiceInterface } from '../services' import { bidAPI } from './bid/api' import { getERC721ContractData } from './utils' -export class BidService - implements BidServiceInterface<VendorName.DECENTRALAND> { +export class BidService implements BidServiceInterface<VendorName.DECENTRALAND> { async fetchBySeller(seller: string) { const bids = await bidAPI.fetchBySeller(seller) return bids.data @@ -26,21 +21,11 @@ export class BidService } async fetchByNFT(nft: NFT, status: ListingStatus = ListingStatus.OPEN) { - const bids = await bidAPI.fetchByNFT( - nft.contractAddress, - nft.tokenId, - status - ) + const bids = await bidAPI.fetchByNFT(nft.contractAddress, nft.tokenId, status) return bids.data } - async place( - wallet: Wallet | null, - nft: NFT, - price: number, - expiresAt: number, - fingerprint?: string - ) { + async place(wallet: Wallet | null, nft: NFT, price: number, expiresAt: number, fingerprint?: string) { if (!wallet) { throw new Error('Invalid address. Wallet must be connected.') } @@ -50,10 +35,7 @@ export class BidService switch (nft.network) { case Network.ETHEREUM: { - const contract: ContractData = getContract( - ContractName.Bid, - nft.chainId - ) + const contract: ContractData = getContract(ContractName.Bid, nft.chainId) if (fingerprint) { return sendTransaction( @@ -77,10 +59,7 @@ export class BidService ) } case Network.MATIC: { - const contract: ContractData = getContract( - ContractName.BidV2, - nft.chainId - ) + const contract: ContractData = getContract(ContractName.BidV2, nft.chainId) return sendTransaction( contract, 'placeBid(address,uint256,uint256,uint256)', @@ -116,14 +95,7 @@ export class BidService } const contract: ContractData = - bid.network === Network.ETHEREUM - ? getContract(ContractName.Bid, bid.chainId) - : getContract(ContractName.BidV2, bid.chainId) - return sendTransaction( - contract, - 'cancelBid(address,uint256)', - bid.contractAddress, - bid.tokenId - ) + bid.network === Network.ETHEREUM ? getContract(ContractName.Bid, bid.chainId) : getContract(ContractName.BidV2, bid.chainId) + return sendTransaction(contract, 'cancelBid(address,uint256)', bid.contractAddress, bid.tokenId) } } diff --git a/webapp/src/modules/vendor/decentraland/NFTService.spec.ts b/webapp/src/modules/vendor/decentraland/NFTService.spec.ts index c66d6379ff..593eba9d91 100644 --- a/webapp/src/modules/vendor/decentraland/NFTService.spec.ts +++ b/webapp/src/modules/vendor/decentraland/NFTService.spec.ts @@ -1,10 +1,4 @@ -import { - Network, - ChainId, - Order, - RentalListing, - RentalStatus -} from '@dcl/schemas' +import { Network, ChainId, Order, RentalListing, RentalStatus } from '@dcl/schemas' import * as walletUtils from 'decentraland-dapps/dist/modules/wallet/utils' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { NFT, NFTsCountParams, NFTsFetchParams } from '../../nft/types' @@ -12,11 +6,7 @@ import { VendorName } from '../types' import { NFTService } from './NFTService' import * as authApi from './nft/authApi' import { NFTResult, NFTsFetchFilters } from './nft' -import { - ContractData, - ContractName, - getContract -} from 'decentraland-transactions' +import { ContractData, ContractName, getContract } from 'decentraland-transactions' import { getERC721ContractData } from './utils' jest.mock('decentraland-dapps/dist/modules/wallet/utils') @@ -65,15 +55,11 @@ describe("Decentraland's NFTService", () => { // ;(api.nftAPI.fetch as jest.Mock).mockRejectedValueOnce( // aBasicErrorMessage // ) - jest - .spyOn(authApi.NFTAuthAPI.prototype, 'get') - .mockRejectedValueOnce(aBasicErrorMessage) + jest.spyOn(authApi.NFTAuthAPI.prototype, 'get').mockRejectedValueOnce(aBasicErrorMessage) }) it("should reject with the fetch's error", () => { - return expect(nftService.fetch(fetchParams, filters)).rejects.toEqual( - aBasicErrorMessage - ) + return expect(nftService.fetch(fetchParams, filters)).rejects.toEqual(aBasicErrorMessage) }) }) @@ -96,9 +82,7 @@ describe("Decentraland's NFTService", () => { it('should have fetched the NFTs with the filter and NFT params', async () => { await nftService.fetch(fetchParams, filters) - expect( - authApi.NFTAuthAPI.prototype.get as jest.Mock - ).toHaveBeenCalledWith(fetchParams, filters) + expect(authApi.NFTAuthAPI.prototype.get as jest.Mock).toHaveBeenCalledWith(fetchParams, filters) }) it('should return the NFTs, the accounts, the orders, the rentals and the total', () => { @@ -132,15 +116,11 @@ describe("Decentraland's NFTService", () => { describe('when the fetch fails', () => { beforeEach(() => { - jest - .spyOn(authApi.NFTAuthAPI.prototype, 'get') - .mockRejectedValueOnce(aBasicErrorMessage) + jest.spyOn(authApi.NFTAuthAPI.prototype, 'get').mockRejectedValueOnce(aBasicErrorMessage) }) it("should reject with the fetch's error", () => { - return expect(nftService.count(countParams, filters)).rejects.toEqual( - aBasicErrorMessage - ) + return expect(nftService.count(countParams, filters)).rejects.toEqual(aBasicErrorMessage) }) }) @@ -148,16 +128,12 @@ describe("Decentraland's NFTService", () => { const total = 1 beforeEach(() => { - jest - .spyOn(authApi.NFTAuthAPI.prototype, 'get') - .mockResolvedValueOnce({ total, data: [] }) + jest.spyOn(authApi.NFTAuthAPI.prototype, 'get').mockResolvedValueOnce({ total, data: [] }) }) it('should have fetched the NFTs with the count and filter params, with the first and skip params as 0', async () => { await nftService.count(countParams, filters) - expect( - authApi.NFTAuthAPI.prototype.get as jest.Mock - ).toHaveBeenCalledWith( + expect(authApi.NFTAuthAPI.prototype.get as jest.Mock).toHaveBeenCalledWith( { ...countParams, skip: 0, @@ -168,9 +144,7 @@ describe("Decentraland's NFTService", () => { }) it('should resolve with the number of NFTs', () => { - return expect(nftService.count(countParams, filters)).resolves.toBe( - total - ) + return expect(nftService.count(countParams, filters)).resolves.toBe(total) }) }) }) @@ -178,44 +152,34 @@ describe("Decentraland's NFTService", () => { describe('when fetching one NFT', () => { describe('when the fetch fails', () => { beforeEach(() => { - jest - .spyOn(authApi.NFTAuthAPI.prototype, 'fetchOne') - .mockRejectedValueOnce(aBasicErrorMessage) + jest.spyOn(authApi.NFTAuthAPI.prototype, 'fetchOne').mockRejectedValueOnce(aBasicErrorMessage) }) it("should reject with the fetch's error", () => { - return expect( - nftService.fetchOne(nft.contractAddress, nft.id) - ).rejects.toEqual(aBasicErrorMessage) + return expect(nftService.fetchOne(nft.contractAddress, nft.id)).rejects.toEqual(aBasicErrorMessage) }) }) describe('when the fetch is successful', () => { beforeEach(() => { - jest - .spyOn(authApi.NFTAuthAPI.prototype, 'fetchOne') - .mockResolvedValueOnce({ - order, - nft, - rental - }) + jest.spyOn(authApi.NFTAuthAPI.prototype, 'fetchOne').mockResolvedValueOnce({ + order, + nft, + rental + }) }) it('should fetch the NFT with the provided address and the token ID', async () => { await nftService.fetchOne(nft.contractAddress, nft.id, { rentalStatus: [RentalStatus.EXECUTED] }) - expect( - authApi.NFTAuthAPI.prototype.fetchOne as jest.Mock - ).toHaveBeenCalledWith(nft.contractAddress, nft.id, { + expect(authApi.NFTAuthAPI.prototype.fetchOne as jest.Mock).toHaveBeenCalledWith(nft.contractAddress, nft.id, { rentalStatus: [RentalStatus.EXECUTED] }) }) it('should return the NFT with its vendor and the order', () => { - return expect( - nftService.fetchOne(nft.contractAddress, nft.id) - ).resolves.toEqual([ + return expect(nftService.fetchOne(nft.contractAddress, nft.id)).resolves.toEqual([ { ...nft, vendor: VendorName.DECENTRALAND }, order, rental @@ -230,9 +194,7 @@ describe("Decentraland's NFTService", () => { wallet = null }) it('should reject into a "Wallet must be connected" error', () => { - return expect( - nftService.transfer(null, 'anAddress', nft) - ).rejects.toThrowError('Invalid address. Wallet must be connected.') + return expect(nftService.transfer(null, 'anAddress', nft)).rejects.toThrowError('Invalid address. Wallet must be connected.') }) }) @@ -242,23 +204,17 @@ describe("Decentraland's NFTService", () => { }) describe('when the transaction fails', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce( - aBasicErrorMessage - ) + ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce(aBasicErrorMessage) }) it("should reject with the transaction's error", () => { - return expect( - nftService.transfer(wallet, anAddress, nft) - ).rejects.toBe(aBasicErrorMessage) + return expect(nftService.transfer(wallet, anAddress, nft)).rejects.toBe(aBasicErrorMessage) }) }) describe('when the transaction is successful', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce( - aTxHash - ) + ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce(aTxHash) }) it("should have called send transaction with the erc721's crafted contract using the nft's chain id, the contract address and the ABI", async () => { @@ -289,9 +245,7 @@ describe("Decentraland's NFTService", () => { }) it("should resolve with the transaction's hash", () => { - return expect( - nftService.transfer(wallet, 'anAddress', nft) - ).resolves.toBe(aTxHash) + return expect(nftService.transfer(wallet, 'anAddress', nft)).resolves.toBe(aTxHash) }) }) }) @@ -304,23 +258,17 @@ describe("Decentraland's NFTService", () => { describe('when the transaction fails', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce( - aBasicErrorMessage - ) + ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce(aBasicErrorMessage) }) it("should reject with the transaction's error", () => { - return expect( - nftService.transfer(wallet, anAddress, nft) - ).rejects.toBe(aBasicErrorMessage) + return expect(nftService.transfer(wallet, anAddress, nft)).rejects.toBe(aBasicErrorMessage) }) }) describe('when the transaction is successful', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce( - aTxHash - ) + ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce(aTxHash) }) it("should have called send transaction with the erc721's contract using the nft's chain id and contract address", async () => { @@ -351,9 +299,7 @@ describe("Decentraland's NFTService", () => { }) it("should resolve with the transaction's hash", () => { - return expect( - nftService.transfer(wallet, 'anAddress', nft) - ).resolves.toBe(aTxHash) + return expect(nftService.transfer(wallet, 'anAddress', nft)).resolves.toBe(aTxHash) }) }) }) diff --git a/webapp/src/modules/vendor/decentraland/NFTService.ts b/webapp/src/modules/vendor/decentraland/NFTService.ts index dd86160fb3..24a40bcf7d 100644 --- a/webapp/src/modules/vendor/decentraland/NFTService.ts +++ b/webapp/src/modules/vendor/decentraland/NFTService.ts @@ -11,8 +11,7 @@ import { NFT_SERVER_URL } from './nft/api' import { NFTAuthAPI } from './nft/authApi' import { getERC721ContractData } from './utils' -export class NFTService - implements NFTServiceInterface<VendorName.DECENTRALAND> { +export class NFTService implements NFTServiceInterface<VendorName.DECENTRALAND> { nftAPI: NFTAuthAPI constructor(config?: BaseClientConfig | undefined) { @@ -21,15 +20,7 @@ export class NFTService async fetch( params: NFTsFetchParams, filters?: NFTsFetchFilters - ): Promise< - readonly [ - NFT<VendorName.DECENTRALAND>[], - Account[], - Order[], - RentalListing[], - number - ] - > { + ): Promise<readonly [NFT<VendorName.DECENTRALAND>[], Account[], Order[], RentalListing[], number]> { const { data: results, total } = await this.nftAPI.get(params, filters) const accounts: Account[] = results.reduce((accumulator, nftResult) => { @@ -48,22 +39,15 @@ export class NFTService vendor: VendorName.DECENTRALAND })) - const orders: Order[] = results - .filter(nftResult => nftResult.order) - .map(nftResult => nftResult.order as Order) + const orders: Order[] = results.filter(nftResult => nftResult.order).map(nftResult => nftResult.order as Order) - const rentals: RentalListing[] = results - .filter(nftResult => nftResult.rental) - .map(nftResult => nftResult.rental as RentalListing) + const rentals: RentalListing[] = results.filter(nftResult => nftResult.rental).map(nftResult => nftResult.rental as RentalListing) return [nfts, accounts, orders, rentals, total] } async count(countParams: NFTsCountParams, filters?: NFTsFetchFilters) { - const result = await this.nftAPI.get( - { ...countParams, first: 0, skip: 0 }, - filters - ) + const result = await this.nftAPI.get({ ...countParams, first: 0, skip: 0 }, filters) return result.total } @@ -71,14 +55,8 @@ export class NFTService contractAddress: string, tokenId: string, options?: FetchOneOptions - ): Promise< - readonly [NFT<VendorName.DECENTRALAND>, Order | null, RentalListing | null] - > { - const response = await this.nftAPI.fetchOne( - contractAddress, - tokenId, - options - ) + ): Promise<readonly [NFT<VendorName.DECENTRALAND>, Order | null, RentalListing | null]> { + const response = await this.nftAPI.fetchOne(contractAddress, tokenId, options) const nft: NFT = { ...response.nft, vendor: VendorName.DECENTRALAND } return [nft, response.order, response.rental] } @@ -90,13 +68,7 @@ export class NFTService const contract = getERC721ContractData(nft) - return sendTransaction( - contract, - 'transferFrom', - wallet.address, - to, - nft.tokenId - ) + return sendTransaction(contract, 'transferFrom', wallet.address, to, nft.tokenId) } toAccount(address: string): Account { diff --git a/webapp/src/modules/vendor/decentraland/OrderService.spec.ts b/webapp/src/modules/vendor/decentraland/OrderService.spec.ts index a78ccb0745..3b8af83ac5 100644 --- a/webapp/src/modules/vendor/decentraland/OrderService.spec.ts +++ b/webapp/src/modules/vendor/decentraland/OrderService.spec.ts @@ -1,16 +1,6 @@ import { ethers } from 'ethers' -import { - ChainId, - ListingStatus, - Order, - OrderFilters, - OrderSortBy -} from '@dcl/schemas' -import { - ContractData, - ContractName, - getContract -} from 'decentraland-transactions' +import { ChainId, ListingStatus, Order, OrderFilters, OrderSortBy } from '@dcl/schemas' +import { ContractData, ContractName, getContract } from 'decentraland-transactions' import * as walletUtils from 'decentraland-dapps/dist/modules/wallet/utils' import * as orderAPI from './order/api' import { NFT } from '../../nft/types' @@ -52,15 +42,11 @@ describe("Decentraland's OrderService", () => { describe('when the fetch fails', () => { beforeEach(() => { - ;(orderAPI.orderAPI.fetchOrders as jest.Mock).mockRejectedValueOnce( - aBasicErrorMessage - ) + ;(orderAPI.orderAPI.fetchOrders as jest.Mock).mockRejectedValueOnce(aBasicErrorMessage) }) it('should reject into an exception', () => { - expect(orderService.fetchOrders(params, sortBy)).rejects.toBe( - aBasicErrorMessage - ) + expect(orderService.fetchOrders(params, sortBy)).rejects.toBe(aBasicErrorMessage) }) }) @@ -68,15 +54,11 @@ describe("Decentraland's OrderService", () => { const orders = [{ id: 'anOrderId' }] as Order[] beforeEach(() => { - ;(orderAPI.orderAPI.fetchOrders as jest.Mock).mockResolvedValueOnce( - orders - ) + ;(orderAPI.orderAPI.fetchOrders as jest.Mock).mockResolvedValueOnce(orders) }) it('should reject into an exception', () => { - expect(orderService.fetchOrders(params, sortBy)).resolves.toEqual( - orders - ) + expect(orderService.fetchOrders(params, sortBy)).resolves.toEqual(orders) }) }) }) @@ -96,12 +78,8 @@ describe("Decentraland's OrderService", () => { describe("when the market's contract doesn't exist for the order's chainId", () => { it('should reject into an exception', () => { order.chainId = 234234 as ChainId - return expect( - orderService.execute(null, nft, order, fingerprint) - ).rejects.toEqual( - new Error( - `Could not get a valid contract for Marketplace using chain ${order.chainId}` - ) + return expect(orderService.execute(null, nft, order, fingerprint)).rejects.toEqual( + new Error(`Could not get a valid contract for Marketplace using chain ${order.chainId}`) ) }) }) @@ -113,31 +91,24 @@ describe("Decentraland's OrderService", () => { describe('when the transaction fails', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce( - aBasicErrorMessage - ) + ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce(aBasicErrorMessage) }) it('should reject into an exception', () => { - return expect( - orderService.execute(null, nft, order, fingerprint) - ).rejects.toEqual(aBasicErrorMessage) + return expect(orderService.execute(null, nft, order, fingerprint)).rejects.toEqual(aBasicErrorMessage) }) }) describe('when the transaction is successful', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce( - aTxHash - ) + ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce(aTxHash) }) it("should have called send transaction with the marketplace's contract using the order's chain id", async () => { await orderService.execute(null, nft, order, fingerprint) expect(walletUtils.sendTransaction as jest.Mock).toHaveBeenCalled() - const firstParameter = (walletUtils.sendTransaction as jest.Mock).mock - .calls[0][0] as ContractData + const firstParameter = (walletUtils.sendTransaction as jest.Mock).mock.calls[0][0] as ContractData expect(firstParameter.chainId).toBe(order.chainId) expect(firstParameter.name).toBe('Decentraland Marketplace') }) @@ -155,9 +126,7 @@ describe("Decentraland's OrderService", () => { }) it('should have returned the transaction hash', () => { - return expect( - orderService.execute(null, nft, order, fingerprint) - ).resolves.toBe(aTxHash) + return expect(orderService.execute(null, nft, order, fingerprint)).resolves.toBe(aTxHash) }) }) }) @@ -169,31 +138,24 @@ describe("Decentraland's OrderService", () => { describe('when the transaction fails', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce( - aBasicErrorMessage - ) + ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce(aBasicErrorMessage) }) it('should reject into an exception', () => { - return expect( - orderService.execute(null, nft, order, fingerprint) - ).rejects.toEqual(aBasicErrorMessage) + return expect(orderService.execute(null, nft, order, fingerprint)).rejects.toEqual(aBasicErrorMessage) }) }) describe('when the transaction is successful', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce( - aTxHash - ) + ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce(aTxHash) }) it("should have called send transaction with the marketplace's contract using the order's chain id", async () => { await orderService.execute(null, nft, order, fingerprint) expect(walletUtils.sendTransaction as jest.Mock).toHaveBeenCalled() - const firstParameter = (walletUtils.sendTransaction as jest.Mock).mock - .calls[0][0] as ContractData + const firstParameter = (walletUtils.sendTransaction as jest.Mock).mock.calls[0][0] as ContractData expect(firstParameter.chainId).toBe(order.chainId) expect(firstParameter.name).toBe('Decentraland Marketplace') }) @@ -210,9 +172,7 @@ describe("Decentraland's OrderService", () => { }) it('should have returned the transaction hash', () => { - return expect( - orderService.execute(null, nft, order, fingerprint) - ).resolves.toBe(aTxHash) + return expect(orderService.execute(null, nft, order, fingerprint)).resolves.toBe(aTxHash) }) }) }) @@ -226,43 +186,32 @@ describe("Decentraland's OrderService", () => { describe("when the market's contract doesn't exist for the NFT's chainId", () => { it('should reject into an exception', () => { nft.chainId = 234234 as ChainId - return expect( - orderService.create(null, nft, priceInEther, expiresAt) - ).rejects.toEqual( - new Error( - `Could not get a valid contract for MarketplaceV2 using chain ${nft.chainId}` - ) + return expect(orderService.create(null, nft, priceInEther, expiresAt)).rejects.toEqual( + new Error(`Could not get a valid contract for MarketplaceV2 using chain ${nft.chainId}`) ) }) }) describe('when the transaction fails', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce( - aBasicErrorMessage - ) + ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce(aBasicErrorMessage) }) it('should reject into an exception', () => { - return expect( - orderService.create(null, nft, priceInEther, expiresAt) - ).rejects.toEqual(aBasicErrorMessage) + return expect(orderService.create(null, nft, priceInEther, expiresAt)).rejects.toEqual(aBasicErrorMessage) }) }) describe('when the transaction is successful', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce( - aTxHash - ) + ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce(aTxHash) }) it("should have called send transaction with the marketplace's contract using the nft's chain id", async () => { await orderService.create(null, nft, priceInEther, expiresAt) expect(walletUtils.sendTransaction as jest.Mock).toHaveBeenCalled() - const firstParameter = (walletUtils.sendTransaction as jest.Mock).mock - .calls[0][0] as ContractData + const firstParameter = (walletUtils.sendTransaction as jest.Mock).mock.calls[0][0] as ContractData expect(firstParameter.chainId).toBe(nft.chainId) expect(firstParameter.name).toBe('Decentraland Marketplace') }) @@ -280,9 +229,7 @@ describe("Decentraland's OrderService", () => { }) it('should have returned the transaction hash', () => { - return expect( - orderService.create(null, nft, priceInEther, expiresAt) - ).resolves.toBe(aTxHash) + return expect(orderService.create(null, nft, priceInEther, expiresAt)).resolves.toBe(aTxHash) }) }) }) @@ -304,40 +251,31 @@ describe("Decentraland's OrderService", () => { it('should reject into an exception', () => { order.chainId = 234234 as ChainId return expect(orderService.cancel(null, order)).rejects.toEqual( - new Error( - `Could not get a valid contract for Marketplace using chain ${order.chainId}` - ) + new Error(`Could not get a valid contract for Marketplace using chain ${order.chainId}`) ) }) }) describe('when the transaction fails', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce( - aBasicErrorMessage - ) + ;(walletUtils.sendTransaction as jest.Mock).mockRejectedValueOnce(aBasicErrorMessage) }) it('should reject into an exception', () => { - return expect(orderService.cancel(null, order)).rejects.toEqual( - aBasicErrorMessage - ) + return expect(orderService.cancel(null, order)).rejects.toEqual(aBasicErrorMessage) }) }) describe('when the transaction is successful', () => { beforeEach(() => { - ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce( - aTxHash - ) + ;(walletUtils.sendTransaction as jest.Mock).mockResolvedValueOnce(aTxHash) }) it("should have called send transaction with the marketplace's contract using the order's chain id", async () => { await orderService.cancel(null, order) expect(walletUtils.sendTransaction as jest.Mock).toHaveBeenCalled() - const firstParameter = (walletUtils.sendTransaction as jest.Mock).mock - .calls[0][0] as ContractData + const firstParameter = (walletUtils.sendTransaction as jest.Mock).mock.calls[0][0] as ContractData expect(firstParameter.chainId).toBe(order.chainId) expect(firstParameter.name).toBe('Decentraland Marketplace') }) diff --git a/webapp/src/modules/vendor/decentraland/OrderService.ts b/webapp/src/modules/vendor/decentraland/OrderService.ts index 476175bac0..6b77d9f09c 100644 --- a/webapp/src/modules/vendor/decentraland/OrderService.ts +++ b/webapp/src/modules/vendor/decentraland/OrderService.ts @@ -1,10 +1,6 @@ import { ethers } from 'ethers' import { Network, Order, OrderFilters, OrderSortBy } from '@dcl/schemas' -import { - ContractName, - getContract, - getContractName -} from 'decentraland-transactions' +import { ContractName, getContract, getContractName } from 'decentraland-transactions' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { sendTransaction } from 'decentraland-dapps/dist/modules/wallet/utils' import { fromMillisecondsToSeconds } from '../../../lib/time' @@ -14,27 +10,13 @@ import { VendorName } from '../types' import { OrderService as OrderServiceInterface } from '../services' import { OrderResponse } from './order/types' -export class OrderService - implements OrderServiceInterface<VendorName.DECENTRALAND> { - async fetchOrders( - params: OrderFilters, - sortBy: OrderSortBy - ): Promise<OrderResponse> { +export class OrderService implements OrderServiceInterface<VendorName.DECENTRALAND> { + async fetchOrders(params: OrderFilters, sortBy: OrderSortBy): Promise<OrderResponse> { return orderAPI.fetchOrders(params, sortBy) } - async create( - _wallet: Wallet | null, - nft: NFT, - price: number, - expiresAt: number - ) { - const contract = getContract( - nft.network === Network.ETHEREUM - ? ContractName.Marketplace - : ContractName.MarketplaceV2, - nft.chainId - ) + async create(_wallet: Wallet | null, nft: NFT, price: number, expiresAt: number) { + const contract = getContract(nft.network === Network.ETHEREUM ? ContractName.Marketplace : ContractName.MarketplaceV2, nft.chainId) return sendTransaction( contract, 'createOrder', @@ -45,43 +27,20 @@ export class OrderService ) } - async execute( - _wallet: Wallet | null, - nft: NFT, - order: Order, - fingerprint?: string - ) { + async execute(_wallet: Wallet | null, nft: NFT, order: Order, fingerprint?: string) { const contractName = getContractName(order.marketplaceAddress) const contract = getContract(contractName, order.chainId) if (fingerprint) { - return sendTransaction( - contract, - 'safeExecuteOrder', - nft.contractAddress, - nft.tokenId, - order.price, - fingerprint - ) + return sendTransaction(contract, 'safeExecuteOrder', nft.contractAddress, nft.tokenId, order.price, fingerprint) } else { - return sendTransaction( - contract, - 'executeOrder', - nft.contractAddress, - nft.tokenId, - order.price - ) + return sendTransaction(contract, 'executeOrder', nft.contractAddress, nft.tokenId, order.price) } } async cancel(_wallet: Wallet | null, order: Order) { const contractName = getContractName(order.marketplaceAddress) const contract = getContract(contractName, order.chainId) - return sendTransaction( - contract, - 'cancelOrder', - order.contractAddress, - order.tokenId - ) + return sendTransaction(contract, 'cancelOrder', order.contractAddress, order.tokenId) } canSell() { diff --git a/webapp/src/modules/vendor/decentraland/SubgraphService.ts b/webapp/src/modules/vendor/decentraland/SubgraphService.ts index 4dec73ffae..a04e1b7891 100644 --- a/webapp/src/modules/vendor/decentraland/SubgraphService.ts +++ b/webapp/src/modules/vendor/decentraland/SubgraphService.ts @@ -1,6 +1,6 @@ import { config } from '../../../config' -export const SUBGRAPH_WORKER = config.get('SUBGRAPH_WORKER')! +export const SUBGRAPH_WORKER = config.get('SUBGRAPH_WORKER') export class SubgraphService { async fetch<T>(subgraph: string, query: string): Promise<T | undefined> { diff --git a/webapp/src/modules/vendor/decentraland/account/api.ts b/webapp/src/modules/vendor/decentraland/account/api.ts index 1ac886e56d..11968993fe 100644 --- a/webapp/src/modules/vendor/decentraland/account/api.ts +++ b/webapp/src/modules/vendor/decentraland/account/api.ts @@ -11,13 +11,9 @@ class AccountAPI extends BaseAPI { } fetchOne = async (address: string): Promise<Account> => { - const { data }: AccountResponse = await this.request( - 'get', - '/collections', - { - address - } - ) + const { data }: AccountResponse = await this.request('get', '/collections', { + address + }) if (data.length === 0) { throw new Error('Not found') diff --git a/webapp/src/modules/vendor/decentraland/analytics/api.ts b/webapp/src/modules/vendor/decentraland/analytics/api.ts index 9ddbef9b6e..e8a8d9dfda 100644 --- a/webapp/src/modules/vendor/decentraland/analytics/api.ts +++ b/webapp/src/modules/vendor/decentraland/analytics/api.ts @@ -1,15 +1,10 @@ import { BaseAPI } from 'decentraland-dapps/dist/lib/api' -import { - AnalyticsTimeframe, - AnalyticsVolumeData -} from '../../../analytics/types' +import { AnalyticsTimeframe, AnalyticsVolumeData } from '../../../analytics/types' import { NFT_SERVER_URL } from '../nft' import { retryParams } from '../utils' class AnalyticsAPI extends BaseAPI { - fetchVolumeByTimeframe = async ( - timeframe: AnalyticsTimeframe - ): Promise<{ data: AnalyticsVolumeData }> => + fetchVolumeByTimeframe = async (timeframe: AnalyticsTimeframe): Promise<{ data: AnalyticsVolumeData }> => this.request('get', `/volume/${timeframe}`) } diff --git a/webapp/src/modules/vendor/decentraland/bid/api.spec.ts b/webapp/src/modules/vendor/decentraland/bid/api.spec.ts index 50fa6d02a7..140f2e80ca 100644 --- a/webapp/src/modules/vendor/decentraland/bid/api.spec.ts +++ b/webapp/src/modules/vendor/decentraland/bid/api.spec.ts @@ -10,10 +10,7 @@ describe('when fetching bids by seller', () => { await bidAPI.fetchBySeller('0x123') - expect(bidAPI.request).toHaveBeenCalledWith( - 'get', - '/bids?seller=0x123&status=open&first=1000' - ) + expect(bidAPI.request).toHaveBeenCalledWith('get', '/bids?seller=0x123&status=open&first=1000') }) }) @@ -23,10 +20,7 @@ describe('when fetching bids by bidder', () => { await bidAPI.fetchByBidder('0x123') - expect(bidAPI.request).toHaveBeenCalledWith( - 'get', - '/bids?bidder=0x123&status=open&first=1000' - ) + expect(bidAPI.request).toHaveBeenCalledWith('get', '/bids?bidder=0x123&status=open&first=1000') }) }) @@ -36,9 +30,6 @@ describe('when fetching bids by nft', () => { await bidAPI.fetchByNFT('0x123', '123') - expect(bidAPI.request).toHaveBeenCalledWith( - 'get', - '/bids?contractAddress=0x123&tokenId=123&status=open&first=1000&skip=0' - ) + expect(bidAPI.request).toHaveBeenCalledWith('get', '/bids?contractAddress=0x123&tokenId=123&status=open&first=1000&skip=0') }) }) diff --git a/webapp/src/modules/vendor/decentraland/bid/api.ts b/webapp/src/modules/vendor/decentraland/bid/api.ts index 2ef65d39df..9315c76f7e 100644 --- a/webapp/src/modules/vendor/decentraland/bid/api.ts +++ b/webapp/src/modules/vendor/decentraland/bid/api.ts @@ -6,11 +6,7 @@ import { retryParams } from '../utils' const FIRST = '1000' class BidAPI extends BaseAPI { - async fetch( - options: Record<string, string>, - sortBy?: BidSortBy, - bidder?: string - ): Promise<{ data: Bid[]; total: number }> { + async fetch(options: Record<string, string>, sortBy?: BidSortBy, bidder?: string): Promise<{ data: Bid[]; total: number }> { const queryParams = new URLSearchParams() for (const key of Object.keys(options)) { queryParams.append(key, options[key]) @@ -18,10 +14,7 @@ class BidAPI extends BaseAPI { sortBy && queryParams.append('sortBy', sortBy.toString()) bidder && queryParams.append('bidder', bidder) try { - const response: { data: Bid[]; total: number } = await this.request( - 'get', - `/bids?${queryParams.toString()}` - ) + const response: { data: Bid[]; total: number } = await this.request('get', `/bids?${queryParams.toString()}`) return response } catch (error) { return { data: [], total: 0 } diff --git a/webapp/src/modules/vendor/decentraland/builder/api.spec.ts b/webapp/src/modules/vendor/decentraland/builder/api.spec.ts index c2f84337bf..2c2991155d 100644 --- a/webapp/src/modules/vendor/decentraland/builder/api.spec.ts +++ b/webapp/src/modules/vendor/decentraland/builder/api.spec.ts @@ -4,9 +4,7 @@ describe('when getting the content url by a given hash', () => { const hash = 'aHash' it('should return the complete url', () => { - expect(builderAPI.contentUrl(hash)).toBe( - `${BUILDER_SERVER_URL}/storage/contents/${hash}` - ) + expect(builderAPI.contentUrl(hash)).toBe(`${BUILDER_SERVER_URL}/storage/contents/${hash}`) }) }) diff --git a/webapp/src/modules/vendor/decentraland/builder/api.ts b/webapp/src/modules/vendor/decentraland/builder/api.ts index 8bdb9b86cf..190a1351d9 100644 --- a/webapp/src/modules/vendor/decentraland/builder/api.ts +++ b/webapp/src/modules/vendor/decentraland/builder/api.ts @@ -3,16 +3,11 @@ import { AddressesByTagResponse, BuilderCollectionAttributes } from './types' import { config } from '../../../../config' import { retryParams } from '../utils' -export const BUILDER_SERVER_URL = config.get('BUILDER_SERVER_URL')! +export const BUILDER_SERVER_URL = config.get('BUILDER_SERVER_URL') class BuilderAPI extends BaseAPI { - fetchAddressesByTag = async ( - tags: string[] - ): Promise<AddressesByTagResponse> => { - return this.request( - 'get', - `/addresses?${tags.map(tag => `tag=${tag}`).join('&')}` - ) + fetchAddressesByTag = async (tags: string[]): Promise<AddressesByTagResponse> => { + return this.request('get', `/addresses?${tags.map(tag => `tag=${tag}`).join('&')}`) } publishedCollectionURL(searchTerm: string, limit: number) { @@ -33,10 +28,7 @@ class BuilderAPI extends BaseAPI { return `${this.url}/storage/contents/${hash}` } - fetchItemContent = async ( - collectionAddress: string, - itemId: string - ): Promise<Record<string, string>> => { + fetchItemContent = async (collectionAddress: string, itemId: string): Promise<Record<string, string>> => { return this.request('get', `/items/${collectionAddress}/${itemId}/contents`) } } diff --git a/webapp/src/modules/vendor/decentraland/catalog/api.ts b/webapp/src/modules/vendor/decentraland/catalog/api.ts index 435c083542..4d165ac189 100644 --- a/webapp/src/modules/vendor/decentraland/catalog/api.ts +++ b/webapp/src/modules/vendor/decentraland/catalog/api.ts @@ -25,9 +25,7 @@ export class CatalogAPI extends BaseClient { } if (filters.creator) { - let creators = Array.isArray(filters.creator) - ? filters.creator - : [filters.creator] + const creators = Array.isArray(filters.creator) ? filters.creator : [filters.creator] creators.forEach(creator => queryParams.append('creator', creator)) } @@ -88,9 +86,7 @@ export class CatalogAPI extends BaseClient { // } if (filters.contractAddresses) { - filters.contractAddresses.forEach(contract => - queryParams.append('contractAddress', contract) - ) + filters.contractAddresses.forEach(contract => queryParams.append('contractAddress', contract)) } if (filters.itemId) { diff --git a/webapp/src/modules/vendor/decentraland/collection/api.ts b/webapp/src/modules/vendor/decentraland/collection/api.ts index d8a2811ea5..38a43704d5 100644 --- a/webapp/src/modules/vendor/decentraland/collection/api.ts +++ b/webapp/src/modules/vendor/decentraland/collection/api.ts @@ -5,21 +5,15 @@ import { retryParams } from '../utils' import { CollectionResponse } from './types' class CollectionAPI extends BaseAPI { - fetch = async ( - filters: CollectionFilters = {} - ): Promise<CollectionResponse> => { + fetch = async (filters: CollectionFilters = {}): Promise<CollectionResponse> => { const queryParams = this.buildCollectionsQueryString(filters) return this.request('get', `/collections?${queryParams}`) } fetchOne = async (collectionUrn: string): Promise<Collection> => { - const { data }: CollectionResponse = await this.request( - 'get', - '/collections', - { - urn: collectionUrn - } - ) + const { data }: CollectionResponse = await this.request('get', '/collections', { + urn: collectionUrn + }) if (data.length === 0) { throw new Error('Not found') diff --git a/webapp/src/modules/vendor/decentraland/contracts.ts b/webapp/src/modules/vendor/decentraland/contracts.ts index abcbb5b39b..e5b186b0f0 100644 --- a/webapp/src/modules/vendor/decentraland/contracts.ts +++ b/webapp/src/modules/vendor/decentraland/contracts.ts @@ -2,8 +2,7 @@ import { NFTCategory, ChainId, Network } from '@dcl/schemas' import { getContract, ContractName as CN } from 'decentraland-transactions' import { Network as AppNetwork } from '../../contract/types' -export const LEGACY_MARKETPLACE_MAINNET_CONTRACT = - '0xb3bca6f5052c7e24726b44da7403b56a8a1b98f8' +export const LEGACY_MARKETPLACE_MAINNET_CONTRACT = '0xb3bca6f5052c7e24726b44da7403b56a8a1b98f8' export enum ContractName { MANA = 'MANA', @@ -679,16 +678,7 @@ const localContracts = { } export const contracts = { - [AppNetwork.GOERLI]: [ - ...localContracts[AppNetwork.GOERLI], - ...nftServerReplicatedMarketplaceContracts[AppNetwork.GOERLI] - ], - [AppNetwork.MAINNET]: [ - ...localContracts[AppNetwork.MAINNET], - ...nftServerReplicatedMarketplaceContracts[AppNetwork.MAINNET] - ], - [AppNetwork.SEPOLIA]: [ - ...localContracts[AppNetwork.SEPOLIA], - ...nftServerReplicatedMarketplaceContracts[AppNetwork.SEPOLIA] - ] + [AppNetwork.GOERLI]: [...localContracts[AppNetwork.GOERLI], ...nftServerReplicatedMarketplaceContracts[AppNetwork.GOERLI]], + [AppNetwork.MAINNET]: [...localContracts[AppNetwork.MAINNET], ...nftServerReplicatedMarketplaceContracts[AppNetwork.MAINNET]], + [AppNetwork.SEPOLIA]: [...localContracts[AppNetwork.SEPOLIA], ...nftServerReplicatedMarketplaceContracts[AppNetwork.SEPOLIA]] } diff --git a/webapp/src/modules/vendor/decentraland/favorites/api.spec.ts b/webapp/src/modules/vendor/decentraland/favorites/api.spec.ts index c1d369ff1d..12ca2a66ee 100644 --- a/webapp/src/modules/vendor/decentraland/favorites/api.spec.ts +++ b/webapp/src/modules/vendor/decentraland/favorites/api.spec.ts @@ -2,12 +2,7 @@ import { AuthIdentity } from 'decentraland-crypto-fetch' import { FavoritedItems, List } from '../../../favorites/types' import { ItemFilters } from '../item/types' import { FavoritesAPI, MARKETPLACE_FAVORITES_SERVER_URL } from './api' -import { - ListDetails, - ListOfLists, - Permission, - UpdateOrCreateList -} from './types' +import { ListDetails, ListOfLists, Permission, UpdateOrCreateList } from './types' let itemId: string let identity: AuthIdentity @@ -42,9 +37,7 @@ describe('when getting the items picked in a list', () => { it('should resolve the favorited item ids and the total favorited', async () => { const expectedUrl = `/v1/lists/${listId}/picks` - await expect(favoritesAPI.getPicksByList(listId, filters)).resolves.toBe( - data - ) + await expect(favoritesAPI.getPicksByList(listId, filters)).resolves.toBe(data) expect(fetchMock).toHaveBeenCalledWith(expectedUrl) }) }) @@ -60,9 +53,7 @@ describe('when getting the items picked in a list', () => { it('should resolve the favorited item ids and the total favorited', async () => { const expectedUrl = `/v1/lists/${listId}/picks?limit=${filters.first}&offset=${filters.skip}` - await expect(favoritesAPI.getPicksByList(listId, filters)).resolves.toBe( - data - ) + await expect(favoritesAPI.getPicksByList(listId, filters)).resolves.toBe(data) expect(fetchMock).toHaveBeenCalledWith(expectedUrl) }) }) @@ -81,12 +72,8 @@ describe('when getting who favorited an item', () => { }) it('should resolve with the addresses of the users who favorited the item and the total of them', () => { - return expect( - favoritesAPI.getWhoFavoritedAnItem(itemId, 0, 10) - ).resolves.toEqual({ - addresses: data.results.map( - (pick: { userAddress: string }) => pick.userAddress - ), + return expect(favoritesAPI.getWhoFavoritedAnItem(itemId, 0, 10)).resolves.toEqual({ + addresses: data.results.map((pick: { userAddress: string }) => pick.userAddress), total: data.total }) }) @@ -138,36 +125,31 @@ describe('when getting the lists', () => { ['sortBy', 'name', 'sortBy'], ['sortDirection', 'asc', 'sortDirection'], ['itemId', 'anItemId', 'itemId'] - ])( - 'when the request is made with the %s parameter', - (parameter, value, expectedParameter) => { - let response: { results: ListOfLists[]; total: number } - beforeEach(async () => { - response = { - results: [ - { - id: 'aListId', - name: 'aName', - itemsCount: 1, - isPrivate: true, - previewOfItemIds: ['anItemId'] - } - ], - total: 1 - } - fetchMock.mockResolvedValueOnce(response) - await favoritesAPI.getLists({ - [parameter]: value - }) + ])('when the request is made with the %s parameter', (parameter, value, expectedParameter) => { + let response: { results: ListOfLists[]; total: number } + beforeEach(async () => { + response = { + results: [ + { + id: 'aListId', + name: 'aName', + itemsCount: 1, + isPrivate: true, + previewOfItemIds: ['anItemId'] + } + ], + total: 1 + } + fetchMock.mockResolvedValueOnce(response) + await favoritesAPI.getLists({ + [parameter]: value }) + }) - it(`should have called the API with the query parameter ${parameter} with its value`, () => { - expect(fetchMock).toHaveBeenCalledWith( - expect.stringContaining(`${expectedParameter}=${value}`) - ) - }) - } - ) + it(`should have called the API with the query parameter ${parameter} with its value`, () => { + expect(fetchMock).toHaveBeenCalledWith(expect.stringContaining(`${expectedParameter}=${value}`)) + }) + }) }) describe('when deleting a list', () => { @@ -194,9 +176,7 @@ describe('when deleting a list', () => { }) it('should resolve', () => { - return expect(favoritesAPI.deleteList('aListId')).resolves.toEqual( - response - ) + return expect(favoritesAPI.deleteList('aListId')).resolves.toEqual(response) }) }) }) @@ -257,9 +237,7 @@ describe('when updating a list', () => { }) it('should reject with the request error', () => { - return expect(favoritesAPI.updateList('aListId', {})).rejects.toEqual( - error - ) + return expect(favoritesAPI.updateList('aListId', {})).rejects.toEqual(error) }) }) diff --git a/webapp/src/modules/vendor/decentraland/favorites/api.ts b/webapp/src/modules/vendor/decentraland/favorites/api.ts index 3d9086ff26..c7e2d84e6b 100644 --- a/webapp/src/modules/vendor/decentraland/favorites/api.ts +++ b/webapp/src/modules/vendor/decentraland/favorites/api.ts @@ -1,31 +1,14 @@ import { BaseClient } from 'decentraland-dapps/dist/lib/BaseClient' import { config } from '../../../../config' import { FavoritedItems } from '../../../favorites/types' -import { - BulkPickUnpickResponse, - ListDetails, - ListOfLists, - ListsOptions, - PicksOptions, - UpdateOrCreateList -} from './types' - -export const DEFAULT_FAVORITES_LIST_ID = config.get( - 'DEFAULT_FAVORITES_LIST_ID' -)! - -export const MARKETPLACE_FAVORITES_SERVER_URL = config.get( - 'MARKETPLACE_FAVORITES_SERVER_URL' -)! +import { BulkPickUnpickResponse, ListDetails, ListOfLists, ListsOptions, PicksOptions, UpdateOrCreateList } from './types' + +export const DEFAULT_FAVORITES_LIST_ID = config.get('DEFAULT_FAVORITES_LIST_ID') + +export const MARKETPLACE_FAVORITES_SERVER_URL = config.get('MARKETPLACE_FAVORITES_SERVER_URL') export class FavoritesAPI extends BaseClient { - private buildPaginationParameters({ - first, - skip - }: { - first?: number - skip?: number - }): URLSearchParams { + private buildPaginationParameters({ first, skip }: { first?: number; skip?: number }): URLSearchParams { const queryParams = new URLSearchParams() if (first !== undefined) { queryParams.append('limit', first.toString()) @@ -57,16 +40,10 @@ export class FavoritesAPI extends BaseClient { queryParams.append('itemId', options.itemId) } - return ( - '/v1/lists' + (queryParams.toString() && `?${queryParams.toString()}`) - ) + return '/v1/lists' + (queryParams.toString() && `?${queryParams.toString()}`) } - async getWhoFavoritedAnItem( - itemId: string, - limit: number, - offset: number - ): Promise<{ addresses: string[]; total: number }> { + async getWhoFavoritedAnItem(itemId: string, limit: number, offset: number): Promise<{ addresses: string[]; total: number }> { const { results, total } = await this.fetch<{ results: { userAddress: string }[] total: number @@ -98,9 +75,7 @@ export class FavoritesAPI extends BaseClient { ) } - async getLists( - options: ListsOptions = {} - ): Promise<{ results: ListOfLists[]; total: number }> { + async getLists(options: ListsOptions = {}): Promise<{ results: ListOfLists[]; total: number }> { return this.fetch(this.buildListsUrl(options)) } @@ -151,11 +126,7 @@ export class FavoritesAPI extends BaseClient { }) } - async bulkPickUnpick( - itemId: string, - pickedFor: string[], - unpickedFrom: string[] - ): Promise<BulkPickUnpickResponse> { + async bulkPickUnpick(itemId: string, pickedFor: string[], unpickedFrom: string[]): Promise<BulkPickUnpickResponse> { return this.fetch(`/v1/picks/${itemId}`, { method: 'POST', body: JSON.stringify({ diff --git a/webapp/src/modules/vendor/decentraland/favorites/types.ts b/webapp/src/modules/vendor/decentraland/favorites/types.ts index be6c02bb45..51c0d3d502 100644 --- a/webapp/src/modules/vendor/decentraland/favorites/types.ts +++ b/webapp/src/modules/vendor/decentraland/favorites/types.ts @@ -36,10 +36,7 @@ export type BaseList = { previewOfItemIds: string[] } -export type ListOfLists = Pick< - BaseList, - 'id' | 'name' | 'isPrivate' | 'previewOfItemIds' -> & { +export type ListOfLists = Pick<BaseList, 'id' | 'name' | 'isPrivate' | 'previewOfItemIds'> & { itemsCount: number isItemInList?: boolean } diff --git a/webapp/src/modules/vendor/decentraland/item/api.ts b/webapp/src/modules/vendor/decentraland/item/api.ts index 369225ff19..cc012b4c79 100644 --- a/webapp/src/modules/vendor/decentraland/item/api.ts +++ b/webapp/src/modules/vendor/decentraland/item/api.ts @@ -1,7 +1,6 @@ import { Item } from '@dcl/schemas' import { BaseClient } from 'decentraland-dapps/dist/lib/BaseClient' -import { ItemFilters } from './types' -import { ItemResponse } from './types' +import { ItemFilters, ItemResponse } from './types' export const DEFAULT_TRENDING_PAGE_SIZE = 20 @@ -20,9 +19,7 @@ export class ItemAPI extends BaseClient { contractAddresses: [contractAddress], itemId }) - const response: ItemResponse = await this.fetch( - `/v1/items?${queryParams.toString()}` - ) + const response: ItemResponse = await this.fetch(`/v1/items?${queryParams.toString()}`) if (response.data.length === 0) { throw new Error('Not found') @@ -51,9 +48,7 @@ export class ItemAPI extends BaseClient { } if (filters.creator) { - let creators = Array.isArray(filters.creator) - ? filters.creator - : [filters.creator] + const creators = Array.isArray(filters.creator) ? filters.creator : [filters.creator] creators.forEach(creator => queryParams.append('creator', creator)) } @@ -103,9 +98,7 @@ export class ItemAPI extends BaseClient { filters.ids.forEach(id => queryParams.append('id', id)) } if (filters.contractAddresses) { - filters.contractAddresses.forEach(contract => - queryParams.append('contractAddress', contract) - ) + filters.contractAddresses.forEach(contract => queryParams.append('contractAddress', contract)) } if (filters.itemId) { queryParams.append('itemId', filters.itemId) diff --git a/webapp/src/modules/vendor/decentraland/item/types.ts b/webapp/src/modules/vendor/decentraland/item/types.ts index 57753eeb54..35c3e1b910 100644 --- a/webapp/src/modules/vendor/decentraland/item/types.ts +++ b/webapp/src/modules/vendor/decentraland/item/types.ts @@ -1,9 +1,4 @@ -import { - Item, - ItemSortBy, - CatalogSortBy, - ItemFilters as ItemFiltersSchema -} from '@dcl/schemas' +import { Item, ItemSortBy, CatalogSortBy, ItemFilters as ItemFiltersSchema } from '@dcl/schemas' export type ItemFilters = Omit<ItemFiltersSchema, 'sortBy'> & { sortBy?: ItemSortBy | CatalogSortBy diff --git a/webapp/src/modules/vendor/decentraland/land/api.ts b/webapp/src/modules/vendor/decentraland/land/api.ts index c8986480c6..86fd6799c6 100644 --- a/webapp/src/modules/vendor/decentraland/land/api.ts +++ b/webapp/src/modules/vendor/decentraland/land/api.ts @@ -3,7 +3,7 @@ import { BaseAPI } from 'decentraland-dapps/dist/lib/api' import { config } from '../../../../config' import { retryParams } from '../utils' -export const ATLAS_SERVER_URL = config.get('ATLAS_SERVER_URL')! +export const ATLAS_SERVER_URL = config.get('ATLAS_SERVER_URL') const httpRequest = axios.create({ baseURL: ATLAS_SERVER_URL }) class AtlasAPI extends BaseAPI { fetchTiles = async (): Promise<any> => httpRequest.get('/v1/tiles') diff --git a/webapp/src/modules/vendor/decentraland/lists/api.ts b/webapp/src/modules/vendor/decentraland/lists/api.ts index 93d8758bbd..b103fe9507 100644 --- a/webapp/src/modules/vendor/decentraland/lists/api.ts +++ b/webapp/src/modules/vendor/decentraland/lists/api.ts @@ -5,10 +5,7 @@ export const DCL_LISTS_URL = config.get('DCL_LISTS_SERVER', '') export class DclListsAPI extends BaseAPI { public async fetchBannedNames(): Promise<string[]> { - const response: { data: string[] } = await this.request( - 'POST', - '/banned-names' - ) + const response: { data: string[] } = await this.request('POST', '/banned-names') return response.data } } diff --git a/webapp/src/modules/vendor/decentraland/marketplace/api.ts b/webapp/src/modules/vendor/decentraland/marketplace/api.ts index ffb157e653..4bcff1d032 100644 --- a/webapp/src/modules/vendor/decentraland/marketplace/api.ts +++ b/webapp/src/modules/vendor/decentraland/marketplace/api.ts @@ -4,13 +4,10 @@ import { Balance } from './types' import { config } from '../../../../config' import { retryParams } from '../utils' -export const MARKETPLACE_SERVER_URL = config.get('MARKETPLACE_SERVER_URL')! +export const MARKETPLACE_SERVER_URL = config.get('MARKETPLACE_SERVER_URL') export class MarketplaceAPI extends BaseAPI { - fetchWalletTokenBalances = async ( - chain: ChainId, - wallet: string - ): Promise<Balance[]> => { + fetchWalletTokenBalances = async (chain: ChainId, wallet: string): Promise<Balance[]> => { const chainIdToChainName = { [ChainId.ETHEREUM_MAINNET]: 'eth-mainnet', [ChainId.ETHEREUM_SEPOLIA]: 'eth-sepolia', @@ -22,15 +19,9 @@ export class MarketplaceAPI extends BaseAPI { [ChainId.ARBITRUM_MAINNET]: 'arbitrum-mainnet', [ChainId.FANTOM_MAINNET]: 'fantom-mainnet' } as Record<ChainId, string> - const balances = await this.request( - 'get', - `/${chainIdToChainName[chain]}/address/${wallet}/balance` - ) + const balances = await this.request('get', `/${chainIdToChainName[chain]}/address/${wallet}/balance`) return balances } } -export const marketplaceAPI = new MarketplaceAPI( - MARKETPLACE_SERVER_URL, - retryParams -) +export const marketplaceAPI = new MarketplaceAPI(MARKETPLACE_SERVER_URL, retryParams) diff --git a/webapp/src/modules/vendor/decentraland/nft/api.ts b/webapp/src/modules/vendor/decentraland/nft/api.ts index 0e4693085d..3441eb788c 100644 --- a/webapp/src/modules/vendor/decentraland/nft/api.ts +++ b/webapp/src/modules/vendor/decentraland/nft/api.ts @@ -1,7 +1,7 @@ import { NFTCategory, NFTFilters, RentalStatus } from '@dcl/schemas' import { BaseAPI } from 'decentraland-dapps/dist/lib/api' import { NFTsFetchParams } from '../../../nft/types' -import { NFTsFetchFilters, NFTResponse, NFTResult } from './types' +import { NFTsFetchFilters, NFTResponse, NFTResult, OwnersFilters, OwnersResponse } from './types' import { ATLAS_SERVER_URL } from '../land' import { Contract } from '../../services' import { FetchOneOptions, VendorName } from '../../types' @@ -9,10 +9,9 @@ import { getNFTSortBy } from '../../../routing/search' import { AssetType } from '../../../asset/types' import { config } from '../../../../config' import { retryParams } from '../utils' -import { OwnersFilters, OwnersResponse } from './types' -export const MARKETPLACE_SERVER_URL = config.get('MARKETPLACE_SERVER_URL')! -export const NFT_SERVER_URL = config.get('NFT_SERVER_URL')! +export const MARKETPLACE_SERVER_URL = config.get('MARKETPLACE_SERVER_URL') +export const NFT_SERVER_URL = config.get('NFT_SERVER_URL') export enum PriceFilterExtraOption { LAND = 'land' @@ -26,35 +25,21 @@ export type PriceFilters = Omit<NFTsFetchFilters, 'category'> & { export type EstateSizeFilters = Pick< NFTFilters, - | 'isOnSale' - | 'adjacentToRoad' - | 'minDistanceToPlaza' - | 'maxDistanceToPlaza' - | 'minPrice' - | 'maxPrice' + 'isOnSale' | 'adjacentToRoad' | 'minDistanceToPlaza' | 'maxDistanceToPlaza' | 'minPrice' | 'maxPrice' > class NFTAPI extends BaseAPI { - fetchEstateSizes = async ( - filters: EstateSizeFilters - ): Promise<Record<string, number>> => { + fetchEstateSizes = async (filters: EstateSizeFilters): Promise<Record<string, number>> => { const { data } = await this.request('get', `/stats/estate/size`, filters) return data } - fetch = async ( - params: NFTsFetchParams, - filters?: NFTsFetchFilters - ): Promise<NFTResponse> => { + fetch = async (params: NFTsFetchParams, filters?: NFTsFetchFilters): Promise<NFTResponse> => { const queryParams = this.buildNFTQueryString(params, filters) return this.request('get', `/nfts?${queryParams}`) } - async fetchOne( - contractAddress: string, - tokenId: string, - options?: FetchOneOptions - ): Promise<NFTResult> { + async fetchOne(contractAddress: string, tokenId: string, options?: FetchOneOptions): Promise<NFTResult> { const response: NFTResponse = await this.request('get', '/nfts', { contractAddress, tokenId, @@ -70,9 +55,7 @@ class NFTAPI extends BaseAPI { async fetchTokenId(x: number, y: number) { try { - const { id } = await fetch( - `${ATLAS_SERVER_URL}/v2/parcels/${x}/${y}` - ).then(resp => resp.json()) + const { id } = await fetch(`${ATLAS_SERVER_URL}/v2/parcels/${x}/${y}`).then(resp => resp.json()) return id } catch (error) { return null @@ -101,22 +84,17 @@ class NFTAPI extends BaseAPI { data: Omit<Contract, 'vendor'>[] total: number } = await this.request('get', '/contracts', { first: 0 }) - const contracts: Contract[] = response.data.map( - contractWithoutVendor => ({ - ...contractWithoutVendor, - vendor: VendorName.DECENTRALAND - }) - ) + const contracts: Contract[] = response.data.map(contractWithoutVendor => ({ + ...contractWithoutVendor, + vendor: VendorName.DECENTRALAND + })) return contracts } catch (error) { return [] } } - private appendNFTFiltersToQueryParams( - queryParams: URLSearchParams, - filters: NFTsFetchFilters - ): void { + private appendNFTFiltersToQueryParams(queryParams: URLSearchParams, filters: NFTsFetchFilters): void { if (filters.rarities) { for (const rarity of filters.rarities) { queryParams.append('itemRarity', rarity) @@ -160,16 +138,12 @@ class NFTAPI extends BaseAPI { } if (filters.rentalStatus) { - const statuses: RentalStatus[] = !Array.isArray(filters.rentalStatus) - ? [filters.rentalStatus] - : filters.rentalStatus + const statuses: RentalStatus[] = !Array.isArray(filters.rentalStatus) ? [filters.rentalStatus] : filters.rentalStatus statuses.forEach(status => queryParams.append('rentalStatus', status)) } if (filters.creator) { - const creators = Array.isArray(filters.creator) - ? filters.creator - : [filters.creator] + const creators = Array.isArray(filters.creator) ? filters.creator : [filters.creator] creators.forEach(creator => queryParams.append('creator', creator)) } @@ -220,10 +194,7 @@ class NFTAPI extends BaseAPI { } } - private buildNFTQueryString( - params: NFTsFetchParams, - filters?: NFTsFetchFilters - ): string { + private buildNFTQueryString(params: NFTsFetchParams, filters?: NFTsFetchFilters): string { const queryParams = new URLSearchParams() queryParams.append('first', params.first.toString()) queryParams.append('skip', params.skip.toString()) @@ -252,9 +223,7 @@ class NFTAPI extends BaseAPI { return queryParams.toString() } - async getOwners( - params: OwnersFilters - ): Promise<{ data: OwnersResponse[]; total: number }> { + async getOwners(params: OwnersFilters): Promise<{ data: OwnersResponse[]; total: number }> { const queryParams = this.buildGetOwnersParams(params) return this.request('get', `/owners?${queryParams}`) } @@ -264,7 +233,7 @@ class NFTAPI extends BaseAPI { const entries = Object.entries(filters) - for (let [key, value] of entries) { + for (const [key, value] of entries) { queryParams.append(key, value.toString()) } diff --git a/webapp/src/modules/vendor/decentraland/nft/authApi.ts b/webapp/src/modules/vendor/decentraland/nft/authApi.ts index 2c83facf4c..c51d832b12 100644 --- a/webapp/src/modules/vendor/decentraland/nft/authApi.ts +++ b/webapp/src/modules/vendor/decentraland/nft/authApi.ts @@ -1,15 +1,14 @@ import { NFTCategory, NFTFilters, RentalStatus } from '@dcl/schemas' import { BaseClient } from 'decentraland-dapps/dist/lib/BaseClient' import { NFTsFetchParams } from '../../../nft/types' -import { NFTsFetchFilters, NFTResponse, NFTResult } from './types' +import { NFTsFetchFilters, NFTResponse, NFTResult, OwnersFilters, OwnersResponse } from './types' import { ATLAS_SERVER_URL } from '../land' import { FetchOneOptions } from '../../types' import { getNFTSortBy } from '../../../routing/search' import { AssetType } from '../../../asset/types' import { config } from '../../../../config' -import { OwnersFilters, OwnersResponse } from './types' -export const NFT_SERVER_URL = config.get('NFT_SERVER_URL')! +export const NFT_SERVER_URL = config.get('NFT_SERVER_URL') export enum PriceFilterExtraOption { LAND = 'land' @@ -23,35 +22,21 @@ export type PriceFilters = Omit<NFTsFetchFilters, 'category'> & { export type EstateSizeFilters = Pick< NFTFilters, - | 'isOnSale' - | 'adjacentToRoad' - | 'minDistanceToPlaza' - | 'maxDistanceToPlaza' - | 'minPrice' - | 'maxPrice' + 'isOnSale' | 'adjacentToRoad' | 'minDistanceToPlaza' | 'maxDistanceToPlaza' | 'minPrice' | 'maxPrice' > export class NFTAuthAPI extends BaseClient { - async get( - params: NFTsFetchParams, - filters?: NFTsFetchFilters - ): Promise<NFTResponse> { + async get(params: NFTsFetchParams, filters?: NFTsFetchFilters): Promise<NFTResponse> { const queryParams = this.buildNFTQueryString(params, filters) return this.fetch(`/v1/nfts?${queryParams}`) } - async fetchOne( - contractAddress: string, - tokenId: string, - options?: FetchOneOptions - ): Promise<NFTResult> { + async fetchOne(contractAddress: string, tokenId: string, options?: FetchOneOptions): Promise<NFTResult> { const queryParams = new URLSearchParams() queryParams.append('contractAddress', contractAddress) queryParams.append('tokenId', tokenId) if (options) { - Object.entries(options).forEach(([key, value]) => - queryParams.append(key, value as any) - ) + Object.entries(options).forEach(([key, value]) => queryParams.append(key, value as any)) } const response: NFTResponse = await this.fetch(`/v1/nfts?${queryParams}`) @@ -64,19 +49,14 @@ export class NFTAuthAPI extends BaseClient { async fetchTokenId(x: number, y: number) { try { - const { id } = await fetch( - `${ATLAS_SERVER_URL}/v2/parcels/${x}/${y}` - ).then(resp => resp.json()) + const { id } = await fetch(`${ATLAS_SERVER_URL}/v2/parcels/${x}/${y}`).then(resp => resp.json()) return id } catch (error) { return null } } - private appendNFTFiltersToQueryParams( - queryParams: URLSearchParams, - filters: NFTsFetchFilters - ): void { + private appendNFTFiltersToQueryParams(queryParams: URLSearchParams, filters: NFTsFetchFilters): void { if (filters.rarities) { for (const rarity of filters.rarities) { queryParams.append('itemRarity', rarity) @@ -120,16 +100,12 @@ export class NFTAuthAPI extends BaseClient { } if (filters.rentalStatus) { - const statuses: RentalStatus[] = !Array.isArray(filters.rentalStatus) - ? [filters.rentalStatus] - : filters.rentalStatus + const statuses: RentalStatus[] = !Array.isArray(filters.rentalStatus) ? [filters.rentalStatus] : filters.rentalStatus statuses.forEach(status => queryParams.append('rentalStatus', status)) } if (filters.creator) { - const creators = Array.isArray(filters.creator) - ? filters.creator - : [filters.creator] + const creators = Array.isArray(filters.creator) ? filters.creator : [filters.creator] creators.forEach(creator => queryParams.append('creator', creator)) } @@ -172,10 +148,7 @@ export class NFTAuthAPI extends BaseClient { } } - private buildNFTQueryString( - params: NFTsFetchParams, - filters?: NFTsFetchFilters - ): string { + private buildNFTQueryString(params: NFTsFetchParams, filters?: NFTsFetchFilters): string { const queryParams = new URLSearchParams() queryParams.append('first', params.first.toString()) queryParams.append('skip', params.skip.toString()) @@ -204,9 +177,7 @@ export class NFTAuthAPI extends BaseClient { return queryParams.toString() } - async getOwners( - params: OwnersFilters - ): Promise<{ data: OwnersResponse[]; total: number }> { + async getOwners(params: OwnersFilters): Promise<{ data: OwnersResponse[]; total: number }> { const queryParams = this.buildGetOwnersParams(params) return this.fetch(`/v1/owners?${queryParams}`) } @@ -216,7 +187,7 @@ export class NFTAuthAPI extends BaseClient { const entries = Object.entries(filters) - for (let [key, value] of entries) { + for (const [key, value] of entries) { queryParams.append(key, value.toString()) } diff --git a/webapp/src/modules/vendor/decentraland/order/api.ts b/webapp/src/modules/vendor/decentraland/order/api.ts index bc26177cc5..def5a831d1 100644 --- a/webapp/src/modules/vendor/decentraland/order/api.ts +++ b/webapp/src/modules/vendor/decentraland/order/api.ts @@ -5,22 +5,14 @@ import { retryParams } from '../utils' import { OrderResponse } from './types' class OrderAPI extends BaseAPI { - private buildOrdersQueryString( - params: OrderFilters, - sortBy: OrderSortBy - ): string { + private buildOrdersQueryString(params: OrderFilters, sortBy: OrderSortBy): string { const queryParams = new URLSearchParams() params.first && queryParams.append('first', params.first.toString()) params.skip && queryParams.append('skip', params.skip.toString()) - params.marketplaceAddress && - queryParams.append( - 'marketplaceAddress', - params.marketplaceAddress.toString() - ) + params.marketplaceAddress && queryParams.append('marketplaceAddress', params.marketplaceAddress.toString()) params.owner && queryParams.append('owner', params.owner.toString()) params.buyer && queryParams.append('buyer', params.buyer.toString()) - params.contractAddress && - queryParams.append('contractAddress', params.contractAddress.toString()) + params.contractAddress && queryParams.append('contractAddress', params.contractAddress.toString()) params.tokenId && queryParams.append('tokenId', params.tokenId.toString()) params.status && queryParams.append('status', params.status.toString()) params.network && queryParams.append('network', params.network.toString()) @@ -31,10 +23,7 @@ class OrderAPI extends BaseAPI { return queryParams.toString() } - async fetchOrders( - params: OrderFilters, - sortBy: OrderSortBy - ): Promise<OrderResponse> { + async fetchOrders(params: OrderFilters, sortBy: OrderSortBy): Promise<OrderResponse> { const queryParams = this.buildOrdersQueryString(params, sortBy) return this.request('get', `/orders?${queryParams}`) diff --git a/webapp/src/modules/vendor/decentraland/rankings/api.ts b/webapp/src/modules/vendor/decentraland/rankings/api.ts index 251d5357fd..ba870e8ba8 100644 --- a/webapp/src/modules/vendor/decentraland/rankings/api.ts +++ b/webapp/src/modules/vendor/decentraland/rankings/api.ts @@ -1,28 +1,17 @@ import { BaseAPI } from 'decentraland-dapps/dist/lib/api' import { NFT_SERVER_URL } from '../nft' -import { - AnalyticsTimeframe, - RankingEntities, - RankingEntity, - RankingsFilters -} from '../../../analytics/types' +import { AnalyticsTimeframe, RankingEntities, RankingEntity, RankingsFilters } from '../../../analytics/types' import { retryParams } from '../utils' const DEFAULT_REQUEST_SIZE = 5 class RankingsAPI extends BaseAPI { - fetch = async ( - entity: RankingEntities, - timeframe: AnalyticsTimeframe, - filters: RankingsFilters = {} - ): Promise<RankingEntity> => { + fetch = async (entity: RankingEntities, timeframe: AnalyticsTimeframe, filters: RankingsFilters = {}): Promise<RankingEntity> => { const queryParams = this.buildItemsQueryString(filters) return this.request('get', `/rankings/${entity}/${timeframe}?${queryParams}`) } - private buildItemsQueryString( - filters: RankingsFilters & { first?: string } - ): string { + private buildItemsQueryString(filters: RankingsFilters & { first?: string }): string { const queryParams = new URLSearchParams() if (filters.category) { @@ -35,10 +24,7 @@ class RankingsAPI extends BaseAPI { queryParams.append('sortBy', filters.sortBy.toString()) } - queryParams.append( - 'first', - filters.first ? filters.first : DEFAULT_REQUEST_SIZE.toString() - ) + queryParams.append('first', filters.first ? filters.first : DEFAULT_REQUEST_SIZE.toString()) return queryParams.toString() } diff --git a/webapp/src/modules/vendor/decentraland/rentals/api.spec.ts b/webapp/src/modules/vendor/decentraland/rentals/api.spec.ts index 59786dc71e..fa29d2cee1 100644 --- a/webapp/src/modules/vendor/decentraland/rentals/api.spec.ts +++ b/webapp/src/modules/vendor/decentraland/rentals/api.spec.ts @@ -1,17 +1,11 @@ import { URL } from 'url' -import { - RentalListing, - RentalsListingsFilterByCategory, - RentalStatus -} from '@dcl/schemas' +import { RentalListing, RentalsListingsFilterByCategory, RentalStatus } from '@dcl/schemas' import signedFetch from 'decentraland-crypto-fetch' import { rentalsAPI } from './api' jest.mock('decentraland-crypto-fetch') -const signedFetchMock: jest.MockedFunction<typeof signedFetch> = (signedFetch as unknown) as jest.MockedFunction< - typeof signedFetch -> +const signedFetchMock: jest.MockedFunction<typeof signedFetch> = signedFetch as unknown as jest.MockedFunction<typeof signedFetch> let rental: RentalListing beforeEach(() => { @@ -29,9 +23,7 @@ describe('when refreshing the rental listings', () => { }) it('should throw an error saying that the response is not 2XX', () => { - return expect( - rentalsAPI.refreshRentalListing(rental.id) - ).rejects.toThrowError( + return expect(rentalsAPI.refreshRentalListing(rental.id)).rejects.toThrowError( 'The signature server responded without a 2XX status code.' ) }) @@ -41,16 +33,12 @@ describe('when refreshing the rental listings', () => { beforeEach(() => { signedFetchMock.mockResolvedValueOnce({ ok: true, - json: jest - .fn() - .mockRejectedValueOnce(new Error('A JSON error')) as Response['json'] + json: jest.fn().mockRejectedValueOnce(new Error('A JSON error')) as Response['json'] } as Response) }) it('should throw an error with the cause', () => { - return expect( - rentalsAPI.refreshRentalListing(rental.id) - ).rejects.toThrowError('A JSON error') + return expect(rentalsAPI.refreshRentalListing(rental.id)).rejects.toThrowError('A JSON error') }) }) @@ -66,9 +54,7 @@ describe('when refreshing the rental listings', () => { }) it('should throw an error with the message', () => { - return expect( - rentalsAPI.refreshRentalListing(rental.id) - ).rejects.toThrowError('A server error') + return expect(rentalsAPI.refreshRentalListing(rental.id)).rejects.toThrowError('A server error') }) }) @@ -76,16 +62,12 @@ describe('when refreshing the rental listings', () => { beforeEach(() => { signedFetchMock.mockResolvedValueOnce({ ok: true, - json: jest - .fn() - .mockResolvedValueOnce({ ok: true, data: rental }) as Response['json'] + json: jest.fn().mockResolvedValueOnce({ ok: true, data: rental }) as Response['json'] } as Response) }) it('should return the rental', () => { - return expect( - rentalsAPI.refreshRentalListing(rental.id) - ).resolves.toEqual(rental) + return expect(rentalsAPI.refreshRentalListing(rental.id)).resolves.toEqual(rental) }) }) }) @@ -97,9 +79,7 @@ describe('when getting rental listings', () => { }) it('should throw an error saying that the response is not 2XX', () => { - return expect( - rentalsAPI.refreshRentalListing(rental.id) - ).rejects.toThrowError( + return expect(rentalsAPI.refreshRentalListing(rental.id)).rejects.toThrowError( 'The signature server responded without a 2XX status code.' ) }) @@ -109,16 +89,12 @@ describe('when getting rental listings', () => { beforeEach(() => { signedFetchMock.mockResolvedValueOnce({ ok: true, - json: jest - .fn() - .mockRejectedValueOnce(new Error('A JSON error')) as Response['json'] + json: jest.fn().mockRejectedValueOnce(new Error('A JSON error')) as Response['json'] } as Response) }) it('should throw an error with the cause', () => { - return expect( - rentalsAPI.refreshRentalListing(rental.id) - ).rejects.toThrowError('A JSON error') + return expect(rentalsAPI.refreshRentalListing(rental.id)).rejects.toThrowError('A JSON error') }) }) @@ -134,9 +110,7 @@ describe('when getting rental listings', () => { }) it('should throw an error with the message', () => { - return expect( - rentalsAPI.refreshRentalListing(rental.id) - ).rejects.toThrowError('A server error') + return expect(rentalsAPI.refreshRentalListing(rental.id)).rejects.toThrowError('A server error') }) }) @@ -173,17 +147,14 @@ describe('when getting rental listings', () => { const url = new URL(signedFetchMock.mock.calls[0][0] as string) expect(url.searchParams.get('limit')).toEqual('12') expect(url.searchParams.get('page')).toEqual('0') - expect(url.searchParams.getAll('status')).toEqual([ - RentalStatus.EXECUTED, - RentalStatus.CLAIMED - ]) + expect(url.searchParams.getAll('status')).toEqual([RentalStatus.EXECUTED, RentalStatus.CLAIMED]) }) }) }) describe('when getting rental listings prices', () => { describe('when request finished successfully', () => { - let prices = { '100': 1 } + const prices = { '100': 1 } beforeEach(() => { jest.spyOn(rentalsAPI, 'request').mockResolvedValueOnce(prices) }) @@ -192,10 +163,7 @@ describe('when getting rental listings prices', () => { await rentalsAPI.getRentalListingsPrices({ category: RentalsListingsFilterByCategory.PARCEL }) - expect(rentalsAPI.request).toHaveBeenCalledWith( - 'get', - '/rental-listings/prices?category=parcel' - ) + expect(rentalsAPI.request).toHaveBeenCalledWith('get', '/rental-listings/prices?category=parcel') }) it('should return rental listings prices object', async () => { @@ -210,9 +178,7 @@ describe('when getting rental listings prices', () => { const errorMessage = 'somwthing went wrong' beforeEach(() => { - jest - .spyOn(rentalsAPI, 'request') - .mockRejectedValueOnce(new Error(errorMessage)) + jest.spyOn(rentalsAPI, 'request').mockRejectedValueOnce(new Error(errorMessage)) }) it('should return error message', async () => { expect( diff --git a/webapp/src/modules/vendor/decentraland/rentals/api.ts b/webapp/src/modules/vendor/decentraland/rentals/api.ts index eef0aad085..503ede6f00 100644 --- a/webapp/src/modules/vendor/decentraland/rentals/api.ts +++ b/webapp/src/modules/vendor/decentraland/rentals/api.ts @@ -1,22 +1,14 @@ import signedFetch, { AuthIdentity } from 'decentraland-crypto-fetch' -import { - RentalListing, - RentalListingCreation, - RentalsListingsFilterBy -} from '@dcl/schemas' +import { RentalListing, RentalListingCreation, RentalsListingsFilterBy } from '@dcl/schemas' import { BaseAPI } from 'decentraland-dapps/dist/lib/api' import { config } from '../../../../config' import { objectToURLSearchParams } from './utils' -export const SIGNATURES_SERVER_URL = config.get('SIGNATURES_SERVER_URL')! +export const SIGNATURES_SERVER_URL = config.get('SIGNATURES_SERVER_URL') type ValueOf<T> = T[keyof T] - class RentalsAPI extends BaseAPI { - createRentalListing = async ( - listing: RentalListingCreation, - identity: AuthIdentity - ): Promise<RentalListing> => { + createRentalListing = async (listing: RentalListingCreation, identity: AuthIdentity): Promise<RentalListing> => { const url = SIGNATURES_SERVER_URL + `/rentals-listings` const response = await signedFetch(url, { method: 'POST', @@ -45,9 +37,7 @@ class RentalsAPI extends BaseAPI { }) if (!response.ok) { - throw new Error( - 'The signature server responded without a 2XX status code.' - ) + throw new Error('The signature server responded without a 2XX status code.') } try { @@ -70,33 +60,20 @@ class RentalsAPI extends BaseAPI { }> => { const UrlSearchParams = URLSearchParams ?? window.URLSearchParams const urlSearchParams = new UrlSearchParams() - ;(Object.keys(params) as Array<keyof typeof params>).forEach( - parameterName => { - if (Array.isArray(params[parameterName])) { - ;(params[parameterName] as ValueOf<typeof params>[]).forEach( - parameterValue => { - urlSearchParams.append( - parameterName, - (parameterValue ?? '').toString() - ) - } - ) - } else { - urlSearchParams.append( - parameterName, - (params[parameterName] ?? '').toString() - ) - } + ;(Object.keys(params) as Array<keyof typeof params>).forEach(parameterName => { + if (Array.isArray(params[parameterName])) { + ;(params[parameterName] as ValueOf<typeof params>[]).forEach(parameterValue => { + urlSearchParams.append(parameterName, (parameterValue ?? '').toString()) + }) + } else { + urlSearchParams.append(parameterName, (params[parameterName] ?? '').toString()) } - ) - const url = - SIGNATURES_SERVER_URL + `/rentals-listings?` + urlSearchParams.toString() + }) + const url = SIGNATURES_SERVER_URL + `/rentals-listings?` + urlSearchParams.toString() const response = await signedFetch(url) if (!response.ok) { - throw new Error( - 'The signature server responded without a 2XX status code.' - ) + throw new Error('The signature server responded without a 2XX status code.') } try { @@ -111,15 +88,10 @@ class RentalsAPI extends BaseAPI { } } - getRentalListingsPrices = async ( - filters: RentalsListingsFilterBy - ): Promise<Record<string, number>> => { + getRentalListingsPrices = async (filters: RentalsListingsFilterBy): Promise<Record<string, number>> => { const queryParams = objectToURLSearchParams(filters) try { - const response = await this.request( - 'get', - `/rental-listings/prices?${queryParams.toString()}` - ) + const response = await this.request('get', `/rental-listings/prices?${queryParams.toString()}`) return response } catch (error) { throw new Error((error as Error).message) diff --git a/webapp/src/modules/vendor/decentraland/rentals/utils.spec.ts b/webapp/src/modules/vendor/decentraland/rentals/utils.spec.ts index b9a5815a9c..b19d415d01 100644 --- a/webapp/src/modules/vendor/decentraland/rentals/utils.spec.ts +++ b/webapp/src/modules/vendor/decentraland/rentals/utils.spec.ts @@ -1,23 +1,23 @@ -import { objectToURLSearchParams } from "./utils" -describe("#objectToURLSearchParams", () => { - describe("when params is undefined", () => { - it("should return empty URLSearchParams", () => { +import { objectToURLSearchParams } from './utils' +describe('#objectToURLSearchParams', () => { + describe('when params is undefined', () => { + it('should return empty URLSearchParams', () => { expect(objectToURLSearchParams(undefined).toString()).toEqual('') }) }) - describe("when params has a defined property", () => { - describe("when property has a simple value", () => { - it("should return correct URLSearchParams item", () => { - const urlSearchParams = objectToURLSearchParams({ property1: 'test'}); + describe('when params has a defined property', () => { + describe('when property has a simple value', () => { + it('should return correct URLSearchParams item', () => { + const urlSearchParams = objectToURLSearchParams({ property1: 'test' }) expect(urlSearchParams.get('property1')).toEqual('test') expect(urlSearchParams.toString()).toEqual('property1=test') }) }) - describe("when property value is an array", () => { - it("should return correct URLSearchParams item", () => { - const urlSearchParams = objectToURLSearchParams({ property1: ['value1', 'value2', 'value3']}) + describe('when property value is an array', () => { + it('should return correct URLSearchParams item', () => { + const urlSearchParams = objectToURLSearchParams({ property1: ['value1', 'value2', 'value3'] }) expect(urlSearchParams.getAll('property1')).toEqual(['value1', 'value2', 'value3']) expect(urlSearchParams.toString()).toEqual('property1=value1&property1=value2&property1=value3') }) diff --git a/webapp/src/modules/vendor/decentraland/rentals/utils.ts b/webapp/src/modules/vendor/decentraland/rentals/utils.ts index afc9fd39c2..afc702e54c 100644 --- a/webapp/src/modules/vendor/decentraland/rentals/utils.ts +++ b/webapp/src/modules/vendor/decentraland/rentals/utils.ts @@ -1,6 +1,6 @@ export function objectToURLSearchParams(params: Record<string, any> = {}) { - const queryParams = new URLSearchParams(); - Object.keys(params).forEach((key) => { + const queryParams = new URLSearchParams() + Object.keys(params).forEach(key => { if (Array.isArray(params[key])) { params[key].forEach((arrayParam: string) => { queryParams.append(key, arrayParam.toString()) diff --git a/webapp/src/modules/vendor/decentraland/sale/api.ts b/webapp/src/modules/vendor/decentraland/sale/api.ts index 673af01d57..dd318a4358 100644 --- a/webapp/src/modules/vendor/decentraland/sale/api.ts +++ b/webapp/src/modules/vendor/decentraland/sale/api.ts @@ -15,7 +15,7 @@ class SaleAPI extends BaseAPI { const entries = Object.entries(filters) - for (let [key, value] of entries) { + for (const [key, value] of entries) { // when passing categories as an array, it should be added as a query param multiple times if (key === 'categories' && Array.isArray(value)) { value.forEach(v => queryParams.append('category', v)) diff --git a/webapp/src/modules/vendor/decentraland/utils.ts b/webapp/src/modules/vendor/decentraland/utils.ts index 309f420751..535d55684e 100644 --- a/webapp/src/modules/vendor/decentraland/utils.ts +++ b/webapp/src/modules/vendor/decentraland/utils.ts @@ -1,16 +1,8 @@ import { ChainId, Network } from '@dcl/schemas' import { RetryParams } from 'decentraland-dapps/dist/lib/api' -import { - ContractData, - ContractName, - getContract -} from 'decentraland-transactions' +import { ContractData, ContractName, getContract } from 'decentraland-transactions' -export function getERC721ContractData(data: { - contractAddress: string - network: Network - chainId: ChainId -}) { +export function getERC721ContractData(data: { contractAddress: string; network: Network; chainId: ChainId }) { const contract: ContractData = /* We need to use the ERC721CollectionV2 instead of ERC721 for non-ethereum transfers otherwise the meta-tx would fail due to wrong domain and version. @@ -28,7 +20,7 @@ export function getERC721ContractData(data: { return contract } -export const retryParams : RetryParams = { +export const retryParams: RetryParams = { attempts: 3, delay: 1500 -} \ No newline at end of file +} diff --git a/webapp/src/modules/vendor/nft/types.ts b/webapp/src/modules/vendor/nft/types.ts index 8707423492..4994faf3ba 100644 --- a/webapp/src/modules/vendor/nft/types.ts +++ b/webapp/src/modules/vendor/nft/types.ts @@ -2,10 +2,8 @@ import { VendorName } from '../types' import * as decentraland from '../decentraland' -export type NFTsFetchFilters< - V extends VendorName | unknown = unknown -> = V extends VendorName.DECENTRALAND +export type NFTsFetchFilters<V extends VendorName | unknown = unknown> = V extends VendorName.DECENTRALAND ? decentraland.NFTsFetchFilters : V extends unknown - ? decentraland.NFTsFetchFilters - : never + ? decentraland.NFTsFetchFilters + : never diff --git a/webapp/src/modules/vendor/services.ts b/webapp/src/modules/vendor/services.ts index 3ebcc088b0..2f695a2f9a 100644 --- a/webapp/src/modules/vendor/services.ts +++ b/webapp/src/modules/vendor/services.ts @@ -1,13 +1,4 @@ -import { - Bid, - Contract as BaseContract, - ListingStatus, - NFTCategory, - Order, - OrderFilters, - OrderSortBy, - RentalListing -} from '@dcl/schemas' +import { Bid, Contract as BaseContract, ListingStatus, NFTCategory, Order, OrderFilters, OrderSortBy, RentalListing } from '@dcl/schemas' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { NFT, NFTsFetchParams, NFTsCountParams } from '../nft/types' import { Account } from '../account/types' @@ -23,9 +14,7 @@ export type Contract = Omit<BaseContract, 'category'> & { } export interface AnalyticsService { - fetchVolumeData: ( - timeframe: AnalyticsTimeframe - ) => Promise<AnalyticsVolumeData> + fetchVolumeData: (timeframe: AnalyticsTimeframe) => Promise<AnalyticsVolumeData> } export class AnalyticsService {} @@ -34,40 +23,20 @@ export interface NFTService<V extends VendorName> { params: NFTsFetchParams, filters?: NFTsFetchFilters<V> ) => Promise<readonly [NFT<V>[], Account[], Order[], RentalListing[], number]> - count: ( - params: NFTsCountParams, - filters?: NFTsFetchFilters<V> - ) => Promise<number> + count: (params: NFTsCountParams, filters?: NFTsFetchFilters<V>) => Promise<number> fetchOne: ( contractAddress: string, tokenId: string, options?: FetchOneOptions ) => Promise<readonly [NFT<V>, Order | null, RentalListing | null]> - transfer: ( - wallet: Wallet | null, - toAddress: string, - nft: NFT<V> - ) => Promise<string> + transfer: (wallet: Wallet | null, toAddress: string, nft: NFT<V>) => Promise<string> } export class NFTService<V> {} export interface OrderService<V extends VendorName> { - fetchOrders: ( - params: OrderFilters, - sortBy: OrderSortBy - ) => Promise<OrderResponse> - create: ( - wallet: Wallet | null, - nft: NFT<V>, - price: number, - expiresAt: number - ) => Promise<string> - execute: ( - wallet: Wallet | null, - nft: NFT<V>, - order: Order, - fingerprint?: string - ) => Promise<string> + fetchOrders: (params: OrderFilters, sortBy: OrderSortBy) => Promise<OrderResponse> + create: (wallet: Wallet | null, nft: NFT<V>, price: number, expiresAt: number) => Promise<string> + execute: (wallet: Wallet | null, nft: NFT<V>, order: Order, fingerprint?: string) => Promise<string> cancel: (wallet: Wallet | null, order: Order) => Promise<string> canSell(): boolean } @@ -77,13 +46,7 @@ export interface BidService<V extends VendorName> { fetchBySeller: (seller: string) => Promise<Bid[]> fetchByBidder: (bidder: string) => Promise<Bid[]> fetchByNFT: (nft: NFT<V>, status?: ListingStatus) => Promise<Bid[]> - place: ( - wallet: Wallet | null, - nft: NFT<V>, - price: number, - expiresAt: number, - fingerprint?: string - ) => Promise<string> + place: (wallet: Wallet | null, nft: NFT<V>, price: number, expiresAt: number, fingerprint?: string) => Promise<string> accept: (wallet: Wallet | null, bid: Bid) => Promise<string> cancel: (wallet: Wallet | null, bid: Bid) => Promise<string> } diff --git a/webapp/src/modules/vendor/utils.ts b/webapp/src/modules/vendor/utils.ts index 0cca70d16b..4801ffec2a 100644 --- a/webapp/src/modules/vendor/utils.ts +++ b/webapp/src/modules/vendor/utils.ts @@ -1,18 +1,11 @@ import { NFTCategory, RentalStatus } from '@dcl/schemas' -import { - getCategoryFromSection, - getSearchEmoteCategory, - getSearchWearableCategory -} from '../routing/search' +import { getCategoryFromSection, getSearchEmoteCategory, getSearchWearableCategory } from '../routing/search' import { BrowseOptions } from '../routing/types' import { Sections } from './routing/types' import { NFTsFetchFilters } from './nft/types' import { VendorName, Disabled } from './types' -export function getFilters( - vendor: VendorName, - options: BrowseOptions -): NFTsFetchFilters { +export function getFilters(vendor: VendorName, options: BrowseOptions): NFTsFetchFilters { const { section, address } = options switch (vendor) { @@ -20,22 +13,14 @@ export function getFilters( const currentSection = Sections[VendorName.DECENTRALAND] const isLand = section === currentSection.LAND - const isParcelsOrEstates = - section === currentSection.PARCELS || section === currentSection.ESTATES + const isParcelsOrEstates = section === currentSection.PARCELS || section === currentSection.ESTATES const isWearableHead = section === currentSection.WEARABLES_HEAD - const isWearableAccessory = - section === currentSection.WEARABLES_ACCESSORIES + const isWearableAccessory = section === currentSection.WEARABLES_ACCESSORIES const category = getCategoryFromSection(section!) - const wearableCategory = - !isWearableAccessory && category === NFTCategory.WEARABLE - ? getSearchWearableCategory(section!) - : undefined + const wearableCategory = !isWearableAccessory && category === NFTCategory.WEARABLE ? getSearchWearableCategory(section!) : undefined - const emoteCategory = - category === NFTCategory.EMOTE - ? getSearchEmoteCategory(section!) - : undefined + const emoteCategory = category === NFTCategory.EMOTE ? getSearchEmoteCategory(section!) : undefined const { rarities, @@ -68,10 +53,7 @@ export function getFilters( creator: creators, network, emotePlayMode, - rentalStatus: - (isLand || isParcelsOrEstates) && address - ? [RentalStatus.OPEN, RentalStatus.EXECUTED] - : undefined, + rentalStatus: (isLand || isParcelsOrEstates) && address ? [RentalStatus.OPEN, RentalStatus.EXECUTED] : undefined, minPrice, maxPrice, minEstateSize, @@ -107,7 +89,5 @@ export function isPartner(vendor: string) { export function getPartners(): VendorName[] { const disabledVendors = Object.values(Disabled) - return Object.values(VendorName).filter( - vendor => isPartner(vendor) && !disabledVendors.includes(vendor) - ) + return Object.values(VendorName).filter(vendor => isPartner(vendor) && !disabledVendors.includes(vendor)) } diff --git a/webapp/src/modules/wallet/sagas.spec.ts b/webapp/src/modules/wallet/sagas.spec.ts index be57df9ea5..eb252c51cc 100644 --- a/webapp/src/modules/wallet/sagas.spec.ts +++ b/webapp/src/modules/wallet/sagas.spec.ts @@ -1,8 +1,5 @@ import { expectSaga } from 'redux-saga-test-plan' -import { - changeAccount, - disconnectWallet -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { changeAccount, disconnectWallet } from 'decentraland-dapps/dist/modules/wallet/actions' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { walletSaga } from './sagas' diff --git a/webapp/src/modules/wallet/sagas.ts b/webapp/src/modules/wallet/sagas.ts index 254f4ad5d8..762a5c79de 100644 --- a/webapp/src/modules/wallet/sagas.ts +++ b/webapp/src/modules/wallet/sagas.ts @@ -1,14 +1,11 @@ import { all, takeEvery } from 'redux-saga/effects' import { createWalletSaga } from 'decentraland-dapps/dist/modules/wallet/sagas' -import { - CHANGE_ACCOUNT, - DISCONNECT_WALLET -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { CHANGE_ACCOUNT, DISCONNECT_WALLET } from 'decentraland-dapps/dist/modules/wallet/actions' import { config } from '../../config' import { TRANSACTIONS_API_URL } from './utils' const baseWalletSaga = createWalletSaga({ - CHAIN_ID: Number(config.get('CHAIN_ID')!), + CHAIN_ID: Number(config.get('CHAIN_ID')), POLL_INTERVAL: 0, TRANSACTIONS_API_URL }) diff --git a/webapp/src/modules/wallet/selectors.ts b/webapp/src/modules/wallet/selectors.ts index 62e63fbcf2..23aaca1ea0 100644 --- a/webapp/src/modules/wallet/selectors.ts +++ b/webapp/src/modules/wallet/selectors.ts @@ -1,18 +1,10 @@ import { createSelector } from 'reselect' import { Network } from '@dcl/schemas/dist/dapps/network' -import { - getData, - getAddress as baseGetAddress, - getNetworks -} from 'decentraland-dapps/dist/modules/wallet/selectors' +import { getData, getAddress as baseGetAddress, getNetworks } from 'decentraland-dapps/dist/modules/wallet/selectors' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { RootState } from '../reducer' -export const getWallet = createSelector< - RootState, - Wallet | null, - Wallet | null ->(getData, wallet => +export const getWallet = createSelector<RootState, Wallet | null, Wallet | null>(getData, wallet => wallet ? { ...wallet, address: wallet.address.toLowerCase() } : null ) @@ -27,9 +19,6 @@ export const getAddress = (state: RootState) => { * @param network The network we want to check how much mana is in. * @returns The MANA that the current wallet has in the provided network or undefined if there's no wallet logged in. */ -export const getMana = ( - state: RootState, - network: Network.ETHEREUM | Network.MATIC -): number | undefined => { +export const getMana = (state: RootState, network: Network.ETHEREUM | Network.MATIC): number | undefined => { return getNetworks(state)?.[network].mana } diff --git a/webapp/src/modules/wallet/utils.ts b/webapp/src/modules/wallet/utils.ts index ccc7dfe8b5..d70404bf53 100644 --- a/webapp/src/modules/wallet/utils.ts +++ b/webapp/src/modules/wallet/utils.ts @@ -1,16 +1,10 @@ import { ethers } from 'ethers' import { race, select, take } from 'redux-saga/effects' import { Provider } from 'decentraland-dapps/dist/modules/wallet/types' -import { - CONNECT_WALLET_FAILURE, - CONNECT_WALLET_SUCCESS -} from 'decentraland-dapps/dist/modules/wallet/actions' +import { CONNECT_WALLET_FAILURE, CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions' import { getConnectedProvider } from 'decentraland-dapps/dist/lib/eth' import { isConnecting } from 'decentraland-dapps/dist/modules/wallet/selectors' -import { - GENERATE_IDENTITY_FAILURE, - GENERATE_IDENTITY_SUCCESS -} from '../identity/actions' +import { GENERATE_IDENTITY_FAILURE, GENERATE_IDENTITY_SUCCESS } from '../identity/actions' import { config } from '../../config' export const TRANSACTIONS_API_URL = config.get('TRANSACTIONS_API_URL') @@ -22,11 +16,7 @@ export function shortenAddress(address: string) { } export function addressEquals(address1?: string, address2?: string) { - return ( - address1 !== undefined && - address2 !== undefined && - address1.toLowerCase() === address2.toLowerCase() - ) + return address1 !== undefined && address2 !== undefined && address1.toLowerCase() === address2.toLowerCase() } export async function getEth(): Promise<ethers.providers.Web3Provider> { @@ -46,9 +36,7 @@ function removeScientificNotationForSmallNumbers(number: number): string { } export function formatBalance(balance: number) { - return balance.toString().includes('-') - ? removeScientificNotationForSmallNumbers(balance) - : balance.toString() + return balance.toString().includes('-') ? removeScientificNotationForSmallNumbers(balance) : balance.toString() } export function* waitForWalletConnectionAndIdentityIfConnecting() { diff --git a/webapp/src/tests/beforeSetupTests.ts b/webapp/src/tests/beforeSetupTests.ts index 8317414ee9..82146435e8 100644 --- a/webapp/src/tests/beforeSetupTests.ts +++ b/webapp/src/tests/beforeSetupTests.ts @@ -6,31 +6,24 @@ import { TextEncoder, TextDecoder } from 'util' import path from 'path' import { config } from 'dotenv' import flatten from 'flat' -import { - mergeTranslations, - setCurrentLocale -} from 'decentraland-dapps/dist/modules/translation/utils' +import { mergeTranslations, setCurrentLocale } from 'decentraland-dapps/dist/modules/translation/utils' import fetch, { Request, Response } from 'node-fetch' import { en as dappsEn } from 'decentraland-dapps/dist/modules/translation/defaults' import * as locales from '../modules/translation/locales' jest.mock('decentraland-dapps/dist/modules/translation/utils', () => { - const module = jest.requireActual( - 'decentraland-dapps/dist/modules/translation/utils' - ) + const module = jest.requireActual('decentraland-dapps/dist/modules/translation/utils') return { ...module, - T: ({ id, values }: typeof module['T']) => module.t(id, values) + T: ({ id, values }: (typeof module)['T']) => module.t(id, values) } }) jest.mock('decentraland-dapps/dist/modules/translation/utils', () => { - const module = jest.requireActual( - 'decentraland-dapps/dist/modules/translation/utils' - ) + const module = jest.requireActual('decentraland-dapps/dist/modules/translation/utils') return { ...module, - T: ({ id, values }: typeof module['T']) => module.t(id, values) + T: ({ id, values }: (typeof module)['T']) => module.t(id, values) } }) @@ -46,7 +39,7 @@ if (!globalThis.fetch) { globalThis.Response = Response as any } -global.FontFace = function() { +global.FontFace = function () { return { load: () => Promise.resolve() } @@ -56,7 +49,4 @@ global.FontFace = function() { add: () => Promise.resolve() } as any -setCurrentLocale( - 'en', - mergeTranslations(flatten(dappsEn) as any, flatten(locales.en)) -) +setCurrentLocale('en', mergeTranslations(flatten(dappsEn), flatten(locales.en))) diff --git a/webapp/src/utils/category.ts b/webapp/src/utils/category.ts index fce1f2f439..cb8ff029df 100644 --- a/webapp/src/utils/category.ts +++ b/webapp/src/utils/category.ts @@ -7,7 +7,7 @@ export function getCategoryInfo(nft: NFT) { return { emoteCategory: nft.data.emote?.category } case NFTCategory.WEARABLE: return { wearableCategory: nft.data.wearable?.category } - default: + default: return {} } } diff --git a/webapp/src/utils/events.ts b/webapp/src/utils/events.ts index 8382e476ed..b4ae691a08 100644 --- a/webapp/src/utils/events.ts +++ b/webapp/src/utils/events.ts @@ -16,10 +16,8 @@ export const CLICK_BUY_NFT_WITH_CRYPTO = 'Click on Buy NFT With Crypto' export const CANCEL_BUY_NFT_WITH_CARD = 'Cancel Buy NFT With Card' export const CLICK_GO_TO_BUY_NFT_WITH_CARD = 'Click on go to Buy NFT With Card' export const OPEN_BUY_MANA_MODAL = 'Open BUY MANA modal' -export const CONTINUE_BUY_WITH_CARD_MODAL = - 'Click on Continue in Buy With Card Explanation Modal' -export const BACK_BUY_WITH_CARD_MODAL = - 'Click on Go Back in Buy With Card Explanation Modal' +export const CONTINUE_BUY_WITH_CARD_MODAL = 'Click on Continue in Buy With Card Explanation Modal' +export const BACK_BUY_WITH_CARD_MODAL = 'Click on Go Back in Buy With Card Explanation Modal' export const TOGGLE_PREVIEW_MODE = 'Toggle Preview Mode' export const UPSERT_LAND_RENTAL = 'Upsert Land Rental' @@ -84,8 +82,7 @@ export const SEARCH_ALL = 'Search all results' // Buy Cross-chain export const BUY_ITEM_CROSS_CHAIN = 'Buy Item Cross Chain' export const BUY_ITEM_CROSS_CHAIN_ERROR = 'Buy Item Cross Chain Error' -export const BUY_ITEM_CROSS_CHAIN_TRANSACTION_DENIED = - 'Buy Item Cross Chain Transaction Denied' +export const BUY_ITEM_CROSS_CHAIN_TRANSACTION_DENIED = 'Buy Item Cross Chain Transaction Denied' export const CROSS_CHAIN_TOKEN_SELECTION = 'Cross Chain token selection' export const CROSS_CHAIN_CHAIN_SELECTION = 'Cross Chain chain selection' export const ERROR_GETTING_ROUTE = 'Error getting Route' diff --git a/webapp/src/utils/filters.tsx b/webapp/src/utils/filters.tsx index 3847ffee85..60ae863bc1 100644 --- a/webapp/src/utils/filters.tsx +++ b/webapp/src/utils/filters.tsx @@ -1,9 +1,4 @@ -import { - GenderFilterOption, - Network, - NFTCategory, - WearableGender -} from '@dcl/schemas' +import { GenderFilterOption, Network, NFTCategory, WearableGender } from '@dcl/schemas' import classNames from 'classnames' import { t } from 'decentraland-dapps/dist/modules/translation/utils' import { Mana } from '../components/Mana' @@ -19,11 +14,7 @@ export enum AssetStatusFilter { export const AVAILABLE_FOR_MALE = 'AVAILABLE_FOR_MALE' export const AVAILABLE_FOR_FEMALE = 'AVAILABLE_FOR_FEMALE' -export function getPriceLabel( - minPrice?: string, - maxPrice?: string, - network: Network = Network.ETHEREUM -) { +export function getPriceLabel(minPrice?: string, maxPrice?: string, network: Network = Network.ETHEREUM) { const priceFormatter = Intl.NumberFormat('en', { notation: 'compact' }) const manaTranslator = () => ( <Mana @@ -89,19 +80,14 @@ export function getNetwork(network?: Network, category?: NFTCategory) { return network } - if ( - category && - [NFTCategory.WEARABLE, NFTCategory.EMOTE].includes(category) - ) { + if (category && [NFTCategory.WEARABLE, NFTCategory.EMOTE].includes(category)) { return Network.MATIC } return Network.ETHEREUM } -export function getBodyShapeValue( - bodyShapes: (WearableGender | GenderFilterOption)[] | undefined -): string | undefined { +export function getBodyShapeValue(bodyShapes: (WearableGender | GenderFilterOption)[] | undefined): string | undefined { if (bodyShapes?.length === 0) { return undefined } @@ -121,9 +107,7 @@ export function getBodyShapeValue( return undefined } -export function getGenderFilterLabel( - bodyShapes: (WearableGender | GenderFilterOption)[] | undefined -): string { +export function getGenderFilterLabel(bodyShapes: (WearableGender | GenderFilterOption)[] | undefined): string { const bodyShape = getBodyShapeValue(bodyShapes) if (!bodyShape) { diff --git a/webapp/src/utils/test.tsx b/webapp/src/utils/test.tsx index a725b3ca3c..c60406ebfd 100644 --- a/webapp/src/utils/test.tsx +++ b/webapp/src/utils/test.tsx @@ -12,17 +12,11 @@ import { RootState } from '../modules/reducer' import { initTestStore } from '../modules/store' import * as locales from '../modules/translation/locales' -const allTranslations = mergeTranslations( - flatten(en) as any, - flatten(locales.en) -) +const allTranslations = mergeTranslations(flatten(en), flatten(locales.en)) export function renderWithProviders( component: JSX.Element, - { - preloadedState, - store - }: { preloadedState?: Partial<RootState>; store?: Store } = {} + { preloadedState, store }: { preloadedState?: Partial<RootState>; store?: Store } = {} ) { const initializedStore = store || @@ -53,11 +47,7 @@ export function renderWithProviders( export async function waitForComponentToFinishLoading(screen: RenderResult) { // TODO: Make loader accessible so we can get the info without using the container ui#310 - await waitFor(() => - expect( - screen.container.getElementsByClassName('loader-container').length - ).toEqual(0) - ) + await waitFor(() => expect(screen.container.getElementsByClassName('loader-container').length).toEqual(0)) } export function createMatchMedia(width: number) { diff --git a/webapp/src/utils/tests.tsx b/webapp/src/utils/tests.tsx index 900212f885..b16a27db0a 100644 --- a/webapp/src/utils/tests.tsx +++ b/webapp/src/utils/tests.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import createSagasMiddleware from 'redux-saga' -import { createMemoryHistory } from 'history' +import { createMemoryHistory, createBrowserHistory } from 'history' import { Provider } from 'react-redux' import { applyMiddleware, compose, createStore, Store } from 'redux' import { ConnectedRouter, routerMiddleware } from 'connected-react-router' @@ -17,7 +17,7 @@ import { SET_IS_TRYING_ON } from '../modules/ui/preview/actions' import { rootSaga } from '../modules/sagas' import { fetchTilesRequest } from '../modules/tile/actions' -export const history = require('history').createBrowserHistory() +export const history = createBrowserHistory() export function initTestStore(preloadedState = {}) { const rootReducer = storageReducerWrapper(createRootReducer(history)) @@ -30,22 +30,11 @@ export function initTestStore(preloadedState = {}) { ['ui', 'preview', 'isTryingOn'], ['identity', 'data'] ], // array of paths from state to be persisted (optional) - actions: [ - CLEAR_TRANSACTIONS, - ARCHIVE_BID, - UNARCHIVE_BID, - GENERATE_IDENTITY_SUCCESS, - SET_IS_TRYING_ON - ], // array of actions types that will trigger a SAVE (optional) + actions: [CLEAR_TRANSACTIONS, ARCHIVE_BID, UNARCHIVE_BID, GENERATE_IDENTITY_SUCCESS, SET_IS_TRYING_ON], // array of actions types that will trigger a SAVE (optional) migrations: {} // migration object that will migrate your localstorage (optional) }) - const middleware = applyMiddleware( - sagasMiddleware, - routerMiddleware(history), - transactionMiddleware, - storageMiddleware - ) + const middleware = applyMiddleware(sagasMiddleware, routerMiddleware(history), transactionMiddleware, storageMiddleware) const enhancer = compose(middleware) const store = createStore(rootReducer, preloadedState, enhancer) @@ -56,10 +45,7 @@ export function initTestStore(preloadedState = {}) { return store } -export function renderWithProviders( - component: JSX.Element, - { preloadedState, store }: { preloadedState?: RootState; store?: Store } = {} -) { +export function renderWithProviders(component: JSX.Element, { preloadedState, store }: { preloadedState?: RootState; store?: Store } = {}) { const initializedStore = store || initTestStore({ From 29c54d26e14c7f7ea0053feefdeeb7cbcbc21dcb Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Fri, 8 Mar 2024 15:45:22 -0300 Subject: [PATCH 20/36] fix: Auto-fixes --- .../Modals/BuyWithCryptoModal/hooks.ts | 2 +- .../components/SuccessPage/SuccessPage.tsx | 20 ++------ webapp/src/modules/analytics/track.ts | 49 ++++++++----------- webapp/src/modules/features/selectors.ts | 6 +-- 4 files changed, 27 insertions(+), 50 deletions(-) diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/hooks.ts b/webapp/src/components/Modals/BuyWithCryptoModal/hooks.ts index c147569f59..56407061c9 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/hooks.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/hooks.ts @@ -241,7 +241,7 @@ export const useCrossChainBuyNftRoute = ( providerTokens: Token[], crossChainProvider: CrossChainProvider | undefined, wallet: Wallet | null, - slippage: number, + slippage: number ): CrossChainRoute => { const getBuyNftRoute = useCallback( (fromAddress, fromAmount, fromChain, fromToken, crossChainProvider) => diff --git a/webapp/src/components/SuccessPage/SuccessPage.tsx b/webapp/src/components/SuccessPage/SuccessPage.tsx index 6f35da314e..76ba2a492e 100644 --- a/webapp/src/components/SuccessPage/SuccessPage.tsx +++ b/webapp/src/components/SuccessPage/SuccessPage.tsx @@ -159,28 +159,16 @@ export function SuccessPage(props: Props) { </div> )} </div> - ) : asset.category === NFTCategory.PARCEL || - asset.category === NFTCategory.ESTATE ? ( + ) : asset.category === NFTCategory.PARCEL || asset.category === NFTCategory.ESTATE ? ( <div className={styles.ensActions}> <div className={styles.primaryEnsActions}> - <Button - as={Link} - className={styles.successButton} - secondary - to={locations.nft(contractAddress, tokenId)} - > + <Button as={Link} className={styles.successButton} secondary to={locations.nft(contractAddress, tokenId)}> {t('success_page.success_state.manage_land')} </Button> {!!profile && ( <> - <Button - className={styles.successButton} - primary - href={BUILDER_URL + '/scenes'} - > - {t( - 'success_page.success_state.start_building' - )} + <Button className={styles.successButton} primary href={BUILDER_URL + '/scenes'}> + {t('success_page.success_state.start_building')} </Button> </> )} diff --git a/webapp/src/modules/analytics/track.ts b/webapp/src/modules/analytics/track.ts index aa971ca5e1..c9049edcc6 100644 --- a/webapp/src/modules/analytics/track.ts +++ b/webapp/src/modules/analytics/track.ts @@ -241,34 +241,27 @@ track<BuyItemSuccessAction>(BUY_ITEM_SUCCESS, events.BUY_ITEM, ({ payload }) => fromChainId: payload.chainId })) -track<BuyItemCrossChainSuccessAction>( - BUY_ITEM_CROSS_CHAIN_SUCCESS, - events.BUY_ITEM_CROSS_CHAIN, - ({ payload }) => { - const { - route: { route }, - item, - order, - txHash - } = payload - return { - fromAmount: ethers.utils.formatUnits( - route.estimate.fromAmount, - route.estimate.fromToken.decimals - ), - fromTokenName: route.estimate.fromToken.name, - fromToken: route.params.fromToken, - fromChain: route.params.fromChain, - itemId: item.itemId, - contractAddress: item.contractAddress, - rarity: item.rarity, - network: item.network, - chainId: item.chainId, - price: Number(ethers.utils.formatEther(order?.price ?? item.price)), - data: item.data, - txHash, - category: item.category - } +track<BuyItemCrossChainSuccessAction>(BUY_ITEM_CROSS_CHAIN_SUCCESS, events.BUY_ITEM_CROSS_CHAIN, ({ payload }) => { + const { + route: { route }, + item, + order, + txHash + } = payload + return { + fromAmount: ethers.utils.formatUnits(route.estimate.fromAmount, route.estimate.fromToken.decimals), + fromTokenName: route.estimate.fromToken.name, + fromToken: route.params.fromToken, + fromChain: route.params.fromChain, + itemId: item.itemId, + contractAddress: item.contractAddress, + rarity: item.rarity, + network: item.network, + chainId: item.chainId, + price: Number(ethers.utils.formatEther(order?.price ?? item.price)), + data: item.data, + txHash, + category: item.category } }) diff --git a/webapp/src/modules/features/selectors.ts b/webapp/src/modules/features/selectors.ts index 9c1a922191..18acaf5279 100644 --- a/webapp/src/modules/features/selectors.ts +++ b/webapp/src/modules/features/selectors.ts @@ -72,11 +72,7 @@ export const getIsChainSelectorEnabled = (state: RootState) => { export const getIsLandCrossChainEnabled = (state: RootState) => { if (hasLoadedInitialFlags(state)) { - return getIsFeatureEnabled( - state, - ApplicationName.MARKETPLACE, - FeatureName.CROSS_CHAIN_LANDS - ) + return getIsFeatureEnabled(state, ApplicationName.MARKETPLACE, FeatureName.CROSS_CHAIN_LANDS) } return false } From ade19be9f4992ffa3337ce29808066c59beb4991 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Fri, 8 Mar 2024 15:57:32 -0300 Subject: [PATCH 21/36] fix: Fixes --- .../components/AssetPage/BestBuyingOption/BestBuyingOption.tsx | 2 +- webapp/src/components/Menu/DropdownMenu/DropdownMenu.tsx | 2 +- .../components/OnSaleOrRentList/OnSaleOrRentList.container.ts | 1 - webapp/src/components/Price/Price.container.ts | 1 - webapp/src/utils/test.tsx | 2 +- webapp/tsconfig.json | 1 - 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.tsx b/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.tsx index 07ca512469..57ad078bbd 100644 --- a/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.tsx +++ b/webapp/src/components/AssetPage/BestBuyingOption/BestBuyingOption.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from 'react' import { Link, useHistory, useLocation } from 'react-router-dom' import { t } from 'decentraland-dapps/dist/modules/translation/utils' -import { Bid, BidSortBy, Item, ListingStatus, Network, Order, OrderFilters, OrderSortBy, Rarity } from '@dcl/schemas' +import { Bid, BidSortBy, ListingStatus, Network, Order, OrderFilters, OrderSortBy, Rarity } from '@dcl/schemas' import { Button, Popup } from 'decentraland-ui' import { getExpirationDateLabel } from '../../../lib/date' import { locations } from '../../../modules/routing/locations' diff --git a/webapp/src/components/Menu/DropdownMenu/DropdownMenu.tsx b/webapp/src/components/Menu/DropdownMenu/DropdownMenu.tsx index 75cfd73d84..94b1fef1f9 100644 --- a/webapp/src/components/Menu/DropdownMenu/DropdownMenu.tsx +++ b/webapp/src/components/Menu/DropdownMenu/DropdownMenu.tsx @@ -36,7 +36,7 @@ const DropdownMenu = <T extends unknown>(props: Props<T>) => { className={classNames({ open: isDropdownOpen })} /> <ul className="submenu"> - {values.includes(currentValue) && isDropdownOpen + {currentValue && values.includes(currentValue) && isDropdownOpen ? values .slice(1) .map((value, index) => ( diff --git a/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.container.ts b/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.container.ts index 4966c69b6e..34b21a7a37 100644 --- a/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.container.ts +++ b/webapp/src/components/OnSaleOrRentList/OnSaleOrRentList.container.ts @@ -1,5 +1,4 @@ import { connect } from 'react-redux' -import { Item } from '@dcl/schemas' import { isLoadingType } from 'decentraland-dapps/dist/modules/loading/selectors' import { Authorization } from 'decentraland-dapps/dist/modules/authorization/types' import { fetchAuthorizationsRequest, revokeTokenRequest } from 'decentraland-dapps/dist/modules/authorization/actions' diff --git a/webapp/src/components/Price/Price.container.ts b/webapp/src/components/Price/Price.container.ts index 80e6e845a8..9f7ab4b58c 100644 --- a/webapp/src/components/Price/Price.container.ts +++ b/webapp/src/components/Price/Price.container.ts @@ -3,7 +3,6 @@ import { MapStateProps, OwnProps } from './Price.types' import Price from './Price' import { RootState } from '../../modules/reducer' import { getCurrentOrder } from '../../modules/order/selectors' -import { Item } from '@dcl/schemas' const mapState = (state: RootState, { asset }: OwnProps): MapStateProps => { let price: string | undefined diff --git a/webapp/src/utils/test.tsx b/webapp/src/utils/test.tsx index c60406ebfd..67889e7e64 100644 --- a/webapp/src/utils/test.tsx +++ b/webapp/src/utils/test.tsx @@ -12,7 +12,7 @@ import { RootState } from '../modules/reducer' import { initTestStore } from '../modules/store' import * as locales from '../modules/translation/locales' -const allTranslations = mergeTranslations(flatten(en), flatten(locales.en)) +const allTranslations = mergeTranslations(flatten(en), flatten(locales.en) as any) export function renderWithProviders( component: JSX.Element, diff --git a/webapp/tsconfig.json b/webapp/tsconfig.json index 31032ef6dd..8f09e241a2 100644 --- a/webapp/tsconfig.json +++ b/webapp/tsconfig.json @@ -21,7 +21,6 @@ "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, - "types": ["vite/client", "jest", "node"], }, "include": ["src", ".eslintrc.js", "vite.config.ts", "jest.config.ts", ".eslintrc.cjs"], "references": [{ "path": "./tsconfig.node.json" }] From c9f01d98916e61fea8309d5acf4be5652de8ad9c Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Fri, 8 Mar 2024 15:59:16 -0300 Subject: [PATCH 22/36] fix: Move .husky to correct directory --- webapp/.husky/pre-commit | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 webapp/.husky/pre-commit diff --git a/webapp/.husky/pre-commit b/webapp/.husky/pre-commit new file mode 100755 index 0000000000..8c178e97b4 --- /dev/null +++ b/webapp/.husky/pre-commit @@ -0,0 +1,15 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx|json|yml|md|html|css)$' || true; }) + +if [ -z "$FILES" ]; then + exit 0 +fi + +TS_FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx)$' || true; }) + +if [[ ! -z "$TS_FILES" ]];then + echo "Running lints" + npm run pre-commit:fix:code -- $TS_FILES +fi From 75117e691ff8dde936e12ab9f0b6770070c269af Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Fri, 8 Mar 2024 16:49:29 -0300 Subject: [PATCH 23/36] fix: Things --- .husky/pre-commit | 15 --------------- indexer/.subgraph.yaml | 1 + webapp/.husky/pre-commit | 7 ++++--- webapp/src/utils/test.tsx | 1 + 4 files changed, 6 insertions(+), 18 deletions(-) delete mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 8c178e97b4..0000000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx|json|yml|md|html|css)$' || true; }) - -if [ -z "$FILES" ]; then - exit 0 -fi - -TS_FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx)$' || true; }) - -if [[ ! -z "$TS_FILES" ]];then - echo "Running lints" - npm run pre-commit:fix:code -- $TS_FILES -fi diff --git a/indexer/.subgraph.yaml b/indexer/.subgraph.yaml index 632d397622..5347cb7674 100644 --- a/indexer/.subgraph.yaml +++ b/indexer/.subgraph.yaml @@ -232,3 +232,4 @@ templates: handler: handleTransfer - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer + diff --git a/webapp/.husky/pre-commit b/webapp/.husky/pre-commit index 8c178e97b4..df66e6d837 100755 --- a/webapp/.husky/pre-commit +++ b/webapp/.husky/pre-commit @@ -1,15 +1,16 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" +cd ./webapp -FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx|json|yml|md|html|css)$' || true; }) +FILES=$(git diff --cached --name-only --relative=webapp --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx|json|yml|md|html|css)$' || true; }) if [ -z "$FILES" ]; then exit 0 fi -TS_FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx)$' || true; }) +TS_FILES=$(git diff --cached --name-only --relative=webapp --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx)$' || true; }) if [[ ! -z "$TS_FILES" ]];then echo "Running lints" npm run pre-commit:fix:code -- $TS_FILES -fi +fi \ No newline at end of file diff --git a/webapp/src/utils/test.tsx b/webapp/src/utils/test.tsx index 67889e7e64..cb9a0a5834 100644 --- a/webapp/src/utils/test.tsx +++ b/webapp/src/utils/test.tsx @@ -12,6 +12,7 @@ import { RootState } from '../modules/reducer' import { initTestStore } from '../modules/store' import * as locales from '../modules/translation/locales' +// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion const allTranslations = mergeTranslations(flatten(en), flatten(locales.en) as any) export function renderWithProviders( From 861f8b989ee4242d6c4f7661972e69b1a3a563ed Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Mon, 11 Mar 2024 16:08:36 -0300 Subject: [PATCH 24/36] fix: Merge --- .../BuyNftWithCryptoModal.tsx | 7 +------ .../BuyWithCryptoModal.container.ts | 14 +++----------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.tsx b/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.tsx index 33200c3cd1..0e5932a4ad 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.tsx +++ b/webapp/src/components/Modals/BuyWithCryptoModal/BuyNftWithCryptoModal/BuyNftWithCryptoModal.tsx @@ -73,12 +73,7 @@ const BuyNftWithCryptoModalHOC = (props: Props) => { price={order.price} isBuyingAsset={isExecutingOrder || isExecutingOrderCrossChain} onBuyNatively={onBuyNatively} - onBuyWithCard={ - nft.category === NFTCategory.ESTATE || - nft.category === NFTCategory.PARCEL - ? undefined - : onBuyWithCard - } + onBuyWithCard={nft.category === NFTCategory.ESTATE || nft.category === NFTCategory.PARCEL ? undefined : onBuyWithCard} onBuyCrossChain={onExecuteOrderCrossChain} onGetGasCost={onGetGasCost} isLoadingAuthorization={isLoadingAuthorization} diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.container.ts b/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.container.ts index 6d13b92b81..59279e9cce 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.container.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/BuyWithCryptoModal.container.ts @@ -7,11 +7,7 @@ import { isSwitchingNetwork } from 'decentraland-dapps/dist/modules/wallet/selec import { RootState } from '../../../modules/reducer' import { getWallet } from '../../../modules/wallet/selectors' import { getIsBuyWithCardPage } from '../../../modules/routing/selectors' -import { - MapDispatchProps, - MapStateProps, - OwnProps -} from './BuyWithCryptoModal.types' +import { MapDispatchProps, MapStateProps, OwnProps } from './BuyWithCryptoModal.types' import { BuyWithCryptoModal } from './BuyWithCryptoModal' const mapState = (state: RootState): MapStateProps => { @@ -22,12 +18,8 @@ const mapState = (state: RootState): MapStateProps => { } } -const mapDispatch = ( - dispatch: Dispatch, - ownProps: OwnProps -): MapDispatchProps => ({ - onGetMana: () => - dispatch(openBuyManaWithFiatModalRequest(ownProps.metadata.asset.network)), +const mapDispatch = (dispatch: Dispatch, ownProps: OwnProps): MapDispatchProps => ({ + onGetMana: () => dispatch(openBuyManaWithFiatModalRequest(ownProps.metadata.asset.network)), onSwitchNetwork: chainId => dispatch(switchNetworkRequest(chainId)) }) From 9c596bb8754c820e043d2f1f98b4e6e247d02ccd Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Mon, 11 Mar 2024 16:30:20 -0300 Subject: [PATCH 25/36] fix: Reselect --- webapp/package-lock.json | 5 +++-- webapp/package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 1478c80877..e1fd924b17 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -49,7 +49,7 @@ "redux": "^4.1.1", "redux-logger": "^3.0.6", "redux-saga": "^1.1.3", - "reselect": "^4.0.0", + "reselect": "4.0.0", "typesafe-actions": "^5.1.0", "uuid": "^9.0.1" }, @@ -18385,7 +18385,8 @@ }, "node_modules/reselect": { "version": "4.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz", + "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==" }, "node_modules/resolve": { "version": "1.22.8", diff --git a/webapp/package.json b/webapp/package.json index 6ad90f1b6a..a28aaff6d5 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -44,7 +44,7 @@ "redux": "^4.1.1", "redux-logger": "^3.0.6", "redux-saga": "^1.1.3", - "reselect": "^4.0.0", + "reselect": "4.0.0", "typesafe-actions": "^5.1.0", "uuid": "^9.0.1" }, From f741e6cf05daa22a7f9a1d04f66d24ebe7a03f7a Mon Sep 17 00:00:00 2001 From: Gabriel Diaz <gabrieldiaz31@gmail.com> Date: Mon, 11 Mar 2024 16:40:20 -0300 Subject: [PATCH 26/36] chore: Upgrade package-lock.json --- webapp/package-lock.json | 95 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index e1fd924b17..ce5f661db4 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -7524,6 +7524,73 @@ "node": ">=8" } }, + "node_modules/babel-plugin-module-resolver": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", + "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", + "dev": true, + "peer": true, + "dependencies": { + "find-babel-config": "^2.0.0", + "glob": "^8.0.3", + "pkg-up": "^3.1.0", + "reselect": "^4.1.7", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/reselect": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", + "dev": true, + "peer": true + }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", "dev": true, @@ -9664,6 +9731,20 @@ "typescript": "^2.2.0 || ^3.0.0" } }, + "node_modules/dcl-tslint-config-standard/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/debug": { "version": "4.3.4", "license": "MIT", @@ -12475,6 +12556,20 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/find-babel-config": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", + "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", + "dev": true, + "peer": true, + "dependencies": { + "json5": "^2.1.1", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/find-replace": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", From f1ae91019d21968f6e4509976172b7ddb3afc269 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz <gabrieldiaz31@gmail.com> Date: Mon, 11 Mar 2024 16:52:04 -0300 Subject: [PATCH 27/36] fix: package-lock file --- webapp/package-lock.json | 22019 +++++++++++++++++++------------------ 1 file changed, 11164 insertions(+), 10855 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index ce5f661db4..e0ccc6586a 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -213,9 +213,9 @@ } }, "node_modules/@0xsquid/sdk": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/@0xsquid/sdk/-/sdk-2.8.9.tgz", - "integrity": "sha512-8bkp6GGRxUI7XbuQ5kfbkGY8qQXOA6q0fDK92gmlq0ooNFW/4eRv7U9WHr6ivsMl4UcxGcPfTP+yDES+FVHTcA==", + "version": "2.8.10", + "resolved": "https://registry.npmjs.org/@0xsquid/sdk/-/sdk-2.8.10.tgz", + "integrity": "sha512-0/H7SmhYW/EzXqu4Ao0WTTE1SJpEO8o4ddj7MC4TSJLQK64msakXAUXm6ez3rtleoqBrIpxookTfOOCgiYkvJg==", "dependencies": { "@cosmjs/encoding": "^0.31.0", "@cosmjs/stargate": "^0.31.3", @@ -229,6 +229,17 @@ "long": "^5.2.3" } }, + "node_modules/@0xsquid/sdk/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@0xsquid/sdk/node_modules/@noble/hashes": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", @@ -250,16 +261,6 @@ "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" }, - "node_modules/@0xsquid/sdk/node_modules/axios": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", - "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, "node_modules/@0xsquid/sdk/node_modules/ethers": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.8.1.tgz", @@ -287,11 +288,6 @@ "node": ">=14.0.0" } }, - "node_modules/@0xsquid/sdk/node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, "node_modules/@0xsquid/sdk/node_modules/tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", @@ -318,9 +314,9 @@ } }, "node_modules/@0xsquid/squid-types": { - "version": "0.1.51", - "resolved": "https://registry.npmjs.org/@0xsquid/squid-types/-/squid-types-0.1.51.tgz", - "integrity": "sha512-E66XjNfsGrgAcYrHCdq4j1aGqd7gNqALb9/H0CW1Tn9MfrXoqlxrQvU4Wc/hmV+UD+hIFSCGhFs4Rd55OK/tBQ==", + "version": "0.1.57", + "resolved": "https://registry.npmjs.org/@0xsquid/squid-types/-/squid-types-0.1.57.tgz", + "integrity": "sha512-Kl7rq5wF69ckveBU0rr7alck/CCO6tqvydQJE8A5u+dj40LM24mdQqvHzYpkowvi2TvEwR76rKm247aCq+eIig==", "dependencies": { "@axelar-network/axelarjs-sdk": "^0.13.6", "@ethersproject/providers": "^5.7.2", @@ -340,9 +336,9 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.1.0.tgz", - "integrity": "sha512-mMVJ/j/GbZ/De4ZHWbQAQO1J6iVnjtZLc9WEdkUQb8S/Bu2cAF2bETXUgMAdvMG3/ngtKmcNBe+Zms9bg6jnQQ==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz", + "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==", "dev": true }, "node_modules/@adraffy/ens-normalize": { @@ -351,21 +347,18 @@ "integrity": "sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==" }, "node_modules/@ampproject/remapping": { - "version": "2.1.2", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.0" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, - "node_modules/@assemblyscript/loader": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz", - "integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==" - }, "node_modules/@axelar-network/axelar-cgp-solidity": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/@axelar-network/axelar-cgp-solidity/-/axelar-cgp-solidity-4.5.0.tgz", @@ -431,10 +424,35 @@ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" }, - "node_modules/@axelar-network/axelarjs-sdk/node_modules/bech32": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", - "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + "node_modules/@axelar-network/axelarjs-sdk/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/@axelar-network/axelarjs-sdk/node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } }, "node_modules/@axelar-network/axelarjs-sdk/node_modules/uuid": { "version": "8.3.2", @@ -444,26 +462,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/@axelar-network/axelarjs-sdk/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/@axelar-network/axelarjs-types": { "version": "0.33.0", "resolved": "https://registry.npmjs.org/@axelar-network/axelarjs-types/-/axelarjs-types-0.33.0.tgz", @@ -473,34 +471,6 @@ "protobufjs": "^7.0.0" } }, - "node_modules/@axelar-network/axelarjs-types/node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, - "node_modules/@axelar-network/axelarjs-types/node_modules/protobufjs": { - "version": "7.2.6", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", - "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", @@ -514,6 +484,18 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/code-frame/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -528,6 +510,21 @@ "node": ">=4" } }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -537,35 +534,57 @@ "node": ">=0.8.0" } }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/compat-data": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", - "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.17.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.12", - "@babel/helper-compilation-targets": "^7.17.10", - "@babel/helper-module-transforms": "^7.17.12", - "@babel/helpers": "^7.17.9", - "@babel/parser": "^7.17.12", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.12", - "@babel/types": "^7.17.12", - "convert-source-map": "^1.7.0", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", + "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.24.0", + "@babel/parser": "^7.24.0", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -575,21 +594,15 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { - "version": "7.17.12", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.17.12", - "@jridgewell/gen-mapping": "^0.3.0", + "@babel/types": "^7.23.6", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "engines": { @@ -597,14 +610,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz", - "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -612,47 +625,23 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -671,28 +660,28 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", - "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", "@babel/helper-simple-access": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -702,9 +691,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -735,9 +724,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -753,22 +742,23 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.17.9", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", + "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.9", - "@babel/types": "^7.17.0" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -788,10 +778,23 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -801,18 +804,55 @@ "node": ">=4" } }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, "node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.0" } }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/parser": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", - "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", + "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -823,8 +863,9 @@ }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -834,8 +875,9 @@ }, "node_modules/@babel/plugin-syntax-bigint": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -845,8 +887,9 @@ }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" }, @@ -856,8 +899,9 @@ }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -867,8 +911,9 @@ }, "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -877,11 +922,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.16.7", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", + "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -892,8 +938,9 @@ }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -903,8 +950,9 @@ }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -914,8 +962,9 @@ }, "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -925,8 +974,9 @@ }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -936,8 +986,9 @@ }, "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -947,8 +998,9 @@ }, "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -958,8 +1010,9 @@ }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" }, @@ -971,11 +1024,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.16.7", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", + "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -985,9 +1039,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.10.tgz", - "integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -995,61 +1049,49 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/runtime/node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" - }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.17.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.12", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.12", - "@babel/types": "^7.17.12", - "debug": "^4.1.0", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", + "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/types": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", - "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1063,9 +1105,9 @@ "dev": true }, "node_modules/@coinbase/wallet-sdk": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.7.1.tgz", - "integrity": "sha512-LjyoDCB+7p0waQXfK+fUgcAs3Ezk6S6e+LYaoFjpJ6c9VTop3NyZF40Pi7df4z7QJohCwzuIDjz0Rhtig6Y7Pg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.7.2.tgz", + "integrity": "sha512-lIGvXMsgpsQWci/XOMQIJ2nIZ8JUy/L+bvC0wkRaYarr0YylwpXrJ2gRM3hCXPS477pkyO7N/kSiAoRgEXUdJQ==", "dependencies": { "@metamask/safe-event-emitter": "2.0.0", "@solana/web3.js": "^1.70.1", @@ -1089,32 +1131,6 @@ "node": ">= 10.0.0" } }, - "node_modules/@coinbase/wallet-sdk/node_modules/qs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", - "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/@coinbase/wallet-sdk/node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/@confio/ics23": { "version": "0.6.8", "resolved": "https://registry.npmjs.org/@confio/ics23/-/ics23-0.6.8.tgz", @@ -1124,13 +1140,43 @@ "protobufjs": "^6.8.8" } }, - "node_modules/@cosmjs/amino": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.31.3.tgz", - "integrity": "sha512-36emtUq895sPRX8PTSOnG+lhJDCVyIcE0Tr5ct59sUbgQiI14y43vj/4WAlJ/utSOxy+Zhj9wxcs4AZfu0BHsw==", + "node_modules/@confio/ics23/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/@confio/ics23/node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, "dependencies": { - "@cosmjs/crypto": "^0.31.3", - "@cosmjs/encoding": "^0.31.3", + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, + "node_modules/@cosmjs/amino": { + "version": "0.31.3", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.31.3.tgz", + "integrity": "sha512-36emtUq895sPRX8PTSOnG+lhJDCVyIcE0Tr5ct59sUbgQiI14y43vj/4WAlJ/utSOxy+Zhj9wxcs4AZfu0BHsw==", + "dependencies": { + "@cosmjs/crypto": "^0.31.3", + "@cosmjs/encoding": "^0.31.3", "@cosmjs/math": "^0.31.3", "@cosmjs/utils": "^0.31.3" } @@ -1159,6 +1205,11 @@ "readonly-date": "^1.0.0" } }, + "node_modules/@cosmjs/encoding/node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, "node_modules/@cosmjs/json-rpc": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.30.1.tgz", @@ -1190,6 +1241,11 @@ "long": "^4.0.0" } }, + "node_modules/@cosmjs/proto-signing/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "node_modules/@cosmjs/socket": { "version": "0.31.3", "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.31.3.tgz", @@ -1209,6 +1265,26 @@ "xstream": "^11.14.0" } }, + "node_modules/@cosmjs/socket/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/@cosmjs/stargate": { "version": "0.31.3", "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.31.3.tgz", @@ -1236,6 +1312,36 @@ "xstream": "^11.14.0" } }, + "node_modules/@cosmjs/stargate/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/@cosmjs/stargate/node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, "node_modules/@cosmjs/stream": { "version": "0.30.1", "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.30.1.tgz", @@ -1278,15 +1384,23 @@ "xstream": "^11.14.0" } }, + "node_modules/@cosmjs/tendermint-rpc/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, "node_modules/@cosmjs/utils": { "version": "0.31.3", "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.31.3.tgz", "integrity": "sha512-VBhAgzrrYdIe0O5IbKRqwszbQa7ZyQLx9nEQuHQ3HUplQW7P44COG/ye2n6AzCudtqxmwdX7nyX8ta1J07GoqA==" }, "node_modules/@covalenthq/client-sdk": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/@covalenthq/client-sdk/-/client-sdk-0.6.4.tgz", - "integrity": "sha512-th6acAVUq56bGwrYD66U8s3pyxE56KG+5+MI+b5qbLcUaBS6zQO7CNhYzhinlQtCpPgh7mE7L4FPntaYh2paDQ==", + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/@covalenthq/client-sdk/-/client-sdk-0.6.7.tgz", + "integrity": "sha512-Q/wwiUGRqOXIZ6JHiEeEK8qHCh4cKc9RAqqU9m6SMb6mH326NJ3trIs+jzopTPsCkNM7atmE1QD1YcvhYuDa4A==", "dependencies": { "@rollup/plugin-commonjs": "^25.0.4", "@rollup/plugin-node-resolve": "^15.2.1", @@ -1298,920 +1412,876 @@ "typescript": "^5.1.6" } }, - "node_modules/@covalenthq/client-sdk/node_modules/@rollup/plugin-commonjs": { - "version": "25.0.7", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", - "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "commondir": "^1.0.1", - "estree-walker": "^2.0.2", - "glob": "^8.0.3", - "is-reference": "1.2.1", - "magic-string": "^0.30.3" + "node_modules/@covalenthq/client-sdk/node_modules/rollup": { + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "bin": { + "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" + "node": ">=14.18.0", + "npm": ">=8.0.0" }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/@covalenthq/client-sdk/node_modules/@rollup/plugin-commonjs/node_modules/@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } + "node": ">=12" } }, - "node_modules/@covalenthq/client-sdk/node_modules/@rollup/plugin-node-resolve": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", - "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-builtin-module": "^3.2.1", - "is-module": "^1.0.0", - "resolve": "^1.22.1" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@date-fns/upgrade": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@date-fns/upgrade/-/upgrade-1.0.3.tgz", + "integrity": "sha512-0BLzKmXwWw3Zh3cZzW4xScmwGijXCAulaFdikqNiSnK8PAgYYSWWxOP/kuJFpKaoIT5KzstVGyHsjA7t/QXi1Q==", + "dependencies": { + "date-fns": "^2.1" + } + }, + "node_modules/@dcl/catalyst-contracts": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@dcl/catalyst-contracts/-/catalyst-contracts-4.3.1.tgz", + "integrity": "sha512-wOaIG/RwsKniQu1wDhigiQHDbfYMSu9Ifk7PToLMA01ellPrF0CZK06vGJLtXlahaXfUbv94N03teS7kYRORLA==" + }, + "node_modules/@dcl/crypto": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/@dcl/crypto/-/crypto-3.4.5.tgz", + "integrity": "sha512-uneyjOAOx7pi5kabZsLmPm9kSLkCk4Cok8FUsvT+6k8RquqkjKqocvkGVOMaoWsfU6S3mkLOyaeqEKmOy4ErxA==", + "dependencies": { + "@dcl/schemas": "^9.2.0", + "eth-connect": "^6.0.3", + "ethereum-cryptography": "^1.0.3" + } + }, + "node_modules/@dcl/crypto/node_modules/@dcl/schemas": { + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-9.15.0.tgz", + "integrity": "sha512-nip5rsOcJplNfBWeImwezuHLprM0gLW03kEeqGIvT9J6HnEBTtvIwkk9+NSt7hzFKEvWGI+C23vyNWbG3nU+SQ==", + "dependencies": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" + } + }, + "node_modules/@dcl/eslint-config": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@dcl/eslint-config/-/eslint-config-2.0.0.tgz", + "integrity": "sha512-5MkSQArjZXBbvb4wlEC6ZHeHBm5hpTn9wV1PQ5vXxyGRWrNoToBqHi7HgvBEboZw4PCUtYK1XA6ubjrnVQa7nA==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "^6.19.1", + "@typescript-eslint/parser": "^6.19.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-babel-module": "^5.3.2", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-autofix": "^1.1.0", + "eslint-plugin-css-import-order": "^1.1.0", + "eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1", + "eslint-plugin-prettier": "^5.1.3", + "prettier": "^3.2.4" + } + }, + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": ">=14.0.0" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { - "rollup": { + "typescript": { "optional": true } } }, - "node_modules/@covalenthq/client-sdk/node_modules/@rollup/plugin-node-resolve/node_modules/@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" }, "engines": { - "node": ">=14.0.0" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { - "rollup": { + "typescript": { "optional": true } } }, - "node_modules/@covalenthq/client-sdk/node_modules/@rollup/pluginutils": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", - "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, "dependencies": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" }, "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/@covalenthq/client-sdk/node_modules/@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==" - }, - "node_modules/@covalenthq/client-sdk/node_modules/big.js": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", - "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", - "engines": { - "node": "*" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/bigjs" - } - }, - "node_modules/@covalenthq/client-sdk/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@covalenthq/client-sdk/node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, "dependencies": { - "@babel/runtime": "^7.21.0" + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": ">=0.11" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/date-fns" + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@covalenthq/client-sdk/node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" - }, - "node_modules/@covalenthq/client-sdk/node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, "engines": { - "node": ">=8" + "node": "^16.0.0 || >=18.0.0" }, "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@covalenthq/client-sdk/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": ">=8" - } - }, - "node_modules/@covalenthq/client-sdk/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "node": "^16.0.0 || >=18.0.0" }, - "engines": { - "node": ">=12" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@covalenthq/client-sdk/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" }, "engines": { - "node": ">=12" + "node": "^16.0.0 || >=18.0.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@covalenthq/client-sdk/node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" } }, - "node_modules/@covalenthq/client-sdk/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": ">=8" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@covalenthq/client-sdk/node_modules/magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "node_modules/@dcl/eslint-config/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" + "yallist": "^4.0.0" }, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/@covalenthq/client-sdk/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/@dcl/eslint-config/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" + "lru-cache": "^6.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@covalenthq/client-sdk/node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" - } - }, - "node_modules/@covalenthq/client-sdk/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dependencies": { - "brace-expansion": "^2.0.1" }, "engines": { "node": ">=10" } }, - "node_modules/@covalenthq/client-sdk/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/@dcl/eslint-config/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@dcl/hashing": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-3.0.4.tgz", + "integrity": "sha512-Cg+MoIOn+BYmQV2q8zSFnNYY+GldlnUazwBnfgrq3i66ZxOaZ65h01btd8OUtSAlfWG4VTNIOHDjtKqmuwJNBg==" + }, + "node_modules/@dcl/schemas": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-10.3.0.tgz", + "integrity": "sha512-92CDJjG6T2g437lkXaw8uOzehPqi0QIp3qnD5uSz5UQu4djoMJYwoGB/IL2RX7pFL8ojaBPFashX/FjqHLxP+A==", "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" } }, - "node_modules/@covalenthq/client-sdk/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/@dcl/single-sign-on-client": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@dcl/single-sign-on-client/-/single-sign-on-client-0.1.0.tgz", + "integrity": "sha512-dbyTkC7jIQncPWbIzuymm0Mgkd7KkEk0moIMsB05z0QQM3p18vPvdmpqby0TAI+aa9AcdcyvOw8p9C0wj/YvUg==", "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" + "@dcl/crypto": "^3.4.3", + "validator": "^13.11.0" } }, - "node_modules/@covalenthq/client-sdk/node_modules/rollup": { - "version": "3.29.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", - "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" + "node_modules/@dcl/ui-env": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@dcl/ui-env/-/ui-env-1.5.0.tgz", + "integrity": "sha512-XxUznNb56JWpYWj8ZmuoS+RsXr2HanqMeKdPvqxkFvttjaec8N9BCg0jrfDxw2Q9T4hxYprjQfPzV5hQTqceNw==" + }, + "node_modules/@esbuild-plugins/node-globals-polyfill": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz", + "integrity": "sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==", + "dev": true, + "peerDependencies": { + "esbuild": "*" } }, - "node_modules/@covalenthq/client-sdk/node_modules/rollup-plugin-typescript2": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.35.0.tgz", - "integrity": "sha512-szcIO9hPUx3PhQl91u4pfNAH2EKbtrXaES+m163xQVE5O1CC0ea6YZV/5woiDDW3CR9jF2CszPrKN+AFiND0bg==", + "node_modules/@esbuild-plugins/node-modules-polyfill": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.2.2.tgz", + "integrity": "sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==", + "dev": true, "dependencies": { - "@rollup/pluginutils": "^4.1.2", - "find-cache-dir": "^3.3.2", - "fs-extra": "^10.0.0", - "semver": "^7.3.7", - "tslib": "^2.4.0" + "escape-string-regexp": "^4.0.0", + "rollup-plugin-node-polyfills": "^0.2.1" }, "peerDependencies": { - "rollup": ">=1.26.3", - "typescript": ">=2.4.0" + "esbuild": "*" } }, - "node_modules/@covalenthq/client-sdk/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "node_modules/@esbuild/aix-ppc64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.1.tgz", + "integrity": "sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "peer": true, + "engines": { + "node": ">=12" + } }, - "node_modules/@covalenthq/client-sdk/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "node_modules/@esbuild/android-arm": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.1.tgz", + "integrity": "sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "peer": true, "engines": { - "node": ">= 10.0.0" + "node": ">=12" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "node_modules/@esbuild/android-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.1.tgz", + "integrity": "sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, + "optional": true, + "os": [ + "android" + ], + "peer": true, "engines": { "node": ">=12" } }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "node_modules/@esbuild/android-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.1.tgz", + "integrity": "sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=12" } }, - "node_modules/@date-fns/upgrade": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@date-fns/upgrade/-/upgrade-1.0.3.tgz", - "integrity": "sha512-0BLzKmXwWw3Zh3cZzW4xScmwGijXCAulaFdikqNiSnK8PAgYYSWWxOP/kuJFpKaoIT5KzstVGyHsjA7t/QXi1Q==", - "dependencies": { - "date-fns": "^2.1" + "node_modules/@esbuild/darwin-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.1.tgz", + "integrity": "sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=12" } }, - "node_modules/@dcl/catalyst-contracts": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@dcl/catalyst-contracts/-/catalyst-contracts-4.0.2.tgz", - "integrity": "sha512-lfLtj4e646xCl/09seLq8zVnbuQ2w1O0c678TRB+1dttGYPpD13osX3J1P7ikC2SoR4NEBgDlFYXGbppmf0NKQ==" + "node_modules/@esbuild/darwin-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.1.tgz", + "integrity": "sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=12" + } }, - "node_modules/@dcl/crypto": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/@dcl/crypto/-/crypto-3.4.3.tgz", - "integrity": "sha512-biG8PqImY3jtVM5bPizgAD0P6X9/7VMxKuD2hxiEEeZClfB1Zi76Qk8pHaLpJ5pU3B+NogwZ8xoREhq0Po+gXQ==", - "dependencies": { - "@dcl/schemas": "^8.2.0", - "eth-connect": "^6.0.3", - "ethereum-cryptography": "^1.0.3" + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.1.tgz", + "integrity": "sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=12" } }, - "node_modules/@dcl/crypto/node_modules/@dcl/schemas": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-8.2.2.tgz", - "integrity": "sha512-IZqcT1YOKxw5XWs6LW6Uw+7Ue5vHCVERPMwefAdt26jW1OTH818od0rBc1tQzzfBTwsrAvbgFJvpbZedieu00g==", - "dependencies": { - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-keywords": "^5.1.0" + "node_modules/@esbuild/freebsd-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.1.tgz", + "integrity": "sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=12" } }, - "node_modules/@dcl/crypto/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "node_modules/@esbuild/linux-arm": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.1.tgz", + "integrity": "sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" } }, - "node_modules/@dcl/crypto/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "peerDependencies": { - "ajv": "^8.0.1" + "node_modules/@esbuild/linux-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.1.tgz", + "integrity": "sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" } }, - "node_modules/@dcl/crypto/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" + "node_modules/@esbuild/linux-ia32": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.1.tgz", + "integrity": "sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" } }, - "node_modules/@dcl/crypto/node_modules/ethereum-cryptography": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "@noble/hashes": "1.0.0", - "@noble/secp256k1": "1.5.5", - "@scure/bip32": "1.0.1", - "@scure/bip39": "1.0.0" + "node_modules/@esbuild/linux-loong64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.1.tgz", + "integrity": "sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" } }, - "node_modules/@dcl/eslint-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@dcl/eslint-config/-/eslint-config-2.0.0.tgz", - "integrity": "sha512-5MkSQArjZXBbvb4wlEC6ZHeHBm5hpTn9wV1PQ5vXxyGRWrNoToBqHi7HgvBEboZw4PCUtYK1XA6ubjrnVQa7nA==", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.1.tgz", + "integrity": "sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==", + "cpu": [ + "mips64el" + ], "dev": true, - "dependencies": { - "@typescript-eslint/eslint-plugin": "^6.19.1", - "@typescript-eslint/parser": "^6.19.1", - "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-import-resolver-babel-module": "^5.3.2", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-autofix": "^1.1.0", - "eslint-plugin-css-import-order": "^1.1.0", - "eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1", - "eslint-plugin-prettier": "^5.1.3", - "prettier": "^3.2.4" + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=12" } }, - "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", - "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.1.tgz", + "integrity": "sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==", + "cpu": [ + "ppc64" + ], "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, + "optional": true, + "os": [ + "linux" + ], + "peer": true, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=12" } }, - "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/parser": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", - "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.1.tgz", + "integrity": "sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==", + "cpu": [ + "riscv64" + ], "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4" - }, + "optional": true, + "os": [ + "linux" + ], + "peer": true, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=12" } }, - "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/scope-manager": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", - "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "node_modules/@esbuild/linux-s390x": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.1.tgz", + "integrity": "sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==", + "cpu": [ + "s390x" + ], "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" - }, + "optional": true, + "os": [ + "linux" + ], + "peer": true, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=12" } }, - "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/type-utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", - "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "node_modules/@esbuild/linux-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.1.tgz", + "integrity": "sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, + "optional": true, + "os": [ + "linux" + ], + "peer": true, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=12" } }, - "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", - "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.1.tgz", + "integrity": "sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=12" } }, - "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", - "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "node_modules/@esbuild/openbsd-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.1.tgz", + "integrity": "sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.1.tgz", + "integrity": "sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.1.tgz", + "integrity": "sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.1.tgz", + "integrity": "sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.1.tgz", + "integrity": "sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", - "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "semver": "^7.5.4" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "url": "https://opencollective.com/eslint" } }, - "node_modules/@dcl/eslint-config/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", - "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@dcl/eslint-config/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@dcl/eslint-config/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "type-fest": "^0.20.2" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@dcl/hashing": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@dcl/hashing/-/hashing-2.0.0.tgz", - "integrity": "sha512-Wver/KQScNhoobAOT9u09THMReCIkuK2VQ2GtB891uHKYh31IxCYJW+dcBkynWUZQA4HTRa3DOtEDt/ZyImaHQ==", - "dependencies": { - "ethereum-cryptography": "^1.0.3", - "ipfs-unixfs-importer": "^7.0.3", - "multiformats": "^9.6.3" - } - }, - "node_modules/@dcl/hashing/node_modules/@noble/hashes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", - "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] - }, - "node_modules/@dcl/hashing/node_modules/@noble/secp256k1": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", - "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] - }, - "node_modules/@dcl/hashing/node_modules/@scure/base": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", - "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] - }, - "node_modules/@dcl/hashing/node_modules/@scure/bip32": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", - "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "@noble/hashes": "~1.2.0", - "@noble/secp256k1": "~1.7.0", - "@scure/base": "~1.1.0" - } - }, - "node_modules/@dcl/hashing/node_modules/@scure/bip39": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", - "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "@noble/hashes": "~1.2.0", - "@scure/base": "~1.1.0" - } - }, - "node_modules/@dcl/hashing/node_modules/ethereum-cryptography": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", - "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", - "dependencies": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" - } - }, - "node_modules/@dcl/schemas": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-10.3.0.tgz", - "integrity": "sha512-92CDJjG6T2g437lkXaw8uOzehPqi0QIp3qnD5uSz5UQu4djoMJYwoGB/IL2RX7pFL8ojaBPFashX/FjqHLxP+A==", - "dependencies": { - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-keywords": "^5.1.0" - } - }, - "node_modules/@dcl/schemas/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@dcl/schemas/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "peerDependencies": { - "ajv": "^8.0.1" - } - }, - "node_modules/@dcl/schemas/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/@dcl/single-sign-on-client": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@dcl/single-sign-on-client/-/single-sign-on-client-0.1.0.tgz", - "integrity": "sha512-dbyTkC7jIQncPWbIzuymm0Mgkd7KkEk0moIMsB05z0QQM3p18vPvdmpqby0TAI+aa9AcdcyvOw8p9C0wj/YvUg==", - "dependencies": { - "@dcl/crypto": "^3.4.3", - "validator": "^13.11.0" - } - }, - "node_modules/@dcl/ui-env": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@dcl/ui-env/-/ui-env-1.5.0.tgz", - "integrity": "sha512-XxUznNb56JWpYWj8ZmuoS+RsXr2HanqMeKdPvqxkFvttjaec8N9BCg0jrfDxw2Q9T4hxYprjQfPzV5hQTqceNw==" - }, - "node_modules/@esbuild-plugins/node-globals-polyfill": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz", - "integrity": "sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==", - "dev": true, - "peerDependencies": { - "esbuild": "*" - } - }, - "node_modules/@esbuild-plugins/node-modules-polyfill": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.2.2.tgz", - "integrity": "sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^4.0.0", - "rollup-plugin-node-polyfills": "^0.2.1" - }, - "peerDependencies": { - "esbuild": "*" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", - "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "brace-expansion": "^1.1.7" }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "dev": true, "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": "*" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=10" }, "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@eslint/js": { @@ -2232,12 +2302,26 @@ "ethereumjs-util": "^7.1.5" } }, - "node_modules/@ethereumjs/common/node_modules/@types/bn.js": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", - "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "node_modules/@ethereumjs/common/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", "dependencies": { - "@types/node": "*" + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" } }, "node_modules/@ethereumjs/common/node_modules/ethereumjs-util": { @@ -2256,7 +2340,9 @@ } }, "node_modules/@ethersproject/abi": { - "version": "5.0.13", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", + "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", "funding": [ { "type": "individual", @@ -2267,19 +2353,18 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT", "dependencies": { - "@ethersproject/address": "^5.0.9", - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/constants": "^5.0.8", - "@ethersproject/hash": "^5.0.10", - "@ethersproject/keccak256": "^5.0.7", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7", - "@ethersproject/strings": "^5.0.8" - } - }, + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, "node_modules/@ethersproject/abstract-provider": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", @@ -2367,9 +2452,9 @@ } }, "node_modules/@ethersproject/basex": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.9.tgz", - "integrity": "sha512-FANswl1IN3PS0eltQxH2aM2+utPrkLUVG4XVFi6SafRG9EpAqXCgycxC8PU90mPGhigYTpg9cnTB5mCZ6ejQjw==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", + "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", "funding": [ { "type": "individual", @@ -2381,8 +2466,8 @@ } ], "dependencies": { - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/properties": "^5.0.7" + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.0" } }, "node_modules/@ethersproject/bignumber": { @@ -2468,33 +2553,7 @@ "@ethersproject/transactions": "^5.7.0" } }, - "node_modules/@ethersproject/contracts/node_modules/@ethersproject/abi": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", - "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/contracts/node_modules/@ethersproject/hash": { + "node_modules/@ethersproject/hash": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", @@ -2520,30 +2579,6 @@ "@ethersproject/strings": "^5.7.0" } }, - "node_modules/@ethersproject/hash": { - "version": "5.0.12", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "dependencies": { - "@ethersproject/abstract-signer": "^5.0.10", - "@ethersproject/address": "^5.0.9", - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/keccak256": "^5.0.7", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7", - "@ethersproject/strings": "^5.0.8" - } - }, "node_modules/@ethersproject/hdnode": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", @@ -2573,45 +2608,6 @@ "@ethersproject/wordlists": "^5.7.0" } }, - "node_modules/@ethersproject/hdnode/node_modules/@ethersproject/basex": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", - "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "node_modules/@ethersproject/hdnode/node_modules/@ethersproject/sha2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "hash.js": "1.1.7" - } - }, "node_modules/@ethersproject/json-wallets": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", @@ -2642,25 +2638,6 @@ "scrypt-js": "3.0.1" } }, - "node_modules/@ethersproject/json-wallets/node_modules/@ethersproject/random": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", - "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, "node_modules/@ethersproject/keccak256": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", @@ -2732,26 +2709,6 @@ "@ethersproject/sha2": "^5.7.0" } }, - "node_modules/@ethersproject/pbkdf2/node_modules/@ethersproject/sha2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "hash.js": "1.1.7" - } - }, "node_modules/@ethersproject/properties": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", @@ -2807,10 +2764,35 @@ "ws": "7.4.6" } }, - "node_modules/@ethersproject/providers/node_modules/@ethersproject/basex": { + "node_modules/@ethersproject/providers/node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "node_modules/@ethersproject/providers/node_modules/ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@ethersproject/random": { "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", - "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", + "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", "funding": [ { "type": "individual", @@ -2823,13 +2805,13 @@ ], "dependencies": { "@ethersproject/bytes": "^5.7.0", - "@ethersproject/properties": "^5.7.0" + "@ethersproject/logger": "^5.7.0" } }, - "node_modules/@ethersproject/providers/node_modules/@ethersproject/hash": { + "node_modules/@ethersproject/rlp": { "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", - "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", + "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", "funding": [ { "type": "individual", @@ -2841,21 +2823,14 @@ } ], "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" + "@ethersproject/logger": "^5.7.0" } }, - "node_modules/@ethersproject/providers/node_modules/@ethersproject/random": { + "node_modules/@ethersproject/sha2": { "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", - "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", + "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", "funding": [ { "type": "individual", @@ -2868,13 +2843,14 @@ ], "dependencies": { "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" } }, - "node_modules/@ethersproject/providers/node_modules/@ethersproject/sha2": { + "node_modules/@ethersproject/signing-key": { "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", + "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", "funding": [ { "type": "individual", @@ -2888,13 +2864,35 @@ "dependencies": { "@ethersproject/bytes": "^5.7.0", "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", "hash.js": "1.1.7" } }, - "node_modules/@ethersproject/random": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.9.tgz", - "integrity": "sha512-DANG8THsKqFbJOantrxumtG6gyETNE54VfbsWa+SQAT8WKpDo9W/X5Zhh73KuhClaey1UI32uVmISZeq/Zxn1A==", + "node_modules/@ethersproject/signing-key/node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/@ethersproject/signing-key/node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/@ethersproject/solidity": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", + "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", "funding": [ { "type": "individual", @@ -2906,14 +2904,18 @@ } ], "dependencies": { - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8" + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0" } }, - "node_modules/@ethersproject/rlp": { + "node_modules/@ethersproject/strings": { "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", - "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", + "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", "funding": [ { "type": "individual", @@ -2926,128 +2928,14 @@ ], "dependencies": { "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", "@ethersproject/logger": "^5.7.0" } }, - "node_modules/@ethersproject/sha2": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.9.tgz", - "integrity": "sha512-5FH4s47gM7N1fFAYQ1+m7aX0SbLg0Xr+6tvqndmNqc382/qBIbzXiGlUookrsjlPb6gLNurnTssCXjNM72J6lQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8", - "hash.js": "1.1.3" - } - }, - "node_modules/@ethersproject/sha2/node_modules/hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/@ethersproject/signing-key": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", - "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "bn.js": "^5.2.1", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "node_modules/@ethersproject/solidity": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", - "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/solidity/node_modules/@ethersproject/sha2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "hash.js": "1.1.7" - } - }, - "node_modules/@ethersproject/strings": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", - "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/transactions": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", - "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", + "node_modules/@ethersproject/transactions": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", + "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", "funding": [ { "type": "individual", @@ -3122,51 +3010,6 @@ "@ethersproject/wordlists": "^5.7.0" } }, - "node_modules/@ethersproject/wallet/node_modules/@ethersproject/hash": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", - "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/wallet/node_modules/@ethersproject/random": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", - "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, "node_modules/@ethersproject/web": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", @@ -3211,32 +3054,6 @@ "@ethersproject/strings": "^5.7.0" } }, - "node_modules/@ethersproject/wordlists/node_modules/@ethersproject/hash": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", - "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, "node_modules/@fluentui/react-component-event-listener": { "version": "0.63.1", "resolved": "https://registry.npmjs.org/@fluentui/react-component-event-listener/-/react-component-event-listener-0.63.1.tgz", @@ -3271,11 +3088,6 @@ "tslib": "^2.1.0" } }, - "node_modules/@formatjs/ecma402-abstract/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@formatjs/fast-memoize": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz", @@ -3284,11 +3096,6 @@ "tslib": "^2.1.0" } }, - "node_modules/@formatjs/fast-memoize/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@formatjs/icu-messageformat-parser": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz", @@ -3299,11 +3106,6 @@ "tslib": "^2.1.0" } }, - "node_modules/@formatjs/icu-messageformat-parser/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@formatjs/icu-skeleton-parser": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz", @@ -3313,33 +3115,6 @@ "tslib": "^2.1.0" } }, - "node_modules/@formatjs/icu-skeleton-parser/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/@formatjs/intl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.2.1.tgz", - "integrity": "sha512-vgvyUOOrzqVaOFYzTf2d3+ToSkH2JpR7x/4U1RyoHQLmvEaTQvXJ7A2qm1Iy3brGNXC/+/7bUlc3lpH+h/LOJA==", - "dependencies": { - "@formatjs/ecma402-abstract": "1.11.4", - "@formatjs/fast-memoize": "1.2.1", - "@formatjs/icu-messageformat-parser": "2.1.0", - "@formatjs/intl-displaynames": "5.4.3", - "@formatjs/intl-listformat": "6.5.3", - "intl-messageformat": "9.13.0", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "typescript": "^4.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/@formatjs/intl-displaynames": { "version": "5.4.3", "resolved": "https://registry.npmjs.org/@formatjs/intl-displaynames/-/intl-displaynames-5.4.3.tgz", @@ -3350,11 +3125,6 @@ "tslib": "^2.1.0" } }, - "node_modules/@formatjs/intl-displaynames/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@formatjs/intl-listformat": { "version": "6.5.3", "resolved": "https://registry.npmjs.org/@formatjs/intl-listformat/-/intl-listformat-6.5.3.tgz", @@ -3365,11 +3135,6 @@ "tslib": "^2.1.0" } }, - "node_modules/@formatjs/intl-listformat/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@formatjs/intl-localematcher": { "version": "0.2.25", "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz", @@ -3378,16 +3143,6 @@ "tslib": "^2.1.0" } }, - "node_modules/@formatjs/intl-localematcher/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/@formatjs/intl/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -3402,6 +3157,28 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -3428,8 +3205,9 @@ }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "license": "ISC", "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", @@ -3441,10 +3219,20 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -3453,21 +3241,51 @@ "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" }, "engines": { "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, @@ -3477,20 +3295,39 @@ }, "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/core": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", @@ -3538,24 +3375,51 @@ } } }, - "node_modules/@jest/core/node_modules/@jest/console": { + "node_modules/@jest/core/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@jest/core/node_modules/pretty-format": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/@jest/create-cache-key-function": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz", + "integrity": "sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@jest/environment": { + "node_modules/@jest/environment": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", @@ -3570,7 +3434,32 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@jest/fake-timers": { + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", @@ -3587,7 +3476,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@jest/globals": { + "node_modules/@jest/globals": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", @@ -3602,7 +3491,104 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@jest/source-map": { + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@jest/reporters/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", @@ -3616,7 +3602,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@jest/test-result": { + "node_modules/@jest/test-result": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", @@ -3631,7 +3617,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@jest/test-sequencer": { + "node_modules/@jest/test-sequencer": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", @@ -3646,7 +3632,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@jest/transform": { + "node_modules/@jest/transform": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", @@ -3672,2053 +3658,2239 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "dependencies": { - "type-detect": "4.0.8" + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@sinonjs/commons": "^3.0.0" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" } }, - "node_modules/@jest/core/node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" + "node": ">=6.0.0" } }, - "node_modules/@jest/core/node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=6.0.0" } }, - "node_modules/@jest/core/node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jest/core/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/@lit-labs/ssr-dom-shim": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.0.tgz", + "integrity": "sha512-yWJKmpGE6lUURKAaIltoPIE/wrbY3TEkqQt+X0m+7fQNnAv0keydnYvbiJFP1PnMhizmIWRWOG5KLhYyc/xl+g==" }, - "node_modules/@jest/core/node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true + "node_modules/@lit/reactive-element": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", + "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.0.0" + } }, - "node_modules/@jest/core/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "node_modules/@magic-ext/oauth": { + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/@magic-ext/oauth/-/oauth-15.6.0.tgz", + "integrity": "sha512-OBLxdPUvL+kW/DIxH8V5Fp4rjkV7LdFfVkRHdy6dPBhdbJjpD9/XOReNZnWa45OHx7+OOl1OocPtXn9hEAFoyQ==", + "dependencies": { + "crypto-js": "^3.3.0" + } }, - "node_modules/@jest/core/node_modules/dedent": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", - "dev": true, + "node_modules/@magic-sdk/commons": { + "version": "17.5.0", + "resolved": "https://registry.npmjs.org/@magic-sdk/commons/-/commons-17.5.0.tgz", + "integrity": "sha512-2KdLT6KTNnToOuTb92a/Ur/zGfV8/M89W+wqrcumcSmdOOyD65C80q2Gd70OF2+HZEOPEfBp8vBTfOGyRSb8fg==", "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } + "@magic-sdk/provider": ">=18.6.0", + "@magic-sdk/types": ">=15.8.0" } }, - "node_modules/@jest/core/node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "engines": { - "node": ">=12" + "node_modules/@magic-sdk/provider": { + "version": "21.5.0", + "resolved": "https://registry.npmjs.org/@magic-sdk/provider/-/provider-21.5.0.tgz", + "integrity": "sha512-q2UAww4Hv8qDg+GYUqmUhdLPL5lfmYXpD6HN1IMI1HBU/SG2hLMVs/28u+RrCC1GddrqTTDal9GXONd3OHurHA==", + "dependencies": { + "@magic-sdk/types": "^17.3.0", + "eventemitter3": "^4.0.4", + "web3-core": "1.5.2" }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" + "peerDependencies": { + "localforage": "^1.7.4" } }, - "node_modules/@jest/core/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/@magic-sdk/types": { + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/@magic-sdk/types/-/types-17.3.0.tgz", + "integrity": "sha512-0mTFr1qDJ94pOJkFu1oZ/s2KnV7lHgILvWuFh7fs7ugyn7z9M7euP9g+Bv+kEdZ6ja4QlNi+UR0OryaXowv75w==" }, - "node_modules/@jest/core/node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", - "dev": true, + "node_modules/@metamask/safe-event-emitter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz", + "integrity": "sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==" + }, + "node_modules/@metamask/utils": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-3.6.0.tgz", + "integrity": "sha512-9cIRrfkWvHblSiNDVXsjivqa9Ak0RYo/1H6tqTqTbAx+oBK2Sva0lWDHxGchOqA7bySGUJKAWSNJvH6gdHZ0gQ==", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "@types/debug": "^4.1.7", + "debug": "^4.3.4", + "semver": "^7.3.8", + "superstruct": "^1.0.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=14.0.0" } }, - "node_modules/@jest/core/node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, + "node_modules/@metamask/utils/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" + "yallist": "^4.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } + "node": ">=10" } }, - "node_modules/@jest/core/node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", - "dev": true, + "node_modules/@metamask/utils/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { - "detect-newline": "^3.0.0" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=10" } }, - "node_modules/@jest/core/node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, + "node_modules/@metamask/utils/node_modules/superstruct": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.4.tgz", + "integrity": "sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=14.0.0" } }, - "node_modules/@jest/core/node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", - "dev": true, + "node_modules/@metamask/utils/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/@motionone/animation": { + "version": "10.17.0", + "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.17.0.tgz", + "integrity": "sha512-ANfIN9+iq1kGgsZxs+Nz96uiNcPLGTXwfNo2Xz/fcJXniPYpaz/Uyrfa+7I5BPLxCP82sh7quVDudf1GABqHbg==", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@motionone/easing": "^10.17.0", + "@motionone/types": "^10.17.0", + "@motionone/utils": "^10.17.0", + "tslib": "^2.3.1" } }, - "node_modules/@jest/core/node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "node_modules/@motionone/dom": { + "version": "10.17.0", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.17.0.tgz", + "integrity": "sha512-cMm33swRlCX/qOPHWGbIlCl0K9Uwi6X5RiL8Ma6OrlJ/TP7Q+Np5GE4xcZkFptysFjMTi4zcZzpnNQGQ5D6M0Q==", + "dependencies": { + "@motionone/animation": "^10.17.0", + "@motionone/generators": "^10.17.0", + "@motionone/types": "^10.17.0", + "@motionone/utils": "^10.17.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" } }, - "node_modules/@jest/core/node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", - "dev": true, + "node_modules/@motionone/easing": { + "version": "10.17.0", + "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.17.0.tgz", + "integrity": "sha512-Bxe2wSuLu/qxqW4rBFS5m9tMLOw+QBh8v5A7Z5k4Ul4sTj5jAOfZG5R0bn5ywmk+Fs92Ij1feZ5pmC4TeXA8Tg==", "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@motionone/utils": "^10.17.0", + "tslib": "^2.3.1" } }, - "node_modules/@jest/core/node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", - "dev": true, + "node_modules/@motionone/generators": { + "version": "10.17.0", + "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.17.0.tgz", + "integrity": "sha512-T6Uo5bDHrZWhIfxG/2Aut7qyWQyJIWehk6OB4qNvr/jwA/SRmixwbd7SOrxZi1z5rH3LIeFFBKK1xHnSbGPZSQ==", "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@motionone/types": "^10.17.0", + "@motionone/utils": "^10.17.0", + "tslib": "^2.3.1" } }, - "node_modules/@jest/core/node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node_modules/@motionone/svelte": { + "version": "10.16.4", + "resolved": "https://registry.npmjs.org/@motionone/svelte/-/svelte-10.16.4.tgz", + "integrity": "sha512-zRVqk20lD1xqe+yEDZhMYgftsuHc25+9JSo+r0a0OWUJFocjSV9D/+UGhX4xgJsuwB9acPzXLr20w40VnY2PQA==", + "dependencies": { + "@motionone/dom": "^10.16.4", + "tslib": "^2.3.1" } }, - "node_modules/@jest/core/node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", - "dev": true, + "node_modules/@motionone/types": { + "version": "10.17.0", + "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.17.0.tgz", + "integrity": "sha512-EgeeqOZVdRUTEHq95Z3t8Rsirc7chN5xFAPMYFobx8TPubkEfRSm5xihmMUkbaR2ErKJTUw3347QDPTHIW12IA==" + }, + "node_modules/@motionone/utils": { + "version": "10.17.0", + "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.17.0.tgz", + "integrity": "sha512-bGwrki4896apMWIj9yp5rAS2m0xyhxblg6gTB/leWDPt+pb410W8lYWsxyurX+DH+gO1zsQsfx2su/c1/LtTpg==", "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@motionone/types": "^10.17.0", + "hey-listen": "^1.0.8", + "tslib": "^2.3.1" } }, - "node_modules/@jest/core/node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", - "dev": true, + "node_modules/@motionone/vue": { + "version": "10.16.4", + "resolved": "https://registry.npmjs.org/@motionone/vue/-/vue-10.16.4.tgz", + "integrity": "sha512-z10PF9JV6SbjFq+/rYabM+8CVlMokgl8RFGvieSGNTmrkQanfHn+15XBrhG3BgUfvmTeSeyShfOHpG0i9zEdcg==", + "deprecated": "Motion One for Vue is deprecated. Use Oku Motion instead https://oku-ui.com/motion", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@motionone/dom": "^10.16.4", + "tslib": "^2.3.1" } }, - "node_modules/@jest/core/node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", - "dev": true, + "node_modules/@noble/curves": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", + "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" + "@noble/hashes": "1.3.3" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@jest/core/node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, + "node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@jest/core/node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "node_modules/@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 8" } }, - "node_modules/@jest/core/node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 8" } }, - "node_modules/@jest/core/node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 8" } }, - "node_modules/@jest/core/node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, + "node_modules/@parcel/watcher": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.4.1.tgz", + "integrity": "sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==", "dependencies": { - "has-flag": "^4.0.0" + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" }, "engines": { - "node": ">=10" + "node": ">= 10.0.0" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/@jest/core/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" + "type": "opencollective", + "url": "https://opencollective.com/parcel" }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.4.1", + "@parcel/watcher-darwin-arm64": "2.4.1", + "@parcel/watcher-darwin-x64": "2.4.1", + "@parcel/watcher-freebsd-x64": "2.4.1", + "@parcel/watcher-linux-arm-glibc": "2.4.1", + "@parcel/watcher-linux-arm64-glibc": "2.4.1", + "@parcel/watcher-linux-arm64-musl": "2.4.1", + "@parcel/watcher-linux-x64-glibc": "2.4.1", + "@parcel/watcher-linux-x64-musl": "2.4.1", + "@parcel/watcher-win32-arm64": "2.4.1", + "@parcel/watcher-win32-ia32": "2.4.1", + "@parcel/watcher-win32-x64": "2.4.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz", + "integrity": "sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=10" + "node": ">= 10.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/core/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.1.tgz", + "integrity": "sha512-ln41eihm5YXIY043vBrrHfn94SIBlqOWmoROhsMVTSXGh0QahKGy77tfEywQ7v3NywyxBBkGIfrWRHm0hsKtzA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@jest/core/node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/core/node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.1.tgz", + "integrity": "sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=8" + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/core/node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.1.tgz", + "integrity": "sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/create-cache-key-function": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz", - "integrity": "sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3" - }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.1.tgz", + "integrity": "sha512-4rVYDlsMEYfa537BRXxJ5UF4ddNwnr2/1O4MHM5PjI9cvV2qymvhwZSFgXqbS8YoTk5i/JR0L0JDs69BUn45YA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", - "dev": true, - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.1.tgz", + "integrity": "sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.4.1.tgz", + "integrity": "sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.6.3" + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.1.tgz", + "integrity": "sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.1.tgz", + "integrity": "sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/expect/node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, + "node_modules/@parcel/watcher-wasm": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-wasm/-/watcher-wasm-2.4.1.tgz", + "integrity": "sha512-/ZR0RxqxU/xxDGzbzosMjh4W6NdYFMqq2nvo2b8SLi7rsl/4jkL8S5stIikorNkdR50oVDvqb/3JT05WM+CRRA==", + "bundleDependencies": [ + "napi-wasm" + ], "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "napi-wasm": "^1.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/expect/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT" }, - "node_modules/@jest/expect/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz", + "integrity": "sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=8" + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/expect/node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.1.tgz", + "integrity": "sha512-maNRit5QQV2kgHFSYwftmPBxiuK5u4DXjbXx7q6eKjq5dsLXZ4FJiVvlcw35QXzk0KrUecJmuVFbj4uV9oYrcw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.1.tgz", + "integrity": "sha512-+DvS92F9ezicfswqrvIRM2njcYJbd5mb9CUgtrHCHmvn7pPPa+nMDRu1o1bYYz/l5IB2NVGNJWiH7h1E58IF2A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 10.0.0" }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@jest/expect/node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, + "node_modules/@parcel/watcher/node_modules/node-addon-api": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", + "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^16 || ^18 || >= 20" } }, - "node_modules/@jest/expect/node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" } }, - "node_modules/@jest/expect/node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" } }, - "node_modules/@jest/expect/node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@redux-saga/core": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@redux-saga/core/-/core-1.3.0.tgz", + "integrity": "sha512-L+i+qIGuyWn7CIg7k1MteHGfttKPmxwZR5E7OsGikCL2LzYA0RERlaUY00Y3P3ZV2EYgrsYlBrGs6cJP5OKKqA==", "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" + "@babel/runtime": "^7.6.3", + "@redux-saga/deferred": "^1.2.1", + "@redux-saga/delay-p": "^1.2.1", + "@redux-saga/is": "^1.1.3", + "@redux-saga/symbols": "^1.1.3", + "@redux-saga/types": "^1.2.1", + "typescript-tuple": "^2.2.1" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "type": "opencollective", + "url": "https://opencollective.com/redux-saga" } }, - "node_modules/@jest/expect/node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, + "node_modules/@redux-saga/deferred": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@redux-saga/deferred/-/deferred-1.2.1.tgz", + "integrity": "sha512-cmin3IuuzMdfQjA0lG4B+jX+9HdTgHZZ+6u3jRAOwGUxy77GSlTi4Qp2d6PM1PUoTmQUR5aijlA39scWWPF31g==" + }, + "node_modules/@redux-saga/delay-p": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@redux-saga/delay-p/-/delay-p-1.2.1.tgz", + "integrity": "sha512-MdiDxZdvb1m+Y0s4/hgdcAXntpUytr9g0hpcOO1XFVyyzkrDu3SKPgBFOtHn7lhu7n24ZKIAT1qtKyQjHqRd+w==", "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "@redux-saga/symbols": "^1.1.3" } }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", - "dev": true, + "node_modules/@redux-saga/is": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@redux-saga/is/-/is-1.1.3.tgz", + "integrity": "sha512-naXrkETG1jLRfVfhOx/ZdLj0EyAzHYbgJWkXbB3qFliPcHKiWbv/ULQryOAEKyjrhiclmr6AMdgsXFyx7/yE6Q==", "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" + "@redux-saga/symbols": "^1.1.3", + "@redux-saga/types": "^1.2.1" + } + }, + "node_modules/@redux-saga/symbols": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@redux-saga/symbols/-/symbols-1.1.3.tgz", + "integrity": "sha512-hCx6ZvU4QAEUojETnX8EVg4ubNLBFl1Lps4j2tX7o45x/2qg37m3c6v+kSp8xjDJY+2tJw4QB3j8o8dsl1FDXg==" + }, + "node_modules/@redux-saga/types": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@redux-saga/types/-/types-1.2.1.tgz", + "integrity": "sha512-1dgmkh+3so0+LlBWRhGA33ua4MYr7tUOj+a9Si28vUi0IUFNbff1T3sgpeDJI/LaC75bBYnQ0A3wXjn0OrRNBA==" + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "25.0.7", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", + "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "glob": "^8.0.3", + "is-reference": "1.2.1", + "magic-string": "^0.30.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + "rollup": "^2.68.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { - "node-notifier": { + "rollup": { "optional": true } } }, - "node_modules/@jest/reporters/node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "node_modules/@rollup/plugin-inject": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz", + "integrity": "sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==", "dev": true, "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" + "@rollup/pluginutils": "^5.0.1", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, - "node_modules/@jest/reporters/node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, + "node_modules/@rollup/plugin-node-resolve": { + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.2.1", + "is-module": "^1.0.0", + "resolve": "^1.22.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, - "node_modules/@jest/reporters/node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, + "node_modules/@rollup/pluginutils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, - "node_modules/@jest/reporters/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.1.tgz", + "integrity": "sha512-iU2Sya8hNn1LhsYyf0N+L4Gf9Qc+9eBTJJJsaOGUp+7x4n2M9dxTt8UvhJl3oeftSjblSlpCfvjA/IfP3g5VjQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ] }, - "node_modules/@jest/reporters/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.1.tgz", + "integrity": "sha512-wlzcWiH2Ir7rdMELxFE5vuM7D6TsOcJ2Yw0c3vaBR3VOsJFVTx9xvwnAvhgU5Ii8Gd6+I11qNHwndDscIm0HXg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.1.tgz", + "integrity": "sha512-YRXa1+aZIFN5BaImK+84B3uNK8C6+ynKLPgvn29X9s0LTVCByp54TB7tdSMHDR7GTV39bz1lOmlLDuedgTwwHg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.1.tgz", + "integrity": "sha512-opjWJ4MevxeA8FhlngQWPBOvVWYNPFkq6/25rGgG+KOy0r8clYwL1CFd+PGwRqqMFVQ4/Qd3sQu5t7ucP7C/Uw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.1.tgz", + "integrity": "sha512-uBkwaI+gBUlIe+EfbNnY5xNyXuhZbDSx2nzzW8tRMjUmpScd6lCQYKY2V9BATHtv5Ef2OBq6SChEP8h+/cxifQ==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.1.tgz", + "integrity": "sha512-0bK9aG1kIg0Su7OcFTlexkVeNZ5IzEsnz1ept87a0TUgZ6HplSgkJAnFpEVRW7GRcikT4GlPV0pbtVedOaXHQQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.1.tgz", + "integrity": "sha512-qB6AFRXuP8bdkBI4D7UPUbE7OQf7u5OL+R94JE42Z2Qjmyj74FtDdLGeriRyBDhm4rQSvqAGCGC01b8Fu2LthQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.1.tgz", + "integrity": "sha512-sHig3LaGlpNgDj5o8uPEoGs98RII8HpNIqFtAI8/pYABO8i0nb1QzT0JDoXF/pxzqO+FkxvwkHZo9k0NJYDedg==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.1.tgz", + "integrity": "sha512-nD3YcUv6jBJbBNFvSbp0IV66+ba/1teuBcu+fBBPZ33sidxitc6ErhON3JNavaH8HlswhWMC3s5rgZpM4MtPqQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.1.tgz", + "integrity": "sha512-7/XVZqgBby2qp/cO0TQ8uJK+9xnSdJ9ct6gSDdEr4MfABrjTyrW6Bau7HQ73a2a5tPB7hno49A0y1jhWGDN9OQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.1.tgz", + "integrity": "sha512-CYc64bnICG42UPL7TrhIwsJW4QcKkIt9gGlj21gq3VV0LL6XNb1yAdHVp1pIi9gkts9gGcT3OfUYHjGP7ETAiw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.1.tgz", + "integrity": "sha512-LN+vnlZ9g0qlHGlS920GR4zFCqAwbv2lULrR29yGaWP9u7wF5L7GqWu9Ah6/kFZPXPUkpdZwd//TNR+9XC9hvA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.1.tgz", + "integrity": "sha512-n+vkrSyphvmU0qkQ6QBNXCGr2mKjhP08mPRM/Xp5Ck2FV4NrHU+y6axzDeixUrCBHVUS51TZhjqrKBBsHLKb2Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@scure/base": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.5.tgz", + "integrity": "sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==", + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", - "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", - "dev": true, + "node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" } }, - "node_modules/@jest/reporters/node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dev": true, + "node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" } }, - "node_modules/@jest/reporters/node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] }, - "node_modules/@jest/reporters/node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, + "node_modules/@semantic-ui-react/event-stack": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.3.tgz", + "integrity": "sha512-FdTmJyWvJaYinHrKRsMLDrz4tTMGdFfds299Qory53hBugiDvGC0tEJf+cHsi5igDwWb/CLOgOiChInHwq8URQ==", "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "exenv": "^1.2.2", + "prop-types": "^15.6.2" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/@jest/reporters/node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, + "node_modules/@sentry-internal/feedback": { + "version": "7.106.1", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.106.1.tgz", + "integrity": "sha512-udYR7rQnnQJ0q4PP3R7lTFx7cUz3SB4ghm8T/fJzdItrk+Puv6y8VqI19SFfDgvwgStInEzE5yys6SUQcXLBtA==", "dependencies": { - "has-flag": "^4.0.0" + "@sentry/core": "7.106.1", + "@sentry/types": "7.106.1", + "@sentry/utils": "7.106.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=12" } }, - "node_modules/@jest/reporters/node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, + "node_modules/@sentry-internal/replay-canvas": { + "version": "7.106.1", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-7.106.1.tgz", + "integrity": "sha512-r+nhLrQuTQih93gZ08F6MLdmaoBy/bQFcVt/2ZVqe1SkDY+MxRlXxq8ydo3FfgEjMRHdody3yT1dj6E174h23w==", "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" + "@sentry/core": "7.106.1", + "@sentry/replay": "7.106.1", + "@sentry/types": "7.106.1", + "@sentry/utils": "7.106.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, + "node_modules/@sentry-internal/tracing": { + "version": "7.106.1", + "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.106.1.tgz", + "integrity": "sha512-Ui9zSmW88jTdmNnNBLYYpNoAi31esX5/auysC3v7+SpwxIsC3AGLFvXs4EPziyz8d0F62Ji0fNQZ96ui4fO6BQ==", "dependencies": { - "@sinclair/typebox": "^0.27.8" + "@sentry/core": "7.106.1", + "@sentry/types": "7.106.1", + "@sentry/utils": "7.106.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, + "node_modules/@sentry/browser": { + "version": "7.106.1", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.106.1.tgz", + "integrity": "sha512-+Yp7OUx78ZwFFYfIvOKZGjMPW7Ds3zZSO8dsMxvDRzkA9NyyAmYMZ/dNTcsGb+PssgkCasF2XA07f6WgkNW92A==", "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@sentry-internal/feedback": "7.106.1", + "@sentry-internal/replay-canvas": "7.106.1", + "@sentry-internal/tracing": "7.106.1", + "@sentry/core": "7.106.1", + "@sentry/replay": "7.106.1", + "@sentry/types": "7.106.1", + "@sentry/utils": "7.106.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.1", + "node_modules/@sentry/cli": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.30.0.tgz", + "integrity": "sha512-GTO5e98vy2QwEYQvhE/ZtGUiVrUu4XungLioJbazm+ZOen8cyac8YOapZfozN5mtxjWOWMOwhOqoTeCU3Q8YKQ==", "dev": true, - "license": "MIT", + "hasInstallScript": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.7", + "progress": "^2.0.3", + "proxy-from-env": "^1.1.0", + "which": "^2.0.2" + }, + "bin": { + "sentry-cli": "bin/sentry-cli" }, "engines": { - "node": ">=6.0.0" + "node": ">= 10" + }, + "optionalDependencies": { + "@sentry/cli-darwin": "2.30.0", + "@sentry/cli-linux-arm": "2.30.0", + "@sentry/cli-linux-arm64": "2.30.0", + "@sentry/cli-linux-i686": "2.30.0", + "@sentry/cli-linux-x64": "2.30.0", + "@sentry/cli-win32-i686": "2.30.0", + "@sentry/cli-win32-x64": "2.30.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "node_modules/@sentry/cli-darwin": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@sentry/cli-darwin/-/cli-darwin-2.30.0.tgz", + "integrity": "sha512-JVesQ9PznbHBOOOwuej2X8/onfXdmAEjBH6fTyWxBl6K8mB4KmBX/aHunXWMBX+VR9X32XZghIqj7acwaFUMPA==", "dev": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.0.0" + "node": ">=10" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.1", - "dev": true, - "license": "MIT", + "node_modules/@sentry/cli-linux-arm": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm/-/cli-linux-arm-2.30.0.tgz", + "integrity": "sha512-MDB3iS31WKg4krCcLo520yxbUERPeA2DCtk9Qs9vSDbQl6Er64dteHllOdx1SDOyX/7GKcxrQEQ6SMmbnOo6wg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux", + "freebsd" + ], "engines": { - "node": ">=6.0.0" + "node": ">=10" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "node_modules/@sentry/cli-linux-arm64": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.30.0.tgz", + "integrity": "sha512-JNXPkkMubKoZVlcFIoClSmTb9C/I6Bz08DuAZm2jnjRaaOMiCBxI/l50H3dmfVZ6apjEguG9JkjFdb0kqKB90w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux", + "freebsd" + ], + "engines": { + "node": ">=10" + } }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.21", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz", - "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==", + "node_modules/@sentry/cli-linux-i686": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-i686/-/cli-linux-i686-2.30.0.tgz", + "integrity": "sha512-WhVVziFQw/fO0Cc53pY8goPAzJtIs6ORTR89fVbKwa3ZDNkX++mEOECbP7RkmD87kuRxyKzN543RPV971PcAHw==", + "cpu": [ + "x86", + "ia32" + ], "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "optional": true, + "os": [ + "linux", + "freebsd" + ], + "engines": { + "node": ">=10" } }, - "node_modules/@lit-labs/ssr-dom-shim": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz", - "integrity": "sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ==" + "node_modules/@sentry/cli-linux-x64": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-x64/-/cli-linux-x64-2.30.0.tgz", + "integrity": "sha512-QkiVDeSfspotZ0Au5Yauv2DAm/BC1fL9BwPek/WwddM18I2HqnDp6l4TA4bQeEY++o0KEuNF53cPahpepltPjw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux", + "freebsd" + ], + "engines": { + "node": ">=10" + } }, - "node_modules/@lit/reactive-element": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", - "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.0.0" + "node_modules/@sentry/cli-win32-i686": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@sentry/cli-win32-i686/-/cli-win32-i686-2.30.0.tgz", + "integrity": "sha512-xLY9B1EEGuNYPKpK6M9PMmcu2PzofdvRtbraTcU6Ck2zALS5oXB9kmWc4dDKucZ/uu9JB0m+Lo4ebaNlca45qQ==", + "cpu": [ + "x86", + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" } }, - "node_modules/@magic-ext/oauth": { - "version": "15.5.0", - "resolved": "https://registry.npmjs.org/@magic-ext/oauth/-/oauth-15.5.0.tgz", - "integrity": "sha512-q9k5IrFwzaVLJauoHmnj11r7bJQ22PZ41CEys3GmDpLB5Xz5iavqB2vyGkZz1r7bU48i5ZqK0qyvQe7it4j4YA==", - "dependencies": { - "crypto-js": "^3.3.0" + "node_modules/@sentry/cli-win32-x64": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@sentry/cli-win32-x64/-/cli-win32-x64-2.30.0.tgz", + "integrity": "sha512-CiXuxnpJI0zho0XE5PVqIS9CwjDEYoMnHQRIr4Jj9OzlGTJ2iSSU6Zp3Ykd7lgo2iK4P6MfxIBm30gFQPnSvVA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" } }, - "node_modules/@magic-sdk/commons": { - "version": "17.4.1", - "resolved": "https://registry.npmjs.org/@magic-sdk/commons/-/commons-17.4.1.tgz", - "integrity": "sha512-1YXNV4WBkYcNKC87zDdUqY5fTUDpns1XUNiFSsCPitqggbxeNtLE+VAj7KbqB2Ea2xdkKRRlQeP4OMgpb42jSw==", - "peerDependencies": { - "@magic-sdk/provider": ">=18.6.0", - "@magic-sdk/types": ">=15.8.0" + "node_modules/@sentry/core": { + "version": "7.106.1", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.106.1.tgz", + "integrity": "sha512-cwCd66wkbutXCI8j14JLkyod9RHtqSNfzGpx/ieBE+N786jX+Yj1DiaZJ6ZYjKQpnToipFnacEakCd9Vc9oePA==", + "dependencies": { + "@sentry/types": "7.106.1", + "@sentry/utils": "7.106.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/@magic-sdk/provider": { - "version": "21.4.1", - "resolved": "https://registry.npmjs.org/@magic-sdk/provider/-/provider-21.4.1.tgz", - "integrity": "sha512-dSoC3mqfZWETtyf4lWUupv8t2x97bqTrHkTWVp3oB16tt/9P2TZKxPsHF+AXsXVuX+NCnzb2c/4AsDc8koYldw==", + "node_modules/@sentry/react": { + "version": "7.106.1", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.106.1.tgz", + "integrity": "sha512-XcvjXGist0vLapzxZxdbPSdLC4drhGOETtlA/kO+KrIKqlqRKuYw+kieU+YeyF9A/L8uSVvbj9rpjl5WVUTdIw==", "dependencies": { - "@magic-sdk/types": "^17.3.0", - "eventemitter3": "^4.0.4", - "web3-core": "1.5.2" + "@sentry/browser": "7.106.1", + "@sentry/core": "7.106.1", + "@sentry/types": "7.106.1", + "@sentry/utils": "7.106.1", + "hoist-non-react-statics": "^3.3.2" + }, + "engines": { + "node": ">=8" }, "peerDependencies": { - "localforage": "^1.7.4" + "react": "15.x || 16.x || 17.x || 18.x" } }, - "node_modules/@magic-sdk/types": { - "version": "17.3.0", - "resolved": "https://registry.npmjs.org/@magic-sdk/types/-/types-17.3.0.tgz", - "integrity": "sha512-0mTFr1qDJ94pOJkFu1oZ/s2KnV7lHgILvWuFh7fs7ugyn7z9M7euP9g+Bv+kEdZ6ja4QlNi+UR0OryaXowv75w==" - }, - "node_modules/@metamask/safe-event-emitter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz", - "integrity": "sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==" - }, - "node_modules/@metamask/utils": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-3.6.0.tgz", - "integrity": "sha512-9cIRrfkWvHblSiNDVXsjivqa9Ak0RYo/1H6tqTqTbAx+oBK2Sva0lWDHxGchOqA7bySGUJKAWSNJvH6gdHZ0gQ==", + "node_modules/@sentry/replay": { + "version": "7.106.1", + "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.106.1.tgz", + "integrity": "sha512-UnuY6bj7v7CVv3T1sbLHjLutSG4hzcQQj6CjEB2NUpM+QAIguFrwAcYG4U42iNg4Qeg5q4kHi1rPpdpvh6unSA==", "dependencies": { - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "semver": "^7.3.8", - "superstruct": "^1.0.3" + "@sentry-internal/tracing": "7.106.1", + "@sentry/core": "7.106.1", + "@sentry/types": "7.106.1", + "@sentry/utils": "7.106.1" }, "engines": { - "node": ">=14.0.0" + "node": ">=12" } }, - "node_modules/@metamask/utils/node_modules/superstruct": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-1.0.3.tgz", - "integrity": "sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==", + "node_modules/@sentry/types": { + "version": "7.106.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.106.1.tgz", + "integrity": "sha512-g3OcyAHGugBwkQP4fZYCCZqF2ng9K7yQc9FVngKq/y7PwHm84epXdYYGDGgfQOIC1d5/GMaPxmzI5IIrZexzkg==", "engines": { - "node": ">=14.0.0" + "node": ">=8" } }, - "node_modules/@motionone/animation": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.15.1.tgz", - "integrity": "sha512-mZcJxLjHor+bhcPuIFErMDNyrdb2vJur8lSfMCsuCB4UyV8ILZLvK+t+pg56erv8ud9xQGK/1OGPt10agPrCyQ==", + "node_modules/@sentry/utils": { + "version": "7.106.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.106.1.tgz", + "integrity": "sha512-NIeuvB9MeDwrObbi6W5xRrNTcQj8klVvwWWYQB0zotY/LDjyl+c+cZzUshFOxBTp9ljVnYzWqZ7J8x/i4baj7w==", "dependencies": { - "@motionone/easing": "^10.15.1", - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", - "tslib": "^2.3.1" + "@sentry/types": "7.106.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/@motionone/animation/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true }, - "node_modules/@motionone/dom": { - "version": "10.16.2", - "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.16.2.tgz", - "integrity": "sha512-bnuHdNbge1FutZXv+k7xub9oPWcF0hsu8y1HTH/qg6av58YI0VufZ3ngfC7p2xhMJMnoh0LXFma2EGTgPeCkeg==", - "dependencies": { - "@motionone/animation": "^10.15.1", - "@motionone/generators": "^10.15.1", - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", - "hey-listen": "^1.0.8", - "tslib": "^2.3.1" + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@motionone/dom/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/@motionone/easing": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.15.1.tgz", - "integrity": "sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==", + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, "dependencies": { - "@motionone/utils": "^10.15.1", - "tslib": "^2.3.1" + "type-detect": "4.0.8" } }, - "node_modules/@motionone/easing/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/@motionone/generators": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.15.1.tgz", - "integrity": "sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==", + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, "dependencies": { - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", - "tslib": "^2.3.1" + "@sinonjs/commons": "^3.0.0" } }, - "node_modules/@motionone/generators/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "node_modules/@socket.io/component-emitter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" }, - "node_modules/@motionone/svelte": { - "version": "10.16.2", - "resolved": "https://registry.npmjs.org/@motionone/svelte/-/svelte-10.16.2.tgz", - "integrity": "sha512-38xsroKrfK+aHYhuQlE6eFcGy0EwrB43Q7RGjF73j/kRUTcLNu/LAaKiLLsN5lyqVzCgTBVt4TMT/ShWbTbc5Q==", + "node_modules/@solana/buffer-layout": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", + "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", "dependencies": { - "@motionone/dom": "^10.16.2", - "tslib": "^2.3.1" + "buffer": "~6.0.3" + }, + "engines": { + "node": ">=5.10" } }, - "node_modules/@motionone/svelte/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "node_modules/@solana/web3.js": { + "version": "1.91.0", + "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.91.0.tgz", + "integrity": "sha512-iqOL9RjNra0TM9BbQWxBRUcZUiNmCJJO+vXLp0GiELUJhbNAoE/K6OV6s+gNEsC13dslvKtfA4mmzRnZNWXtIQ==", + "dependencies": { + "@babel/runtime": "^7.23.4", + "@noble/curves": "^1.2.0", + "@noble/hashes": "^1.3.3", + "@solana/buffer-layout": "^4.0.1", + "agentkeepalive": "^4.5.0", + "bigint-buffer": "^1.1.5", + "bn.js": "^5.2.1", + "borsh": "^0.7.0", + "bs58": "^4.0.1", + "buffer": "6.0.3", + "fast-stable-stringify": "^1.0.0", + "jayson": "^4.1.0", + "node-fetch": "^2.7.0", + "rpc-websockets": "^7.5.1", + "superstruct": "^0.14.2" + } }, - "node_modules/@motionone/types": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.15.1.tgz", - "integrity": "sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA==" + "node_modules/@stablelib/aead": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/aead/-/aead-1.0.1.tgz", + "integrity": "sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg==" }, - "node_modules/@motionone/utils": { - "version": "10.15.1", - "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.15.1.tgz", - "integrity": "sha512-p0YncgU+iklvYr/Dq4NobTRdAPv9PveRDUXabPEeOjBLSO/1FNB2phNTZxOxpi1/GZwYpAoECEa0Wam+nsmhSw==", + "node_modules/@stablelib/binary": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz", + "integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==", "dependencies": { - "@motionone/types": "^10.15.1", - "hey-listen": "^1.0.8", - "tslib": "^2.3.1" + "@stablelib/int": "^1.0.1" } }, - "node_modules/@motionone/utils/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "node_modules/@stablelib/bytes": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/bytes/-/bytes-1.0.1.tgz", + "integrity": "sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ==" }, - "node_modules/@motionone/vue": { - "version": "10.16.2", - "resolved": "https://registry.npmjs.org/@motionone/vue/-/vue-10.16.2.tgz", - "integrity": "sha512-7/dEK/nWQXOkJ70bqb2KyNfSWbNvWqKKq1C8juj+0Mg/AorgD8O5wE3naddK0G+aXuNMqRuc4jlsYHHWHtIzVw==", + "node_modules/@stablelib/chacha": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/chacha/-/chacha-1.0.1.tgz", + "integrity": "sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg==", "dependencies": { - "@motionone/dom": "^10.16.2", - "tslib": "^2.3.1" + "@stablelib/binary": "^1.0.1", + "@stablelib/wipe": "^1.0.1" } }, - "node_modules/@motionone/vue/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/@multiformats/base-x": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", - "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==" - }, - "node_modules/@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "node_modules/@stablelib/chacha20poly1305": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/chacha20poly1305/-/chacha20poly1305-1.0.1.tgz", + "integrity": "sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA==", "dependencies": { - "@noble/hashes": "1.3.2" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "@stablelib/aead": "^1.0.1", + "@stablelib/binary": "^1.0.1", + "@stablelib/chacha": "^1.0.1", + "@stablelib/constant-time": "^1.0.1", + "@stablelib/poly1305": "^1.0.1", + "@stablelib/wipe": "^1.0.1" } }, - "node_modules/@noble/curves/node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "node_modules/@stablelib/constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/constant-time/-/constant-time-1.0.1.tgz", + "integrity": "sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg==" + }, + "node_modules/@stablelib/ed25519": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stablelib/ed25519/-/ed25519-1.0.3.tgz", + "integrity": "sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg==", + "dependencies": { + "@stablelib/random": "^1.0.2", + "@stablelib/sha512": "^1.0.1", + "@stablelib/wipe": "^1.0.1" } }, - "node_modules/@noble/hashes": { - "version": "1.0.0", - "license": "MIT" + "node_modules/@stablelib/hash": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz", + "integrity": "sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==" }, - "node_modules/@noble/secp256k1": { - "version": "1.5.5", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT" + "node_modules/@stablelib/hkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/hkdf/-/hkdf-1.0.1.tgz", + "integrity": "sha512-SBEHYE16ZXlHuaW5RcGk533YlBj4grMeg5TooN80W3NpcHRtLZLLXvKyX0qcRFxf+BGDobJLnwkvgEwHIDBR6g==", + "dependencies": { + "@stablelib/hash": "^1.0.1", + "@stablelib/hmac": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, + "node_modules/@stablelib/hmac": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/hmac/-/hmac-1.0.1.tgz", + "integrity": "sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA==", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" + "@stablelib/constant-time": "^1.0.1", + "@stablelib/hash": "^1.0.1", + "@stablelib/wipe": "^1.0.1" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" + "node_modules/@stablelib/int": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz", + "integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==" + }, + "node_modules/@stablelib/keyagreement": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/keyagreement/-/keyagreement-1.0.1.tgz", + "integrity": "sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg==", + "dependencies": { + "@stablelib/bytes": "^1.0.1" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, + "node_modules/@stablelib/poly1305": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/poly1305/-/poly1305-1.0.1.tgz", + "integrity": "sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA==", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" + "@stablelib/constant-time": "^1.0.1", + "@stablelib/wipe": "^1.0.1" } }, - "node_modules/@parcel/watcher": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.4.0.tgz", - "integrity": "sha512-XJLGVL0DEclX5pcWa2N9SX1jCGTDd8l972biNooLFtjneuGqodupPQh6XseXIBBeVIMaaJ7bTcs3qGvXwsp4vg==", + "node_modules/@stablelib/random": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz", + "integrity": "sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==", + "dependencies": { + "@stablelib/binary": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/sha256": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/sha256/-/sha256-1.0.1.tgz", + "integrity": "sha512-GIIH3e6KH+91FqGV42Kcj71Uefd/QEe7Dy42sBTeqppXV95ggCcxLTk39bEr+lZfJmp+ghsR07J++ORkRELsBQ==", + "dependencies": { + "@stablelib/binary": "^1.0.1", + "@stablelib/hash": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/sha512": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/sha512/-/sha512-1.0.1.tgz", + "integrity": "sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw==", + "dependencies": { + "@stablelib/binary": "^1.0.1", + "@stablelib/hash": "^1.0.1", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@stablelib/wipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz", + "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==" + }, + "node_modules/@stablelib/x25519": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stablelib/x25519/-/x25519-1.0.3.tgz", + "integrity": "sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw==", + "dependencies": { + "@stablelib/keyagreement": "^1.0.1", + "@stablelib/random": "^1.0.2", + "@stablelib/wipe": "^1.0.1" + } + }, + "node_modules/@swc/core": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.6.tgz", + "integrity": "sha512-A7iK9+1qzTCIuc3IYcS8gPHCm9bZVKUJrfNnwveZYyo6OFp3jLno4WOM2yBy5uqedgYATEiWgBYHKq37KrU6IA==", + "dev": true, "hasInstallScript": true, "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" + "@swc/counter": "^0.1.2", + "@swc/types": "^0.1.5" }, "engines": { - "node": ">= 10.0.0" + "node": ">=10" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/parcel" + "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.4.0", - "@parcel/watcher-darwin-arm64": "2.4.0", - "@parcel/watcher-darwin-x64": "2.4.0", - "@parcel/watcher-freebsd-x64": "2.4.0", - "@parcel/watcher-linux-arm-glibc": "2.4.0", - "@parcel/watcher-linux-arm64-glibc": "2.4.0", - "@parcel/watcher-linux-arm64-musl": "2.4.0", - "@parcel/watcher-linux-x64-glibc": "2.4.0", - "@parcel/watcher-linux-x64-musl": "2.4.0", - "@parcel/watcher-win32-arm64": "2.4.0", - "@parcel/watcher-win32-ia32": "2.4.0", - "@parcel/watcher-win32-x64": "2.4.0" + "@swc/core-darwin-arm64": "1.4.6", + "@swc/core-darwin-x64": "1.4.6", + "@swc/core-linux-arm-gnueabihf": "1.4.6", + "@swc/core-linux-arm64-gnu": "1.4.6", + "@swc/core-linux-arm64-musl": "1.4.6", + "@swc/core-linux-x64-gnu": "1.4.6", + "@swc/core-linux-x64-musl": "1.4.6", + "@swc/core-win32-arm64-msvc": "1.4.6", + "@swc/core-win32-ia32-msvc": "1.4.6", + "@swc/core-win32-x64-msvc": "1.4.6" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } } }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.0.tgz", - "integrity": "sha512-vZMv9jl+szz5YLsSqEGCMSllBl1gU1snfbRL5ysJU03MEa6gkVy9OMcvXV1j4g0++jHEcvzhs3Z3LpeEbVmY6Q==", + "node_modules/@swc/core-darwin-arm64": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.6.tgz", + "integrity": "sha512-bpggpx/BfLFyy48aUKq1PsNUxb7J6CINlpAUk0V4yXfmGnpZH80Gp1pM3GkFDQyCfq7L7IpjPrIjWQwCrL4hYw==", "cpu": [ - "x64" + "arm64" ], + "dev": true, "optional": true, "os": [ "darwin" ], "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "node": ">=10" } }, - "node_modules/@parcel/watcher-wasm": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-wasm/-/watcher-wasm-2.4.0.tgz", - "integrity": "sha512-MNgQ4WCbBybqQ97KwR/hqJGYTg3+s8qHpgIyFWB2qJOBvoJWbXuJGmm4ZkPLq2bMaANqCZqrXwmKYagZTkMKZA==", - "bundleDependencies": [ - "napi-wasm" + "node_modules/@swc/core-darwin-x64": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.6.tgz", + "integrity": "sha512-vJn+/ZuBTg+vtNkcmgZdH6FQpa0hFVdnB9bAeqYwKkyqP15zaPe6jfC+qL2y/cIeC7ASvHXEKrnCZgBLxfVQ9w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" ], - "dependencies": { - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "napi-wasm": "^1.1.0" - }, "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "node": ">=10" } }, - "node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/@parcel/watcher/node_modules/node-addon-api": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", - "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.6.tgz", + "integrity": "sha512-hEmYcB/9XBAl02MtuVHszhNjQpjBzhk/NFulnU33tBMbNZpy2TN5yTsitezMq090QXdDz8sKIALApDyg07ZR8g==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^16 || ^18 || >= 20" + "node": ">=10" } }, - "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.6.tgz", + "integrity": "sha512-/UCYIVoGpm2YVvGHZM2QOA3dexa28BjcpLAIYnoCbgH5f7ulDhE8FAIO/9pasj+kixDBsdqewHfsNXFYlgGJjQ==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" + "node": ">=10" } }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.6.tgz", + "integrity": "sha512-LGQsKJ8MA9zZ8xHCkbGkcPSmpkZL2O7drvwsGKynyCttHhpwVjj9lguhD4DWU3+FWIsjvho5Vu0Ggei8OYi/Lw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" } }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.6.tgz", + "integrity": "sha512-10JL2nLIreMQDKvq2TECnQe5fCuoqBHu1yW8aChqgHUyg9d7gfZX/kppUsuimqcgRBnS0AjTDAA+JF6UsG/2Yg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" } }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.6.tgz", + "integrity": "sha512-EGyjFVzVY6Do89x8sfah7I3cuP4MwtwzmA6OlfD/KASqfCFf5eIaEBMbajgR41bVfMV7lK72lwAIea5xEyq1AQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.6.tgz", + "integrity": "sha512-gfW9AuXvwSyK07Vb8Y8E9m2oJZk21WqcD+X4BZhkbKB0TCZK0zk1j/HpS2UFlr1JB2zPKPpSWLU3ll0GEHRG2A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.6.tgz", + "integrity": "sha512-ZuQm81FhhvNVYtVb9GfZ+Du6e7fZlkisWvuCeBeRiyseNt1tcrQ8J3V67jD2nxje8CVXrwG3oUIbPcybv2rxfQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.6.tgz", + "integrity": "sha512-UagPb7w5V0uzWSjrXwOavGa7s9iv3wrVdEgWy+/inm0OwY4lj3zpK9qDnMWAwYLuFwkI3UG4Q3dH8wD+CUUcjw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true }, - "node_modules/@redux-saga/core": { - "version": "1.1.3", - "license": "MIT", + "node_modules/@swc/jest": { + "version": "0.2.36", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.36.tgz", + "integrity": "sha512-8X80dp81ugxs4a11z1ka43FPhP+/e+mJNXJSxiNYk8gIX/jPBtY4gQTrKu/KIoco8bzKuPI5lUxjfLiGsfvnlw==", + "dev": true, "dependencies": { - "@babel/runtime": "^7.6.3", - "@redux-saga/deferred": "^1.1.2", - "@redux-saga/delay-p": "^1.1.2", - "@redux-saga/is": "^1.1.2", - "@redux-saga/symbols": "^1.1.2", - "@redux-saga/types": "^1.1.0", - "redux": "^4.0.4", - "typescript-tuple": "^2.2.1" + "@jest/create-cache-key-function": "^29.7.0", + "@swc/counter": "^0.1.3", + "jsonc-parser": "^3.2.0" + }, + "engines": { + "npm": ">= 7.0.0" + }, + "peerDependencies": { + "@swc/core": "*" } }, - "node_modules/@redux-saga/deferred": { - "version": "1.1.2", - "license": "MIT" + "node_modules/@swc/types": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", + "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==", + "dev": true }, - "node_modules/@redux-saga/delay-p": { - "version": "1.1.2", - "license": "MIT", + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "dependencies": { - "@redux-saga/symbols": "^1.1.2" + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@redux-saga/is": { - "version": "1.1.2", - "license": "MIT", + "node_modules/@testing-library/dom": { + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", + "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", + "dev": true, + "peer": true, "dependencies": { - "@redux-saga/symbols": "^1.1.2", - "@redux-saga/types": "^1.1.0" + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.1.3", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=14" } }, - "node_modules/@redux-saga/symbols": { - "version": "1.1.2", - "license": "MIT" + "node_modules/@testing-library/jest-dom": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.17.0.tgz", + "integrity": "sha512-ynmNeT7asXyH3aSVv4vvX4Rb+0qjOhdNHnO/3vuZNqPmhDpV/+rCSGwQ7bLcmU2cJ4dvoheIO85LQj0IbJHEtg==", + "dev": true, + "dependencies": { + "@adobe/css-tools": "^4.0.1", + "@babel/runtime": "^7.9.2", + "@types/testing-library__jest-dom": "^5.9.1", + "aria-query": "^5.0.0", + "chalk": "^3.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.5.6", + "lodash": "^4.17.15", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=8", + "npm": ">=6", + "yarn": ">=1" + } }, - "node_modules/@redux-saga/types": { - "version": "1.1.0", - "license": "MIT" + "node_modules/@testing-library/jest-dom/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/@rollup/plugin-inject": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz", - "integrity": "sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==", + "node_modules/@testing-library/react": { + "version": "12.1.5", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-12.1.5.tgz", + "integrity": "sha512-OfTXCJUFgjd/digLUuPxa0+/3ZxsQmE7ub9kcbW/wi96Bh3o/p5vrETcBGfP17NWPGqeYYl5LTRpwyGoMC4ysg==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.3" + "@babel/runtime": "^7.12.5", + "@testing-library/dom": "^8.0.0", + "@types/react-dom": "<18.0.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=12" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } + "react": "<18.0.0", + "react-dom": "<18.0.0" } }, - "node_modules/@rollup/plugin-inject/node_modules/@rollup/pluginutils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", - "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", + "node_modules/@testing-library/react-hooks": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@testing-library/react-hooks/-/react-hooks-8.0.1.tgz", + "integrity": "sha512-Aqhl2IVmLt8IovEVarNDFuJDVWVvhnr9/GCU6UUnrYXwgDFF9h2L2o2P9KBni1AST5sT6riAyoukFLyjQUgD/g==", "dev": true, "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^2.3.1" + "@babel/runtime": "^7.12.5", + "react-error-boundary": "^3.1.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=12" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + "@types/react": "^16.9.0 || ^17.0.0", + "react": "^16.9.0 || ^17.0.0", + "react-dom": "^16.9.0 || ^17.0.0", + "react-test-renderer": "^16.9.0 || ^17.0.0" }, "peerDependenciesMeta": { - "rollup": { + "@types/react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-test-renderer": { "optional": true } } }, - "node_modules/@rollup/plugin-inject/node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, - "node_modules/@rollup/plugin-inject/node_modules/magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "node_modules/@testing-library/react/node_modules/@testing-library/dom": { + "version": "8.20.1", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.20.1.tgz", + "integrity": "sha512-/DiOQ5xBxgdYRC8LNk7U+RWat0S3qRLeIw3ZIkMQ9kkVlRmwD/Eg8k8CqIpD6GW7u20JIUOfMKbxtiLutpjQ4g==", "dev": true, "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.1.3", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" }, "engines": { "node": ">=12" } }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.5.tgz", - "integrity": "sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA==", - "cpu": [ - "x64" - ], + "node_modules/@testing-library/user-event": { + "version": "14.5.2", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", + "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==", "dev": true, - "optional": true, - "os": [ - "darwin" - ] + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" + } }, - "node_modules/@scure/base": { - "version": "1.0.0", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT" - }, - "node_modules/@scure/bip32": { - "version": "1.0.1", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.0.0", - "@noble/secp256k1": "~1.5.2", - "@scure/base": "~1.0.0" - } - }, - "node_modules/@scure/bip39": { - "version": "1.0.0", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.0.0", - "@scure/base": "~1.0.0" - } - }, - "node_modules/@semantic-ui-react/event-stack": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.3.tgz", - "integrity": "sha512-FdTmJyWvJaYinHrKRsMLDrz4tTMGdFfds299Qory53hBugiDvGC0tEJf+cHsi5igDwWb/CLOgOiChInHwq8URQ==", - "dependencies": { - "exenv": "^1.2.2", - "prop-types": "^15.6.2" - }, - "peerDependencies": { - "react": "^16.0.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/@sentry-internal/tracing": { - "version": "7.64.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.64.0.tgz", - "integrity": "sha512-1XE8W6ki7hHyBvX9hfirnGkKDBKNq3bDJyXS86E0bYVDl94nvbRM9BD9DHsCFetqYkVm1yDGEK+6aUVs4CztoQ==", - "dependencies": { - "@sentry/core": "7.64.0", - "@sentry/types": "7.64.0", - "@sentry/utils": "7.64.0", - "tslib": "^2.4.1 || ^1.9.3" - }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, "engines": { - "node": ">=8" + "node": ">= 10" } }, - "node_modules/@sentry/browser": { - "version": "7.64.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.64.0.tgz", - "integrity": "sha512-lB2IWUkZavEDclxfLBp554dY10ZNIEvlDZUWWathW+Ws2wRb6PNLtuPUNu12R7Q7z0xpkOLrM1kRNN0OdldgKA==", + "node_modules/@transak/transak-sdk": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@transak/transak-sdk/-/transak-sdk-1.4.1.tgz", + "integrity": "sha512-/BKzb9orz1xDxa41oOPW+4KpjSHNEXgtaFazX/aIjQbr7LLbRqfXC/IHzpPmjR9OmFm8pFhV2Y86Rg0aZt5ZUA==", "dependencies": { - "@sentry-internal/tracing": "7.64.0", - "@sentry/core": "7.64.0", - "@sentry/replay": "7.64.0", - "@sentry/types": "7.64.0", - "@sentry/utils": "7.64.0", - "tslib": "^2.4.1 || ^1.9.3" + "events": "^3.3.0", + "query-string": "^8.1.0" }, "engines": { - "node": ">=8" + "node": ">=10.0.0" } }, - "node_modules/@sentry/cli": { - "version": "2.20.5", - "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.20.5.tgz", - "integrity": "sha512-ZvWb86eF0QXH9C5Mbi87aUmr8SH848yEpXJmlM2AoBowpE9kKDnewCAKvyXUihojUFwCSEEjoJhrRMMgmCZqXA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.7", - "progress": "^2.0.3", - "proxy-from-env": "^1.1.0", - "which": "^2.0.2" - }, - "bin": { - "sentry-cli": "bin/sentry-cli" - }, + "node_modules/@transak/transak-sdk/node_modules/decode-uri-component": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.4.1.tgz", + "integrity": "sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ==", "engines": { - "node": ">= 10" + "node": ">=14.16" } }, - "node_modules/@sentry/core": { - "version": "7.64.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.64.0.tgz", - "integrity": "sha512-IzmEyl5sNG7NyEFiyFHEHC+sizsZp9MEw1+RJRLX6U5RITvcsEgcajSkHQFafaBPzRrcxZMdm47Cwhl212LXcw==", - "dependencies": { - "@sentry/types": "7.64.0", - "@sentry/utils": "7.64.0", - "tslib": "^2.4.1 || ^1.9.3" - }, + "node_modules/@transak/transak-sdk/node_modules/filter-obj": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-5.1.0.tgz", + "integrity": "sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==", "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@sentry/react": { - "version": "7.64.0", - "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.64.0.tgz", - "integrity": "sha512-wOyJUQi7OoT1q+F/fVVv1fzbyO4OYbTu6m1DliLOGQPGEHPBsgPc722smPIExd1/rAMK/FxOuNN5oNhubH8nhg==", + "node_modules/@transak/transak-sdk/node_modules/query-string": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-8.2.0.tgz", + "integrity": "sha512-tUZIw8J0CawM5wyGBiDOAp7ObdRQh4uBor/fUR9ZjmbZVvw95OD9If4w3MQxr99rg0DJZ/9CIORcpEqU5hQG7g==", "dependencies": { - "@sentry/browser": "7.64.0", - "@sentry/types": "7.64.0", - "@sentry/utils": "7.64.0", - "hoist-non-react-statics": "^3.3.2", - "tslib": "^2.4.1 || ^1.9.3" + "decode-uri-component": "^0.4.1", + "filter-obj": "^5.1.0", + "split-on-first": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=14.16" }, - "peerDependencies": { - "react": "15.x || 16.x || 17.x || 18.x" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@sentry/replay": { - "version": "7.64.0", - "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.64.0.tgz", - "integrity": "sha512-alaMCZDZhaAVmEyiUnszZnvfdbiZx5MmtMTGrlDd7tYq3K5OA9prdLqqlmfIJYBfYtXF3lD0iZFphOZQD+4CIw==", - "dependencies": { - "@sentry/core": "7.64.0", - "@sentry/types": "7.64.0", - "@sentry/utils": "7.64.0" - }, + "node_modules/@transak/transak-sdk/node_modules/split-on-first": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-3.0.0.tgz", + "integrity": "sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA==", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@sentry/types": { - "version": "7.64.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.64.0.tgz", - "integrity": "sha512-LqjQprWXjUFRmzIlUjyA+KL+38elgIYmAeoDrdyNVh8MK5IC1W2Lh1Q87b4yOiZeMiIhIVNBd7Ecoh2rodGrGA==", - "engines": { - "node": ">=8" - } + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true }, - "node_modules/@sentry/utils": { - "version": "7.64.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.64.0.tgz", - "integrity": "sha512-HRlM1INzK66Gt+F4vCItiwGKAng4gqzCR4C5marsL3qv6SrKH98dQnCGYgXluSWaaa56h97FRQu7TxCk6jkSvQ==", - "dependencies": { - "@sentry/types": "7.64.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "engines": { - "node": ">=10" + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "node_modules/@typechain/ethers-v5": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-10.2.1.tgz", + "integrity": "sha512-n3tQmCZjRE6IU4h6lqUGiQ1j866n5MTCBJreNEHHVWXa2u9GJTaeYyU1/k+1qLutkyw+sS6VAN+AbeiTqsxd/A==", + "dev": true, + "dependencies": { + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" + "peerDependencies": { + "@ethersproject/abi": "^5.0.0", + "@ethersproject/providers": "^5.0.0", + "ethers": "^5.1.3", + "typechain": "^8.1.1", + "typescript": ">=4.3.0" } }, - "node_modules/@socket.io/component-emitter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", - "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==" + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true }, - "node_modules/@solana/buffer-layout": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz", - "integrity": "sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA==", + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, "dependencies": { - "buffer": "~6.0.3" - }, - "engines": { - "node": ">=5.10" + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" } }, - "node_modules/@solana/web3.js": { - "version": "1.78.5", - "resolved": "https://registry.npmjs.org/@solana/web3.js/-/web3.js-1.78.5.tgz", - "integrity": "sha512-2ZHsDNqkKdglJQrIvJ3p2DmgS3cGnary3VJyqt9C1SPrpAtLYzcElr3xyXJOznyQTU/8AMw+GoF11lFoKbicKg==", - "dependencies": { - "@babel/runtime": "^7.22.6", - "@noble/curves": "^1.0.0", - "@noble/hashes": "^1.3.1", - "@solana/buffer-layout": "^4.0.0", - "agentkeepalive": "^4.3.0", - "bigint-buffer": "^1.1.5", - "bn.js": "^5.2.1", - "borsh": "^0.7.0", - "bs58": "^4.0.1", - "buffer": "6.0.3", - "fast-stable-stringify": "^1.0.0", - "jayson": "^4.1.0", - "node-fetch": "^2.6.12", - "rpc-websockets": "^7.5.1", - "superstruct": "^0.14.2" + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" } }, - "node_modules/@solana/web3.js/node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" } }, - "node_modules/@stablelib/aead": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/aead/-/aead-1.0.1.tgz", - "integrity": "sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg==" - }, - "node_modules/@stablelib/binary": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz", - "integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==", + "node_modules/@types/babel__traverse": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", + "dev": true, "dependencies": { - "@stablelib/int": "^1.0.1" + "@babel/types": "^7.20.7" } }, - "node_modules/@stablelib/bytes": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/bytes/-/bytes-1.0.1.tgz", - "integrity": "sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ==" + "node_modules/@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "dependencies": { + "@types/node": "*" + } }, - "node_modules/@stablelib/chacha": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/chacha/-/chacha-1.0.1.tgz", - "integrity": "sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg==", + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/wipe": "^1.0.1" + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" } }, - "node_modules/@stablelib/chacha20poly1305": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/chacha20poly1305/-/chacha20poly1305-1.0.1.tgz", - "integrity": "sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA==", + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dependencies": { - "@stablelib/aead": "^1.0.1", - "@stablelib/binary": "^1.0.1", - "@stablelib/chacha": "^1.0.1", - "@stablelib/constant-time": "^1.0.1", - "@stablelib/poly1305": "^1.0.1", - "@stablelib/wipe": "^1.0.1" + "@types/node": "*" } }, - "node_modules/@stablelib/constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/constant-time/-/constant-time-1.0.1.tgz", - "integrity": "sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg==" + "node_modules/@types/css-mediaquery": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@types/css-mediaquery/-/css-mediaquery-0.1.4.tgz", + "integrity": "sha512-DZyHAz716ZUctpqkUU2COwUoZ4gI6mZK2Q1oIz/fvNS6XHVpKSJgDnE7vRxZUBn9vjJHDVelCVW0dkshKOLFsA==", + "dev": true }, - "node_modules/@stablelib/ed25519": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stablelib/ed25519/-/ed25519-1.0.3.tgz", - "integrity": "sha512-puIMWaX9QlRsbhxfDc5i+mNPMY+0TmQEskunY1rZEBPi1acBCVQAhnsk/1Hk50DGPtVsZtAWQg4NHGlVaO9Hqg==", - "dependencies": { - "@stablelib/random": "^1.0.2", - "@stablelib/sha512": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } + "node_modules/@types/d3-array": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.1.tgz", + "integrity": "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==" }, - "node_modules/@stablelib/hash": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz", - "integrity": "sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==" + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==" }, - "node_modules/@stablelib/hkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/hkdf/-/hkdf-1.0.1.tgz", - "integrity": "sha512-SBEHYE16ZXlHuaW5RcGk533YlBj4grMeg5TooN80W3NpcHRtLZLLXvKyX0qcRFxf+BGDobJLnwkvgEwHIDBR6g==", - "dependencies": { - "@stablelib/hash": "^1.0.1", - "@stablelib/hmac": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==" }, - "node_modules/@stablelib/hmac": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/hmac/-/hmac-1.0.1.tgz", - "integrity": "sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA==", + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", "dependencies": { - "@stablelib/constant-time": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/wipe": "^1.0.1" + "@types/d3-color": "*" } }, - "node_modules/@stablelib/int": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz", - "integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==" + "node_modules/@types/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-P2dlU/q51fkOc/Gfl3Ul9kicV7l+ra934qBFXCFhrZMOL6du1TM0pm1ThYvENukyOn5h9v+yMJ9Fn5JK4QozrQ==" }, - "node_modules/@stablelib/keyagreement": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/keyagreement/-/keyagreement-1.0.1.tgz", - "integrity": "sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg==", + "node_modules/@types/d3-scale": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.8.tgz", + "integrity": "sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ==", "dependencies": { - "@stablelib/bytes": "^1.0.1" + "@types/d3-time": "*" } }, - "node_modules/@stablelib/poly1305": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/poly1305/-/poly1305-1.0.1.tgz", - "integrity": "sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA==", + "node_modules/@types/d3-shape": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.6.tgz", + "integrity": "sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA==", "dependencies": { - "@stablelib/constant-time": "^1.0.1", - "@stablelib/wipe": "^1.0.1" + "@types/d3-path": "*" } }, - "node_modules/@stablelib/random": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz", - "integrity": "sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==", - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } + "node_modules/@types/d3-time": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.3.tgz", + "integrity": "sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw==" }, - "node_modules/@stablelib/sha256": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/sha256/-/sha256-1.0.1.tgz", - "integrity": "sha512-GIIH3e6KH+91FqGV42Kcj71Uefd/QEe7Dy42sBTeqppXV95ggCcxLTk39bEr+lZfJmp+ghsR07J++ORkRELsBQ==", - "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/wipe": "^1.0.1" - } + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==" }, - "node_modules/@stablelib/sha512": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/sha512/-/sha512-1.0.1.tgz", - "integrity": "sha512-13gl/iawHV9zvDKciLo1fQ8Bgn2Pvf7OV6amaRVKiq3pjQ3UmEpXxWiAfV8tYjUpeZroBxtyrwtdooQT/i3hzw==", + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", "dependencies": { - "@stablelib/binary": "^1.0.1", - "@stablelib/hash": "^1.0.1", - "@stablelib/wipe": "^1.0.1" + "@types/ms": "*" } }, - "node_modules/@stablelib/wipe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz", - "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==" + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, - "node_modules/@stablelib/x25519": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stablelib/x25519/-/x25519-1.0.3.tgz", - "integrity": "sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw==", - "dependencies": { - "@stablelib/keyagreement": "^1.0.1", - "@stablelib/random": "^1.0.2", - "@stablelib/wipe": "^1.0.1" - } + "node_modules/@types/flat": { + "version": "0.0.28", + "resolved": "https://registry.npmjs.org/@types/flat/-/flat-0.0.28.tgz", + "integrity": "sha512-2M3R9T8Wd9yGjE24I6/pxEeNR9CtU2oErPNfZbK9K+btKpoQVPsWayMx9VGv+jIuxa9yHiQ+T3nhFfW7IS2A3Q==" }, - "node_modules/@swc/core": { - "version": "1.3.104", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.104.tgz", - "integrity": "sha512-9LWH/qzR/Pmyco+XwPiPfz59T1sryI7o5dmqb593MfCkaX5Fzl9KhwQTI47i21/bXYuCdfa9ySZuVkzXMirYxA==", + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, - "hasInstallScript": true, "dependencies": { - "@swc/counter": "^0.1.1", - "@swc/types": "^0.1.5" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.3.104", - "@swc/core-darwin-x64": "1.3.104", - "@swc/core-linux-arm-gnueabihf": "1.3.104", - "@swc/core-linux-arm64-gnu": "1.3.104", - "@swc/core-linux-arm64-musl": "1.3.104", - "@swc/core-linux-x64-gnu": "1.3.104", - "@swc/core-linux-x64-musl": "1.3.104", - "@swc/core-win32-arm64-msvc": "1.3.104", - "@swc/core-win32-ia32-msvc": "1.3.104", - "@swc/core-win32-x64-msvc": "1.3.104" - }, - "peerDependencies": { - "@swc/helpers": "^0.5.0" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } + "@types/node": "*" } }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.3.104", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.104.tgz", - "integrity": "sha512-LBCWGTYkn1UjyxrmcLS3vZgtCDVhwxsQMV7jz5duc7Gas8SRWh6ZYqvUkjlXMDX1yx0uvzHrkaRw445+zDRj7Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" + "node_modules/@types/history": { + "version": "4.7.11", + "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz", + "integrity": "sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==", + "dev": true + }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" } }, - "node_modules/@swc/counter": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz", - "integrity": "sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==", + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, - "node_modules/@swc/jest": { - "version": "0.2.30", - "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.30.tgz", - "integrity": "sha512-80KKC6GYvgrpX1/7yKsRbu88V6OAJIcMGzOLCt0pPSg1nEwJg/lLAodVy2hCD8OcYApmY5gSwD4SnwgA5Y7Q7A==", + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "dependencies": { - "@jest/create-cache-key-function": "^29.7.0", - "jsonc-parser": "^3.2.0" - }, - "engines": { - "npm": ">= 7.0.0" - }, - "peerDependencies": { - "@swc/core": "*" + "@types/istanbul-lib-coverage": "*" } }, - "node_modules/@swc/types": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", - "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==", - "dev": true - }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, "dependencies": { - "defer-to-connect": "^2.0.0" - }, - "engines": { - "node": ">=10" + "@types/istanbul-lib-report": "*" } }, - "node_modules/@testing-library/dom": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.20.0.tgz", - "integrity": "sha512-d9ULIT+a4EXLX3UU8FBjauG9NnsZHkHztXoIcTsOKoOw030fyjheN9svkTULjJxtYag9DZz5Jz5qkWZDPxTFwA==", + "node_modules/@types/jest": { + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "^5.0.0", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.4.4", - "pretty-format": "^27.0.2" - }, - "engines": { - "node": ">=12" + "expect": "^29.0.0", + "pretty-format": "^29.0.0" } }, - "node_modules/@testing-library/dom/node_modules/ansi-styles": { + "node_modules/@types/jest/node_modules/ansi-styles": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", @@ -5730,1221 +5902,846 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@testing-library/dom/node_modules/aria-query": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", - "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", - "dev": true, - "dependencies": { - "deep-equal": "^2.0.5" - } - }, - "node_modules/@testing-library/dom/node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "node_modules/@types/jest/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "react-is": "^18.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@testing-library/dom/node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "node_modules/@types/jest/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "node_modules/@testing-library/jest-dom": { - "version": "5.16.5", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.5.tgz", - "integrity": "sha512-N5ixQ2qKpi5OLYfwQmUb/5mSV9LneAcaUfp32pn4yCnpb8r/Yz0pXFPck21dIicKmi+ta5WRAknkZCfA8refMA==", + "node_modules/@types/jsdom": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", + "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", "dev": true, "dependencies": { - "@adobe/css-tools": "^4.0.1", - "@babel/runtime": "^7.9.2", - "@types/testing-library__jest-dom": "^5.9.1", - "aria-query": "^5.0.0", - "chalk": "^3.0.0", - "css.escape": "^1.5.1", - "dom-accessibility-api": "^0.5.6", - "lodash": "^4.17.15", - "redent": "^3.0.0" - }, - "engines": { - "node": ">=8", - "npm": ">=6", - "yarn": ">=1" + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" } }, - "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "@types/node": "*" } }, - "node_modules/@testing-library/jest-dom/node_modules/aria-query": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", - "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", - "dev": true, + "node_modules/@types/lodash": { + "version": "4.14.202", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", + "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==" + }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" + }, + "node_modules/@types/ms": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" + }, + "node_modules/@types/node": { + "version": "18.19.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.22.tgz", + "integrity": "sha512-p3pDIfuMg/aXBmhkyanPshdfJuX5c5+bQjYLIikPLXAUycEogij/c50n/C+8XOA5L93cU4ZRXtn+dNQGi0IZqQ==", "dependencies": { - "deep-equal": "^2.0.5" + "undici-types": "~5.26.4" } }, - "node_modules/@testing-library/jest-dom/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, + "node_modules/@types/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" + "@types/node": "*", + "form-data": "^4.0.0" } }, - "node_modules/@testing-library/jest-dom/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "node_modules/@types/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "@types/node": "*" } }, - "node_modules/@testing-library/jest-dom/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", "dev": true }, - "node_modules/@testing-library/jest-dom/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" + "node_modules/@types/prop-types": { + "version": "15.7.11", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", + "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" + }, + "node_modules/@types/react": { + "version": "17.0.76", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.76.tgz", + "integrity": "sha512-w9Aq+qeszGYoQM0hgFcdsAODGJdogadBDiitPm+zjBFJ0mLymvn2qSXsDaLJUndFRqqXk1FQfa9avHUBk1JhJQ==", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" } }, - "node_modules/@testing-library/jest-dom/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/@types/react-dom": { + "version": "17.0.25", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.25.tgz", + "integrity": "sha512-urx7A7UxkZQmThYA4So0NelOVjx3V4rNFVJwp0WZlbIK5eM4rNJDiN3R/E9ix0MBh6kAEojk/9YL+Te6D9zHNA==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "@types/react": "^17" } }, - "node_modules/@testing-library/react": { - "version": "12.1.5", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-12.1.5.tgz", - "integrity": "sha512-OfTXCJUFgjd/digLUuPxa0+/3ZxsQmE7ub9kcbW/wi96Bh3o/p5vrETcBGfP17NWPGqeYYl5LTRpwyGoMC4ysg==", + "node_modules/@types/react-lazy-load-image-component": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@types/react-lazy-load-image-component/-/react-lazy-load-image-component-1.6.3.tgz", + "integrity": "sha512-HsIsYz7yWWTh/bftdzGnijKD26JyofLRqM/RM80sxs7Gk13G83ew8R/ra2XzXuiZfjNEjAq/Va+NBHFF9ciwxA==", "dev": true, "dependencies": { - "@babel/runtime": "^7.12.5", - "@testing-library/dom": "^8.0.0", - "@types/react-dom": "<18.0.0" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "react": "<18.0.0", - "react-dom": "<18.0.0" + "@types/react": "*", + "csstype": "^3.0.2" } }, - "node_modules/@testing-library/react-hooks": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@testing-library/react-hooks/-/react-hooks-8.0.1.tgz", - "integrity": "sha512-Aqhl2IVmLt8IovEVarNDFuJDVWVvhnr9/GCU6UUnrYXwgDFF9h2L2o2P9KBni1AST5sT6riAyoukFLyjQUgD/g==", - "dev": true, + "node_modules/@types/react-redux": { + "version": "7.1.33", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.33.tgz", + "integrity": "sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg==", "dependencies": { - "@babel/runtime": "^7.12.5", - "react-error-boundary": "^3.1.0" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "@types/react": "^16.9.0 || ^17.0.0", - "react": "^16.9.0 || ^17.0.0", - "react-dom": "^16.9.0 || ^17.0.0", - "react-test-renderer": "^16.9.0 || ^17.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "react-test-renderer": { - "optional": true - } + "@types/hoist-non-react-statics": "^3.3.0", + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0", + "redux": "^4.0.0" } }, - "node_modules/@testing-library/user-event": { - "version": "14.4.3", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.4.3.tgz", - "integrity": "sha512-kCUc5MEwaEMakkO5x7aoD+DLi02ehmEM2QCGWvNqAS1dV/fAvORWEjnjsEIvml59M7Y5kCkWN6fCCyPOe8OL6Q==", + "node_modules/@types/react-router": { + "version": "5.1.20", + "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz", + "integrity": "sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==", "dev": true, - "engines": { - "node": ">=12", - "npm": ">=6" - }, - "peerDependencies": { - "@testing-library/dom": ">=7.21.4" + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*" } }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "node_modules/@types/react-router-dom": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz", + "integrity": "sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==", "dev": true, - "engines": { - "node": ">= 10" + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router": "*" } }, - "node_modules/@transak/transak-sdk": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@transak/transak-sdk/-/transak-sdk-1.4.1.tgz", - "integrity": "sha512-/BKzb9orz1xDxa41oOPW+4KpjSHNEXgtaFazX/aIjQbr7LLbRqfXC/IHzpPmjR9OmFm8pFhV2Y86Rg0aZt5ZUA==", + "node_modules/@types/react-virtualized-auto-sizer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.4.tgz", + "integrity": "sha512-nhYwlFiYa8M3S+O2T9QO/e1FQUYMr/wJENUdf/O0dhRi1RS/93rjrYQFYdbUqtdFySuhrtnEDX29P6eKOttY+A==", + "dev": true, "dependencies": { - "events": "^3.3.0", - "query-string": "^8.1.0" - }, - "engines": { - "node": ">=10.0.0" + "@types/react": "*" } }, - "node_modules/@transak/transak-sdk/node_modules/decode-uri-component": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.4.1.tgz", - "integrity": "sha512-+8VxcR21HhTy8nOt6jf20w0c9CADrw1O8d+VZ/YzzCt4bJ3uBjw+D1q2osAB8RnpwwaeYBxy0HyKQxD5JBMuuQ==", - "engines": { - "node": ">=14.16" + "node_modules/@types/react-window": { + "version": "1.8.8", + "resolved": "https://registry.npmjs.org/@types/react-window/-/react-window-1.8.8.tgz", + "integrity": "sha512-8Ls660bHR1AUA2kuRvVG9D/4XpRC6wjAaPT9dil7Ckc76eP9TKWZwwmgfq8Q1LANX3QNDnoU4Zp48A3w+zK69Q==", + "dev": true, + "dependencies": { + "@types/react": "*" } }, - "node_modules/@transak/transak-sdk/node_modules/filter-obj": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-5.1.0.tgz", - "integrity": "sha512-qWeTREPoT7I0bifpPUXtxkZJ1XJzxWtfoWWkdVGqa+eCr3SHW/Ocp89o8vLvbUuQnadybJpjOKu4V+RwO6sGng==", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node_modules/@types/react-window-infinite-loader": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/react-window-infinite-loader/-/react-window-infinite-loader-1.0.9.tgz", + "integrity": "sha512-gEInTjQwURCnDOFyIEK2+fWB5gTjqwx30O62QfxA9stE5aiB6EWkGj4UMhc0axq7/FV++Gs/TGW8FtgEx0S6Tw==", + "dev": true, + "dependencies": { + "@types/react": "*", + "@types/react-window": "*" } }, - "node_modules/@transak/transak-sdk/node_modules/query-string": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-8.2.0.tgz", - "integrity": "sha512-tUZIw8J0CawM5wyGBiDOAp7ObdRQh4uBor/fUR9ZjmbZVvw95OD9If4w3MQxr99rg0DJZ/9CIORcpEqU5hQG7g==", + "node_modules/@types/redux": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@types/redux/-/redux-3.6.0.tgz", + "integrity": "sha512-ic+60DXHW5seNyqFvfr7Sk5cnXs+HsF9tIeIaxjOuSP5kzgDXC+AzKTYmjAfuLx4Sccm/0vjwBQj3OOkUkwOqg==", + "deprecated": "This is a stub types definition for Redux (https://github.com/reactjs/redux). Redux provides its own type definitions, so you don't need @types/redux installed!", + "dev": true, "dependencies": { - "decode-uri-component": "^0.4.1", - "filter-obj": "^5.1.0", - "split-on-first": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "redux": "*" } }, - "node_modules/@transak/transak-sdk/node_modules/split-on-first": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-3.0.0.tgz", - "integrity": "sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node_modules/@types/redux-logger": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/@types/redux-logger/-/redux-logger-3.0.13.tgz", + "integrity": "sha512-jylqZXQfMxahkuPcO8J12AKSSCQngdEWQrw7UiLUJzMBcv1r4Qg77P6mjGLjM27e5gFQDPD8vwUMJ9AyVxFSsg==", + "dev": true, + "dependencies": { + "redux": "^5.0.0" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "node_modules/@types/redux-logger/node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", "dev": true }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==" }, - "node_modules/@tsconfig/node14": { + "node_modules/@types/responselike": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true - }, - "node_modules/@typechain/ethers-v5": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-10.1.0.tgz", - "integrity": "sha512-3LIb+eUpV3mNCrjUKT5oqp8PBsZYSnVrkfk6pY/ZM0boRs2mKxjFZ7bktx42vfDye8PPz3NxtW4DL5NsNsFqlg==", - "dev": true, - "dependencies": { - "lodash": "^4.17.15", - "ts-essentials": "^7.0.1" - }, - "peerDependencies": { - "@ethersproject/abi": "^5.0.0", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/providers": "^5.0.0", - "ethers": "^5.1.3", - "typechain": "^8.1.0", - "typescript": ">=4.3.0" - } - }, - "node_modules/@types/aria-query": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz", - "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==", - "dev": true - }, - "node_modules/@types/babel__core": { - "version": "7.1.19", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.14.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.3.0" - } - }, - "node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", "dependencies": { "@types/node": "*" } }, - "node_modules/@types/cacheable-request": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", - "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "*", - "@types/node": "*", - "@types/responselike": "*" - } + "node_modules/@types/scheduler": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", + "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" }, - "node_modules/@types/connect": { - "version": "3.4.36", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.36.tgz", - "integrity": "sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==", + "node_modules/@types/secp256k1": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", + "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", "dependencies": { "@types/node": "*" } }, - "node_modules/@types/css-mediaquery": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@types/css-mediaquery/-/css-mediaquery-0.1.1.tgz", - "integrity": "sha512-JQ+sPiPlRUHmlL4e3DBUNbxVEb6p7dis78/uSDbQpkeCKVoepChZMWGPIVA2JIH0ylfkA9S+TZUdShlgDpFKrw==", + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, - "node_modules/@types/d3-array": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.0.4.tgz", - "integrity": "sha512-nwvEkG9vYOc0Ic7G7kwgviY4AQlTfYGIZ0fqB7CQHXGyYM6nO7kJh5EguSNA3jfh4rq7Sb7eMVq8isuvg2/miQ==" - }, - "node_modules/@types/d3-color": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.0.tgz", - "integrity": "sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==" + "node_modules/@types/sinon": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", + "integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==" }, - "node_modules/@types/d3-ease": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.0.tgz", - "integrity": "sha512-aMo4eaAOijJjA6uU+GIeW018dvy9+oH5Y2VPPzjjfxevvGQ/oRDs+tfYC9b50Q4BygRR8yE2QCLsrT0WtAVseA==" + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true }, - "node_modules/@types/d3-interpolate": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.1.tgz", - "integrity": "sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw==", + "node_modules/@types/testing-library__jest-dom": { + "version": "5.14.9", + "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.9.tgz", + "integrity": "sha512-FSYhIjFlfOpGSRyVoMBMuS3ws5ehFQODymf3vlI7U1K8c7PHwWwFY7VREfmsuzHSOnoKs/9/Y983ayOs7eRzqw==", + "dev": true, "dependencies": { - "@types/d3-color": "*" + "@types/jest": "*" } }, - "node_modules/@types/d3-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.0.0.tgz", - "integrity": "sha512-0g/A+mZXgFkQxN3HniRDbXMN79K3CdTpLsevj+PXiTcb2hVyvkZUBg37StmgCQkaD84cUJ4uaDAWq7UJOQy2Tg==" + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "dev": true }, - "node_modules/@types/d3-scale": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.3.tgz", - "integrity": "sha512-PATBiMCpvHJSMtZAMEhc2WyL+hnzarKzI6wAHYjhsonjWJYGq5BXTzQjv4l8m2jO183/4wZ90rKvSeT7o72xNQ==", - "dependencies": { - "@types/d3-time": "*" - } + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==" }, - "node_modules/@types/d3-shape": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.1.tgz", - "integrity": "sha512-6Uh86YFF7LGg4PQkuO2oG6EMBRLuW9cbavUW46zkIO5kuS2PfTqo2o9SkgtQzguBHbLgNnU90UNsITpsX1My+A==", + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", "dependencies": { - "@types/d3-path": "*" + "@types/node": "*" } }, - "node_modules/@types/d3-time": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.0.tgz", - "integrity": "sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==" - }, - "node_modules/@types/d3-timer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.0.tgz", - "integrity": "sha512-HNB/9GHqu7Fo8AQiugyJbv6ZxYz58wef0esl4Mv828w1ZKpAshw/uFWVDUcIB9KKFeFKoxS3cHY07FFgtTRZ1g==" - }, - "node_modules/@types/debug": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", - "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", + "node_modules/@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, "dependencies": { - "@types/ms": "*" + "@types/yargs-parser": "*" } }, - "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" - }, - "node_modules/@types/flat": { - "version": "0.0.28", - "resolved": "https://registry.npmjs.org/@types/flat/-/flat-0.0.28.tgz", - "integrity": "sha512-2M3R9T8Wd9yGjE24I6/pxEeNR9CtU2oErPNfZbK9K+btKpoQVPsWayMx9VGv+jIuxa9yHiQ+T3nhFfW7IS2A3Q==" + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true }, - "node_modules/@types/graceful-fs": { - "version": "4.1.5", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.2.0.tgz", + "integrity": "sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw==", "dev": true, - "license": "MIT", "dependencies": { - "@types/node": "*" + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/type-utils": "7.2.0", + "@typescript-eslint/utils": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@types/history": { - "version": "4.7.9", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "MIT" - }, - "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.1", - "license": "MIT", "dependencies": { - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, - "license": "MIT", "dependencies": { - "@types/istanbul-lib-coverage": "*" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/parser": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz", + "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==", "dev": true, - "license": "MIT", "dependencies": { - "@types/istanbul-lib-report": "*" + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", "dev": true, "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@types/jsdom": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", - "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", + "node_modules/@typescript-eslint/type-utils": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.2.0.tgz", + "integrity": "sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==", "dev": true, "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/lodash": { - "version": "4.14.202", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", - "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==" - }, - "node_modules/@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" - }, - "node_modules/@types/ms": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", - "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" - }, - "node_modules/@types/node": { - "version": "18.19.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.8.tgz", - "integrity": "sha512-g1pZtPhsvGVTwmeVoexWZLTQaOvXwoSq//pTL0DHeNzUDrFnir4fgETdhjhIxjVnN+hKOuh98+E1eMLnUXstFg==", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/node-fetch": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.4.tgz", - "integrity": "sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==", - "dependencies": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, - "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/utils": "7.2.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": ">= 6" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@types/pbkdf2": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "@types/node": "*" + "node_modules/@typescript-eslint/types": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@types/prettier": { - "version": "2.4.4", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", "dev": true, - "license": "MIT" - }, - "node_modules/@types/prop-types": { - "version": "15.7.4", - "license": "MIT" - }, - "node_modules/@types/react": { - "version": "17.0.17", - "license": "MIT", "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@types/react-dom": { - "version": "17.0.9", + "node_modules/@typescript-eslint/typescript-estree/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "MIT", "dependencies": { - "@types/react": "*" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@types/react-lazy-load-image-component": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@types/react-lazy-load-image-component/-/react-lazy-load-image-component-1.5.2.tgz", - "integrity": "sha512-4NLJsMJVrMv18FuMIkUUBVj/PH9A+BvLKrZC75EWiEFn1IsMrZHgL1tVKw5QBfoa0Qjz6SkWIzEvwcyZ8PgnIg==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { - "@types/react": "*", - "csstype": "^3.0.2" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@types/react-redux": { - "version": "7.1.18", - "license": "MIT", - "dependencies": { - "@types/hoist-non-react-statics": "^3.3.0", - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0", - "redux": "^4.0.0" - } + "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, - "node_modules/@types/react-router": { - "version": "5.1.18", + "node_modules/@typescript-eslint/utils": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz", + "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==", "dev": true, - "license": "MIT", "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" } }, - "node_modules/@types/react-router-dom": { - "version": "5.1.8", + "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "MIT", "dependencies": { - "@types/history": "*", - "@types/react": "*", - "@types/react-router": "*" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@types/react-router/node_modules/@types/history": { - "version": "4.7.11", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/react-virtualized-auto-sizer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.1.tgz", - "integrity": "sha512-GH8sAnBEM5GV9LTeiz56r4ZhMOUSrP43tAQNSRVxNexDjcNKLCEtnxusAItg1owFUFE6k0NslV26gqVClVvong==", + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { - "@types/react": "*" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/@types/react-window": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@types/react-window/-/react-window-1.8.5.tgz", - "integrity": "sha512-V9q3CvhC9Jk9bWBOysPGaWy/Z0lxYcTXLtLipkt2cnRj1JOSFNF7wqGpkScSXMgBwC+fnVRg/7shwgddBG5ICw==", + "node_modules/@typescript-eslint/utils/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", "dev": true, "dependencies": { - "@types/react": "*" + "@typescript-eslint/types": "7.2.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@types/react-window-infinite-loader": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/react-window-infinite-loader/-/react-window-infinite-loader-1.0.6.tgz", - "integrity": "sha512-V8g8sBDLVeJJAfEENJS7VXZK+DRJ+jzPNtk8jpj2G+obhf+iqGNUDGwNWCbBhLiD+KpHhf3kWQlKBRi0tAeU4Q==", + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/@vitejs/plugin-react-swc": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.6.0.tgz", + "integrity": "sha512-XFRbsGgpGxGzEV5i5+vRiro1bwcIaZDIdBRP16qwm+jP68ue/S8FJTBEgOeojtVDYrbSua3XFp71kC8VJE6v+g==", "dev": true, "dependencies": { - "@types/react": "*", - "@types/react-window": "*" + "@swc/core": "^1.3.107" + }, + "peerDependencies": { + "vite": "^4 || ^5" } }, - "node_modules/@types/redux": { - "version": "3.6.0", - "dev": true, - "license": "MIT", + "node_modules/@walletconnect/core": { + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.11.2.tgz", + "integrity": "sha512-bB4SiXX8hX3/hyBfVPC5gwZCXCl+OPj+/EDVM71iAO3TDsh78KPbrVAbDnnsbHzZVHlsMohtXX3j5XVsheN3+g==", "dependencies": { - "redux": "*" + "@walletconnect/heartbeat": "1.2.1", + "@walletconnect/jsonrpc-provider": "1.0.13", + "@walletconnect/jsonrpc-types": "1.0.3", + "@walletconnect/jsonrpc-utils": "1.0.8", + "@walletconnect/jsonrpc-ws-connection": "1.0.14", + "@walletconnect/keyvaluestorage": "^1.1.1", + "@walletconnect/logger": "^2.0.1", + "@walletconnect/relay-api": "^1.0.9", + "@walletconnect/relay-auth": "^1.0.4", + "@walletconnect/safe-json": "^1.0.2", + "@walletconnect/time": "^1.0.2", + "@walletconnect/types": "2.11.2", + "@walletconnect/utils": "2.11.2", + "events": "^3.3.0", + "isomorphic-unfetch": "3.1.0", + "lodash.isequal": "4.5.0", + "uint8arrays": "^3.1.0" } }, - "node_modules/@types/redux-logger": { - "version": "3.0.9", - "dev": true, - "license": "MIT", + "node_modules/@walletconnect/core/node_modules/@walletconnect/keyvaluestorage": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", + "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", "dependencies": { - "redux": "^4.0.0" + "@walletconnect/safe-json": "^1.0.1", + "idb-keyval": "^6.2.1", + "unstorage": "^1.9.0" + }, + "peerDependencies": { + "@react-native-async-storage/async-storage": "1.x" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + } } }, - "node_modules/@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "node_modules/@walletconnect/environment": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.1.tgz", + "integrity": "sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==", "dependencies": { - "@types/node": "*" + "tslib": "1.14.1" } }, - "node_modules/@types/scheduler": { - "version": "0.16.2", - "license": "MIT" + "node_modules/@walletconnect/environment/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@types/secp256k1": { - "version": "4.0.3", - "license": "MIT", + "node_modules/@walletconnect/ethereum-provider": { + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.11.2.tgz", + "integrity": "sha512-BUDqee0Uy2rCZVkW5Ao3q6Ado/3fePYnFdryVF+YL6bPhj+xQZ5OfKodl+uvs7Rwq++O5wTX2RqOTzpW7+v+Mg==", "dependencies": { - "@types/node": "*" + "@walletconnect/jsonrpc-http-connection": "^1.0.7", + "@walletconnect/jsonrpc-provider": "^1.0.13", + "@walletconnect/jsonrpc-types": "^1.0.3", + "@walletconnect/jsonrpc-utils": "^1.0.8", + "@walletconnect/modal": "^2.6.2", + "@walletconnect/sign-client": "2.11.2", + "@walletconnect/types": "2.11.2", + "@walletconnect/universal-provider": "2.11.2", + "@walletconnect/utils": "2.11.2", + "events": "^3.3.0" } }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, - "node_modules/@types/sinon": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", - "integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==" - }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/testing-library__jest-dom": { - "version": "5.14.5", - "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz", - "integrity": "sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ==", - "dev": true, + "node_modules/@walletconnect/events": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/events/-/events-1.0.1.tgz", + "integrity": "sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==", "dependencies": { - "@types/jest": "*" + "keyvaluestorage-interface": "^1.0.0", + "tslib": "1.14.1" } }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true + "node_modules/@walletconnect/events/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@types/trusted-types": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.4.tgz", - "integrity": "sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ==" + "node_modules/@walletconnect/heartbeat": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz", + "integrity": "sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q==", + "dependencies": { + "@walletconnect/events": "^1.0.1", + "@walletconnect/time": "^1.0.2", + "tslib": "1.14.1" + } }, - "node_modules/@types/uuid": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.5.tgz", - "integrity": "sha512-xfHdwa1FMJ082prjSJpoEI57GZITiQz10r3vEJCHa2khEFQjKy91aWKz6+zybzssCvXUwE1LQWgWVwZ4nYUvHQ==" + "node_modules/@walletconnect/heartbeat/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@types/ws": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.4.tgz", - "integrity": "sha512-PpPrX7SZW9re6+Ha8ojZG4Se8AZXgf0GK6zmfqEuCsY49LFDNXO3SByp44X3dFEqtB73lkCDAdUazhAjVPiNwg==", + "node_modules/@walletconnect/jsonrpc-http-connection": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.7.tgz", + "integrity": "sha512-qlfh8fCfu8LOM9JRR9KE0s0wxP6ZG9/Jom8M0qsoIQeKF3Ni0FyV4V1qy/cc7nfI46SLQLSl4tgWSfLiE1swyQ==", "dependencies": { - "@types/node": "*" + "@walletconnect/jsonrpc-utils": "^1.0.6", + "@walletconnect/safe-json": "^1.0.1", + "cross-fetch": "^3.1.4", + "tslib": "1.14.1" } }, - "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, + "node_modules/@walletconnect/jsonrpc-http-connection/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/jsonrpc-provider": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz", + "integrity": "sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g==", "dependencies": { - "@types/yargs-parser": "*" + "@walletconnect/jsonrpc-utils": "^1.0.8", + "@walletconnect/safe-json": "^1.0.2", + "tslib": "1.14.1" } }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true + "node_modules/@walletconnect/jsonrpc-provider/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.1.tgz", - "integrity": "sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==", - "dev": true, + "node_modules/@walletconnect/jsonrpc-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz", + "integrity": "sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==", "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.1.1", - "@typescript-eslint/type-utils": "7.1.1", - "@typescript-eslint/utils": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "keyvaluestorage-interface": "^1.0.0", + "tslib": "1.14.1" } }, - "node_modules/@typescript-eslint/parser": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.1.tgz", - "integrity": "sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==", - "dev": true, + "node_modules/@walletconnect/jsonrpc-types/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/jsonrpc-utils": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz", + "integrity": "sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==", "dependencies": { - "@typescript-eslint/scope-manager": "7.1.1", - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/typescript-estree": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", - "debug": "^4.3.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@walletconnect/environment": "^1.0.1", + "@walletconnect/jsonrpc-types": "^1.0.3", + "tslib": "1.14.1" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.1.tgz", - "integrity": "sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==", - "dev": true, + "node_modules/@walletconnect/jsonrpc-utils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/jsonrpc-ws-connection": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz", + "integrity": "sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA==", "dependencies": { - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "@walletconnect/jsonrpc-utils": "^1.0.6", + "@walletconnect/safe-json": "^1.0.2", + "events": "^3.3.0", + "ws": "^7.5.1" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.1.tgz", - "integrity": "sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "7.1.1", - "@typescript-eslint/utils": "7.1.1", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, + "node_modules/@walletconnect/jsonrpc-ws-connection/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=8.3.0" }, "peerDependencies": { - "eslint": "^8.56.0" + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" }, "peerDependenciesMeta": { - "typescript": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { "optional": true } } }, - "node_modules/@typescript-eslint/types": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.1.tgz", - "integrity": "sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==", - "dev": true, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node_modules/@walletconnect/logger": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/logger/-/logger-2.0.1.tgz", + "integrity": "sha512-SsTKdsgWm+oDTBeNE/zHxxr5eJfZmE9/5yp/Ku+zJtcTAjELb3DXueWkDXmE9h8uHIbJzIb5wj5lPdzyrjT6hQ==", + "dependencies": { + "pino": "7.11.0", + "tslib": "1.14.1" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.1.tgz", - "integrity": "sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==", - "dev": true, + "node_modules/@walletconnect/logger/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@walletconnect/modal": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@walletconnect/modal/-/modal-2.6.2.tgz", + "integrity": "sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA==", "dependencies": { - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@walletconnect/modal-core": "2.6.2", + "@walletconnect/modal-ui": "2.6.2" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, + "node_modules/@walletconnect/modal-core": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@walletconnect/modal-core/-/modal-core-2.6.2.tgz", + "integrity": "sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA==", "dependencies": { - "balanced-match": "^1.0.0" + "valtio": "1.11.2" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, + "node_modules/@walletconnect/modal-ui": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz", + "integrity": "sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA==", "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.1.tgz", - "integrity": "sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.1.1", - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/typescript-estree": "7.1.1", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.1.tgz", - "integrity": "sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.1.1", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "node_modules/@vitejs/plugin-react-swc": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.5.0.tgz", - "integrity": "sha512-1PrOvAaDpqlCV+Up8RkAh9qaiUjoDUcjtttyhXDKw53XA6Ve16SOp6cCOpRs8Dj8DqUQs6eTW5YkLcLJjrXAig==", - "dev": true, - "dependencies": { - "@swc/core": "^1.3.96" - }, - "peerDependencies": { - "vite": "^4 || ^5" - } - }, - "node_modules/@walletconnect/core": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.9.2.tgz", - "integrity": "sha512-VARMPAx8sIgodeyngDHbealP3B621PQqjqKsByFUTOep8ZI1/R/20zU+cmq6j9RCrL+kLKZcrZqeVzs8Z7OlqQ==", - "dependencies": { - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-provider": "1.0.13", - "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "1.0.13", - "@walletconnect/keyvaluestorage": "^1.0.2", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/relay-api": "^1.0.9", - "@walletconnect/relay-auth": "^1.0.4", - "@walletconnect/safe-json": "^1.0.2", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.9.2", - "@walletconnect/utils": "2.9.2", - "events": "^3.3.0", - "lodash.isequal": "4.5.0", - "uint8arrays": "^3.1.0" - } - }, - "node_modules/@walletconnect/core/node_modules/@walletconnect/keyvaluestorage": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", - "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", - "dependencies": { - "@walletconnect/safe-json": "^1.0.1", - "idb-keyval": "^6.2.1", - "unstorage": "^1.9.0" - }, - "peerDependencies": { - "@react-native-async-storage/async-storage": "1.x" - }, - "peerDependenciesMeta": { - "@react-native-async-storage/async-storage": { - "optional": true - } - } - }, - "node_modules/@walletconnect/core/node_modules/uint8arrays": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", - "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "dependencies": { - "multiformats": "^9.4.2" - } - }, - "node_modules/@walletconnect/environment": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.1.tgz", - "integrity": "sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==", - "dependencies": { - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/ethereum-provider": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.9.2.tgz", - "integrity": "sha512-eO1dkhZffV1g7vpG19XUJTw09M/bwGUwwhy1mJ3AOPbOSbMPvwiCuRz2Kbtm1g9B0Jv15Dl+TvJ9vTgYF8zoZg==", - "dependencies": { - "@walletconnect/jsonrpc-http-connection": "^1.0.7", - "@walletconnect/jsonrpc-provider": "^1.0.13", - "@walletconnect/jsonrpc-types": "^1.0.3", - "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/sign-client": "2.9.2", - "@walletconnect/types": "2.9.2", - "@walletconnect/universal-provider": "2.9.2", - "@walletconnect/utils": "2.9.2", - "events": "^3.3.0" - }, - "peerDependencies": { - "@walletconnect/modal": ">=2" - }, - "peerDependenciesMeta": { - "@walletconnect/modal": { - "optional": true - } - } - }, - "node_modules/@walletconnect/events": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/events/-/events-1.0.1.tgz", - "integrity": "sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==", - "dependencies": { - "keyvaluestorage-interface": "^1.0.0", - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/heartbeat": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz", - "integrity": "sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q==", - "dependencies": { - "@walletconnect/events": "^1.0.1", - "@walletconnect/time": "^1.0.2", - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/jsonrpc-http-connection": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.7.tgz", - "integrity": "sha512-qlfh8fCfu8LOM9JRR9KE0s0wxP6ZG9/Jom8M0qsoIQeKF3Ni0FyV4V1qy/cc7nfI46SLQLSl4tgWSfLiE1swyQ==", - "dependencies": { - "@walletconnect/jsonrpc-utils": "^1.0.6", - "@walletconnect/safe-json": "^1.0.1", - "cross-fetch": "^3.1.4", - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/jsonrpc-provider": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz", - "integrity": "sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g==", - "dependencies": { - "@walletconnect/jsonrpc-utils": "^1.0.8", - "@walletconnect/safe-json": "^1.0.2", - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/jsonrpc-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz", - "integrity": "sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==", - "dependencies": { - "keyvaluestorage-interface": "^1.0.0", - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/jsonrpc-utils": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz", - "integrity": "sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==", - "dependencies": { - "@walletconnect/environment": "^1.0.1", - "@walletconnect/jsonrpc-types": "^1.0.3", - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/jsonrpc-ws-connection": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.13.tgz", - "integrity": "sha512-mfOM7uFH4lGtQxG+XklYuFBj6dwVvseTt5/ahOkkmpcAEgz2umuzu7fTR+h5EmjQBdrmYyEBOWADbeaFNxdySg==", - "dependencies": { - "@walletconnect/jsonrpc-utils": "^1.0.6", - "@walletconnect/safe-json": "^1.0.2", - "events": "^3.3.0", - "tslib": "1.14.1", - "ws": "^7.5.1" - } - }, - "node_modules/@walletconnect/jsonrpc-ws-connection/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/@walletconnect/logger": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/logger/-/logger-2.0.1.tgz", - "integrity": "sha512-SsTKdsgWm+oDTBeNE/zHxxr5eJfZmE9/5yp/Ku+zJtcTAjELb3DXueWkDXmE9h8uHIbJzIb5wj5lPdzyrjT6hQ==", - "dependencies": { - "pino": "7.11.0", - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/modal": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/@walletconnect/modal/-/modal-2.6.2.tgz", - "integrity": "sha512-eFopgKi8AjKf/0U4SemvcYw9zlLpx9njVN8sf6DAkowC2Md0gPU/UNEbH1Wwj407pEKnEds98pKWib1NN1ACoA==", - "dependencies": { - "@walletconnect/modal-core": "2.6.2", - "@walletconnect/modal-ui": "2.6.2" - } - }, - "node_modules/@walletconnect/modal-core": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/@walletconnect/modal-core/-/modal-core-2.6.2.tgz", - "integrity": "sha512-cv8ibvdOJQv2B+nyxP9IIFdxvQznMz8OOr/oR/AaUZym4hjXNL/l1a2UlSQBXrVjo3xxbouMxLb3kBsHoYP2CA==", - "dependencies": { - "valtio": "1.11.2" - } - }, - "node_modules/@walletconnect/modal-ui": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/@walletconnect/modal-ui/-/modal-ui-2.6.2.tgz", - "integrity": "sha512-rbdstM1HPGvr7jprQkyPggX7rP4XiCG85ZA+zWBEX0dVQg8PpAgRUqpeub4xQKDgY7pY/xLRXSiCVdWGqvG2HA==", - "dependencies": { - "@walletconnect/modal-core": "2.6.2", - "lit": "2.8.0", - "motion": "10.16.2", - "qrcode": "1.5.3" + "@walletconnect/modal-core": "2.6.2", + "lit": "2.8.0", + "motion": "10.16.2", + "qrcode": "1.5.3" } }, "node_modules/@walletconnect/relay-api": { @@ -6956,6 +6753,11 @@ "tslib": "1.14.1" } }, + "node_modules/@walletconnect/relay-api/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@walletconnect/relay-auth": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@walletconnect/relay-auth/-/relay-auth-1.0.4.tgz", @@ -6969,13 +6771,10 @@ "uint8arrays": "^3.0.0" } }, - "node_modules/@walletconnect/relay-auth/node_modules/uint8arrays": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", - "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "dependencies": { - "multiformats": "^9.4.2" - } + "node_modules/@walletconnect/relay-auth/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/safe-json": { "version": "1.0.2", @@ -6985,19 +6784,24 @@ "tslib": "1.14.1" } }, + "node_modules/@walletconnect/safe-json/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@walletconnect/sign-client": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.9.2.tgz", - "integrity": "sha512-anRwnXKlR08lYllFMEarS01hp1gr6Q9XUgvacr749hoaC/AwGVlxYFdM8+MyYr3ozlA+2i599kjbK/mAebqdXg==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.11.2.tgz", + "integrity": "sha512-MfBcuSz2GmMH+P7MrCP46mVE5qhP0ZyWA0FyIH6/WuxQ6G+MgKsGfaITqakpRPsykWOJq8tXMs3XvUPDU413OQ==", "dependencies": { - "@walletconnect/core": "2.9.2", + "@walletconnect/core": "2.11.2", "@walletconnect/events": "^1.0.1", "@walletconnect/heartbeat": "1.2.1", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "^2.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.9.2", - "@walletconnect/utils": "2.9.2", + "@walletconnect/types": "2.11.2", + "@walletconnect/utils": "2.11.2", "events": "^3.3.0" } }, @@ -7009,15 +6813,20 @@ "tslib": "1.14.1" } }, + "node_modules/@walletconnect/time/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@walletconnect/types": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.9.2.tgz", - "integrity": "sha512-7Rdn30amnJEEal4hk83cdwHUuxI1SWQ+K7fFFHBMqkuHLGi3tpMY6kpyfDxnUScYEZXqgRps4Jo5qQgnRqVM7A==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.11.2.tgz", + "integrity": "sha512-p632MFB+lJbip2cvtXPBQslpUdiw1sDtQ5y855bOlAGquay+6fZ4h1DcDePeKQDQM3P77ax2a9aNPZxV6y/h1Q==", "dependencies": { "@walletconnect/events": "^1.0.1", "@walletconnect/heartbeat": "1.2.1", "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/keyvaluestorage": "^1.0.2", + "@walletconnect/keyvaluestorage": "^1.1.1", "@walletconnect/logger": "^2.0.1", "events": "^3.3.0" } @@ -7041,25 +6850,25 @@ } }, "node_modules/@walletconnect/universal-provider": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.9.2.tgz", - "integrity": "sha512-JmaolkO8D31UdRaQCHwlr8uIFUI5BYhBzqYFt54Mc6gbIa1tijGOmdyr6YhhFO70LPmS6gHIjljwOuEllmlrxw==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.11.2.tgz", + "integrity": "sha512-cNtIn5AVoDxKAJ4PmB8m5adnf5mYQMUamEUPKMVvOPscfGtIMQEh9peKsh2AN5xcRVDbgluC01Id545evFyymw==", "dependencies": { "@walletconnect/jsonrpc-http-connection": "^1.0.7", "@walletconnect/jsonrpc-provider": "1.0.13", "@walletconnect/jsonrpc-types": "^1.0.2", "@walletconnect/jsonrpc-utils": "^1.0.7", "@walletconnect/logger": "^2.0.1", - "@walletconnect/sign-client": "2.9.2", - "@walletconnect/types": "2.9.2", - "@walletconnect/utils": "2.9.2", + "@walletconnect/sign-client": "2.11.2", + "@walletconnect/types": "2.11.2", + "@walletconnect/utils": "2.11.2", "events": "^3.3.0" } }, "node_modules/@walletconnect/utils": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.9.2.tgz", - "integrity": "sha512-D44hwXET/8JhhIjqljY6qxSu7xXnlPrf63UN/Qfl98vDjWlYVcDl2+JIQRxD9GPastw0S8XZXdRq59XDXLuZBg==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.11.2.tgz", + "integrity": "sha512-LyfdmrnZY6dWqlF4eDrx5jpUwsB2bEPjoqR5Z6rXPiHJKUOdJt7az+mNOn5KTSOlRpd1DmozrBrWr+G9fFLYVw==", "dependencies": { "@stablelib/chacha20poly1305": "1.0.1", "@stablelib/hkdf": "1.0.1", @@ -7069,7 +6878,7 @@ "@walletconnect/relay-api": "^1.0.9", "@walletconnect/safe-json": "^1.0.2", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.9.2", + "@walletconnect/types": "2.11.2", "@walletconnect/window-getters": "^1.0.1", "@walletconnect/window-metadata": "^1.0.1", "detect-browser": "5.3.0", @@ -7077,39 +6886,6 @@ "uint8arrays": "^3.1.0" } }, - "node_modules/@walletconnect/utils/node_modules/query-string": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", - "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", - "dependencies": { - "decode-uri-component": "^0.2.2", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@walletconnect/utils/node_modules/strict-uri-encode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", - "engines": { - "node": ">=4" - } - }, - "node_modules/@walletconnect/utils/node_modules/uint8arrays": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", - "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "dependencies": { - "multiformats": "^9.4.2" - } - }, "node_modules/@walletconnect/window-getters": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.1.tgz", @@ -7118,6 +6894,11 @@ "tslib": "1.14.1" } }, + "node_modules/@walletconnect/window-getters/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@walletconnect/window-metadata": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz", @@ -7127,6 +6908,11 @@ "tslib": "1.14.1" } }, + "node_modules/@walletconnect/window-metadata/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@web3-react/abstract-connector": { "version": "6.0.7", "resolved": "https://registry.npmjs.org/@web3-react/abstract-connector/-/abstract-connector-6.0.7.tgz", @@ -7201,9 +6987,12 @@ } }, "node_modules/@well-known-components/interfaces/node_modules/@types/node": { - "version": "20.4.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.0.tgz", - "integrity": "sha512-jfT7iTf/4kOQ9S7CHV9BIyRaQqHu67mOjsIQBC3BKZvzvUB6zLxEwJ6sBE3ozcvP8kF6Uk5PXN0Q+c0dfhGX0g==" + "version": "20.11.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", + "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@wert-io/widget-initializer": { "version": "5.2.0", @@ -7219,7 +7008,8 @@ }, "node_modules/abort-controller": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "dependencies": { "event-target-shim": "^5.0.0" }, @@ -7229,7 +7019,8 @@ }, "node_modules/accepts": { "version": "1.3.8", - "license": "MIT", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -7239,8 +7030,9 @@ } }, "node_modules/acorn": { - "version": "7.1.1", - "license": "MIT", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "bin": { "acorn": "bin/acorn" }, @@ -7258,18 +7050,6 @@ "acorn-walk": "^8.0.2" } }, - "node_modules/acorn-globals/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -7290,12 +7070,14 @@ }, "node_modules/aes-js": { "version": "3.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" }, "node_modules/agent-base": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, - "license": "MIT", "dependencies": { "debug": "4" }, @@ -7315,12 +7097,13 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "license": "MIT", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dependencies": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { @@ -7328,14 +7111,30 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ajv/node_modules/json-schema-traverse": { - "version": "0.4.1", - "license": "MIT" + "node_modules/ajv-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "peerDependencies": { + "ajv": "^8.0.1" + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } }, "node_modules/ansi-escapes": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -7346,17 +7145,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -7366,14 +7154,17 @@ } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { @@ -7395,11 +7186,18 @@ "dev": true }, "node_modules/argparse": { - "version": "1.0.10", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/aria-query": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", "dev": true, - "license": "MIT", "dependencies": { - "sprintf-js": "~1.0.2" + "deep-equal": "^2.0.5" } }, "node_modules/array-back": { @@ -7412,12 +7210,15 @@ } }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7425,7 +7226,8 @@ }, "node_modules/array-flatten": { "version": "1.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/array-union": { "version": "2.1.0", @@ -7438,21 +7240,24 @@ }, "node_modules/asn1": { "version": "0.2.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dependencies": { "safer-buffer": "~2.1.0" } }, "node_modules/assert-plus": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "engines": { "node": ">=0.8" } }, "node_modules/async-limiter": { "version": "1.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, "node_modules/async-mutex": { "version": "0.2.6", @@ -7462,14 +7267,10 @@ "tslib": "^2.0.0" } }, - "node_modules/async-mutex/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/asynckit": { "version": "0.4.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/atomic-sleep": { "version": "1.0.0", @@ -7480,9 +7281,12 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -7492,27 +7296,53 @@ }, "node_modules/aws-sign2": { "version": "0.7.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "engines": { "node": "*" } }, "node_modules/aws4": { - "version": "1.11.0", - "license": "MIT" + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" }, "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" } }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", @@ -7524,64 +7354,52 @@ "node": ">=8" } }, - "node_modules/babel-plugin-module-resolver": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", - "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, - "peer": true, "dependencies": { - "find-babel-config": "^2.0.0", - "glob": "^8.0.3", - "pkg-up": "^3.1.0", - "reselect": "^4.1.7", - "resolve": "^1.22.1" + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" }, "engines": { - "node": ">= 16" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0" + "node": ">=8" } }, - "node_modules/babel-plugin-module-resolver/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, - "peer": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/babel-plugin-module-resolver/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "node_modules/babel-plugin-module-resolver": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", + "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", "dev": true, "peer": true, "dependencies": { - "brace-expansion": "^2.0.1" + "find-babel-config": "^2.0.0", + "glob": "^8.0.3", + "pkg-up": "^3.1.0", + "reselect": "^4.1.7", + "resolve": "^1.22.1" }, "engines": { - "node": ">=10" + "node": ">= 16" } }, "node_modules/babel-plugin-module-resolver/node_modules/reselect": { @@ -7593,8 +7411,9 @@ }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", @@ -7613,9 +7432,26 @@ "@babel/core": "^7.0.0" } }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/babel-runtime": { "version": "6.26.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", "dependencies": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" @@ -7623,11 +7459,13 @@ }, "node_modules/babel-runtime/node_modules/regenerator-runtime": { "version": "0.11.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" }, "node_modules/balanced-match": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/balloon-css": { "version": "0.5.2", @@ -7636,13 +7474,16 @@ }, "node_modules/base-x": { "version": "3.0.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", "dependencies": { "safe-buffer": "^5.0.1" } }, "node_modules/base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "funding": [ { "type": "github", @@ -7656,29 +7497,47 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dependencies": { "tweetnacl": "^0.14.3" } }, + "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, "node_modules/bech32": { - "version": "1.1.4", - "license": "MIT" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", + "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" }, - "node_modules/bigint-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", - "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.3.0" - }, - "engines": { + "node_modules/big.js": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.2.1.tgz", + "integrity": "sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ==", + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, + "node_modules/bigint-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bigint-buffer/-/bigint-buffer-1.1.5.tgz", + "integrity": "sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.3.0" + }, + "engines": { "node": ">= 10.0.0" } }, @@ -7705,7 +7564,8 @@ }, "node_modules/bindings": { "version": "1.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", "dependencies": { "file-uri-to-path": "1.0.0" } @@ -7730,57 +7590,56 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/bl": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", - "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", - "dependencies": { - "buffer": "^6.0.3", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "node_modules/blakejs": { "version": "1.2.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" }, "node_modules/bluebird": { "version": "3.7.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/bn.js": { "version": "5.2.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, "node_modules/body-parser": { - "version": "1.19.2", - "license": "MIT", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.7", - "raw-body": "2.4.3", - "type-is": "~1.6.18" + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, "node_modules/body-parser/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/body-parser/node_modules/iconv-lite": { "version": "0.4.24", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -7790,7 +7649,22 @@ }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/borsh": { "version": "0.7.0", @@ -7803,17 +7677,17 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { "version": "3.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dependencies": { "fill-range": "^7.0.1" }, @@ -7823,11 +7697,13 @@ }, "node_modules/brorand": { "version": "1.1.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, "node_modules/browserify-aes": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dependencies": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -7838,9 +7714,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -7857,10 +7733,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -7871,14 +7747,16 @@ }, "node_modules/bs58": { "version": "4.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "dependencies": { "base-x": "^3.0.2" } }, "node_modules/bs58check": { "version": "2.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dependencies": { "bs58": "^4.0.0", "create-hash": "^1.1.0", @@ -7887,8 +7765,9 @@ }, "node_modules/bser": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" } @@ -7918,8 +7797,9 @@ }, "node_modules/buffer-from": { "version": "1.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "node_modules/buffer-to-arraybuffer": { "version": "0.0.5", @@ -7928,12 +7808,13 @@ }, "node_modules/buffer-xor": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" }, "node_modules/bufferutil": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", - "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", "hasInstallScript": true, "dependencies": { "node-gyp-build": "^4.3.0" @@ -7943,16 +7824,20 @@ } }, "node_modules/builtin-modules": { - "version": "1.1.1", - "dev": true, - "license": "MIT", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "engines": { - "node": ">=0.10.0" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/bytes": { "version": "3.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "engines": { "node": ">= 0.8" } @@ -7966,9 +7851,9 @@ } }, "node_modules/cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", @@ -7982,14 +7867,33 @@ "node": ">=8" } }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7997,23 +7901,25 @@ }, "node_modules/callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase": { "version": "5.3.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "engines": { "node": ">=6" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001521", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001521.tgz", - "integrity": "sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ==", + "version": "1.0.30001597", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz", + "integrity": "sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==", "dev": true, "funding": [ { @@ -8032,11 +7938,13 @@ }, "node_modules/caseless": { "version": "0.12.0", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, "node_modules/chalk": { "version": "4.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -8048,54 +7956,11 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/chalk/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/chalk/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/chalk/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/char-regex": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } @@ -8123,9 +7988,21 @@ "fsevents": "~2.3.2" } }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/chownr": { "version": "1.1.4", - "license": "ISC" + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "node_modules/ci-info": { "version": "3.9.0", @@ -8142,50 +8019,33 @@ "node": ">=8" } }, - "node_modules/cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "deprecated": "This module has been superseded by the multiformats module", - "dependencies": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - }, - "engines": { - "node": ">=4.0.0", - "npm": ">=3.0.0" - } - }, - "node_modules/cids/node_modules/uint8arrays": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", - "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "dependencies": { - "multiformats": "^9.4.2" - } - }, "node_modules/cipher-base": { "version": "1.0.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "node_modules/citty": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.5.tgz", - "integrity": "sha512-AS7n5NSc0OQVMV9v6wt3ByujNIrne0/cTjiC2MYqhvao57VNfiuVksTSr2p17nVOhEr2KtqiAkGwHcgMC/qUuQ==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", "dependencies": { "consola": "^3.2.3" } }, + "node_modules/cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true + }, "node_modules/classnames": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", - "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" }, "node_modules/clipboardy": { "version": "4.0.0", @@ -8203,81 +8063,226 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "node_modules/clipboardy/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dependencies": { - "mimic-response": "^1.0.0" + "node_modules/clipboardy/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "engines": { + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/clsx": { - "version": "1.1.1", - "license": "MIT", + "node_modules/clipboardy/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "engines": { - "node": ">=6" + "node": ">=16.17.0" } }, - "node_modules/cluster-key-slot": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", - "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "node_modules/clipboardy/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "engines": { - "node": ">=0.10.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/co": { - "version": "4.6.0", - "dev": true, - "license": "MIT", + "node_modules/clipboardy/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", + "node_modules/clipboardy/node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dependencies": { - "color-name": "1.1.3" + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "license": "MIT", + "node_modules/clipboardy/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dependencies": { - "delayed-stream": "~1.0.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">= 0.8" - } + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clipboardy/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clipboardy/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/clipboardy/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } }, "node_modules/command-line-args": { "version": "5.2.1", @@ -8309,6 +8314,18 @@ "node": ">=8.0.0" } }, + "node_modules/command-line-usage/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/command-line-usage/node_modules/array-back": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", @@ -8332,6 +8349,21 @@ "node": ">=4" } }, + "node_modules/command-line-usage/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/command-line-usage/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, "node_modules/command-line-usage/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -8341,6 +8373,27 @@ "node": ">=0.8.0" } }, + "node_modules/command-line-usage/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/command-line-usage/node_modules/typical": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", @@ -8352,26 +8405,30 @@ }, "node_modules/commander": { "version": "2.20.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "node_modules/commondir": { "version": "1.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/connected-react-router": { - "version": "6.9.1", - "license": "MIT", + "version": "6.9.3", + "resolved": "https://registry.npmjs.org/connected-react-router/-/connected-react-router-6.9.3.tgz", + "integrity": "sha512-4ThxysOiv/R2Dc4Cke1eJwjKwH1Y51VDwlOrOfs1LjpdYOVvCNjNkZDayo7+sx42EeGJPQUNchWkjAIJdXGIOQ==", "dependencies": { "lodash.isequalwith": "^4.4.0", "prop-types": "^15.7.2" }, "optionalDependencies": { - "immutable": "^3.8.1 || ^4.0.0-rc.1", + "immutable": "^3.8.1 || ^4.0.0", "seamless-immutable": "^7.1.3" }, "peerDependencies": { @@ -8392,7 +8449,8 @@ }, "node_modules/content-disposition": { "version": "0.5.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dependencies": { "safe-buffer": "5.2.1" }, @@ -8401,28 +8459,23 @@ } }, "node_modules/content-type": { - "version": "1.0.4", - "license": "MIT", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } }, "node_modules/convert-source-map": { - "version": "1.8.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/convert-source-map/node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true }, "node_modules/cookie": { - "version": "0.4.2", - "license": "MIT", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "engines": { "node": ">= 0.6" } @@ -8434,7 +8487,8 @@ }, "node_modules/cookie-signature": { "version": "1.0.6", - "license": "MIT" + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/cookiejar": { "version": "2.1.4", @@ -8443,13 +8497,16 @@ }, "node_modules/core-js": { "version": "2.6.12", - "hasInstallScript": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true }, "node_modules/core-js-pure": { - "version": "3.21.1", + "version": "3.36.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.36.0.tgz", + "integrity": "sha512-cN28qmhRNgbMZZMc/RFu5w8pK9VJzpb2rJVR/lHuZJKwmXnoWOpXmMkxqBB514igkp1Hu8WGROsiOAzUcKdHOQ==", "hasInstallScript": true, - "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" @@ -8457,7 +8514,8 @@ }, "node_modules/core-util-is": { "version": "1.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, "node_modules/cors": { "version": "2.8.5", @@ -8480,10 +8538,40 @@ "protobufjs": "~6.11.2" } }, + "node_modules/cosmjs-types/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "node_modules/cosmjs-types/node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, "node_modules/countup.js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.3.0.tgz", - "integrity": "sha512-O341AtF3vBcnXOpMWAT3X+wokiRa4KXNSmfEw7fFR9OdD8zTGTzRDD8vg4AQzhpLIaZoKGH5w1O3cTeZERVy6Q==" + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.8.0.tgz", + "integrity": "sha512-f7xEhX0awl4NOElHulrl4XRfKoNH3rB+qfNSZZyjSZhaAoUk6elvhH+MNxMmlmuUJ2/QNTWPSA7U4mNtIAKljQ==" }, "node_modules/crc-32": { "version": "1.2.2", @@ -8498,7 +8586,8 @@ }, "node_modules/create-hash": { "version": "1.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dependencies": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -8509,7 +8598,8 @@ }, "node_modules/create-hmac": { "version": "1.1.7", - "license": "MIT", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dependencies": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -8540,1319 +8630,1308 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", - "dev": true, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node-fetch": "^2.6.12" } }, - "node_modules/create-jest/node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dev": true, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 8" } }, - "node_modules/create-jest/node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "node_modules/crossws": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.2.4.tgz", + "integrity": "sha512-DAxroI2uSOgUKLz00NX6A8U/8EE3SZHmIND+10jkVSaypvyt57J5JEOxAQOL6lQxyzi/wZbTIwssU1uy69h5Vg==", + "peerDependencies": { + "uWebSockets.js": "*" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "peerDependenciesMeta": { + "uWebSockets.js": { + "optional": true + } } }, - "node_modules/create-jest/node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "node_modules/crypto-js": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", + "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==" + }, + "node_modules/css-mediaquery": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/css-mediaquery/-/css-mediaquery-0.1.2.tgz", + "integrity": "sha512-COtn4EROW5dBGlE/4PiKnh6rZpAPxDeFLaEEwt4i10jpDMFt2EhQGS79QmmrO+iKCHv0PU/HrOWEhijFd1x99Q==" + }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true + }, + "node_modules/cssom": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", + "dev": true + }, + "node_modules/cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" + "cssom": "~0.3.6" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/create-jest/node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "node_modules/cssstyle/node_modules/cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "node_modules/customize-cra": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/customize-cra/-/customize-cra-1.0.0.tgz", + "integrity": "sha512-DbtaLuy59224U+xCiukkxSq8clq++MOtJ1Et7LED1fLszWe88EoblEYFBJ895sB1mC6B4uu3xPT/IjClELhMbA==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" + "lodash.flow": "^3.5.0" + } + }, + "node_modules/d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "dependencies": { + "es5-ext": "^0.10.64", + "type": "^2.7.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=0.12" } }, - "node_modules/create-jest/node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "internmap": "1 - 2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/create-jest/node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dev": true, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" + "d3-color": "1 - 3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/create-jest/node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/create-jest/node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", - "dev": true, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", "dependencies": { - "type-detect": "4.0.8" + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" } }, - "node_modules/create-jest/node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", "dependencies": { - "@sinonjs/commons": "^3.0.0" + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" } }, - "node_modules/create-jest/node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", - "dev": true, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" + "d3-time": "1 - 3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" + "node": ">=12" } }, - "node_modules/create-jest/node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", - "dev": true, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" + "assert-plus": "^1.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=0.10" } }, - "node_modules/create-jest/node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "node_modules/data-urls": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">=12" } }, - "node_modules/create-jest/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dependencies": { + "@babel/runtime": "^7.21.0" + }, "engines": { - "node": ">=10" + "node": ">=0.11" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/create-jest/node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } }, - "node_modules/create-jest/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "node_modules/dayjs": { + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" }, - "node_modules/create-jest/node_modules/dedent": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", - "dev": true, - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" + "node_modules/dayzed": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/dayzed/-/dayzed-3.2.3.tgz", + "integrity": "sha512-qXTIKs+R6ydWwNo+X1wu3lUptyRSGoyY+ZzRcQSM0zUlaG+/Ei+bFjqbQm1T2oJ+WKNkTHURBcGsxnx9N+9kfA==", + "dependencies": { + "@babel/runtime": "^7.6.2", + "date-fns": "^2.0.0" }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } + "peerDependencies": { + "prop-types": "^15", + "react": "^16.8 || ^17.0 || ^18.0" } }, - "node_modules/create-jest/node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" + "node_modules/dcl-catalyst-client": { + "version": "21.5.5", + "resolved": "https://registry.npmjs.org/dcl-catalyst-client/-/dcl-catalyst-client-21.5.5.tgz", + "integrity": "sha512-VXIypnUl4czyo+vTH0L082YgTqA5fKu/1Y5yusZ7bhuUs/uxgNsGSc35blqjUY67GaG4R7XaSOwn6jA3dzxPfg==", + "dependencies": { + "@dcl/catalyst-contracts": "^4.0.2", + "@dcl/crypto": "^3.4.0", + "@dcl/hashing": "^3.0.0", + "@dcl/schemas": "^9.0.0", + "@well-known-components/fetch-component": "^2.0.0", + "cookie": "^0.5.0", + "cross-fetch": "^3.1.5", + "form-data": "^4.0.0" } }, - "node_modules/create-jest/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" + "node_modules/dcl-catalyst-client/node_modules/@dcl/schemas": { + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-9.15.0.tgz", + "integrity": "sha512-nip5rsOcJplNfBWeImwezuHLprM0gLW03kEeqGIvT9J6HnEBTtvIwkk9+NSt7hzFKEvWGI+C23vyNWbG3nU+SQ==", + "dependencies": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" } }, - "node_modules/create-jest/node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", - "dev": true, + "node_modules/dcl-catalyst-commons": { + "version": "9.0.22", + "resolved": "https://registry.npmjs.org/dcl-catalyst-commons/-/dcl-catalyst-commons-9.0.22.tgz", + "integrity": "sha512-toHVwHP8jtzCqJHoCdiDNAs+AJysNDIDy6KUny4uRA/VC0fMU4DpOLrB+SN/0YIBaNBY+0VnWbmxcwCyG0057g==", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "@dcl/schemas": "^6.4.2", + "abort-controller": "^3.0.0", + "cookie": "^0.4.1", + "cross-fetch": "^3.1.4", + "ms": "^2.1.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=14.0.0", + "npm": ">=7.0.0" } }, - "node_modules/create-jest/node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, + "node_modules/dcl-catalyst-commons/node_modules/@dcl/schemas": { + "version": "6.19.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-6.19.0.tgz", + "integrity": "sha512-S8lrq8L1vriVXkBzeycxppjbfgJ5XofA9pbCKdteJR+79r6Dn5oLo3t5g7RcMQDihdjWdDLbbwxlEAkPgmvc8w==", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0" + } + }, + "node_modules/dcl-catalyst-commons/node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } + "node": ">= 0.6" } }, - "node_modules/create-jest/node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", - "dev": true, + "node_modules/dcl-crypto": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/dcl-crypto/-/dcl-crypto-2.3.0.tgz", + "integrity": "sha512-ypsd4XjSWaOj0DtESxpnY+YYQBy43c/uUrNRaVnWGiJehQc+3EC7nONnCy3p8XcLspGAwtes7nwWtRnsNKFvVQ==", "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "eth-crypto": "^1.5.1", + "web3x": "^4.0.6" } }, - "node_modules/create-jest/node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "node_modules/dcl-tslint-config-standard": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dcl-tslint-config-standard/-/dcl-tslint-config-standard-3.0.0.tgz", + "integrity": "sha512-6oDLMtVWvcJD8VwWPzqR8K/RwtQHl2H92m6kyQbJb79a/eJzUb4HKSrsnjPEsGZY6zUZ2QNZBTXVN3j5l+2SBg==", "dev": true, "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "tslint-clean-code": "^0.2.5", + "tslint-eslint-rules": "^5.1.0", + "tslint-no-circular-imports": "^0.2.1" } }, - "node_modules/create-jest/node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "node_modules/dcl-tslint-config-standard/node_modules/doctrine": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz", + "integrity": "sha512-qiB/Rir6Un6Ad/TIgTRzsremsTGWzs8j7woXvp14jgq00676uBiBT5eUOi+FgRywZFVy5Us/c04ISRpZhRbS6w==", "dev": true, "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "esutils": "^1.1.6", + "isarray": "0.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=0.10.0" } }, - "node_modules/create-jest/node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "node_modules/dcl-tslint-config-standard/node_modules/esutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz", + "integrity": "sha512-RG1ZkUT7iFJG9LSHr7KDuuMSlujfeTtMNIcInURxKAxhMtwQhI3NrQhz26gZQYlsYZQKzsnwtpKrFKj9K9Qu1A==", "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "node": ">=0.10.0" } }, - "node_modules/create-jest/node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "node_modules/dcl-tslint-config-standard/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "node_modules/dcl-tslint-config-standard/node_modules/tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==", + "dev": true + }, + "node_modules/dcl-tslint-config-standard/node_modules/tslint-eslint-rules": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/tslint-eslint-rules/-/tslint-eslint-rules-5.4.0.tgz", + "integrity": "sha512-WlSXE+J2vY/VPgIcqQuijMQiel+UtmXS+4nvK4ZzlDiqBfXse8FAvkNnTcYhnQyOTW5KFM+uRRGXxYhFpuBc6w==", "dev": true, "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "doctrine": "0.7.2", + "tslib": "1.9.0", + "tsutils": "^3.0.0" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "peerDependencies": { + "tslint": "^5.0.0", + "typescript": "^2.2.0 || ^3.0.0" } }, - "node_modules/create-jest/node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "node_modules/dcl-tslint-config-standard/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" + "tslib": "^1.8.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-jest/node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-jest/node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" + "node": ">= 6" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, - "node_modules/create-jest/node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "node_modules/dcl-tslint-config-standard/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=4.2.0" } }, - "node_modules/create-jest/node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", - "dev": true, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" + "ms": "2.1.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-jest/node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" + "node": ">=6.0" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/create-jest/node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=0.10.0" } }, - "node_modules/create-jest/node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", - "dev": true, + "node_modules/decentraland-connect": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/decentraland-connect/-/decentraland-connect-6.2.0.tgz", + "integrity": "sha512-+YEIPbz8+9DzhjvXlvSqW9eGULept0S06GZA10+vWnLMk1X02qrSYA09d8am8NxsEEoqJ4bZx4Jdsq8lJYPj1g==", "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@dcl/schemas": "^10.2.0", + "@dcl/single-sign-on-client": "^0.1.0", + "@magic-ext/oauth": "^15.5.0", + "@walletconnect/ethereum-provider": "^2.9.2", + "@walletconnect/modal": "^2.6.1", + "@web3-react/fortmatic-connector": "^6.1.6", + "@web3-react/injected-connector": "^6.0.7", + "@web3-react/network-connector": "^6.1.3", + "@web3-react/walletlink-connector": "^6.2.13", + "ethers": "^6.9.1", + "magic-sdk": "^21.4.1", + "socket.io-client": "^4.7.2", + "tslib": "^2.6.2" } }, - "node_modules/create-jest/node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, + "node_modules/decentraland-connect/node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" + }, + "node_modules/decentraland-connect/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "@noble/hashes": "1.3.2" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/create-jest/node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, + "node_modules/decentraland-connect/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", "engines": { - "node": ">=10" + "node": ">= 16" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://paulmillr.com/funding/" } }, - "node_modules/create-jest/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, + "node_modules/decentraland-connect/node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + }, + "node_modules/decentraland-connect/node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + }, + "node_modules/decentraland-connect/node_modules/ethers": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.11.1.tgz", + "integrity": "sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "yocto-queue": "^0.1.0" + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.5.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=14.0.0" } }, - "node_modules/create-jest/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/create-jest/node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } + "node_modules/decentraland-connect/node_modules/ethers/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, - "node_modules/create-jest/node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, + "node_modules/decentraland-connect/node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", "engines": { - "node": ">=8" + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/create-jest/node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, + "node_modules/decentraland-crypto-fetch": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/decentraland-crypto-fetch/-/decentraland-crypto-fetch-1.0.3.tgz", + "integrity": "sha512-C7tNyQVW1mbcJS5pt9ohzeMl59W1PMXHfp/DdXhAZrVJ9QW6t43BESTV5lL7XqxY7DO7G1uhKOMWiORFR+EhQw==", "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" + "core-js-pure": "^3.19.1", + "dcl-crypto": "^2.3.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=12", + "npm": ">=6" } }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "license": "MIT", + "node_modules/decentraland-dapps": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-19.0.2.tgz", + "integrity": "sha512-6XVHnAv9m4/UUEwJIi9l30srTn32UUHxphF7ja0b6QpndU3Fd2w46FxlHr1edj0bWwxp9I2/PSHB6q+YfRQGow==", "dependencies": { - "node-fetch": "2.6.7" + "@0xsequence/multicall": "^0.25.1", + "@0xsequence/relayer": "^0.25.1", + "@dcl/crypto": "^3.3.1", + "@dcl/schemas": "^10.2.0", + "@dcl/single-sign-on-client": "^0.1.0", + "@dcl/ui-env": "^1.5.0", + "@transak/transak-sdk": "^1.0.31", + "@types/flat": "0.0.28", + "@well-known-components/fetch-component": "^2.0.1", + "@wert-io/widget-initializer": "^5.2.0", + "axios": "^0.21.1", + "date-fns": "^1.29.0", + "dcl-catalyst-client": "^21.1.0", + "decentraland-connect": "^6.2.0", + "decentraland-crypto-fetch": "^2.0.1", + "decentraland-transactions": "^2.3.1", + "decentraland-ui": "^5.8.0", + "ethers": "^5.6.8", + "events": "^3.3.0", + "flat": "^5.0.2", + "pusher-js": "^8.0.1", + "react-intl": "^5.20.7", + "redux-persistence": "^1.2.0", + "redux-persistence-engine-localstorage": "^1.0.0", + "redux-storage-decorator-filter": "^1.1.8", + "typesafe-actions": "^2.0.3", + "uuid": "^9.0.1" + }, + "engines": { + "npm": "^8.0.0 || ^9.0.0" + }, + "peerDependencies": { + "connected-react-router": "^6.9.1", + "history": "^4.10.1", + "react": "^17.0.2", + "react-redux": "^7.2.4", + "react-router": "^5.3.4", + "redux": "^4.1.0", + "redux-saga": "^1.1.3" } }, - "node_modules/cross-fetch/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "node_modules/decentraland-dapps/node_modules/@formatjs/intl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.2.1.tgz", + "integrity": "sha512-vgvyUOOrzqVaOFYzTf2d3+ToSkH2JpR7x/4U1RyoHQLmvEaTQvXJ7A2qm1Iy3brGNXC/+/7bUlc3lpH+h/LOJA==", "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" + "@formatjs/ecma402-abstract": "1.11.4", + "@formatjs/fast-memoize": "1.2.1", + "@formatjs/icu-messageformat-parser": "2.1.0", + "@formatjs/intl-displaynames": "5.4.3", + "@formatjs/intl-listformat": "6.5.3", + "intl-messageformat": "9.13.0", + "tslib": "^2.1.0" }, "peerDependencies": { - "encoding": "^0.1.0" + "typescript": "^4.5" }, "peerDependenciesMeta": { - "encoding": { + "typescript": { "optional": true } } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "license": "MIT", + "node_modules/decentraland-dapps/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" + "follow-redirects": "^1.14.0" } }, - "node_modules/crossws": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.1.1.tgz", - "integrity": "sha512-c9c/o7bS3OjsdpSkvexpka0JNlesBF2JU9B2V1yNsYGwRbAafxhJQ7VI9b48D5bpONz/oxbPGMzBojy9sXoQIQ==" - }, - "node_modules/crypto-js": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", - "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==" - }, - "node_modules/css-mediaquery": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/css-mediaquery/-/css-mediaquery-0.1.2.tgz", - "integrity": "sha512-COtn4EROW5dBGlE/4PiKnh6rZpAPxDeFLaEEwt4i10jpDMFt2EhQGS79QmmrO+iKCHv0PU/HrOWEhijFd1x99Q==" - }, - "node_modules/css-unit-converter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.2.tgz", - "integrity": "sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA==" - }, - "node_modules/css.escape": { - "version": "1.5.1", - "dev": true, - "license": "MIT" - }, - "node_modules/cssom": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", - "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", - "dev": true + "node_modules/decentraland-dapps/node_modules/date-fns": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", + "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" }, - "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, + "node_modules/decentraland-dapps/node_modules/decentraland-crypto-fetch": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/decentraland-crypto-fetch/-/decentraland-crypto-fetch-2.0.1.tgz", + "integrity": "sha512-2IKu6Y4k/fle8bmU0b4zy7V1i1R0oCXtqlJumBXc4jwHUHKAcHDLD2YtgJFdd7JjsWQwf+t0DsKpzBCjQDKANg==", "dependencies": { - "cssom": "~0.3.6" + "@dcl/crypto": "^3.3.1", + "core-js-pure": "^3.19.1" }, "engines": { - "node": ">=8" + "node": ">=12", + "npm": ">=6" } }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - }, - "node_modules/csstype": { - "version": "3.0.11", - "license": "MIT" - }, - "node_modules/customize-cra": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/customize-cra/-/customize-cra-1.0.0.tgz", - "integrity": "sha512-DbtaLuy59224U+xCiukkxSq8clq++MOtJ1Et7LED1fLszWe88EoblEYFBJ895sB1mC6B4uu3xPT/IjClELhMbA==", - "dev": true, + "node_modules/decentraland-dapps/node_modules/react-intl": { + "version": "5.25.1", + "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-5.25.1.tgz", + "integrity": "sha512-pkjdQDvpJROoXLMltkP/5mZb0/XqrqLoPGKUCfbdkP8m6U9xbK40K51Wu+a4aQqTEvEK5lHBk0fWzUV72SJ3Hg==", "dependencies": { - "lodash.flow": "^3.5.0" + "@formatjs/ecma402-abstract": "1.11.4", + "@formatjs/icu-messageformat-parser": "2.1.0", + "@formatjs/intl": "2.2.1", + "@formatjs/intl-displaynames": "5.4.3", + "@formatjs/intl-listformat": "6.5.3", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/react": "16 || 17 || 18", + "hoist-non-react-statics": "^3.3.2", + "intl-messageformat": "9.13.0", + "tslib": "^2.1.0" + }, + "peerDependencies": { + "react": "^16.3.0 || 17 || 18", + "typescript": "^4.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/d": { - "version": "1.0.1", - "license": "ISC", - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "node_modules/decentraland-dapps/node_modules/typesafe-actions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/typesafe-actions/-/typesafe-actions-2.2.0.tgz", + "integrity": "sha512-qjrFDl6S2yejKEz0M2c3c5D5z8sGJTjma94O9kRHStiqauXP9dKUM0Nbdmn90HCZBZl3jzFNT21bOtxRfCkc0w==", + "engines": { + "node": ">= 4" } }, - "node_modules/d3-array": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.2.tgz", - "integrity": "sha512-yEEyEAbDrF8C6Ob2myOBLjwBLck1Z89jMGFee0oPsn95GqjerpaOA4ch+vc2l0FNFFwMD5N7OCSEN5eAlsUbgQ==", - "dependencies": { - "internmap": "1 - 2" + "node_modules/decentraland-dapps/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "optional": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=12" + "node": ">=4.2.0" } }, - "node_modules/d3-color": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", - "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", - "engines": { - "node": ">=12" + "node_modules/decentraland-transactions": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-2.3.1.tgz", + "integrity": "sha512-0CPwk9G89XxMlRUII4e3vqpRwabfeQ1mpym3VP3bU4SCWvzslcN8qUqcuhwLtJRtdKRNh39bb3Ylxld0a83NIw==", + "dependencies": { + "@0xsquid/sdk": "^2.8.9", + "@0xsquid/squid-types": "^0.1.51", + "decentraland-connect": "^6.2.0", + "tslib": "^2.6.2" + }, + "peerDependencies": { + "@dcl/schemas": ">=1.1.1" } }, - "node_modules/d3-ease": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", - "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "node_modules/decentraland-ui": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/decentraland-ui/-/decentraland-ui-5.10.0.tgz", + "integrity": "sha512-3Bcr3xIlDkgfKE/V/ARuowRwzOsVVZYbalK0ifBeUzAMeGNjTwctV8w/wfxuk+bbkpJ3Of9oZSNVUSVxKsnqug==", + "dependencies": { + "@dcl/schemas": "^10.2.0", + "@dcl/ui-env": "^1.4.0", + "balloon-css": "^0.5.0", + "classnames": "^2.3.2", + "dayjs": "^1.11.10", + "deep-equal": "^2.0.5", + "ethereum-blockies": "^0.1.1", + "events": "^3.3.0", + "fp-future": "^1.0.1", + "parallax-js": "^3.1.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0", + "react-responsive": "^9.0.0-beta.3", + "react-semantic-ui-datepickers": "^2.17.2", + "react-tile-map": "^0.4.1", + "recharts": "^2.3.2", + "semantic-ui-css": "^2.4.1", + "semantic-ui-react": "^2.0.3", + "uuid": "^9.0.1" + }, "engines": { - "node": ">=12" + "node": "18" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } } }, - "node_modules/d3-format": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", - "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true + }, + "node_modules/decimal.js-light": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", + "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==" + }, + "node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "engines": { - "node": ">=12" + "node": ">=0.10" } }, - "node_modules/d3-interpolate": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", - "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dependencies": { - "d3-color": "1 - 3" + "mimic-response": "^3.1.0" }, "engines": { - "node": ">=12" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/d3-path": { + "node_modules/decompress-response/node_modules/mimic-response": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", - "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "engines": { - "node": ">=12" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/d3-scale": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", - "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", - "dependencies": { - "d3-array": "2.10.0 - 3", - "d3-format": "1 - 3", - "d3-interpolate": "1.2.0 - 3", - "d3-time": "2.1.1 - 3", - "d3-time-format": "2 - 4" + "node_modules/dedent": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" }, - "engines": { - "node": ">=12" + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } } }, - "node_modules/d3-shape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", - "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "node_modules/deep-diff": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", + "integrity": "sha512-yVn6RZmHiGnxRKR9sJb3iVV2XTF1Ghh2DiWRZ3dMnGc43yUdWWF/kX6lQyk3+P84iprfWKU/8zFTrlkvtFm1ug==" + }, + "node_modules/deep-equal": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", "dependencies": { - "d3-path": "^3.1.0" + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" }, "engines": { - "node": ">=12" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/d3-time": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", - "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", - "dependencies": { - "d3-array": "2 - 3" - }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, "engines": { - "node": ">=12" + "node": ">=4.0.0" } }, - "node_modules/d3-time-format": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", - "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", - "dependencies": { - "d3-time": "1 - 3" - }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "engines": { - "node": ">=12" + "node": ">=0.10.0" } }, - "node_modules/d3-timer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", - "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "license": "MIT", + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dependencies": { - "assert-plus": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { - "node": ">=0.10" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/data-urls": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", - "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", - "dev": true, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { - "node": ">=12" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/data-urls/node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" - }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==" + }, + "node_modules/delay": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", "engines": { - "node": ">=12" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/data-urls/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "engines": { - "node": ">=12" + "node": ">=0.4.0" } }, - "node_modules/data-urls/node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "engines": { - "node": ">=12" + "node": ">=0.10" } }, - "node_modules/date-fns": { - "version": "2.29.3", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz", - "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==", + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" + "node": ">= 0.8" } }, - "node_modules/dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" + "node_modules/destr": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", + "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==" }, - "node_modules/dayzed": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/dayzed/-/dayzed-3.2.3.tgz", - "integrity": "sha512-qXTIKs+R6ydWwNo+X1wu3lUptyRSGoyY+ZzRcQSM0zUlaG+/Ei+bFjqbQm1T2oJ+WKNkTHURBcGsxnx9N+9kfA==", - "dependencies": { - "@babel/runtime": "^7.6.2", - "date-fns": "^2.0.0" - }, - "peerDependencies": { - "prop-types": "^15", - "react": "^16.8 || ^17.0 || ^18.0" + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/dcl-catalyst-client": { - "version": "21.5.0", - "resolved": "https://registry.npmjs.org/dcl-catalyst-client/-/dcl-catalyst-client-21.5.0.tgz", - "integrity": "sha512-bLfovKM/j828q/urvlBAGzPCdBF5JbYQdBqycmAvHFJf8uCGxuP5KABdYxqO4rNz635rJH7RbWdN6vMBuv9ewg==", - "dependencies": { - "@dcl/catalyst-contracts": "^4.0.2", - "@dcl/crypto": "^3.4.0", - "@dcl/hashing": "^2.0.0", - "@dcl/schemas": "^8.1.0", - "@well-known-components/fetch-component": "^2.0.0", - "cookie": "^0.5.0", - "cross-fetch": "^3.1.5", - "form-data": "^4.0.0" + "node_modules/detect-browser": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", + "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==" + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" } }, - "node_modules/dcl-catalyst-client/node_modules/@dcl/schemas": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-8.2.2.tgz", - "integrity": "sha512-IZqcT1YOKxw5XWs6LW6Uw+7Ue5vHCVERPMwefAdt26jW1OTH818od0rBc1tQzzfBTwsrAvbgFJvpbZedieu00g==", - "dependencies": { - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-keywords": "^5.1.0" + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" } }, - "node_modules/dcl-catalyst-client/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" } }, - "node_modules/dcl-catalyst-client/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "peerDependencies": { - "ajv": "^8.0.1" + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/dcl-catalyst-client/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==" + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.3" + "path-type": "^4.0.0" }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/dcl-catalyst-client/node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/dcl-catalyst-commons": { - "version": "9.0.16", - "resolved": "https://registry.npmjs.org/dcl-catalyst-commons/-/dcl-catalyst-commons-9.0.16.tgz", - "integrity": "sha512-bfHUJCcaS0yX64A6CXF5t6Ld+LrYWMFF/wyM+5lPsbHaTgojo/fpLP0rfFg0GxVzglTo1jYOXhc0KuDcPeiMsg==", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, "dependencies": { - "@dcl/schemas": "^6.4.2", - "abort-controller": "^3.0.0", - "cookie": "^0.4.1", - "cross-fetch": "^3.1.4", - "ms": "^2.1.2" + "esutils": "^2.0.2" }, "engines": { - "node": ">=14.0.0", - "npm": ">=7.0.0" + "node": ">=6.0.0" } }, - "node_modules/dcl-catalyst-commons/node_modules/@dcl/schemas": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-6.19.0.tgz", - "integrity": "sha512-S8lrq8L1vriVXkBzeycxppjbfgJ5XofA9pbCKdteJR+79r6Dn5oLo3t5g7RcMQDihdjWdDLbbwxlEAkPgmvc8w==", + "node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", "dependencies": { - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-keywords": "^5.1.0" + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" } }, - "node_modules/dcl-catalyst-commons/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "node_modules/dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==" + }, + "node_modules/domexception": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", + "deprecated": "Use your platform's native DOMException instead", + "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "webidl-conversions": "^7.0.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "engines": { + "node": ">=12" } }, - "node_modules/dcl-catalyst-commons/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "peerDependencies": { - "ajv": "^8.0.1" + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, - "node_modules/dcl-catalyst-commons/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "node_modules/dprop": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dprop/-/dprop-1.0.0.tgz", + "integrity": "sha512-CNrGk9cBoRzsLtyGRTcjsYh0n63nLtnWelCV31DlEK/yftX05rLK7qb9et891DYLUwhadlh/lOxq7W/+8XA2pQ==" + }, + "node_modules/drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", "dependencies": { - "fast-deep-equal": "^3.1.3" + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" }, - "peerDependencies": { - "ajv": "^8.8.2" + "engines": { + "node": ">=0.10" } }, - "node_modules/dcl-crypto": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/dcl-crypto/-/dcl-crypto-2.3.0.tgz", - "integrity": "sha512-ypsd4XjSWaOj0DtESxpnY+YYQBy43c/uUrNRaVnWGiJehQc+3EC7nONnCy3p8XcLspGAwtes7nwWtRnsNKFvVQ==", + "node_modules/duplexify": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", + "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", "dependencies": { - "eth-crypto": "^1.5.1", - "web3x": "^4.0.6" + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.2" } }, - "node_modules/dcl-tslint-config-standard": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dcl-tslint-config-standard/-/dcl-tslint-config-standard-3.0.0.tgz", - "integrity": "sha512-6oDLMtVWvcJD8VwWPzqR8K/RwtQHl2H92m6kyQbJb79a/eJzUb4HKSrsnjPEsGZY6zUZ2QNZBTXVN3j5l+2SBg==", - "dev": true, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dependencies": { - "tslint-clean-code": "^0.2.5", - "tslint-eslint-rules": "^5.1.0", - "tslint-no-circular-imports": "^0.2.1" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, - "node_modules/dcl-tslint-config-standard/node_modules/doctrine": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz", - "integrity": "sha512-qiB/Rir6Un6Ad/TIgTRzsremsTGWzs8j7woXvp14jgq00676uBiBT5eUOi+FgRywZFVy5Us/c04ISRpZhRbS6w==", - "dev": true, + "node_modules/eccrypto": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", + "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", + "hasInstallScript": true, "dependencies": { - "esutils": "^1.1.6", - "isarray": "0.0.1" + "acorn": "7.1.1", + "elliptic": "6.5.4", + "es6-promise": "4.2.8", + "nan": "2.14.0" }, - "engines": { - "node": ">=0.10.0" + "optionalDependencies": { + "secp256k1": "3.7.1" } }, - "node_modules/dcl-tslint-config-standard/node_modules/esutils": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz", - "integrity": "sha512-RG1ZkUT7iFJG9LSHr7KDuuMSlujfeTtMNIcInURxKAxhMtwQhI3NrQhz26gZQYlsYZQKzsnwtpKrFKj9K9Qu1A==", - "dev": true, + "node_modules/eccrypto/node_modules/acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=0.10.0" + "node": ">=0.4.0" } }, - "node_modules/dcl-tslint-config-standard/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "node_modules/dcl-tslint-config-standard/node_modules/tslib": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", - "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==", - "dev": true + "node_modules/eccrypto/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, - "node_modules/dcl-tslint-config-standard/node_modules/tslint-eslint-rules": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/tslint-eslint-rules/-/tslint-eslint-rules-5.4.0.tgz", - "integrity": "sha512-WlSXE+J2vY/VPgIcqQuijMQiel+UtmXS+4nvK4ZzlDiqBfXse8FAvkNnTcYhnQyOTW5KFM+uRRGXxYhFpuBc6w==", - "dev": true, + "node_modules/eccrypto/node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dependencies": { - "doctrine": "0.7.2", - "tslib": "1.9.0", - "tsutils": "^3.0.0" - }, - "peerDependencies": { - "tslint": "^5.0.0", - "typescript": "^2.2.0 || ^3.0.0" - } - }, - "node_modules/dcl-tslint-config-standard/node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/debug": { - "version": "4.3.4", - "license": "MIT", + "node_modules/eccrypto/node_modules/secp256k1": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", + "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", + "hasInstallScript": true, + "optional": true, "dependencies": { - "ms": "2.1.2" + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.4.1", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=4.0.0" } }, - "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "license": "MIT" + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, - "node_modules/decamelize": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "node_modules/electron-to-chromium": { + "version": "1.4.700", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.700.tgz", + "integrity": "sha512-40dqKQ3F7C8fbBEmjSeJ+qEHCKzPyrP9SkeIBZ3wSCUH9nhWStrDz030XlDzlhNhlul1Z0fz7TpDFnsIzo4Jtg==", + "dev": true }, - "node_modules/decentraland-connect": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/decentraland-connect/-/decentraland-connect-6.2.0.tgz", - "integrity": "sha512-+YEIPbz8+9DzhjvXlvSqW9eGULept0S06GZA10+vWnLMk1X02qrSYA09d8am8NxsEEoqJ4bZx4Jdsq8lJYPj1g==", + "node_modules/elliptic": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz", + "integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==", "dependencies": { - "@dcl/schemas": "^10.2.0", - "@dcl/single-sign-on-client": "^0.1.0", - "@magic-ext/oauth": "^15.5.0", - "@walletconnect/ethereum-provider": "^2.9.2", - "@walletconnect/modal": "^2.6.1", - "@web3-react/fortmatic-connector": "^6.1.6", - "@web3-react/injected-connector": "^6.0.7", - "@web3-react/network-connector": "^6.1.3", - "@web3-react/walletlink-connector": "^6.2.13", - "ethers": "^6.9.1", - "magic-sdk": "^21.4.1", - "socket.io-client": "^4.7.2", - "tslib": "^2.6.2" + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/decentraland-connect/node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, "engines": { - "node": ">= 16" + "node": ">=12" }, "funding": { - "url": "https://paulmillr.com/funding/" + "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, - "node_modules/decentraland-connect/node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "node_modules/decentraland-connect/node_modules/aes-js": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + "node_modules/encode-utf8": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", + "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==" }, - "node_modules/decentraland-connect/node_modules/ethers": { - "version": "6.9.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.9.2.tgz", - "integrity": "sha512-YpkrtILnMQz5jSEsJQRTpduaGT/CXuLnUIuOYzHA0v/7c8IX91m2J48wSKjzGL5L9J/Us3tLoUdb+OwE3U+FFQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/ethers-io/" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@adraffy/ens-normalize": "1.10.0", - "@noble/curves": "1.2.0", - "@noble/hashes": "1.3.2", - "@types/node": "18.15.13", - "aes-js": "4.0.0-beta.5", - "tslib": "2.4.0", - "ws": "8.5.0" - }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "engines": { - "node": ">=14.0.0" + "node": ">= 0.8" } }, - "node_modules/decentraland-connect/node_modules/ethers/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dependencies": { + "iconv-lite": "^0.6.2" + } }, - "node_modules/decentraland-connect/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } }, - "node_modules/decentraland-connect/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "node_modules/engine.io-client": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.3.tgz", + "integrity": "sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q==", + "dependencies": { + "@socket.io/component-emitter": "~3.1.0", + "debug": "~4.3.1", + "engine.io-parser": "~5.2.1", + "ws": "~8.11.0", + "xmlhttprequest-ssl": "~2.0.0" + } + }, + "node_modules/engine.io-client/node_modules/ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "engines": { "node": ">=10.0.0" }, @@ -9869,280 +9948,194 @@ } } }, - "node_modules/decentraland-crypto-fetch": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/decentraland-crypto-fetch/-/decentraland-crypto-fetch-1.0.3.tgz", - "integrity": "sha512-C7tNyQVW1mbcJS5pt9ohzeMl59W1PMXHfp/DdXhAZrVJ9QW6t43BESTV5lL7XqxY7DO7G1uhKOMWiORFR+EhQw==", - "dependencies": { - "core-js-pure": "^3.19.1", - "dcl-crypto": "^2.3.0" - }, + "node_modules/engine.io-parser": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz", + "integrity": "sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==", "engines": { - "node": ">=12", - "npm": ">=6" + "node": ">=10.0.0" } }, - "node_modules/decentraland-dapps": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-19.0.2.tgz", - "integrity": "sha512-6XVHnAv9m4/UUEwJIi9l30srTn32UUHxphF7ja0b6QpndU3Fd2w46FxlHr1edj0bWwxp9I2/PSHB6q+YfRQGow==", + "node_modules/enhanced-resolve": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", + "dev": true, "dependencies": { - "@0xsequence/multicall": "^0.25.1", - "@0xsequence/relayer": "^0.25.1", - "@dcl/crypto": "^3.3.1", - "@dcl/schemas": "^10.2.0", - "@dcl/single-sign-on-client": "^0.1.0", - "@dcl/ui-env": "^1.5.0", - "@transak/transak-sdk": "^1.0.31", - "@types/flat": "0.0.28", - "@well-known-components/fetch-component": "^2.0.1", - "@wert-io/widget-initializer": "^5.2.0", - "axios": "^0.21.1", - "date-fns": "^1.29.0", - "dcl-catalyst-client": "^21.1.0", - "decentraland-connect": "^6.2.0", - "decentraland-crypto-fetch": "^2.0.1", - "decentraland-transactions": "^2.3.1", - "decentraland-ui": "^5.8.0", - "ethers": "^5.6.8", - "events": "^3.3.0", - "flat": "^5.0.2", - "pusher-js": "^8.0.1", - "react-intl": "^5.20.7", - "redux-persistence": "^1.2.0", - "redux-persistence-engine-localstorage": "^1.0.0", - "redux-storage-decorator-filter": "^1.1.8", - "typesafe-actions": "^2.0.3", - "uuid": "^9.0.1" + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" }, "engines": { - "npm": "^8.0.0 || ^9.0.0" - }, - "peerDependencies": { - "connected-react-router": "^6.9.1", - "history": "^4.10.1", - "react": "^17.0.2", - "react-redux": "^7.2.4", - "react-router": "^5.3.4", - "redux": "^4.1.0", - "redux-saga": "^1.1.3" - } - }, - "node_modules/decentraland-dapps/node_modules/date-fns": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", - "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" - }, - "node_modules/decentraland-dapps/node_modules/decentraland-crypto-fetch": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/decentraland-crypto-fetch/-/decentraland-crypto-fetch-2.0.1.tgz", - "integrity": "sha512-2IKu6Y4k/fle8bmU0b4zy7V1i1R0oCXtqlJumBXc4jwHUHKAcHDLD2YtgJFdd7JjsWQwf+t0DsKpzBCjQDKANg==", - "dependencies": { - "@dcl/crypto": "^3.3.1", - "core-js-pure": "^3.19.1" - }, - "engines": { - "node": ">=12", - "npm": ">=6" + "node": ">=10.13.0" } }, - "node_modules/decentraland-dapps/node_modules/typesafe-actions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/typesafe-actions/-/typesafe-actions-2.2.0.tgz", - "integrity": "sha512-qjrFDl6S2yejKEz0M2c3c5D5z8sGJTjma94O9kRHStiqauXP9dKUM0Nbdmn90HCZBZl3jzFNT21bOtxRfCkc0w==", + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, "engines": { - "node": ">= 4" + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/decentraland-transactions": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-2.3.1.tgz", - "integrity": "sha512-0CPwk9G89XxMlRUII4e3vqpRwabfeQ1mpym3VP3bU4SCWvzslcN8qUqcuhwLtJRtdKRNh39bb3Ylxld0a83NIw==", + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, "dependencies": { - "@0xsquid/sdk": "^2.8.9", - "@0xsquid/squid-types": "^0.1.51", - "decentraland-connect": "^6.2.0", - "tslib": "^2.6.2" - }, - "peerDependencies": { - "@dcl/schemas": ">=1.1.1" + "is-arrayish": "^0.2.1" } }, - "node_modules/decentraland-transactions/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, - "node_modules/decentraland-ui": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/decentraland-ui/-/decentraland-ui-5.8.0.tgz", - "integrity": "sha512-8s6QCfCZ53dlTwa5R/o5vwGfsmsLOwrU7sOWbhL7iw+iVU1EIqc0k4boCPWhAngei/BQGNrdsShEbiHfUMHJvQ==", + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dependencies": { - "@dcl/schemas": "^10.2.0", - "@dcl/ui-env": "^1.4.0", - "balloon-css": "^0.5.0", - "classnames": "^2.3.2", - "dayjs": "^1.11.10", - "deep-equal": "^2.0.5", - "ethereum-blockies": "^0.1.1", - "events": "^3.3.0", - "fp-future": "^1.0.1", - "parallax-js": "^3.1.0", - "react": "^16.8.0 || ^17.0.0", - "react-dom": "^16.8.0 || ^17.0.0", - "react-responsive": "^9.0.0-beta.3", - "react-semantic-ui-datepickers": "^2.17.2", - "react-tile-map": "^0.4.1", - "recharts": "^2.3.2", - "semantic-ui-css": "^2.4.1", - "semantic-ui-react": "^2.0.3", - "uuid": "^9.0.1" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0", - "react-dom": "^16.8.0 || ^17.0.0" + "get-intrinsic": "^1.2.4" }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "react-dom": { - "optional": true - } - } - }, - "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "dev": true - }, - "node_modules/decimal.js-light": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", - "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==" - }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "engines": { - "node": ">=0.10" + "node": ">= 0.4" } }, - "node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", - "dependencies": { - "mimic-response": "^1.0.0" - }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "engines": { - "node": ">=4" + "node": ">= 0.4" } }, - "node_modules/deep-diff": { - "version": "0.3.8", - "license": "MIT" - }, - "node_modules/deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" + "stop-iteration-iterator": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, + "node_modules/es5-ext": { + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" + }, "engines": { - "node": ">=4.0.0" + "node": ">=0.10" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/deepmerge": { - "version": "4.2.2", - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "engines": { - "node": ">=10" + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", + "dependencies": { + "es6-promise": "^4.0.3" } }, - "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "node_modules/es6-symbol": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "d": "^1.0.2", + "ext": "^1.7.0" }, "engines": { - "node": ">= 0.4" + "node": ">=0.12" } }, - "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "node_modules/esbuild": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz", + "integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==", + "dev": true, + "hasInstallScript": true, + "peer": true, + "bin": { + "esbuild": "bin/esbuild" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.1", + "@esbuild/android-arm": "0.20.1", + "@esbuild/android-arm64": "0.20.1", + "@esbuild/android-x64": "0.20.1", + "@esbuild/darwin-arm64": "0.20.1", + "@esbuild/darwin-x64": "0.20.1", + "@esbuild/freebsd-arm64": "0.20.1", + "@esbuild/freebsd-x64": "0.20.1", + "@esbuild/linux-arm": "0.20.1", + "@esbuild/linux-arm64": "0.20.1", + "@esbuild/linux-ia32": "0.20.1", + "@esbuild/linux-loong64": "0.20.1", + "@esbuild/linux-mips64el": "0.20.1", + "@esbuild/linux-ppc64": "0.20.1", + "@esbuild/linux-riscv64": "0.20.1", + "@esbuild/linux-s390x": "0.20.1", + "@esbuild/linux-x64": "0.20.1", + "@esbuild/netbsd-x64": "0.20.1", + "@esbuild/openbsd-x64": "0.20.1", + "@esbuild/sunos-x64": "0.20.1", + "@esbuild/win32-arm64": "0.20.1", + "@esbuild/win32-ia32": "0.20.1", + "@esbuild/win32-x64": "0.20.1" } }, - "node_modules/defu": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", - "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==" + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "node_modules/delay": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", - "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "engines": { "node": ">=10" }, @@ -10150,468 +10143,443 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/denque": { + "node_modules/escodegen": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", - "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", - "engines": { - "node": ">=0.10" - } - }, - "node_modules/depd": { - "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, "engines": { - "node": ">= 0.6" + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" } }, - "node_modules/destr": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.2.tgz", - "integrity": "sha512-65AlobnZMiCET00KaFFjUefxDX0khFA/E4myqZ7a6Sq1yZtR8+FVIvilVX66vF2uobSumxooYZChiRPCKNqhmg==" - }, - "node_modules/destroy": { - "version": "1.0.4", - "license": "MIT" - }, - "node_modules/detect-browser": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz", - "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==" - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, "bin": { - "detect-libc": "bin/detect-libc.js" + "eslint": "bin/eslint.js" }, "engines": { - "node": ">=0.10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/detect-newline": { - "version": "3.1.0", + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, - "node_modules/diff": { - "version": "4.0.2", + "node_modules/eslint-import-resolver-babel-module": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-5.3.2.tgz", + "integrity": "sha512-K7D8n0O6p/JJncPote8yiuB7chJfu26Yn/Q3gzT53cNzJNS0NUCkI0iuimj4/vWVRHVQvPnYWeq07V8RvKjz/A==", "dev": true, - "license": "BSD-3-Clause", + "dependencies": { + "pkg-up": "^3.1.0", + "resolve": "^1.20.0" + }, "engines": { - "node": ">=0.3.1" + "node": ">=10.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0", + "babel-plugin-module-resolver": "^3.0.0 || ^4.0.0 || ^5.0.0" } }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, - "node_modules/dijkstrajs": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", - "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==" + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", + "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", "dev": true, "dependencies": { - "path-type": "^4.0.0" + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" }, "engines": { - "node": ">=8" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/eslint-module-utils": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "dev": true, "dependencies": { - "esutils": "^2.0.2" + "debug": "^3.2.7" }, "engines": { - "node": ">=6.0.0" + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, - "node_modules/dom-accessibility-api": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", - "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", - "dev": true - }, - "node_modules/dom-walk": { - "version": "0.1.2" + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } }, - "node_modules/domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "deprecated": "Use your platform's native DOMException instead", + "node_modules/eslint-plugin-autofix": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-autofix/-/eslint-plugin-autofix-1.1.0.tgz", + "integrity": "sha512-aKQ7s6CTeJRJgnhSlsGI7kQhnNCa1q3UYBM+9PTEgvdC5b+GjV/SZA233VNqkoBldb7/BkeWBRjorUjxeUfrxA==", "dev": true, "dependencies": { - "webidl-conversions": "^7.0.0" + "eslint-rule-composer": "^0.3.0", + "espree": "^9.0.0", + "esutils": "^2.0.2", + "lodash": "^4.17.20", + "string-similarity": "^4.0.3" }, "engines": { - "node": ">=12" + "node": ">=8" + }, + "peerDependencies": { + "eslint": ">= 5.12.1" } }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "node_modules/eslint-plugin-css-import-order": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-css-import-order/-/eslint-plugin-css-import-order-1.1.0.tgz", + "integrity": "sha512-43ODxP1sXpmgI4c+NCtXqmhkLsYGe8El1ewOlvsXKchLjWLxJw5zfp4eEg31Eni+is3jGkBL2TrNyUOOnbOMDg==", "dev": true, - "engines": { - "node": ">=12" + "peerDependencies": { + "eslint": ">= 6.0.0 < 9.0.0" } }, - "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "node_modules/eslint-plugin-import": { + "name": "eslint-plugin-i", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.29.1.tgz", + "integrity": "sha512-ORizX37MelIWLbMyqI7hi8VJMf7A0CskMmYkB+lkCX3aF4pkGV7kwx5bSEb4qx7Yce2rAf9s34HqDRPjGRZPNQ==", "dev": true, + "dependencies": { + "debug": "^4.3.4", + "doctrine": "^3.0.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "get-tsconfig": "^4.7.2", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "semver": "^7.5.4" + }, "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://opencollective.com/unts" + }, + "peerDependencies": { + "eslint": "^7.2.0 || ^8" } }, - "node_modules/dprop": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dprop/-/dprop-1.0.0.tgz", - "integrity": "sha512-CNrGk9cBoRzsLtyGRTcjsYh0n63nLtnWelCV31DlEK/yftX05rLK7qb9et891DYLUwhadlh/lOxq7W/+8XA2pQ==" - }, - "node_modules/drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", - "dependencies": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/duplexify": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", - "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.0" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "license": "MIT", + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/eccrypto": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", - "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", - "hasInstallScript": true, + "node_modules/eslint-plugin-import/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "dependencies": { - "acorn": "7.1.1", - "elliptic": "6.5.4", - "es6-promise": "4.2.8", - "nan": "2.14.0" + "yallist": "^4.0.0" }, - "optionalDependencies": { - "secp256k1": "3.7.1" + "engines": { + "node": ">=10" } }, - "node_modules/eccrypto/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "optional": true - }, - "node_modules/eccrypto/node_modules/secp256k1": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", - "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", - "hasInstallScript": true, - "optional": true, + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.4.1", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=4.0.0" + "node": "*" } }, - "node_modules/ee-first": { - "version": "1.1.1", - "license": "MIT" - }, - "node_modules/electron-to-chromium": { - "version": "1.4.495", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.495.tgz", - "integrity": "sha512-mwknuemBZnoOCths4GtpU/SDuVMp3uQHKa2UNJT9/aVD6WVRjGpXOxRGX7lm6ILIenTdGXPSTCTDaWos5tEU8Q==", - "dev": true - }, - "node_modules/elliptic": { - "version": "6.5.4", - "license": "MIT", + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "license": "MIT" - }, - "node_modules/encode-utf8": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", - "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "license": "MIT", + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, "engines": { - "node": ">= 0.8" - } - }, - "node_modules/encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dependencies": { - "iconv-lite": "^0.6.2" + "node": ">=10" } }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } + "node_modules/eslint-plugin-import/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, - "node_modules/engine.io-client": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.3.tgz", - "integrity": "sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q==", + "node_modules/eslint-plugin-prettier": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", + "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", + "dev": true, "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1", - "engine.io-parser": "~5.2.1", - "ws": "~8.11.0", - "xmlhttprequest-ssl": "~2.0.0" - } - }, - "node_modules/engine.io-client/node_modules/ws": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", - "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.6" + }, "engines": { - "node": ">=10.0.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" }, "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" }, "peerDependenciesMeta": { - "bufferutil": { + "@types/eslint": { "optional": true }, - "utf-8-validate": { + "eslint-config-prettier": { "optional": true } } }, - "node_modules/engine.io-parser": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", - "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", + "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "dev": true, "engines": { - "node": ">=10.0.0" + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" } }, - "node_modules/enhanced-resolve": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.1.tgz", - "integrity": "sha512-3d3JRbwsCLJsYgvb6NuWEG44jjPSOMuS73L/6+7BZuoKm3W+qXnSoIYVHi8dG7Qcg4inAY4jbzkZ7MnskePeDg==", + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.5.tgz", + "integrity": "sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==", "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" + "peerDependencies": { + "eslint": ">=7" } }, - "node_modules/err-code": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", - "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==" + "node_modules/eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } }, - "node_modules/error-ex": { - "version": "1.3.2", + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, - "license": "MIT", "dependencies": { - "is-arrayish": "^0.2.1" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/eslint" } }, - "node_modules/es5-ext": { - "version": "0.10.59", - "hasInstallScript": true, - "license": "ISC", + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=0.10" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "license": "MIT", + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, - "node_modules/es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==", - "dependencies": { - "es6-promise": "^4.0.3" - } - }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "license": "ISC", - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/esbuild": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", - "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" + "dependencies": { + "type-fest": "^0.20.2" }, "engines": { - "node": ">=12" + "node": ">=8" }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.11", - "@esbuild/android-arm": "0.19.11", - "@esbuild/android-arm64": "0.19.11", - "@esbuild/android-x64": "0.19.11", - "@esbuild/darwin-arm64": "0.19.11", - "@esbuild/darwin-x64": "0.19.11", - "@esbuild/freebsd-arm64": "0.19.11", - "@esbuild/freebsd-x64": "0.19.11", - "@esbuild/linux-arm": "0.19.11", - "@esbuild/linux-arm64": "0.19.11", - "@esbuild/linux-ia32": "0.19.11", - "@esbuild/linux-loong64": "0.19.11", - "@esbuild/linux-mips64el": "0.19.11", - "@esbuild/linux-ppc64": "0.19.11", - "@esbuild/linux-riscv64": "0.19.11", - "@esbuild/linux-s390x": "0.19.11", - "@esbuild/linux-x64": "0.19.11", - "@esbuild/netbsd-x64": "0.19.11", - "@esbuild/openbsd-x64": "0.19.11", - "@esbuild/sunos-x64": "0.19.11", - "@esbuild/win32-arm64": "0.19.11", - "@esbuild/win32-ia32": "0.19.11", - "@esbuild/win32-x64": "0.19.11" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/escalade": { - "version": "3.1.1", + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "MIT", + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=6" + "node": "*" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -10619,84 +10587,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true, "engines": { - "node": ">=0.10.0" + "node": ">=0.10" } }, - "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -10705,404 +10618,281 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, "bin": { - "eslint-config-prettier": "bin/cli.js" + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, - "peerDependencies": { - "eslint": ">=7.0.0" + "engines": { + "node": ">=4" } }, - "node_modules/eslint-import-resolver-babel-module": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-5.3.2.tgz", - "integrity": "sha512-K7D8n0O6p/JJncPote8yiuB7chJfu26Yn/Q3gzT53cNzJNS0NUCkI0iuimj4/vWVRHVQvPnYWeq07V8RvKjz/A==", + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { - "pkg-up": "^3.1.0", - "resolve": "^1.20.0" + "estraverse": "^5.1.0" }, "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0", - "babel-plugin-module-resolver": "^3.0.0 || ^4.0.0 || ^5.0.0" + "node": ">=0.10" } }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" } }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "dependencies": { - "ms": "^2.1.1" + "engines": { + "node": ">=4.0" } }, - "node_modules/eslint-import-resolver-typescript": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", - "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "dependencies": { - "debug": "^4.3.4", - "enhanced-resolve": "^5.12.0", - "eslint-module-utils": "^2.7.4", - "fast-glob": "^3.3.1", - "get-tsconfig": "^4.5.0", - "is-core-module": "^2.11.0", - "is-glob": "^4.0.3" - }, "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" - }, - "peerDependencies": { - "eslint": "*", - "eslint-plugin-import": "*" + "node": ">=0.10.0" } }, - "node_modules/eslint-module-utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", - "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", - "dev": true, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eth-block-tracker": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-6.1.0.tgz", + "integrity": "sha512-K9SY8+/xMBi4M5HHTDdxnpEqEEGjbNpzHFqvxyjMZej8InV/B+CkFRKM6W+uvrFJ7m8Zd1E0qUkseU3vdIDFYQ==", "dependencies": { - "debug": "^3.2.7" + "@metamask/safe-event-emitter": "^2.0.0", + "@metamask/utils": "^3.0.1", + "json-rpc-random-id": "^1.0.1", + "pify": "^3.0.0" }, "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } + "node": ">=14.0.0" } }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } + "node_modules/eth-connect": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/eth-connect/-/eth-connect-6.2.4.tgz", + "integrity": "sha512-K0+g+pZoWkcJKKc4hwlYvaruoMBFcARoULIdf50bz/Zk9YdgFoKPjlRQWAtBgSDfxJS7AAHqg40k2Z/uQI0aNw==" }, - "node_modules/eslint-plugin-autofix": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-autofix/-/eslint-plugin-autofix-1.1.0.tgz", - "integrity": "sha512-aKQ7s6CTeJRJgnhSlsGI7kQhnNCa1q3UYBM+9PTEgvdC5b+GjV/SZA233VNqkoBldb7/BkeWBRjorUjxeUfrxA==", - "dev": true, + "node_modules/eth-crypto": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/eth-crypto/-/eth-crypto-1.9.0.tgz", + "integrity": "sha512-FUlzt0n1qfnIUTDAjJXgze8+1jyxzqlsrdZnpQRl+W2+wLQ4kV4U0VAz3jYZm3vCR0781km7XyT3x5ZP4x5x2Q==", "dependencies": { - "eslint-rule-composer": "^0.3.0", - "espree": "^9.0.0", - "esutils": "^2.0.2", - "lodash": "^4.17.20", - "string-similarity": "^4.0.3" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "eslint": ">= 5.12.1" + "@types/bn.js": "5.1.0", + "babel-runtime": "6.26.0", + "eccrypto": "1.1.6", + "eth-lib": "0.2.8", + "ethereumjs-tx": "2.1.2", + "ethereumjs-util": "7.0.9", + "ethers": "5.0.32", + "secp256k1": "4.0.2" } }, - "node_modules/eslint-plugin-css-import-order": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-css-import-order/-/eslint-plugin-css-import-order-1.1.0.tgz", - "integrity": "sha512-43ODxP1sXpmgI4c+NCtXqmhkLsYGe8El1ewOlvsXKchLjWLxJw5zfp4eEg31Eni+is3jGkBL2TrNyUOOnbOMDg==", - "dev": true, - "peerDependencies": { - "eslint": ">= 6.0.0 < 9.0.0" + "node_modules/eth-crypto/node_modules/@ethersproject/abi": { + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.13.tgz", + "integrity": "sha512-2coOH3D7ra1lwamKEH0HVc+Jbcsw5yfeCgmY8ekhCDualEiyyovD2qDcMBBcY3+kjoLHVTmo7ost6MNClxdOrg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.0.9", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", + "@ethersproject/hash": "^5.0.10", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, - "node_modules/eslint-plugin-import": { - "name": "eslint-plugin-i", - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.29.1.tgz", - "integrity": "sha512-ORizX37MelIWLbMyqI7hi8VJMf7A0CskMmYkB+lkCX3aF4pkGV7kwx5bSEb4qx7Yce2rAf9s34HqDRPjGRZPNQ==", - "dev": true, + "node_modules/eth-crypto/node_modules/@ethersproject/abstract-provider": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.10.tgz", + "integrity": "sha512-OSReY5iz94iIaPlRvLiJP8YVIvQLx4aUvMMnHWSaA/vTU8QHZmgNlt4OBdYV1+aFY8Xl+VRYiWBHq72ZDKXXCQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "debug": "^4.3.4", - "doctrine": "^3.0.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "get-tsconfig": "^4.7.2", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://opencollective.com/unts" - }, - "peerDependencies": { - "eslint": "^7.2.0 || ^8" + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/networks": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/web": "^5.0.12" } }, - "node_modules/eslint-plugin-prettier": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", - "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.6" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": "*", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true + "node_modules/eth-crypto/node_modules/@ethersproject/abstract-signer": { + "version": "5.0.14", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.14.tgz", + "integrity": "sha512-JztBwVO7o5OHLh2vyjordlS4/1EjRyaECtc8vPdXTF1i4dXN+J0coeRoPN6ZFbBvi/YbaB6br2fvqhst1VQD/g==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "eslint-config-prettier": { - "optional": true + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/properties": "^5.0.7" } }, - "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", - "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", - "dev": true, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + "node_modules/eth-crypto/node_modules/@ethersproject/address": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", + "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/keccak256": "^5.0.7", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/rlp": "^5.0.7" } }, - "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.5.tgz", - "integrity": "sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==", - "dev": true, - "peerDependencies": { - "eslint": ">=7" + "node_modules/eth-crypto/node_modules/@ethersproject/base64": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.9.tgz", + "integrity": "sha512-37RBz5LEZ9SlTNGiWCYFttnIN9J7qVs9Xo2EbqGqDH5LfW9EIji66S+YDMpXVo1zWDax1FkEldAoatxHK2gfgA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.0.9" } }, - "node_modules/eslint-rule-composer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", - "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", - "dev": true, - "engines": { - "node": ">=4.0.0" + "node_modules/eth-crypto/node_modules/@ethersproject/basex": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.9.tgz", + "integrity": "sha512-FANswl1IN3PS0eltQxH2aM2+utPrkLUVG4XVFi6SafRG9EpAqXCgycxC8PU90mPGhigYTpg9cnTB5mCZ6ejQjw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/properties": "^5.0.7" } }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, + "node_modules/eth-crypto/node_modules/@ethersproject/bignumber": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "bn.js": "^4.4.0" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eth-block-tracker": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-6.1.0.tgz", - "integrity": "sha512-K9SY8+/xMBi4M5HHTDdxnpEqEEGjbNpzHFqvxyjMZej8InV/B+CkFRKM6W+uvrFJ7m8Zd1E0qUkseU3vdIDFYQ==", - "dependencies": { - "@metamask/safe-event-emitter": "^2.0.0", - "@metamask/utils": "^3.0.1", - "json-rpc-random-id": "^1.0.1", - "pify": "^3.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/eth-connect": { - "version": "6.0.3", - "license": "LGPL-3.0" - }, - "node_modules/eth-crypto": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/eth-crypto/-/eth-crypto-1.9.0.tgz", - "integrity": "sha512-FUlzt0n1qfnIUTDAjJXgze8+1jyxzqlsrdZnpQRl+W2+wLQ4kV4U0VAz3jYZm3vCR0781km7XyT3x5ZP4x5x2Q==", + "node_modules/eth-crypto/node_modules/@ethersproject/bytes": { + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "@types/bn.js": "5.1.0", - "babel-runtime": "6.26.0", - "eccrypto": "1.1.6", - "eth-lib": "0.2.8", - "ethereumjs-tx": "2.1.2", - "ethereumjs-util": "7.0.9", - "ethers": "5.0.32", - "secp256k1": "4.0.2" + "@ethersproject/logger": "^5.0.8" } }, - "node_modules/eth-crypto/node_modules/@ethersproject/abstract-provider": { + "node_modules/eth-crypto/node_modules/@ethersproject/constants": { "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.10.tgz", - "integrity": "sha512-OSReY5iz94iIaPlRvLiJP8YVIvQLx4aUvMMnHWSaA/vTU8QHZmgNlt4OBdYV1+aFY8Xl+VRYiWBHq72ZDKXXCQ==", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "funding": [ { "type": "individual", @@ -11114,19 +10904,13 @@ } ], "dependencies": { - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/networks": "^5.0.7", - "@ethersproject/properties": "^5.0.7", - "@ethersproject/transactions": "^5.0.9", - "@ethersproject/web": "^5.0.12" + "@ethersproject/bignumber": "^5.0.13" } }, - "node_modules/eth-crypto/node_modules/@ethersproject/abstract-signer": { - "version": "5.0.14", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.14.tgz", - "integrity": "sha512-JztBwVO7o5OHLh2vyjordlS4/1EjRyaECtc8vPdXTF1i4dXN+J0coeRoPN6ZFbBvi/YbaB6br2fvqhst1VQD/g==", + "node_modules/eth-crypto/node_modules/@ethersproject/contracts": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.12.tgz", + "integrity": "sha512-srijy31idjz8bE+gL1I6IRj2H4I9dUwfQ+QroLrIgNdGArqY8y2iFUKa3QTy+JBX26fJsdYiCQi1kKkaNpnMpQ==", "funding": [ { "type": "individual", @@ -11138,17 +10922,21 @@ } ], "dependencies": { + "@ethersproject/abi": "^5.0.10", "@ethersproject/abstract-provider": "^5.0.8", + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", "@ethersproject/bignumber": "^5.0.13", "@ethersproject/bytes": "^5.0.9", + "@ethersproject/constants": "^5.0.8", "@ethersproject/logger": "^5.0.8", "@ethersproject/properties": "^5.0.7" } }, - "node_modules/eth-crypto/node_modules/@ethersproject/address": { - "version": "5.0.11", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", - "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", + "node_modules/eth-crypto/node_modules/@ethersproject/hash": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.12.tgz", + "integrity": "sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q==", "funding": [ { "type": "individual", @@ -11160,17 +10948,20 @@ } ], "dependencies": { + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", "@ethersproject/bignumber": "^5.0.13", "@ethersproject/bytes": "^5.0.9", "@ethersproject/keccak256": "^5.0.7", "@ethersproject/logger": "^5.0.8", - "@ethersproject/rlp": "^5.0.7" + "@ethersproject/properties": "^5.0.7", + "@ethersproject/strings": "^5.0.8" } }, - "node_modules/eth-crypto/node_modules/@ethersproject/base64": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.9.tgz", - "integrity": "sha512-37RBz5LEZ9SlTNGiWCYFttnIN9J7qVs9Xo2EbqGqDH5LfW9EIji66S+YDMpXVo1zWDax1FkEldAoatxHK2gfgA==", + "node_modules/eth-crypto/node_modules/@ethersproject/hdnode": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.10.tgz", + "integrity": "sha512-ZLwMtIcXK7xz2lSITDCl40W04CtRq4K9NwBxhCzdzPdaz6XnoJMwGz2YMVLg+8ksseq+RYtTwIIXtlK6vyvQyg==", "funding": [ { "type": "individual", @@ -11182,13 +10973,24 @@ } ], "dependencies": { - "@ethersproject/bytes": "^5.0.9" + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/basex": "^5.0.7", + "@ethersproject/bignumber": "^5.0.13", + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "@ethersproject/pbkdf2": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/sha2": "^5.0.7", + "@ethersproject/signing-key": "^5.0.8", + "@ethersproject/strings": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", + "@ethersproject/wordlists": "^5.0.8" } }, - "node_modules/eth-crypto/node_modules/@ethersproject/bignumber": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", - "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", + "node_modules/eth-crypto/node_modules/@ethersproject/json-wallets": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.12.tgz", + "integrity": "sha512-nac553zGZnOewpjlqbfy7WBl8m3y7qudzRsI2dCxrediYtPIVIs9f6Pbnou8vDmmp8X4/U4W788d+Ma88o+Gbg==", "funding": [ { "type": "individual", @@ -11200,15 +11002,25 @@ } ], "dependencies": { + "@ethersproject/abstract-signer": "^5.0.10", + "@ethersproject/address": "^5.0.9", "@ethersproject/bytes": "^5.0.9", + "@ethersproject/hdnode": "^5.0.8", + "@ethersproject/keccak256": "^5.0.7", "@ethersproject/logger": "^5.0.8", - "bn.js": "^4.4.0" + "@ethersproject/pbkdf2": "^5.0.7", + "@ethersproject/properties": "^5.0.7", + "@ethersproject/random": "^5.0.7", + "@ethersproject/strings": "^5.0.8", + "@ethersproject/transactions": "^5.0.9", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" } }, - "node_modules/eth-crypto/node_modules/@ethersproject/bytes": { - "version": "5.0.11", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", - "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", + "node_modules/eth-crypto/node_modules/@ethersproject/keccak256": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", "funding": [ { "type": "individual", @@ -11220,129 +11032,8 @@ } ], "dependencies": { - "@ethersproject/logger": "^5.0.8" - } - }, - "node_modules/eth-crypto/node_modules/@ethersproject/constants": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", - "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bignumber": "^5.0.13" - } - }, - "node_modules/eth-crypto/node_modules/@ethersproject/contracts": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.12.tgz", - "integrity": "sha512-srijy31idjz8bE+gL1I6IRj2H4I9dUwfQ+QroLrIgNdGArqY8y2iFUKa3QTy+JBX26fJsdYiCQi1kKkaNpnMpQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abi": "^5.0.10", - "@ethersproject/abstract-provider": "^5.0.8", - "@ethersproject/abstract-signer": "^5.0.10", - "@ethersproject/address": "^5.0.9", - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/constants": "^5.0.8", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7" - } - }, - "node_modules/eth-crypto/node_modules/@ethersproject/hdnode": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.10.tgz", - "integrity": "sha512-ZLwMtIcXK7xz2lSITDCl40W04CtRq4K9NwBxhCzdzPdaz6XnoJMwGz2YMVLg+8ksseq+RYtTwIIXtlK6vyvQyg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-signer": "^5.0.10", - "@ethersproject/basex": "^5.0.7", - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/pbkdf2": "^5.0.7", - "@ethersproject/properties": "^5.0.7", - "@ethersproject/sha2": "^5.0.7", - "@ethersproject/signing-key": "^5.0.8", - "@ethersproject/strings": "^5.0.8", - "@ethersproject/transactions": "^5.0.9", - "@ethersproject/wordlists": "^5.0.8" - } - }, - "node_modules/eth-crypto/node_modules/@ethersproject/json-wallets": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.12.tgz", - "integrity": "sha512-nac553zGZnOewpjlqbfy7WBl8m3y7qudzRsI2dCxrediYtPIVIs9f6Pbnou8vDmmp8X4/U4W788d+Ma88o+Gbg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-signer": "^5.0.10", - "@ethersproject/address": "^5.0.9", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/hdnode": "^5.0.8", - "@ethersproject/keccak256": "^5.0.7", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/pbkdf2": "^5.0.7", - "@ethersproject/properties": "^5.0.7", - "@ethersproject/random": "^5.0.7", - "@ethersproject/strings": "^5.0.8", - "@ethersproject/transactions": "^5.0.9", - "aes-js": "3.0.0", - "scrypt-js": "3.0.1" - } - }, - "node_modules/eth-crypto/node_modules/@ethersproject/keccak256": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", - "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.0.9", - "js-sha3": "0.5.7" + "@ethersproject/bytes": "^5.0.9", + "js-sha3": "0.5.7" } }, "node_modules/eth-crypto/node_modules/@ethersproject/logger": { @@ -11451,6 +11142,25 @@ "ws": "7.2.3" } }, + "node_modules/eth-crypto/node_modules/@ethersproject/random": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.9.tgz", + "integrity": "sha512-DANG8THsKqFbJOantrxumtG6gyETNE54VfbsWa+SQAT8WKpDo9W/X5Zhh73KuhClaey1UI32uVmISZeq/Zxn1A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8" + } + }, "node_modules/eth-crypto/node_modules/@ethersproject/rlp": { "version": "5.0.9", "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz", @@ -11470,6 +11180,26 @@ "@ethersproject/logger": "^5.0.8" } }, + "node_modules/eth-crypto/node_modules/@ethersproject/sha2": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.9.tgz", + "integrity": "sha512-5FH4s47gM7N1fFAYQ1+m7aX0SbLg0Xr+6tvqndmNqc382/qBIbzXiGlUookrsjlPb6gLNurnTssCXjNM72J6lQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.0.9", + "@ethersproject/logger": "^5.0.8", + "hash.js": "1.1.3" + } + }, "node_modules/eth-crypto/node_modules/@ethersproject/signing-key": { "version": "5.0.11", "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.11.tgz", @@ -11655,19 +11385,30 @@ "@ethersproject/strings": "^5.0.8" } }, - "node_modules/eth-crypto/node_modules/@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dependencies": { - "@types/node": "*" - } + "node_modules/eth-crypto/node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, "node_modules/eth-crypto/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, + "node_modules/eth-crypto/node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, "node_modules/eth-crypto/node_modules/ethers": { "version": "5.0.32", "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.32.tgz", @@ -11715,1170 +11456,652 @@ "@ethersproject/wordlists": "5.0.10" } }, - "node_modules/eth-crypto/node_modules/js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==" - }, - "node_modules/eth-crypto/node_modules/ws": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", - "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/eth-json-rpc-filters": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-5.1.0.tgz", - "integrity": "sha512-fos+9xmoa1A2Ytsc9eYof17r81BjdJOUcGcgZn4K/tKdCCTb+a8ytEtwlu1op5qsXFDlgGmstTELFrDEc89qEQ==", - "dependencies": { - "@metamask/safe-event-emitter": "^2.0.0", - "async-mutex": "^0.2.6", - "eth-query": "^2.1.2", - "json-rpc-engine": "^6.1.0", - "pify": "^5.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/eth-json-rpc-filters/node_modules/pify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", - "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dependencies": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "node_modules/eth-lib/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" - }, - "node_modules/eth-query": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", - "integrity": "sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA==", - "dependencies": { - "json-rpc-random-id": "^1.0.0", - "xtend": "^4.0.1" - } - }, - "node_modules/eth-rpc-errors": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-4.0.2.tgz", - "integrity": "sha512-n+Re6Gu8XGyfFy1it0AwbD1x0MUzspQs0D5UiPs1fFPCr6WAwZM+vbIhXheBFrpgosqN9bs5PqlB4Q61U/QytQ==", - "dependencies": { - "fast-safe-stringify": "^2.0.6" - } - }, - "node_modules/ethereum-blockies": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ethereum-blockies/-/ethereum-blockies-0.1.1.tgz", - "integrity": "sha512-ED+noMZ6z7RrzzhvrQna1L30C27MX+ZsdB5c/d5vygXtHjEyAQjQS2TgCYhPxs+z3U+u2YQsL9PiRkNl1f+ugg==" - }, - "node_modules/ethereum-bloom-filters": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", - "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", - "dependencies": { - "js-sha3": "^0.8.0" - } - }, - "node_modules/ethereum-cryptography": { - "version": "0.1.3", - "license": "MIT", - "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "node_modules/ethereumjs-common": { - "version": "1.5.2", - "license": "MIT" - }, - "node_modules/ethereumjs-tx": { - "version": "2.1.2", - "license": "MPL-2.0", - "dependencies": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "node_modules/ethereumjs-tx/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT" - }, - "node_modules/ethereumjs-tx/node_modules/ethereumjs-util": { - "version": "6.2.1", - "license": "MPL-2.0", - "dependencies": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - }, - "node_modules/ethereumjs-util": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.9.tgz", - "integrity": "sha512-cRqvYYKJoitq6vMKMf8pXeVwvTrX+dRD0JwHaYqm8jvogK14tqIoCWH/KUHcRwnVxVXEYF/o6pup5jRG4V0xzg==", - "dependencies": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.4" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/ethereumjs-util/node_modules/@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - }, - "node_modules/ethers-multicall-provider": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ethers-multicall-provider/-/ethers-multicall-provider-5.0.0.tgz", - "integrity": "sha512-dsfIwBSbr8yG+F0o87uoMFje1k5w988883MMJvK7R66mYT6NApQhQ7sMH/cxKGXTRf3at+nGt/4QIYHbYhe/8A==", - "dependencies": { - "ethers": "^6.0.0", - "lodash": "^4.17.0" - }, - "engines": { - "node": ">=12.0" - }, - "peerDependencies": { - "lodash": "^4.17.0" - } - }, - "node_modules/ethers-multicall-provider/node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ethers-multicall-provider/node_modules/@types/node": { - "version": "18.15.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", - "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" - }, - "node_modules/ethers-multicall-provider/node_modules/aes-js": { - "version": "4.0.0-beta.5", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", - "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" - }, - "node_modules/ethers-multicall-provider/node_modules/ethers": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.8.1.tgz", - "integrity": "sha512-iEKm6zox5h1lDn6scuRWdIdFJUCGg3+/aQWu0F4K0GVyEZiktFkqrJbRjTn1FlYEPz7RKA707D6g5Kdk6j7Ljg==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/ethers-io/" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@adraffy/ens-normalize": "1.10.0", - "@noble/curves": "1.2.0", - "@noble/hashes": "1.3.2", - "@types/node": "18.15.13", - "aes-js": "4.0.0-beta.5", - "tslib": "2.4.0", - "ws": "8.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/ethers-multicall-provider/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, - "node_modules/ethers-multicall-provider/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/ethers/node_modules/@ethersproject/abi": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", - "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/ethers/node_modules/@ethersproject/basex": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", - "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "node_modules/ethers/node_modules/@ethersproject/hash": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", - "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/ethers/node_modules/@ethersproject/random": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", - "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/ethers/node_modules/@ethersproject/sha2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "hash.js": "1.1.7" - } - }, - "node_modules/ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", - "dependencies": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-unit/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" - }, - "node_modules/ethjs-util": { - "version": "0.1.6", - "license": "MIT", - "dependencies": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "license": "MIT" - }, - "node_modules/events": { - "version": "3.3.0", - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/execa/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/execa/node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/exenv": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" - }, - "node_modules/exit": { - "version": "0.1.2", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/express": { - "version": "4.17.3", - "license": "MIT", - "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" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/ext": { - "version": "1.6.0", - "license": "ISC", + "node_modules/eth-crypto/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "dependencies": { - "type": "^2.5.0" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" } }, - "node_modules/ext/node_modules/type": { - "version": "2.6.0", - "license": "ISC" - }, - "node_modules/extend": { - "version": "3.0.2", - "license": "MIT" - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "engines": [ - "node >=0.6.0" - ], - "license": "MIT" + "node_modules/eth-crypto/node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==" }, - "node_modules/eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "node_modules/eth-crypto/node_modules/ws": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", + "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==", "engines": { - "node": "> 0.1.90" + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "node_modules/fast-diff": { - "version": "1.2.0", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/fast-equals": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-2.0.4.tgz", - "integrity": "sha512-caj/ZmjHljPrZtbzJ3kfH5ia/k4mTJe/qSiXAGzxZWRZgsgDV0cvNaQULqUX8t0/JVlzzEdYOwCN5DmzTxoD4w==" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, + "node_modules/eth-json-rpc-filters": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-5.1.0.tgz", + "integrity": "sha512-fos+9xmoa1A2Ytsc9eYof17r81BjdJOUcGcgZn4K/tKdCCTb+a8ytEtwlu1op5qsXFDlgGmstTELFrDEc89qEQ==", "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "@metamask/safe-event-emitter": "^2.0.0", + "async-mutex": "^0.2.6", + "eth-query": "^2.1.2", + "json-rpc-engine": "^6.1.0", + "pify": "^5.0.0" }, "engines": { - "node": ">=8.6.0" + "node": ">=14.0.0" } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fast-redact": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.3.0.tgz", - "integrity": "sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==", + "node_modules/eth-json-rpc-filters/node_modules/pify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", + "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" - }, - "node_modules/fast-stable-stringify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", - "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, + "node_modules/eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", "dependencies": { - "reusify": "^1.0.4" + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" } }, - "node_modules/fb-watchman": { - "version": "2.0.1", - "dev": true, - "license": "Apache-2.0", + "node_modules/eth-lib/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/eth-query": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", + "integrity": "sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA==", "dependencies": { - "bser": "2.1.1" + "json-rpc-random-id": "^1.0.0", + "xtend": "^4.0.1" } }, - "node_modules/fetch-ponyfill": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-7.1.0.tgz", - "integrity": "sha512-FhbbL55dj/qdVO3YNK7ZEkshvj3eQ7EuIGV2I6ic/2YiocvyWv+7jg2s4AyS0wdRU75s3tA8ZxI/xPigb0v5Aw==", + "node_modules/eth-rpc-errors": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-4.0.2.tgz", + "integrity": "sha512-n+Re6Gu8XGyfFy1it0AwbD1x0MUzspQs0D5UiPs1fFPCr6WAwZM+vbIhXheBFrpgosqN9bs5PqlB4Q61U/QytQ==", "dependencies": { - "node-fetch": "~2.6.1" + "fast-safe-stringify": "^2.0.6" } }, - "node_modules/fetch-ponyfill/node_modules/node-fetch": { - "version": "2.6.13", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.13.tgz", - "integrity": "sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==", + "node_modules/ethereum-blockies": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ethereum-blockies/-/ethereum-blockies-0.1.1.tgz", + "integrity": "sha512-ED+noMZ6z7RrzzhvrQna1L30C27MX+ZsdB5c/d5vygXtHjEyAQjQS2TgCYhPxs+z3U+u2YQsL9PiRkNl1f+ugg==" + }, + "node_modules/ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "js-sha3": "^0.8.0" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, + "node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "license": "MIT" + "node_modules/ethereum-cryptography/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] }, - "node_modules/fill-range": { - "version": "7.0.1", - "license": "MIT", + "node_modules/ethereumjs-common": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", + "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==", + "deprecated": "New package name format for new versions: @ethereumjs/common. Please update." + }, + "node_modules/ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "deprecated": "New package name format for new versions: @ethereumjs/tx. Please update.", "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" } }, - "node_modules/filter-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", - "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", - "engines": { - "node": ">=0.10.0" + "node_modules/ethereumjs-tx/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dependencies": { + "@types/node": "*" } }, - "node_modules/finalhandler": { - "version": "1.1.2", - "license": "MIT", + "node_modules/ethereumjs-tx/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/ethereumjs-tx/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" } }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "license": "MIT", + "node_modules/ethereumjs-tx/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "dependencies": { - "ms": "2.0.0" + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" } }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/find-babel-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", - "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", - "dev": true, - "peer": true, + "node_modules/ethereumjs-util": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.9.tgz", + "integrity": "sha512-cRqvYYKJoitq6vMKMf8pXeVwvTrX+dRD0JwHaYqm8jvogK14tqIoCWH/KUHcRwnVxVXEYF/o6pup5jRG4V0xzg==", "dependencies": { - "json5": "^2.1.1", - "path-exists": "^4.0.0" + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" }, "engines": { - "node": ">=16.0.0" + "node": ">=10.0.0" } }, - "node_modules/find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "dev": true, + "node_modules/ethereumjs-util/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", "dependencies": { - "array-back": "^3.0.1" - }, - "engines": { - "node": ">=4.0.0" + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" } }, - "node_modules/find-up": { + "node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, + "node_modules/ethers-multicall-provider": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, + "resolved": "https://registry.npmjs.org/ethers-multicall-provider/-/ethers-multicall-provider-5.0.0.tgz", + "integrity": "sha512-dsfIwBSbr8yG+F0o87uoMFje1k5w988883MMJvK7R66mYT6NApQhQ7sMH/cxKGXTRf3at+nGt/4QIYHbYhe/8A==", "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "ethers": "^6.0.0", + "lodash": "^4.17.0" }, "engines": { - "node": ">=10" + "node": ">=12.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "lodash": "^4.17.0" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "bin": { - "flat": "cli.js" - } + "node_modules/ethers-multicall-provider/node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, + "node_modules/ethers-multicall-provider/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "@noble/hashes": "1.3.2" }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethers-multicall-provider/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "node_modules/ethers-multicall-provider/node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" }, - "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "node_modules/ethers-multicall-provider/node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + }, + "node_modules/ethers-multicall-provider/node_modules/ethers": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.11.1.tgz", + "integrity": "sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg==", "funding": [ { "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" } ], - "engines": { - "node": ">=4.0" + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.5.0" }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "engines": { + "node": ">=14.0.0" } }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dependencies": { - "is-callable": "^1.1.3" - } + "node_modules/ethers-multicall-provider/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, - "node_modules/forever-agent": { - "version": "0.6.1", - "license": "Apache-2.0", + "node_modules/ethers-multicall-provider/node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", "engines": { - "node": "*" + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" }, "engines": { - "node": ">= 6" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/format-string-by-pattern": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/format-string-by-pattern/-/format-string-by-pattern-1.2.2.tgz", - "integrity": "sha512-dYhtZGK/V7iif43UGjHu3ExGASwmoDdHPIejcVv/dYnCjtkzFl4XIXqKuzryj26DaXMAwvEQ3FUv09fROvgY/Q==", - "engines": { - "node": ">=10" - } + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" }, - "node_modules/fortmatic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fortmatic/-/fortmatic-1.1.3.tgz", - "integrity": "sha512-70gPiTuwfqEQNg4fFK5MVf3gRAW+mo2tHdiMSEt2OLKcoHWrAn63e/r245dPJAw4Qvz7PhkYF/bTx6ga50zWog==", + "node_modules/ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", "dependencies": { - "@babel/runtime": "7.3.4" + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/fortmatic/node_modules/@babel/runtime": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz", - "integrity": "sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g==", + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", "dependencies": { - "regenerator-runtime": "^0.12.0" + "d": "1", + "es5-ext": "~0.10.14" } }, - "node_modules/fortmatic/node_modules/regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" - }, - "node_modules/forwarded": { - "version": "0.2.0", - "license": "MIT", + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", "engines": { - "node": ">= 0.6" + "node": ">=6" } }, - "node_modules/fp-future": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fp-future/-/fp-future-1.0.1.tgz", - "integrity": "sha512-2McmZH/KsZqlqHju9+Ox0FC7q7Knve4t6ZeKubbhAz1xpnD7hkCrP8TP5g5QbbD5bA5jBANbXf/ew4x1FjSUrw==" + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, - "node_modules/fresh": { - "version": "0.5.2", - "license": "MIT", + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "engines": { - "node": ">= 0.6" + "node": ">=0.8.x" } }, - "node_modules/fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, - "node_modules/fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, "dependencies": { - "minipass": "^2.6.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/fsm-iterator": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "node": ">=10" + }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==" }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, - "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">= 0.8.0" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "license": "ISC", + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "node_modules/express": { + "version": "4.18.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", + "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", "dependencies": { - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.10.0" } }, - "node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" } }, - "node_modules/get-port-please": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.1.2.tgz", - "integrity": "sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==" + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "node_modules/express/node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/express/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", "dependencies": { - "pump": "^3.0.0" + "side-channel": "^1.0.4" }, "engines": { - "node": ">=8" + "node": ">=0.6" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-tsconfig": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", - "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", - "dev": true, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + "type": "^2.7.2" } }, - "node_modules/getpass": { - "version": "0.1.7", - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0" + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", + "engines": { + "node": "> 0.1.90" } }, - "node_modules/gl-vec2": { + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-diff": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/gl-vec2/-/gl-vec2-1.3.0.tgz", - "integrity": "sha512-YiqaAuNsheWmUV0Sa8k94kBB0D6RWjwZztyO+trEYS8KzJ6OQB/4686gdrf59wld4hHFIvaxynO3nRxpk1Ij/A==" + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true }, - "node_modules/glob": { - "version": "7.1.7", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "node_modules/fast-equals": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", + "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=8.6.0" } }, - "node_modules/glob-parent": { + "node_modules/fast-glob/node_modules/glob-parent": { "version": "5.1.2", - "license": "ISC", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -12886,1144 +12109,1268 @@ "node": ">= 6" } }, - "node_modules/global": { - "version": "4.4.0", - "license": "MIT", - "dependencies": { - "min-document": "^2.19.0", - "process": "^0.11.10" - } + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dependencies": { - "define-properties": "^1.1.3" - }, + "node_modules/fast-redact": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.4.0.tgz", + "integrity": "sha512-2gwPvyna0zwBdxKnng1suu/dTL5s8XEy2ZqH8mwDUwJdDkV8w5kp+JV26mupdK68HmPMbm6yjW9m7/Ys/BHEHg==", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", + "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "reusify": "^1.0.4" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bser": "2.1.1" } }, - "node_modules/got": { - "version": "11.8.5", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz", - "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==", + "node_modules/fetch-ponyfill": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-7.1.0.tgz", + "integrity": "sha512-FhbbL55dj/qdVO3YNK7ZEkshvj3eQ7EuIGV2I6ic/2YiocvyWv+7jg2s4AyS0wdRU75s3tA8ZxI/xPigb0v5Aw==", "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" + "node-fetch": "~2.6.1" } }, - "node_modules/got/node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "node_modules/fetch-ponyfill/node_modules/node-fetch": { + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==", "dependencies": { - "mimic-response": "^3.1.0" + "whatwg-url": "^5.0.0" }, "engines": { - "node": ">=10" + "node": "4.x || >=6.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/got/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "engines": { - "node": ">=10" + "peerDependencies": { + "encoding": "^0.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, - "node_modules/graceful-fs": { - "version": "4.2.9", - "license": "ISC" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "node_modules/fetch-ponyfill/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, - "node_modules/graphql": { - "version": "14.7.0", - "license": "MIT", - "dependencies": { - "iterall": "^1.2.2" - }, - "engines": { - "node": ">= 6.x" - } + "node_modules/fetch-ponyfill/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, - "node_modules/h3": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/h3/-/h3-1.10.1.tgz", - "integrity": "sha512-UBAUp47hmm4BB5/njB4LrEa9gpuvZj4/Qf/ynSMzO6Ku2RXaouxEfiG2E2IFnv6fxbhAkzjasDxmo6DFdEeXRg==", + "node_modules/fetch-ponyfill/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dependencies": { - "cookie-es": "^1.0.0", - "defu": "^6.1.4", - "destr": "^2.0.2", - "iron-webcrypto": "^1.0.0", - "ohash": "^1.1.3", - "radix3": "^1.1.0", - "ufo": "^1.3.2", - "uncrypto": "^0.1.3", - "unenv": "^1.9.0" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, - "node_modules/hamt-sharding": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hamt-sharding/-/hamt-sharding-2.0.1.tgz", - "integrity": "sha512-vnjrmdXG9dDs1m/H4iJ6z0JFI2NtgsW5keRkTcM85NGak69Mkf5PHUqBz+Xs0T4sg0ppvj9O5EGAJo40FTxmmA==", + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, "dependencies": { - "sparse-array": "^1.3.1", - "uint8arrays": "^3.0.0" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=10.0.0", - "npm": ">=6.0.0" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/hamt-sharding/node_modules/uint8arrays": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", - "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dependencies": { - "multiformats": "^9.4.2" + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "license": "ISC", + "node_modules/filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/har-validator": { - "version": "5.1.5", - "license": "MIT", + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" }, "engines": { - "node": ">=6" + "node": ">= 0.8" } }, - "node_modules/harmony-reflect": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.2.tgz", - "integrity": "sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "license": "MIT", + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" + "ms": "2.0.0" } }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/has-flag": { - "version": "3.0.0", + "node_modules/find-babel-config": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", + "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", "dev": true, - "license": "MIT", + "peer": true, + "dependencies": { + "json5": "^2.1.1", + "path-exists": "^4.0.0" + }, "engines": { - "node": ">=4" + "node": ">=16.0.0" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dependencies": { - "get-intrinsic": "^1.1.1" + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", + "node_modules/find-cache-dir/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "license": "MIT", + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "array-back": "^3.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4.0.0" } }, - "node_modules/hash-base": { - "version": "3.1.0", - "license": "MIT", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "bin": { + "flat": "cli.js" } }, - "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, "dependencies": { - "function-bind": "^1.1.2" + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">= 0.4" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/hdkey": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-1.1.2.tgz", - "integrity": "sha512-PTQ4VKu0oRnCrYfLp04iQZ7T2Cxz0UsEXYauk2j8eh6PJXCpbXuCFhOmtIFtbET0i3PMWmHN9J11gU8LEgUljQ==", + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/follow-redirects": { + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dependencies": { - "bs58check": "^2.1.2", - "safe-buffer": "^5.1.1", - "secp256k1": "^3.0.1" + "is-callable": "^1.1.3" } }, - "node_modules/hdkey/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "engines": { + "node": "*" + } }, - "node_modules/hdkey/node_modules/secp256k1": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", - "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", - "hasInstallScript": true, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.5.2", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=4.0.0" + "node": ">= 6" } }, - "node_modules/hey-listen": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz", - "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==" + "node_modules/format-string-by-pattern": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/format-string-by-pattern/-/format-string-by-pattern-1.2.2.tgz", + "integrity": "sha512-dYhtZGK/V7iif43UGjHu3ExGASwmoDdHPIejcVv/dYnCjtkzFl4XIXqKuzryj26DaXMAwvEQ3FUv09fROvgY/Q==", + "engines": { + "node": ">=10" + } }, - "node_modules/history": { - "version": "4.10.1", - "license": "MIT", + "node_modules/fortmatic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fortmatic/-/fortmatic-1.1.3.tgz", + "integrity": "sha512-70gPiTuwfqEQNg4fFK5MVf3gRAW+mo2tHdiMSEt2OLKcoHWrAn63e/r245dPJAw4Qvz7PhkYF/bTx6ga50zWog==", "dependencies": { - "@babel/runtime": "^7.1.2", - "loose-envify": "^1.2.0", - "resolve-pathname": "^3.0.0", - "tiny-invariant": "^1.0.2", - "tiny-warning": "^1.0.0", - "value-equal": "^1.0.1" + "@babel/runtime": "7.3.4" } }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "license": "MIT", + "node_modules/fortmatic/node_modules/@babel/runtime": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz", + "integrity": "sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g==", "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "regenerator-runtime": "^0.12.0" } }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "license": "BSD-3-Clause", - "dependencies": { - "react-is": "^16.7.0" + "node_modules/fortmatic/node_modules/regenerator-runtime": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", + "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" } }, - "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", - "dev": true, + "node_modules/fp-future": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fp-future/-/fp-future-1.0.1.tgz", + "integrity": "sha512-2McmZH/KsZqlqHju9+Ox0FC7q7Knve4t6ZeKubbhAz1xpnD7hkCrP8TP5g5QbbD5bA5jBANbXf/ew4x1FjSUrw==" + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dependencies": { - "whatwg-encoding": "^2.0.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { "node": ">=12" } }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "node_modules/fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dependencies": { + "minipass": "^2.6.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + "node_modules/fsm-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fsm-iterator/-/fsm-iterator-1.1.0.tgz", + "integrity": "sha512-hg47CNYdIGJ5m9WSKh617LHRdvJo4PiF0VkncFLwPVxKvBEQfSPd1qx/xLV/eSusewEu0C8eUFrsLsWlBgIcOg==", + "dev": true }, - "node_modules/http-errors": { - "version": "1.8.1", - "license": "MIT", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==" + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, "engines": { - "node": ">= 6" + "node": ">=6.9.0" } }, - "node_modules/http-shutdown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/http-shutdown/-/http-shutdown-1.2.2.tgz", - "integrity": "sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw==", + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/http-signature": { - "version": "1.2.0", - "license": "MIT", + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" + "node": ">= 0.4" }, - "engines": { - "node": ">=10.19.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, "engines": { - "node": ">= 6" + "node": ">=8.0.0" } }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "node_modules/get-port-please": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.1.2.tgz", + "integrity": "sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==" + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "dependencies": { - "ms": "^2.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/husky": { - "version": "9.0.11", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", - "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", + "node_modules/get-tsconfig": { + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", + "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", "dev": true, - "bin": { - "husky": "bin.mjs" - }, - "engines": { - "node": ">=18" + "dependencies": { + "resolve-pkg-maps": "^1.0.0" }, "funding": { - "url": "https://github.com/sponsors/typicode" + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/hyphenate-style-name": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", - "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dependencies": { + "assert-plus": "^1.0.0" + } }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "node_modules/gl-vec2": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/gl-vec2/-/gl-vec2-1.3.0.tgz", + "integrity": "sha512-YiqaAuNsheWmUV0Sa8k94kBB0D6RWjwZztyO+trEYS8KzJ6OQB/4686gdrf59wld4hHFIvaxynO3nRxpk1Ij/A==" + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/idb-keyval": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.1.tgz", - "integrity": "sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==" - }, - "node_modules/identity-obj-proxy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz", - "integrity": "sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==", + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "harmony-reflect": "^1.4.6" + "is-glob": "^4.0.3" }, "engines": { - "node": ">=4" + "node": ">=10.13.0" } }, - "node_modules/idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "node_modules/glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dependencies": { - "punycode": "2.1.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=4.0.0" + "node": ">=10" } }, - "node_modules/idna-uts46-hx/node_modules/punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==", - "engines": { - "node": ">=6" + "node_modules/global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "dependencies": { + "min-document": "^2.19.0", + "process": "^0.11.10" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, "engines": { - "node": ">= 4" + "node": ">=4" } }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" - }, - "node_modules/immutable": { - "version": "4.0.0", - "license": "MIT", - "optional": true - }, - "node_modules/impetus": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/impetus/-/impetus-0.8.8.tgz", - "integrity": "sha512-7ejVjFxRAiBlnZQbdNGzUGgxMvLjVke/QNP2TFN/VK8baASsuRiE8YuSbD0qyiU8Pae+w95De4ZYz+rxSo5FJw==", + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dependencies": { + "define-properties": "^1.1.3" + }, "engines": { - "npm": ">=2.13.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" + "get-intrinsic": "^1.1.3" }, - "bin": { - "import-local-fixture": "fixtures/cli.js" + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=10.19.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sindresorhus/got?sponsor=1" } }, - "node_modules/import-local/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/graphql": { + "version": "14.7.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz", + "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==", "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "iterall": "^1.2.2" }, "engines": { - "node": ">=8" + "node": ">= 6.x" } }, - "node_modules/import-local/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, + "node_modules/h3": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/h3/-/h3-1.11.1.tgz", + "integrity": "sha512-AbaH6IDnZN6nmbnJOH72y3c5Wwh9P97soSVdGSBbcDACRdkC0FEWf25pzx4f/NuOCK6quHmW18yF2Wx+G4Zi1A==", "dependencies": { - "p-locate": "^4.1.0" - }, + "cookie-es": "^1.0.0", + "crossws": "^0.2.2", + "defu": "^6.1.4", + "destr": "^2.0.3", + "iron-webcrypto": "^1.0.0", + "ohash": "^1.1.3", + "radix3": "^1.1.0", + "ufo": "^1.4.0", + "uncrypto": "^0.1.3", + "unenv": "^1.9.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/import-local/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", "dependencies": { - "p-limit": "^2.2.0" + "ajv": "^6.12.3", + "har-schema": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/import-local/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, + "node_modules/har-validator/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dependencies": { - "find-up": "^4.0.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=8" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" + "node_modules/har-validator/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/harmony-reflect": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.2.tgz", + "integrity": "sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/indent-string": { + "node_modules/has-flag": { "version": "4.0.0", - "dev": true, - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "engines": { "node": ">=8" } }, - "node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/interface-ipld-format": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/interface-ipld-format/-/interface-ipld-format-1.0.1.tgz", - "integrity": "sha512-WV/ar+KQJVoQpqRDYdo7YPGYIUHJxCuOEhdvsRpzLqoOIVCqPKdMMYmsLL1nCRsF3yYNio+PAJbCKiv6drrEAg==", - "deprecated": "This module has been superseded by the multiformats module", - "dependencies": { - "cids": "^1.1.6", - "multicodec": "^3.0.1", - "multihashes": "^4.0.2" + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/internmap": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", - "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, "engines": { - "node": ">=12" + "node": ">=4" } }, - "node_modules/intl-messageformat": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz", - "integrity": "sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==", + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dependencies": { - "@formatjs/ecma402-abstract": "1.11.4", - "@formatjs/fast-memoize": "1.2.1", - "@formatjs/icu-messageformat-parser": "2.1.0", - "tslib": "^2.1.0" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" } }, - "node_modules/intl-messageformat/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } }, - "node_modules/ioredis": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.3.2.tgz", - "integrity": "sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==", + "node_modules/hdkey": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-1.1.2.tgz", + "integrity": "sha512-PTQ4VKu0oRnCrYfLp04iQZ7T2Cxz0UsEXYauk2j8eh6PJXCpbXuCFhOmtIFtbET0i3PMWmHN9J11gU8LEgUljQ==", "dependencies": { - "@ioredis/commands": "^1.1.1", - "cluster-key-slot": "^1.1.0", - "debug": "^4.3.4", - "denque": "^2.1.0", - "lodash.defaults": "^4.2.0", - "lodash.isarguments": "^3.1.0", - "redis-errors": "^1.2.0", - "redis-parser": "^3.0.0", - "standard-as-callback": "^2.1.0" + "bs58check": "^2.1.2", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + }, + "node_modules/hdkey/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/hdkey/node_modules/secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" }, "engines": { - "node": ">=12.22.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/ioredis" + "node": ">=4.0.0" } }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "license": "MIT", - "engines": { - "node": ">= 0.10" + "node_modules/hey-listen": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz", + "integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==" + }, + "node_modules/history": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "dependencies": { + "@babel/runtime": "^7.1.2", + "loose-envify": "^1.2.0", + "resolve-pathname": "^3.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^1.0.1" } }, - "node_modules/ipfs-unixfs": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-4.0.3.tgz", - "integrity": "sha512-hzJ3X4vlKT8FQ3Xc4M1szaFVjsc1ZydN+E4VQ91aXxfpjFn9G2wsMo1EFdAXNq/BUnN5dgqIOMP5zRYr3DTsAw==", + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", "dependencies": { - "err-code": "^3.0.1", - "protobufjs": "^6.10.2" - }, - "engines": { - "node": ">=14.0.0", - "npm": ">=7.0.0" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/ipfs-unixfs-importer": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ipfs-unixfs-importer/-/ipfs-unixfs-importer-7.0.3.tgz", - "integrity": "sha512-qeFOlD3AQtGzr90sr5Tq1Bi8pT5Nr2tSI8z310m7R4JDYgZc6J1PEZO3XZQ8l1kuGoqlAppBZuOYmPEqaHcVQQ==", - "dependencies": { - "bl": "^5.0.0", - "cids": "^1.1.5", - "err-code": "^3.0.1", - "hamt-sharding": "^2.0.0", - "ipfs-unixfs": "^4.0.3", - "ipld-dag-pb": "^0.22.2", - "it-all": "^1.0.5", - "it-batch": "^1.0.8", - "it-first": "^1.0.6", - "it-parallel-batch": "^1.0.9", - "merge-options": "^3.0.4", - "multihashing-async": "^2.1.0", - "rabin-wasm": "^0.1.4", - "uint8arrays": "^2.1.2" - }, - "engines": { - "node": ">=14.0.0", - "npm": ">=7.0.0" + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" } }, - "node_modules/ipld-dag-pb": { - "version": "0.22.3", - "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.22.3.tgz", - "integrity": "sha512-dfG5C5OVAR4FEP7Al2CrHWvAyIM7UhAQrjnOYOIxXGQz5NlEj6wGX0XQf6Ru6or1na6upvV3NQfstapQG8X2rg==", - "deprecated": "This module has been superseded by @ipld/dag-pb and multiformats", + "node_modules/html-encoding-sniffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "dev": true, "dependencies": { - "cids": "^1.0.0", - "interface-ipld-format": "^1.0.0", - "multicodec": "^3.0.1", - "multihashing-async": "^2.0.0", - "protobufjs": "^6.10.2", - "stable": "^0.1.8", - "uint8arrays": "^2.0.5" + "whatwg-encoding": "^2.0.0" }, "engines": { - "node": ">=6.0.0", - "npm": ">=3.0.0" + "node": ">=12" } }, - "node_modules/iron-webcrypto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.0.0.tgz", - "integrity": "sha512-anOK1Mktt8U1Xi7fCM3RELTuYbnFikQY5VtrDj7kPgpejV7d43tWKhzgioO0zpkazLEL/j/iayRqnJhrGfqUsg==", - "funding": { - "url": "https://github.com/sponsors/brc-dd" - } + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, - "node_modules/is-arguments": { - "version": "1.1.1", - "license": "MIT", + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8" } }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg==" }, - "node_modules/is-arrayish": { - "version": "0.2.1", + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, - "license": "MIT" - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "license": "MIT", "dependencies": { - "has-bigints": "^1.0.1" + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 6" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dependencies": { - "binary-extensions": "^2.0.0" - }, + "node_modules/http-shutdown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/http-shutdown/-/http-shutdown-1.2.2.tgz", + "integrity": "sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw==", "engines": { - "node": ">=8" + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" } }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "license": "MIT", + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.8", + "npm": ">=1.3.7" } }, - "node_modules/is-builtin-module": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", - "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", "dependencies": { - "builtin-modules": "^3.3.0" + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=10.19.0" } }, - "node_modules/is-builtin-module/node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "engines": { - "node": ">=6" + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 6" } }, - "node_modules/is-callable": { - "version": "1.2.4", - "license": "MIT", + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=10.17.0" } }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", "dependencies": { - "hasown": "^2.0.0" + "ms": "^2.0.0" + } + }, + "node_modules/husky": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", + "dev": true, + "bin": { + "husky": "bin.mjs" + }, + "engines": { + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/typicode" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "license": "MIT", + "node_modules/hyphenate-style-name": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", + "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dependencies": { - "has-tostringtag": "^1.0.0" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-docker": { + "node_modules/idb-keyval": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.1.tgz", + "integrity": "sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==" + }, + "node_modules/identity-obj-proxy": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "bin": { - "is-docker": "cli.js" + "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz", + "integrity": "sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==", + "dev": true, + "dependencies": { + "harmony-reflect": "^1.4.6" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "license": "MIT", + "node_modules/idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "dependencies": { + "punycode": "2.1.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=4.0.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", + "node_modules/idna-uts46-hx/node_modules/punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA==", "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/is-function": { - "version": "1.0.2", - "license": "MIT" + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/is-generator-fn": { - "version": "2.1.0", + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, - "license": "MIT", "engines": { - "node": ">=6" + "node": ">= 4" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, + "node_modules/immutable": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz", + "integrity": "sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==", + "optional": true + }, + "node_modules/impetus": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/impetus/-/impetus-0.8.8.tgz", + "integrity": "sha512-7ejVjFxRAiBlnZQbdNGzUGgxMvLjVke/QNP2TFN/VK8baASsuRiE8YuSbD0qyiU8Pae+w95De4ZYz+rxSo5FJw==", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "npm": ">=2.13.0" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "license": "MIT", + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, "dependencies": { - "is-extglob": "^2.1.1" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-hex-prefixed": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, "dependencies": { - "is-docker": "^3.0.0" + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" }, "bin": { - "is-inside-container": "cli.js" + "import-local-fixture": "fixtures/cli.js" }, "engines": { - "node": ">=14.16" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" } }, - "node_modules/is-module": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/is-number": { - "version": "7.0.0", - "license": "MIT", + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, "engines": { - "node": ">=0.12.0" + "node": ">=8" } }, - "node_modules/is-number-object": { + "node_modules/inflight": { "version": "1.0.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dependencies": { - "has-tostringtag": "^1.0.0" + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/intl-messageformat": { + "version": "9.13.0", + "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz", + "integrity": "sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==", "dependencies": { - "isobject": "^3.0.1" + "@formatjs/ecma402-abstract": "1.11.4", + "@formatjs/fast-memoize": "1.2.1", + "@formatjs/icu-messageformat-parser": "2.1.0", + "tslib": "^2.1.0" + } + }, + "node_modules/ioredis": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.3.2.tgz", + "integrity": "sha512-1DKMMzlIHM02eBBVOFQ1+AolGjs6+xEcM4PDL7NqOS6szq7H9jSaEkIUH6/a5Hl241LzW6JLSiAbNvTQjUupUA==", + "dependencies": { + "@ioredis/commands": "^1.1.1", + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.4", + "denque": "^2.1.0", + "lodash.defaults": "^4.2.0", + "lodash.isarguments": "^3.1.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ioredis" } }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dependencies": { - "@types/estree": "*" + "node_modules/iron-webcrypto": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.1.0.tgz", + "integrity": "sha512-5vgYsCakNlaQub1orZK5QmNYhwYtcllTkZBp5sfIaCqY93Cf6l+v2rtE+E4TMbcfjxDMCdrO8wmp7+ZvhDECLA==", + "funding": { + "url": "https://github.com/sponsors/brc-dd" } }, - "node_modules/is-regex": { - "version": "1.1.4", - "license": "MIT", + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -14035,67 +13382,55 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-stream": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true }, - "node_modules/is-string": { - "version": "1.0.7", - "license": "MIT", + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "has-bigints": "^1.0.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-symbol": { - "version": "1.0.4", - "license": "MIT", + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dependencies": { - "has-symbols": "^1.0.2" + "binary-extensions": "^2.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dependencies": { - "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", "has-tostringtag": "^1.0.0" }, "engines": { @@ -14105,370 +13440,264 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "license": "MIT" + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-weakset": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-wsl": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", - "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dependencies": { - "is-inside-container": "^1.0.0" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=16" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is64bit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is64bit/-/is64bit-2.0.0.tgz", - "integrity": "sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw==", - "dependencies": { - "system-architecture": "^0.1.0" + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "bin": { + "is-docker": "cli.js" }, "engines": { - "node": ">=18" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/isarray": { - "version": "2.0.5", - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "license": "ISC" - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "engines": { "node": ">=0.10.0" } }, - "node_modules/isomorphic-fetch": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==", - "dependencies": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - } - }, - "node_modules/isomorphic-fetch/node_modules/node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "dependencies": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "node_modules/isomorphic-ws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", - "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", - "peerDependencies": { - "ws": "*" - } - }, - "node_modules/isstream": { - "version": "0.1.2", - "license": "MIT" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.1.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "engines": { "node": ">=8" } }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } + "node_modules/is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==" }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/istanbul-lib-report/node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", "dependencies": { - "semver": "^7.5.3" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "is-extglob": "^2.1.1" }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", "engines": { - "node": ">=8" - } - }, - "node_modules/it-all": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/it-all/-/it-all-1.0.6.tgz", - "integrity": "sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A==" - }, - "node_modules/it-batch": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/it-batch/-/it-batch-1.0.9.tgz", - "integrity": "sha512-7Q7HXewMhNFltTsAMdSz6luNhyhkhEtGGbYek/8Xb/GiqYMtwUmopE1ocPSiJKKp3rM4Dt045sNFoUu+KZGNyA==" - }, - "node_modules/it-first": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/it-first/-/it-first-1.0.7.tgz", - "integrity": "sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g==" - }, - "node_modules/it-parallel-batch": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/it-parallel-batch/-/it-parallel-batch-1.0.11.tgz", - "integrity": "sha512-UWsWHv/kqBpMRmyZJzlmZeoAMA0F3SZr08FBdbhtbe+MtoEBgr/ZUAKrnenhXCBrsopy76QjRH2K/V8kNdupbQ==", - "dependencies": { - "it-batch": "^1.0.9" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/iterall": { - "version": "1.3.0", - "license": "MIT" - }, - "node_modules/jayson": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", - "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", "dependencies": { - "@types/connect": "^3.4.33", - "@types/node": "^12.12.54", - "@types/ws": "^7.4.4", - "commander": "^2.20.3", - "delay": "^5.0.0", - "es6-promisify": "^5.0.0", - "eyes": "^0.1.8", - "isomorphic-ws": "^4.0.1", - "json-stringify-safe": "^5.0.1", - "JSONStream": "^1.3.5", - "uuid": "^8.3.2", - "ws": "^7.4.5" + "is-docker": "^3.0.0" }, "bin": { - "jayson": "bin/jayson.js" + "is-inside-container": "cli.js" }, "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jayson/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" - }, - "node_modules/jayson/node_modules/@types/ws": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", - "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", - "dependencies": { - "@types/node": "*" + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jayson/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==" + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" } }, - "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", - "dev": true, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + "node": ">= 0.4" }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" + "isobject": "^3.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=0.10.0" } }, - "node_modules/jest-changed-files/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "@types/estree": "*" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-changed-files/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-changed-files/node_modules/is-stream": { + "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", @@ -14480,362 +13709,376 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-changed-files/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dependencies": { - "path-key": "^3.0.0" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-changed-files/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dependencies": { - "yocto-queue": "^0.1.0" + "has-symbols": "^1.0.2" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", - "dev": true, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" + "which-typed-array": "^1.1.14" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "engines": { + "node": ">= 0.4" }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-cli/node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", - "dev": true, + "node_modules/is-weakset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-cli/node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dev": true, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" + "is-inside-container": "^1.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-cli/node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dev": true, + "node_modules/is64bit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is64bit/-/is64bit-2.0.0.tgz", + "integrity": "sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw==", "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "system-architecture": "^0.1.0" + }, + "engines": { + "node": ">=18" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=0.10.0" } }, - "node_modules/jest-cli/node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", - "dev": true, + "node_modules/isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" } }, - "node_modules/jest-cli/node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, + "node_modules/isomorphic-fetch/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=0.10.0" } }, - "node_modules/jest-cli/node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, + "node_modules/isomorphic-fetch/node_modules/node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "encoding": "^0.1.11", + "is-stream": "^1.0.1" } }, - "node_modules/jest-cli/node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dev": true, + "node_modules/isomorphic-unfetch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", + "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node-fetch": "^2.6.1", + "unfetch": "^4.2.0" } }, - "node_modules/jest-cli/node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "peerDependencies": { + "ws": "*" } }, - "node_modules/jest-cli/node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, - "dependencies": { - "type-detect": "4.0.8" + "engines": { + "node": ">=8" } }, - "node_modules/jest-cli/node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "node_modules/istanbul-lib-instrument": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", "dev": true, "dependencies": { - "@sinonjs/commons": "^3.0.0" + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" } }, - "node_modules/jest-cli/node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "node_modules/istanbul-lib-instrument/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" + "yallist": "^4.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" + "node": ">=10" } }, - "node_modules/jest-cli/node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=10" } }, - "node_modules/jest-cli/node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "node_modules/istanbul-lib-instrument/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">=10" } }, - "node_modules/jest-cli/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-cli/node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true - }, - "node_modules/jest-cli/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" }, "engines": { - "node": ">=12" + "node": ">=8" } }, - "node_modules/jest-cli/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "node_modules/iterall": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==" + }, + "node_modules/jayson": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.0.tgz", + "integrity": "sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==", "dependencies": { - "color-name": "~1.1.4" + "@types/connect": "^3.4.33", + "@types/node": "^12.12.54", + "@types/ws": "^7.4.4", + "commander": "^2.20.3", + "delay": "^5.0.0", + "es6-promisify": "^5.0.0", + "eyes": "^0.1.8", + "isomorphic-ws": "^4.0.1", + "json-stringify-safe": "^5.0.1", + "JSONStream": "^1.3.5", + "uuid": "^8.3.2", + "ws": "^7.4.5" + }, + "bin": { + "jayson": "bin/jayson.js" }, "engines": { - "node": ">=7.0.0" + "node": ">=8" } }, - "node_modules/jest-cli/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "node_modules/jayson/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" }, - "node_modules/jest-cli/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true + "node_modules/jayson/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } }, - "node_modules/jest-cli/node_modules/dedent": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", - "dev": true, + "node_modules/jayson/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, "peerDependencies": { - "babel-plugin-macros": "^3.1.0" + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" }, "peerDependenciesMeta": { - "babel-plugin-macros": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { "optional": true } } }, - "node_modules/jest-cli/node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, "engines": { - "node": ">=12" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/jest-cli/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-circus": { + "node_modules/jest-circus": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", @@ -14866,7 +14109,72 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-config": { + "node_modules/jest-circus/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-circus/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", @@ -14911,82 +14219,88 @@ } } }, - "node_modules/jest-cli/node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "node_modules/jest-config/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-cli/node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "node_modules/jest-config/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/jest-cli/node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "node_modules/jest-config/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "*" } }, - "node_modules/jest-cli/node_modules/jest-haste-map": { + "node_modules/jest-config/node_modules/pretty-format": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" } }, - "node_modules/jest-cli/node_modules/jest-leak-detector": { + "node_modules/jest-config/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-diff": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" }, @@ -14994,621 +14308,694 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-mock": { + "node_modules/jest-diff/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-diff/node_modules/pretty-format": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "node_modules/jest-diff/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-resolve": { + "node_modules/jest-each": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "dependencies": { + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", + "jest-get-type": "^29.6.3", "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-runner": { + "node_modules/jest-each/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jest-each/node_modules/pretty-format": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-runtime": { + "node_modules/jest-each/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-environment-jsdom": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", + "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", "dev": true, "dependencies": { "@jest/environment": "^29.7.0", "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", + "@types/jsdom": "^20.0.0", "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" + "jsdom": "^20.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, - "node_modules/jest-cli/node_modules/jest-snapshot": { + "node_modules/jest-environment-node": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-watcher": { + "node_modules/jest-haste-map": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "dependencies": { - "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", "jest-util": "^29.7.0", - "string-length": "^4.0.1" + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "node_modules/jest-cli/node_modules/jest-worker": { + "node_modules/jest-leak-detector": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/jest-leak-detector/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-cli/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/jest-leak-detector/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/jest-leak-detector/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true }, - "node_modules/jest-cli/node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "node_modules/jest-matcher-utils/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-cli/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/jest-matcher-utils/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jest-matcher-utils/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-cli/node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "node_modules/jest-message-util/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "node_modules/jest-message-util/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-cli/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, "engines": { - "node": ">=12" + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } } }, - "node_modules/jest-cli/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, "engines": { - "node": ">=12" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-diff": { + "node_modules/jest-resolve": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom": { + "node_modules/jest-resolve-dependencies": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", - "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/jsdom": "^20.0.0", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0", - "jsdom": "^20.0.0" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } } }, - "node_modules/jest-environment-jsdom/node_modules/@jest/environment": { + "node_modules/jest-runner": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.7.0", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^29.7.0" + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/@jest/fake-timers": { + "node_modules/jest-runtime": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", "dev": true, "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", "jest-message-util": "^29.7.0", "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom/node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "node_modules/jest-runtime/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "type-detect": "4.0.8" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/jest-environment-jsdom/node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "@sinonjs/commons": "^3.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-runtime/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "node_modules/jest-environment-jsdom/node_modules/jest-mock": { + "node_modules/jest-snapshot": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "node_modules/jest-snapshot/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "yallist": "^4.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=10" } }, - "node_modules/jest-message-util": { + "node_modules/jest-snapshot/node_modules/pretty-format": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", + "node_modules/jest-snapshot/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" + "dependencies": { + "lru-cache": "^6.0.0" }, - "peerDependencies": { - "jest-resolve": "*" + "bin": { + "semver": "bin/semver.js" }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } + "engines": { + "node": ">=10" } }, - "node_modules/jest-resolve-dependencies": { + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/jest-util": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve-dependencies/node_modules/@jest/transform": { + "node_modules/jest-validate": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "dependencies": { - "@babel/core": "^7.11.6", "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", + "camelcase": "^6.2.0", "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve-dependencies/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/jest-resolve-dependencies/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/jest-validate/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-resolve-dependencies/node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=10" }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-resolve-dependencies/node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "node_modules/jest-validate/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve-dependencies/node_modules/jest-snapshot": { + "node_modules/jest-validate/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/jest-watcher": { "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", + "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", + "@types/node": "*", + "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", + "emittery": "^0.13.1", "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" + "string-length": "^4.0.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve-dependencies/node_modules/jest-worker": { + "node_modules/jest-worker": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", @@ -15623,7 +15010,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve-dependencies/node_modules/jest-worker/node_modules/supports-color": { + "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", @@ -15638,36 +15025,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jest-resolve-dependencies/node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jiti": { "version": "1.21.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", @@ -15682,9 +15039,9 @@ "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" }, "node_modules/js-base64": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.6.tgz", - "integrity": "sha512-NPrWuHFxFUknr1KqJRDgUQPexQF0uIJWjeT+2KjEePhitQxQEx5EJBG1lVn5/hc8aLycTpXrDOgPQ6Zq+EDiTA==" + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz", + "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==" }, "node_modules/js-sha3": { "version": "0.8.0", @@ -15693,15 +15050,16 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { - "version": "3.14.1", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -15709,7 +15067,8 @@ }, "node_modules/jsbn": { "version": "0.1.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, "node_modules/jsdom": { "version": "20.0.3", @@ -15738,119 +15097,29 @@ "tough-cookie": "^4.1.2", "w3c-xmlserializer": "^4.0.0", "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^11.0.0", - "ws": "^8.11.0", - "xml-name-validator": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/jsdom/node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsdom/node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jsdom/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/jsdom/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/jsdom/node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/jsdom/node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", - "dev": true, + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0", + "ws": "^8.11.0", + "xml-name-validator": "^4.0.0" + }, "engines": { - "node": ">=10.0.0" + "node": ">=14" }, "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" + "canvas": "^2.5.0" }, "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { + "canvas": { "optional": true } } }, "node_modules/jsesc": { "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true, - "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, @@ -15865,8 +15134,9 @@ }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-rpc-engine": { "version": "6.1.0", @@ -15887,11 +15157,13 @@ }, "node_modules/json-schema": { "version": "0.4.0", - "license": "(AFL-2.1 OR BSD-3-Clause)" + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "node_modules/json-schema-traverse": { "version": "1.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -15901,7 +15173,8 @@ }, "node_modules/json-stringify-safe": { "version": "5.0.1", - "license": "ISC" + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, "node_modules/json5": { "version": "2.2.3", @@ -15916,13 +15189,17 @@ } }, "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" }, "node_modules/jsonfile": { - "version": "4.0.0", - "license": "MIT", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -15952,7 +15229,8 @@ }, "node_modules/jsprim": { "version": "1.4.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -15964,9 +15242,10 @@ } }, "node_modules/keccak": { - "version": "3.0.2", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", "hasInstallScript": true, - "license": "MIT", "dependencies": { "node-addon-api": "^2.0.0", "node-gyp-build": "^4.2.0", @@ -16004,16 +15283,18 @@ }, "node_modules/kleur": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/leven": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -16053,31 +15334,32 @@ } }, "node_modules/lines-and-columns": { - "version": "1.1.6", - "dev": true, - "license": "MIT" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true }, "node_modules/listhen": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/listhen/-/listhen-1.6.0.tgz", - "integrity": "sha512-z0RcEXVX5oTpY1bO02SKoTU/kmZSrFSngNNzHRM6KICR17PTq7ANush6AE6ztGJwJD4RLpBrVHd9GnV51J7s3w==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/listhen/-/listhen-1.7.2.tgz", + "integrity": "sha512-7/HamOm5YD9Wb7CFgAZkKgVPA96WwhcTQoqtm2VTZGVbVVn3IWKRBTgrU7cchA3Q8k9iCsG8Osoi9GX4JsGM9g==", "dependencies": { - "@parcel/watcher": "^2.4.0", - "@parcel/watcher-wasm": "2.4.0", - "citty": "^0.1.5", + "@parcel/watcher": "^2.4.1", + "@parcel/watcher-wasm": "^2.4.1", + "citty": "^0.1.6", "clipboardy": "^4.0.0", "consola": "^3.2.3", - "crossws": "^0.1.0", + "crossws": "^0.2.0", "defu": "^6.1.4", "get-port-please": "^3.1.2", - "h3": "^1.10.1", + "h3": "^1.10.2", "http-shutdown": "^1.2.2", "jiti": "^1.21.0", - "mlly": "^1.5.0", + "mlly": "^1.6.1", "node-forge": "^1.3.1", "pathe": "^1.1.2", "std-env": "^3.7.0", - "ufo": "^1.3.2", + "ufo": "^1.4.0", "untun": "^0.1.3", "uqr": "^0.1.2" }, @@ -16155,7 +15437,8 @@ }, "node_modules/lodash.debounce": { "version": "4.0.8", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, "node_modules/lodash.defaults": { "version": "4.2.0", @@ -16180,11 +15463,13 @@ }, "node_modules/lodash.isequal": { "version": "4.5.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, "node_modules/lodash.isequalwith": { "version": "4.4.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.isequalwith/-/lodash.isequalwith-4.4.0.tgz", + "integrity": "sha512-dcZON0IalGBpRmJBmMkaoV7d3I80R2O+FrzsZyHdNSFrANq/cgDqKQNmAHE8UEj4+QYWwwhkQOVdLHiAopzlsQ==" }, "node_modules/lodash.isfunction": { "version": "3.0.9", @@ -16193,8 +15478,9 @@ }, "node_modules/lodash.ismatch": { "version": "4.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==", + "dev": true }, "node_modules/lodash.isobject": { "version": "3.0.2", @@ -16203,7 +15489,8 @@ }, "node_modules/lodash.merge": { "version": "4.6.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/lodash.reduce": { "version": "4.6.0", @@ -16226,13 +15513,14 @@ "integrity": "sha512-bwKX88k2JhCV9D1vtE8+naDKlLiGrSmf8zi/Y9ivFHwbmRfA8RxS/aVJ+sIht2XOwqoNr4xUPUkGZpc1sHFEKg==" }, "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "node_modules/loose-envify": { "version": "1.4.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -16253,9 +15541,9 @@ } }, "node_modules/lottie-web": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.12.0.tgz", - "integrity": "sha512-tt2oiv0EmXC8J/RF877dVCo93vZBBnww+SO6dldREgHD8EsP97jQ42JRryIRfY+6aVESQsHYNEAYgH25cBFy7A==" + "version": "5.12.2", + "resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.12.2.tgz", + "integrity": "sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg==" }, "node_modules/lowercase-keys": { "version": "2.0.0", @@ -16266,43 +15554,93 @@ } }, "node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "yallist": "^3.0.2" } }, "node_modules/lz-string": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "bin": { "lz-string": "bin/bin.js" } }, "node_modules/magic-sdk": { - "version": "21.4.1", - "resolved": "https://registry.npmjs.org/magic-sdk/-/magic-sdk-21.4.1.tgz", - "integrity": "sha512-T/v7XWjPWiLMASWiA9qAo6Yoo+swBj1t60kDxXgNumRg4rKbvWnBToNTMmVY3li0ORA8NkeymtLQwX/oeAVFhw==", + "version": "21.5.0", + "resolved": "https://registry.npmjs.org/magic-sdk/-/magic-sdk-21.5.0.tgz", + "integrity": "sha512-LNSTJGOO1wtJSwoEnO8ehH3RePdYc3lc0pD+SGZWyY78Ly6CgNE15lILBGJvpdaZjZd6wVqDYOf6Hh+PayuNKg==", "dependencies": { - "@magic-sdk/commons": "^17.4.1", - "@magic-sdk/provider": "^21.4.1", + "@magic-sdk/commons": "^17.5.0", + "@magic-sdk/provider": "^21.5.0", "@magic-sdk/types": "^17.3.0", "localforage": "^1.7.4" } }, "node_modules/magic-string": { - "version": "0.25.9", + "version": "0.30.8", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", + "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, - "license": "MIT", "dependencies": { - "sourcemap-codec": "^1.4.8" + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, + "node_modules/make-dir/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -16311,8 +15649,9 @@ }, "node_modules/makeerror": { "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "tmpl": "1.0.5" } @@ -16327,7 +15666,8 @@ }, "node_modules/md5.js": { "version": "1.3.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -16336,15 +15676,17 @@ }, "node_modules/media-typer": { "version": "0.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "engines": { "node": ">= 0.6" } }, "node_modules/memoize-decorator": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/memoize-decorator/-/memoize-decorator-1.0.2.tgz", + "integrity": "sha512-G2vHcq4c+EwnBAOeWCH1mNz99QPCgm4ECjhHOd3SFZm66jVlwhBLdqhCvnHxptaRyZfm8ap3igoeDfrO92+uHQ==", + "dev": true }, "node_modules/memoize-one": { "version": "5.2.1", @@ -16353,30 +15695,13 @@ }, "node_modules/merge-descriptors": { "version": "1.0.1", - "license": "MIT" - }, - "node_modules/merge-options": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", - "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==", - "dependencies": { - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/merge-options/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "engines": { - "node": ">=8" - } + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/merge-stream": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "node_modules/merge2": { "version": "1.4.1", @@ -16389,7 +15714,8 @@ }, "node_modules/methods": { "version": "1.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "engines": { "node": ">= 0.6" } @@ -16407,25 +15733,28 @@ } }, "node_modules/mime": { - "version": "1.6.0", - "license": "MIT", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", "bin": { "mime": "cli.js" }, "engines": { - "node": ">=4" + "node": ">=10.0.0" } }, "node_modules/mime-db": { "version": "1.52.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", - "license": "MIT", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { "mime-db": "1.52.0" }, @@ -16452,41 +15781,53 @@ }, "node_modules/min-document": { "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", "dependencies": { "dom-walk": "^0.1.0" } }, "node_modules/min-indent": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/minimalistic-assert": { "version": "1.0.1", - "license": "ISC" + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { - "version": "1.2.6", - "license": "MIT" + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minipass": { "version": "2.9.0", @@ -16497,11 +15838,6 @@ "yallist": "^3.0.0" } }, - "node_modules/minipass/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - }, "node_modules/minizlib": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", @@ -16511,13 +15847,14 @@ } }, "node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dependencies": { + "minimist": "^1.2.6" + }, "bin": { "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/mkdirp-promise": { @@ -16533,9 +15870,9 @@ } }, "node_modules/mlly": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.5.0.tgz", - "integrity": "sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.6.1.tgz", + "integrity": "sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==", "dependencies": { "acorn": "^8.11.3", "pathe": "^1.1.2", @@ -16543,17 +15880,6 @@ "ufo": "^1.3.2" } }, - "node_modules/mlly/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/mock-fs": { "version": "4.14.0", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", @@ -16562,142 +15888,53 @@ "node_modules/motion": { "version": "10.16.2", "resolved": "https://registry.npmjs.org/motion/-/motion-10.16.2.tgz", - "integrity": "sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ==", - "dependencies": { - "@motionone/animation": "^10.15.1", - "@motionone/dom": "^10.16.2", - "@motionone/svelte": "^10.16.2", - "@motionone/types": "^10.15.1", - "@motionone/utils": "^10.15.1", - "@motionone/vue": "^10.16.2" - } - }, - "node_modules/mouse-event-offset": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mouse-event-offset/-/mouse-event-offset-3.0.2.tgz", - "integrity": "sha512-s9sqOs5B1Ykox3Xo8b3Ss2IQju4UwlW6LSR+Q5FXWpprJ5fzMLefIIItr3PH8RwzfGy6gxs/4GAmiNuZScE25w==" - }, - "node_modules/mouse-wheel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mouse-wheel/-/mouse-wheel-1.2.0.tgz", - "integrity": "sha512-+OfYBiUOCTWcTECES49neZwL5AoGkXE+lFjIvzwNCnYRlso+EnfvovcBxGoyQ0yQt806eSPjS675K0EwWknXmw==", - "dependencies": { - "right-now": "^1.0.0", - "signum": "^1.0.0", - "to-px": "^1.0.1" - } - }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "engines": { - "node": ">=4" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "node_modules/multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "deprecated": "This module has been superseded by the multiformats module", - "dependencies": { - "@multiformats/base-x": "^4.0.1" - }, - "engines": { - "node": ">=12.0.0", - "npm": ">=6.0.0" - } - }, - "node_modules/multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "deprecated": "This module has been superseded by the multiformats module", - "dependencies": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - } - }, - "node_modules/multicodec/node_modules/uint8arrays": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", - "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "dependencies": { - "multiformats": "^9.4.2" - } - }, - "node_modules/multiformats": { - "version": "9.9.0", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz", - "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==" - }, - "node_modules/multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dependencies": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "engines": { - "node": ">=12.0.0", - "npm": ">=6.0.0" - } - }, - "node_modules/multihashes/node_modules/uint8arrays": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", - "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", - "dependencies": { - "multiformats": "^9.4.2" - } - }, - "node_modules/multihashes/node_modules/varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" - }, - "node_modules/multihashing-async": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-2.1.4.tgz", - "integrity": "sha512-sB1MiQXPSBTNRVSJc2zM157PXgDtud2nMFUEIvBrsq5Wv96sUclMRK/ecjoP1T/W61UJBqt4tCTwMkUpt2Gbzg==", - "dependencies": { - "blakejs": "^1.1.0", - "err-code": "^3.0.0", - "js-sha3": "^0.8.0", - "multihashes": "^4.0.1", - "murmurhash3js-revisited": "^3.0.0", - "uint8arrays": "^3.0.0" - }, - "engines": { - "node": ">=12.0.0", - "npm": ">=6.0.0" + "integrity": "sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ==", + "dependencies": { + "@motionone/animation": "^10.15.1", + "@motionone/dom": "^10.16.2", + "@motionone/svelte": "^10.16.2", + "@motionone/types": "^10.15.1", + "@motionone/utils": "^10.15.1", + "@motionone/vue": "^10.16.2" } }, - "node_modules/multihashing-async/node_modules/uint8arrays": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", - "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "node_modules/mouse-event-offset": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mouse-event-offset/-/mouse-event-offset-3.0.2.tgz", + "integrity": "sha512-s9sqOs5B1Ykox3Xo8b3Ss2IQju4UwlW6LSR+Q5FXWpprJ5fzMLefIIItr3PH8RwzfGy6gxs/4GAmiNuZScE25w==" + }, + "node_modules/mouse-wheel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mouse-wheel/-/mouse-wheel-1.2.0.tgz", + "integrity": "sha512-+OfYBiUOCTWcTECES49neZwL5AoGkXE+lFjIvzwNCnYRlso+EnfvovcBxGoyQ0yQt806eSPjS675K0EwWknXmw==", "dependencies": { - "multiformats": "^9.4.2" + "right-now": "^1.0.0", + "signum": "^1.0.0", + "to-px": "^1.0.1" } }, - "node_modules/murmurhash3js-revisited": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz", - "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==", + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", "engines": { - "node": ">=8.0.0" + "node": ">=4" } }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/multiformats": { + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz", + "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==" + }, "node_modules/nan": { "version": "2.14.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" }, "node_modules/nano-json-stream-parser": { "version": "0.1.2", @@ -16724,23 +15961,27 @@ }, "node_modules/natural-compare": { "version": "1.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true }, "node_modules/negotiator": { "version": "0.6.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "engines": { "node": ">= 0.6" } }, "node_modules/next-tick": { "version": "1.1.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" }, "node_modules/node-addon-api": { "version": "2.0.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" }, "node_modules/node-fetch": { "version": "2.7.0", @@ -16766,6 +16007,25 @@ "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.2.tgz", "integrity": "sha512-69mtXOFZ6hSkYiXAVB5SqaRvrbITC/NPyqv7yuu/qw0nmgPyYbIMYYNIDhNtwPrzk0ptrimrLz/hhjvm4w5Z+w==" }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -16775,8 +16035,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.3.0", - "license": "MIT", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -16785,18 +16046,20 @@ }, "node_modules/node-int64": { "version": "0.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-path": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "engines": { "node": ">=0.10.0" } @@ -16813,28 +16076,15 @@ } }, "node_modules/npm-run-path": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", - "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "path-key": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/number-to-bn": { @@ -16863,31 +16113,35 @@ }, "node_modules/oauth-sign": { "version": "0.9.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "engines": { "node": "*" } }, "node_modules/object-assign": { "version": "4.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { - "version": "1.12.0", - "license": "MIT", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-is": { - "version": "1.1.5", - "license": "MIT", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" }, "engines": { "node": ">= 0.4" @@ -16905,12 +16159,12 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -16950,8 +16204,9 @@ "integrity": "sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==" }, "node_modules/on-finished": { - "version": "2.3.0", - "license": "MIT", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dependencies": { "ee-first": "1.1.1" }, @@ -16961,7 +16216,8 @@ }, "node_modules/once": { "version": "1.4.0", - "license": "ISC", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dependencies": { "wrappy": "1" } @@ -17007,13 +16263,15 @@ } }, "node_modules/p-limit": { - "version": "2.3.0", - "license": "MIT", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "dependencies": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -17034,24 +16292,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-try": { "version": "2.2.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "engines": { "node": ">=6" } @@ -17079,12 +16323,14 @@ }, "node_modules/parse-headers": { "version": "2.0.5", - "license": "MIT" + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz", + "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==" }, "node_modules/parse-json": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -17115,21 +16361,10 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "node_modules/parse5/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/parseurl": { "version": "1.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "engines": { "node": ">= 0.8" } @@ -17144,26 +16379,38 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "engines": { "node": ">=8" } }, "node_modules/path-parse": { "version": "1.0.7", - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "license": "MIT" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/path-to-regexp/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" }, "node_modules/path-type": { "version": "4.0.0", @@ -17181,7 +16428,8 @@ }, "node_modules/pbkdf2": { "version": "3.1.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "dependencies": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -17195,16 +16443,19 @@ }, "node_modules/performance-now": { "version": "2.1.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "node_modules/picocolors": { "version": "1.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { "node": ">=8.6" }, @@ -17256,13 +16507,73 @@ "integrity": "sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==" }, "node_modules/pirates": { - "version": "4.0.5", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/pkg-types": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", @@ -17310,6 +16621,21 @@ "node": ">=6" } }, + "node_modules/pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/pkg-up/node_modules/p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", @@ -17339,10 +16665,46 @@ "node": ">=10.13.0" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, "node_modules/preact": { - "version": "10.17.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.17.1.tgz", - "integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA==", + "version": "10.19.6", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.6.tgz", + "integrity": "sha512-gympg+T2Z1fG1unB8NH29yHJwnEaCH37Z32diPDku316OTnRPeMbiRV9kTrfZpocXjdfnWuFUl/Mj4BHaf6gnw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -17385,17 +16747,17 @@ } }, "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.6.3", + "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "react-is": "^17.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { @@ -17411,14 +16773,15 @@ } }, "node_modules/pretty-format/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true }, "node_modules/process": { "version": "0.11.10", - "license": "MIT", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "engines": { "node": ">= 0.6.0" } @@ -17430,16 +16793,18 @@ }, "node_modules/progress": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/prompts": { - "version": "2.4.0", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, - "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -17450,7 +16815,8 @@ }, "node_modules/prop-types": { "version": "15.8.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -17458,9 +16824,9 @@ } }, "node_modules/protobufjs": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", - "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -17473,23 +16839,17 @@ "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", "@types/node": ">=13.7.0", - "long": "^4.0.0" + "long": "^5.0.0" }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" + "engines": { + "node": ">=12.0.0" } }, - "node_modules/protobufjs/node_modules/@types/node": { - "version": "20.4.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.0.tgz", - "integrity": "sha512-jfT7iTf/4kOQ9S7CHV9BIyRaQqHu67mOjsIQBC3BKZvzvUB6zLxEwJ6sBE3ozcvP8kF6Uk5PXN0Q+c0dfhGX0g==" - }, "node_modules/proxy-addr": { "version": "2.0.7", - "license": "MIT", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -17509,20 +16869,23 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "node_modules/psl": { - "version": "1.8.0", - "license": "MIT" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" }, "node_modules/pump": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "node_modules/punycode": { - "version": "2.1.1", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } @@ -17551,11 +16914,6 @@ "tweetnacl": "^1.0.3" } }, - "node_modules/pusher-js/node_modules/tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" - }, "node_modules/qrcode": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.3.tgz", @@ -17573,20 +16931,6 @@ "node": ">=10.13.0" } }, - "node_modules/qrcode/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/qrcode/node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -17597,22 +16941,6 @@ "wrap-ansi": "^6.2.0" } }, - "node_modules/qrcode/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/qrcode/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/qrcode/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -17636,6 +16964,20 @@ "node": ">=8" } }, + "node_modules/qrcode/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/qrcode/node_modules/p-locate": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", @@ -17660,6 +17002,11 @@ "node": ">=8" } }, + "node_modules/qrcode/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, "node_modules/qrcode/node_modules/yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", @@ -17694,8 +17041,12 @@ } }, "node_modules/qs": { - "version": "6.9.7", - "license": "BSD-3-Clause", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", + "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", + "dependencies": { + "side-channel": "^1.0.6" + }, "engines": { "node": ">=0.6" }, @@ -17704,22 +17055,27 @@ } }, "node_modules/query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", + "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", "dependencies": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" + "decode-uri-component": "^0.2.2", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/querystringify": { "version": "2.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -17757,26 +17113,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rabin-wasm": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/rabin-wasm/-/rabin-wasm-0.1.5.tgz", - "integrity": "sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==", - "dependencies": { - "@assemblyscript/loader": "^0.9.4", - "bl": "^5.0.0", - "debug": "^4.3.1", - "minimist": "^1.2.5", - "node-fetch": "^2.6.1", - "readable-stream": "^3.6.0" - }, - "bin": { - "rabin-wasm": "cli/bin.js" - } - }, "node_modules/radix3": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.0.tgz", - "integrity": "sha512-pNsHDxbGORSvuSScqNJ+3Km6QAVqk8CfsCBIEoDgpqLrkD2f3QM4I7d1ozJJ172OmIcoUcerZaNWqtLkRXTV3A==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.1.tgz", + "integrity": "sha512-yUUd5VTiFtcMEx0qFUxGAv5gbMc1un4RvEO1JZdP7ZUl/RHygZK6PknIKntmQRZxnMY3ZXD2ISaw1ij8GYW1yg==" }, "node_modules/raf": { "version": "3.4.1", @@ -17788,24 +17128,27 @@ }, "node_modules/randombytes": { "version": "2.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/range-parser": { "version": "1.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "2.4.3", - "license": "MIT", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" }, @@ -17815,7 +17158,8 @@ }, "node_modules/raw-body/node_modules/iconv-lite": { "version": "0.4.24", - "license": "MIT", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -17825,7 +17169,8 @@ }, "node_modules/react": { "version": "17.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -17835,11 +17180,11 @@ } }, "node_modules/react-countup": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/react-countup/-/react-countup-6.3.0.tgz", - "integrity": "sha512-uZsE+kuisXp/3OZeAuq2lzp6sXKmzw331Et5CRy4ueR9VcOp7z7T6/O1F04BC2Pa2frKmIITsghi3Hh933qWXQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/react-countup/-/react-countup-6.5.0.tgz", + "integrity": "sha512-26JFHbUHsHxu8SetkJwWVIUEkaNnrj4P9msxNGC8tS4hGr1bngRzbwtJYOgXD2G/ItjaKJ3JfYKd85sw7qRVeA==", "dependencies": { - "countup.js": "^2.2.0" + "countup.js": "^2.8.0" }, "peerDependencies": { "react": ">= 16.3.0" @@ -17847,7 +17192,8 @@ }, "node_modules/react-dom": { "version": "17.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", @@ -17859,8 +17205,9 @@ }, "node_modules/react-error-boundary": { "version": "3.1.4", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz", + "integrity": "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA==", "dev": true, - "license": "MIT", "dependencies": { "@babel/runtime": "^7.12.5" }, @@ -17878,52 +17225,28 @@ "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" }, "node_modules/react-intersection-observer": { - "version": "9.4.3", - "resolved": "https://registry.npmjs.org/react-intersection-observer/-/react-intersection-observer-9.4.3.tgz", - "integrity": "sha512-WNRqMQvKpupr6MzecAQI0Pj0+JQong307knLP4g/nBex7kYfIaZsPpXaIhKHR+oV8z+goUbH9e10j6lGRnTzlQ==", - "peerDependencies": { - "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/react-intl": { - "version": "5.25.1", - "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-5.25.1.tgz", - "integrity": "sha512-pkjdQDvpJROoXLMltkP/5mZb0/XqrqLoPGKUCfbdkP8m6U9xbK40K51Wu+a4aQqTEvEK5lHBk0fWzUV72SJ3Hg==", - "dependencies": { - "@formatjs/ecma402-abstract": "1.11.4", - "@formatjs/icu-messageformat-parser": "2.1.0", - "@formatjs/intl": "2.2.1", - "@formatjs/intl-displaynames": "5.4.3", - "@formatjs/intl-listformat": "6.5.3", - "@types/hoist-non-react-statics": "^3.3.1", - "@types/react": "16 || 17 || 18", - "hoist-non-react-statics": "^3.3.2", - "intl-messageformat": "9.13.0", - "tslib": "^2.1.0" - }, + "version": "9.8.1", + "resolved": "https://registry.npmjs.org/react-intersection-observer/-/react-intersection-observer-9.8.1.tgz", + "integrity": "sha512-QzOFdROX8D8MH3wE3OVKH0f3mLjKTtEN1VX/rkNuECCff+aKky0pIjulDhr3Ewqj5el/L+MhBkM3ef0Tbt+qUQ==", "peerDependencies": { - "react": "^16.3.0 || 17 || 18", - "typescript": "^4.5" + "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { - "typescript": { + "react-dom": { "optional": true } } }, - "node_modules/react-intl/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/react-is": { "version": "16.13.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react-lazy-load-image-component": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/react-lazy-load-image-component/-/react-lazy-load-image-component-1.5.6.tgz", - "integrity": "sha512-M0jeJtOlTHgThOfgYM9krSqYbR6ShxROy/KVankwbw9/amPKG1t5GSGN1sei6Cyu8+QJVuyAUvQ+LFtCVTTlKw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/react-lazy-load-image-component/-/react-lazy-load-image-component-1.6.0.tgz", + "integrity": "sha512-8KFkDTgjh+0+PVbH+cx0AgxLGbdTsxWMnxXzU5HEUztqewk9ufQAu8cstjZhyvtMIPsdMcPZfA0WAa7HtjQbBQ==", "dependencies": { "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1" @@ -17933,11 +17256,6 @@ "react-dom": "^15.x.x || ^16.x.x || ^17.x.x || ^18.x.x" } }, - "node_modules/react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" - }, "node_modules/react-popper": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.3.0.tgz", @@ -17953,18 +17271,19 @@ } }, "node_modules/react-redux": { - "version": "7.2.4", - "license": "MIT", + "version": "7.2.9", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz", + "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", "dependencies": { - "@babel/runtime": "^7.12.1", - "@types/react-redux": "^7.1.16", + "@babel/runtime": "^7.15.4", + "@types/react-redux": "^7.1.20", "hoist-non-react-statics": "^3.3.2", "loose-envify": "^1.4.0", "prop-types": "^15.7.2", - "react-is": "^16.13.1" + "react-is": "^17.0.2" }, "peerDependencies": { - "react": "^16.8.3 || ^17" + "react": "^16.8.3 || ^17 || ^18" }, "peerDependenciesMeta": { "react-dom": { @@ -17975,6 +17294,11 @@ } } }, + "node_modules/react-redux/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + }, "node_modules/react-responsive": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/react-responsive/-/react-responsive-9.0.2.tgz", @@ -18028,17 +17352,6 @@ "react": ">=15" } }, - "node_modules/react-router/node_modules/isarray": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/react-router/node_modules/path-to-regexp": { - "version": "1.8.0", - "license": "MIT", - "dependencies": { - "isarray": "0.0.1" - } - }, "node_modules/react-semantic-ui-datepickers": { "version": "2.17.2", "resolved": "https://registry.npmjs.org/react-semantic-ui-datepickers/-/react-semantic-ui-datepickers-2.17.2.tgz", @@ -18055,6 +17368,37 @@ "node": ">=14.0.0" } }, + "node_modules/react-semantic-ui-datepickers/node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + }, + "node_modules/react-semantic-ui-datepickers/node_modules/date-fns": { + "version": "2.29.3", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz", + "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==", + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, + "node_modules/react-smooth": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-4.0.0.tgz", + "integrity": "sha512-2NMXOBY1uVUQx1jBeENGA497HK20y6CPGYL1ZnJLeoQ8rrc3UfmOM82sRxtzpcoCkUMy4CS0RGylfuVhuFjBgg==", + "dependencies": { + "fast-equals": "^5.0.1", + "prop-types": "^15.8.1", + "react-transition-group": "^4.4.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-tile-map": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/react-tile-map/-/react-tile-map-0.4.1.tgz", @@ -18071,19 +17415,34 @@ "react-dom": ">=16.8.6" } }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, "node_modules/react-virtualized-auto-sizer": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.15.tgz", - "integrity": "sha512-01yhkssgHShMiu5W8k+86kgl8lutpl+Uef9KP4wrozXnzZjxWIgj+cH8Qi064oQpKD8myn/JNMzp4tcZNQ3Avg==", + "version": "1.0.24", + "resolved": "https://registry.npmjs.org/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.24.tgz", + "integrity": "sha512-3kCn7N9NEb3FlvJrSHWGQ4iVl+ydQObq2fHMn12i5wbtm74zHOPhz/i64OL3c1S1vi9i2GXtZqNqUJTQ+BnNfg==", "peerDependencies": { - "react": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0-rc", - "react-dom": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0-rc" + "react": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0", + "react-dom": "^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0" } }, "node_modules/react-window": { - "version": "1.8.8", - "resolved": "https://registry.npmjs.org/react-window/-/react-window-1.8.8.tgz", - "integrity": "sha512-D4IiBeRtGXziZ1n0XklnFGu7h9gU684zepqyKzgPNzrsrk7xOCxni+TCckjg2Nr/DiaEEGVVmnhYSlT2rB47dQ==", + "version": "1.8.10", + "resolved": "https://registry.npmjs.org/react-window/-/react-window-1.8.10.tgz", + "integrity": "sha512-Y0Cx+dnU6NLa5/EvoHukUD0BklJ8qITCtVEPY1C/nL8wwoZ0b5aEw8Ff1dOVHw7fCzMt55XfJDd8S8W8LCaUCg==", "dependencies": { "@babel/runtime": "^7.0.0", "memoize-one": ">=3.1.1 <6" @@ -18097,9 +17456,9 @@ } }, "node_modules/react-window-infinite-loader": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/react-window-infinite-loader/-/react-window-infinite-loader-1.0.8.tgz", - "integrity": "sha512-907ZLAiZZfBHuZyiY0V7uiSL4P/rI6UQyCF9wES1cDWTeyNLgGLaxu+BZkcUW3R5tSCQcbCcWBl0jVIpYzrKGQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/react-window-infinite-loader/-/react-window-infinite-loader-1.0.9.tgz", + "integrity": "sha512-5Hg89IdU4Vrp0RT8kZYKeTIxWZYhNkVXeI1HbKo01Vm/Z7qztDvXljwx16sMzsa9yapRJQW3ODZfMUw38SOWHw==", "engines": { "node": ">8.0.0" }, @@ -18109,8 +17468,9 @@ } }, "node_modules/readable-stream": { - "version": "3.6.0", - "license": "MIT", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -18145,25 +17505,23 @@ } }, "node_modules/recharts": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.3.2.tgz", - "integrity": "sha512-2II30fGzKaypHfHNQNUhCfiLMxrOS/gF0WFahDIEFgXtJkVEe2DpZWFfEfAn+RU3B7/h2V/B05Bwmqq3rTXwLw==", + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.12.2.tgz", + "integrity": "sha512-9bpxjXSF5g81YsKkTSlaX7mM4b6oYI1mIYck6YkUcWuL3tomADccI51/6thY4LmvhYuRTwpfrOvE80Zc3oBRfQ==", "dependencies": { - "classnames": "^2.2.5", + "clsx": "^2.0.0", "eventemitter3": "^4.0.1", - "lodash": "^4.17.19", + "lodash": "^4.17.21", "react-is": "^16.10.2", - "react-resize-detector": "^7.1.2", - "react-smooth": "^2.0.1", + "react-smooth": "^4.0.0", "recharts-scale": "^0.4.4", - "reduce-css-calc": "^2.1.8", + "tiny-invariant": "^1.3.1", "victory-vendor": "^36.6.8" }, "engines": { - "node": ">=12" + "node": ">=14" }, "peerDependencies": { - "prop-types": "^15.6.0", "react": "^16.0.0 || ^17.0.0 || ^18.0.0", "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" } @@ -18176,59 +17534,19 @@ "decimal.js-light": "^2.4.1" } }, - "node_modules/recharts/node_modules/dom-helpers": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.4.0.tgz", - "integrity": "sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==", - "dependencies": { - "@babel/runtime": "^7.1.2" - } - }, - "node_modules/recharts/node_modules/react-resize-detector": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/react-resize-detector/-/react-resize-detector-7.1.2.tgz", - "integrity": "sha512-zXnPJ2m8+6oq9Nn8zsep/orts9vQv3elrpA+R8XTcW7DVVUJ9vwDwMXaBtykAYjMnkCIaOoK9vObyR7ZgFNlOw==", - "dependencies": { - "lodash": "^4.17.21" - }, - "peerDependencies": { - "react": "^16.0.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/recharts/node_modules/react-smooth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-2.0.1.tgz", - "integrity": "sha512-Own9TA0GPPf3as4vSwFhDouVfXP15ie/wIHklhyKBH5AN6NFtdk0UpHBnonV11BtqDkAWlt40MOUc+5srmW7NA==", - "dependencies": { - "fast-equals": "^2.0.0", - "react-transition-group": "2.9.0" - }, - "peerDependencies": { - "prop-types": "^15.6.0", - "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/recharts/node_modules/react-smooth/node_modules/react-transition-group": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz", - "integrity": "sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==", - "dependencies": { - "dom-helpers": "^3.4.0", - "loose-envify": "^1.4.0", - "prop-types": "^15.6.2", - "react-lifecycles-compat": "^3.0.4" - }, - "peerDependencies": { - "react": ">=15.0.0", - "react-dom": ">=15.0.0" + "node_modules/recharts/node_modules/clsx": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", + "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "engines": { + "node": ">=6" } }, "node_modules/redent": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, - "license": "MIT", "dependencies": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" @@ -18256,20 +17574,6 @@ "node": ">=4" } }, - "node_modules/reduce-css-calc": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-2.1.8.tgz", - "integrity": "sha512-8liAVezDmUcH+tdzoEGrhfbGcP7nOV4NkGE3a74+qqvE7nt9i4sKLGBuZNOnpI4WiGksiNPklZxva80061QiPg==", - "dependencies": { - "css-unit-converter": "^1.1.1", - "postcss-value-parser": "^3.3.0" - } - }, - "node_modules/reduce-css-calc/node_modules/postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, "node_modules/reduce-flatten": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", @@ -18280,15 +17584,17 @@ } }, "node_modules/redux": { - "version": "4.1.1", - "license": "MIT", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", "dependencies": { "@babel/runtime": "^7.9.2" } }, "node_modules/redux-logger": { "version": "3.0.6", - "license": "MIT", + "resolved": "https://registry.npmjs.org/redux-logger/-/redux-logger-3.0.6.tgz", + "integrity": "sha512-JoCIok7bg/XpqA1JqCqXFypuqBbQzGQySrhFzewB7ThcnysTO30l4VCst86AuB9T9tuT03MAA56Jw2PNhRSNCg==", "dependencies": { "deep-diff": "^0.3.5" } @@ -18337,22 +17643,22 @@ } }, "node_modules/redux-saga": { - "version": "1.1.3", - "license": "MIT", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.3.0.tgz", + "integrity": "sha512-J9RvCeAZXSTAibFY0kGw6Iy4EdyDNW7k6Q+liwX+bsck7QVsU78zz8vpBRweEfANxnnlG/xGGeOvf6r8UXzNJQ==", "dependencies": { - "@redux-saga/core": "^1.1.3" + "@redux-saga/core": "^1.3.0" } }, "node_modules/redux-saga-test-plan": { - "version": "4.0.3", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/redux-saga-test-plan/-/redux-saga-test-plan-4.0.6.tgz", + "integrity": "sha512-ESdbFoDWCeJ/EiFdUNSCGtA2CC9tnuvHDm6k06gVFa98EIeR2hpzFkGk9kJ1/hpMUnYFp+OOEEITIrZeDYBfFg==", "dev": true, - "license": "MIT", "dependencies": { - "core-js": "^2.4.1", "fsm-iterator": "^1.1.0", "lodash.isequal": "^4.5.0", - "lodash.ismatch": "^4.4.0", - "object-assign": "^4.1.0" + "lodash.ismatch": "^4.4.0" }, "peerDependencies": { "@redux-saga/is": "^1.0.1", @@ -18382,14 +17688,20 @@ "lodash.merge": "^4.3.1" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -18400,7 +17712,9 @@ }, "node_modules/request": { "version": "2.88.2", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -18429,7 +17743,8 @@ }, "node_modules/request/node_modules/form-data": { "version": "2.3.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -18441,11 +17756,24 @@ }, "node_modules/request/node_modules/qs": { "version": "6.5.3", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "engines": { "node": ">=0.6" } }, + "node_modules/request/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/request/node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -18457,26 +17785,30 @@ }, "node_modules/require-directory": { "version": "2.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "engines": { "node": ">=0.10.0" } }, "node_modules/require-from-string": { "version": "2.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "engines": { "node": ">=0.10.0" } }, "node_modules/require-main-filename": { "version": "2.0.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "node_modules/requires-port": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true }, "node_modules/reselect": { "version": "4.0.0", @@ -18536,7 +17868,8 @@ }, "node_modules/resolve-pathname": { "version": "3.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==" }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", @@ -18597,9 +17930,52 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/ripemd160": { "version": "2.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" @@ -18607,7 +17983,8 @@ }, "node_modules/rlp": { "version": "2.2.7", - "license": "MPL-2.0", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", "dependencies": { "bn.js": "^5.2.0" }, @@ -18616,10 +17993,9 @@ } }, "node_modules/rollup": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.5.tgz", - "integrity": "sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==", - "dev": true, + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.1.tgz", + "integrity": "sha512-ggqQKvx/PsB0FaWXhIvVkSWh7a/PCLQAsMjBc+nA2M8Rv2/HG0X6zvixAB7KyZBRtifBUhy5k8voQX/mRnABPg==", "dependencies": { "@types/estree": "1.0.5" }, @@ -18631,19 +18007,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.5", - "@rollup/rollup-android-arm64": "4.9.5", - "@rollup/rollup-darwin-arm64": "4.9.5", - "@rollup/rollup-darwin-x64": "4.9.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.5", - "@rollup/rollup-linux-arm64-gnu": "4.9.5", - "@rollup/rollup-linux-arm64-musl": "4.9.5", - "@rollup/rollup-linux-riscv64-gnu": "4.9.5", - "@rollup/rollup-linux-x64-gnu": "4.9.5", - "@rollup/rollup-linux-x64-musl": "4.9.5", - "@rollup/rollup-win32-arm64-msvc": "4.9.5", - "@rollup/rollup-win32-ia32-msvc": "4.9.5", - "@rollup/rollup-win32-x64-msvc": "4.9.5", + "@rollup/rollup-android-arm-eabi": "4.12.1", + "@rollup/rollup-android-arm64": "4.12.1", + "@rollup/rollup-darwin-arm64": "4.12.1", + "@rollup/rollup-darwin-x64": "4.12.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.12.1", + "@rollup/rollup-linux-arm64-gnu": "4.12.1", + "@rollup/rollup-linux-arm64-musl": "4.12.1", + "@rollup/rollup-linux-riscv64-gnu": "4.12.1", + "@rollup/rollup-linux-x64-gnu": "4.12.1", + "@rollup/rollup-linux-x64-musl": "4.12.1", + "@rollup/rollup-win32-arm64-msvc": "4.12.1", + "@rollup/rollup-win32-ia32-msvc": "4.12.1", + "@rollup/rollup-win32-x64-msvc": "4.12.1", "fsevents": "~2.3.2" } }, @@ -18665,6 +18041,15 @@ "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", "dev": true }, + "node_modules/rollup-plugin-inject/node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.8" + } + }, "node_modules/rollup-plugin-node-polyfills": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz", @@ -18686,23 +18071,83 @@ "rollup": "^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" } }, + "node_modules/rollup-plugin-typescript2": { + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.35.0.tgz", + "integrity": "sha512-szcIO9hPUx3PhQl91u4pfNAH2EKbtrXaES+m163xQVE5O1CC0ea6YZV/5woiDDW3CR9jF2CszPrKN+AFiND0bg==", + "dependencies": { + "@rollup/pluginutils": "^4.1.2", + "find-cache-dir": "^3.3.2", + "fs-extra": "^10.0.0", + "semver": "^7.3.7", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "rollup": ">=1.26.3", + "typescript": ">=2.4.0" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/rollup-plugin-typescript2/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/rollup-pluginutils": { "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", "dev": true, - "license": "MIT", "dependencies": { "estree-walker": "^0.6.1" } }, "node_modules/rollup-pluginutils/node_modules/estree-walker": { "version": "0.6.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true }, "node_modules/rpc-websockets": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.6.0.tgz", - "integrity": "sha512-Jgcs8q6t8Go98dEulww1x7RysgTkzpCMelVxZW4hvuyFtOGpeUz9prpr2KjUa/usqxgFCd9Tu3+yhHEP9GVmiQ==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.9.0.tgz", + "integrity": "sha512-DwKewQz1IUA5wfLvgM8wDpPRcr+nWSxuFxx5CbrI2z/MyyZ4nXLM86TvIA+cI1ZAdqC8JIBR1mZR55dzaLU+Hw==", "dependencies": { "@babel/runtime": "^7.17.2", "eventemitter3": "^4.0.7", @@ -18726,26 +18171,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/rpc-websockets/node_modules/ws": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.1.tgz", - "integrity": "sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -18780,8 +18205,15 @@ "npm": ">=2.0.0" } }, + "node_modules/rxjs/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "funding": [ { "type": "github", @@ -18795,8 +18227,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/safe-stable-stringify": { "version": "2.4.3", @@ -18808,7 +18239,8 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/saxes": { "version": "6.0.0", @@ -18824,7 +18256,8 @@ }, "node_modules/scheduler": { "version": "0.20.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -18832,17 +18265,20 @@ }, "node_modules/scrypt-js": { "version": "3.0.1", - "license": "MIT" + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, "node_modules/seamless-immutable": { "version": "7.1.4", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/seamless-immutable/-/seamless-immutable-7.1.4.tgz", + "integrity": "sha512-XiUO1QP4ki4E2PHegiGAlu6r82o5A+6tRh7IkGGTVg/h+UoeX4nFBeCGPOhb4CYjvkqsfm/TUtvOMYC1xmV30A==", "optional": true }, "node_modules/secp256k1": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", "hasInstallScript": true, - "license": "MIT", "dependencies": { "elliptic": "^6.5.2", "node-addon-api": "^2.0.0", @@ -18885,36 +18321,31 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/send": { - "version": "0.17.2", - "license": "MIT", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "dependencies": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "engines": { "node": ">= 0.8.0" @@ -18922,23 +18353,37 @@ }, "node_modules/send/node_modules/debug": { "version": "2.6.9", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dependencies": { "ms": "2.0.0" } }, "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } }, "node_modules/serve-static": { - "version": "1.14.2", - "license": "MIT", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.2" + "send": "0.18.0" }, "engines": { "node": ">= 0.8.0" @@ -18961,30 +18406,34 @@ }, "node_modules/set-blocking": { "version": "2.0.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -18992,15 +18441,18 @@ }, "node_modules/setimmediate": { "version": "1.0.5", - "license": "MIT" + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, "node_modules/setprototypeof": { "version": "1.2.0", - "license": "ISC" + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/sha.js": { "version": "2.4.11", - "license": "(MIT AND BSD-3-Clause)", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -19032,7 +18484,8 @@ }, "node_modules/shebang-command": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -19042,18 +18495,24 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "engines": { "node": ">=8" } }, "node_modules/side-channel": { - "version": "1.0.4", - "license": "MIT", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -19061,8 +18520,9 @@ }, "node_modules/signal-exit": { "version": "3.0.7", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/signum": { "version": "1.0.0", @@ -19098,23 +18558,36 @@ "simple-concat": "^1.0.0" } }, + "node_modules/simple-get/node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/sisteransi": { "version": "1.0.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true }, "node_modules/slash": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/socket.io-client": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.3.tgz", - "integrity": "sha512-nU+ywttCyBitXIl9Xe0RSEfek4LneYkJxCeNnKCuhwoH4jGXO1ipIUw/VA/+Vvv2G1MTym11fzFC0SxkrcfXDw==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.4.tgz", + "integrity": "sha512-wh+OkeF0rAVCrABWQBaEjLfb7DVPotMbu0cgWgyR0v6eA4EoVnAwcIeIbcdTE3GT/H3kbdLl7OoH2+asoDRIIg==", "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.2", @@ -19145,27 +18618,45 @@ "atomic-sleep": "^1.0.0" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-js": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, - "license": "MIT" + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } }, - "node_modules/sparse-array": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/sparse-array/-/sparse-array-1.3.2.tgz", - "integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==" + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true }, "node_modules/split-on-first": { "version": "1.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", "engines": { "node": ">=6" } @@ -19180,12 +18671,14 @@ }, "node_modules/sprintf-js": { "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true }, "node_modules/sshpk": { - "version": "1.17.0", - "license": "MIT", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -19206,14 +18699,16 @@ "node": ">=0.10.0" } }, - "node_modules/stable": { - "version": "0.1.8", - "license": "MIT" + "node_modules/sshpk/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" }, "node_modules/stack-utils": { - "version": "2.0.5", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, - "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -19223,8 +18718,9 @@ }, "node_modules/stack-utils/node_modules/escape-string-regexp": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -19248,10 +18744,11 @@ } }, "node_modules/statuses": { - "version": "1.5.0", - "license": "MIT", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/std-env": { @@ -19285,15 +18782,17 @@ "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==" }, "node_modules/strict-uri-encode": { - "version": "1.1.0", - "license": "MIT", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, "node_modules/string_decoder": { "version": "1.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dependencies": { "safe-buffer": "~5.2.0" } @@ -19306,8 +18805,9 @@ }, "node_modules/string-length": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, - "license": "MIT", "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -19330,7 +18830,8 @@ }, "node_modules/string-width": { "version": "4.2.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -19342,7 +18843,8 @@ }, "node_modules/strip-ansi": { "version": "6.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -19350,6 +18852,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -19361,7 +18872,8 @@ }, "node_modules/strip-hex-prefix": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", "dependencies": { "is-hex-prefixed": "1.0.0" }, @@ -19372,8 +18884,9 @@ }, "node_modules/strip-indent": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, - "license": "MIT", "dependencies": { "min-indent": "^1.0.0" }, @@ -19383,8 +18896,9 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -19398,19 +18912,20 @@ "integrity": "sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==" }, "node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "engines": { "node": ">= 0.4" }, @@ -19477,11 +18992,37 @@ "xhr-request-promise": "^0.1.2" } }, + "node_modules/swarm-js/node_modules/fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "node_modules/swarm-js/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/swarm-js/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/swarm-js/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/swarm-js/node_modules/ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", @@ -19522,12 +19063,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/synckit/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - }, "node_modules/system-architecture": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/system-architecture/-/system-architecture-0.1.0.tgz", @@ -19598,33 +19133,60 @@ "node": ">=4.5" } }, - "node_modules/tar/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, "dependencies": { - "minimist": "^1.2.6" + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/tar/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - }, - "node_modules/test-exclude": { - "version": "6.0.0", + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=8" + "node": "*" } }, "node_modules/text-encoding-utf-8": { @@ -19660,22 +19222,26 @@ } }, "node_modules/tiny-invariant": { - "version": "1.2.0", - "license": "MIT" + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" }, "node_modules/tiny-warning": { "version": "1.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, "node_modules/tmpl": { "version": "1.0.5", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true }, "node_modules/to-fast-properties": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -19690,7 +19256,8 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dependencies": { "is-number": "^7.0.0" }, @@ -19700,7 +19267,8 @@ }, "node_modules/toidentifier": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "engines": { "node": ">=0.6" } @@ -19742,24 +19310,45 @@ } }, "node_modules/tough-cookie": { - "version": "2.5.0", - "license": "BSD-3-Clause", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dev": true, "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" }, "engines": { - "node": ">=0.8" + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" } }, "node_modules/tr46": { - "version": "0.0.3", - "license": "MIT" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "dev": true, + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } }, "node_modules/ts-api-utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", - "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, "engines": { "node": ">=16" @@ -19769,9 +19358,9 @@ } }, "node_modules/ts-command-line-args": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.3.1.tgz", - "integrity": "sha512-FR3y7pLl/fuUNSmnPhfLArGqRrpojQgIEEOVzYx9DhTmfIN7C9RWSfpkJEF4J+Gk7aVx5pak8I7vWZsaN4N84g==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", + "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", "dev": true, "dependencies": { "chalk": "^4.1.0", @@ -19835,26 +19424,16 @@ } } }, - "node_modules/ts-node/node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/tslib": { - "version": "1.14.1", - "license": "0BSD" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tslint": { "version": "5.20.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", + "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@babel/code-frame": "^7.0.0", "builtin-modules": "^1.1.1", @@ -19882,8 +19461,9 @@ }, "node_modules/tslint-clean-code": { "version": "0.2.10", + "resolved": "https://registry.npmjs.org/tslint-clean-code/-/tslint-clean-code-0.2.10.tgz", + "integrity": "sha512-MjfU3TVDB+oidhI/uAN/p0ncaqFnPq4L6nYtPvNp/MaFxM52jYtgx1qxf+uTIaQ7KZWZB/P9CpbL7/8WWSzQJg==", "dev": true, - "license": "MIT", "dependencies": { "memoize-decorator": "^1.0.2", "tsutils": "2.7.1" @@ -19892,10 +19472,17 @@ "tslint": ">=5.1.0" } }, + "node_modules/tslint-clean-code/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/tslint-clean-code/node_modules/tsutils": { "version": "2.7.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.7.1.tgz", + "integrity": "sha512-si/DcDXZX44S3Qpm0r6EzbHFL4QFvykgGXDgWUboMAGXUgIoYh9eRwFp+zoM0TBgR/MCbZFEZpijU+SstlbFaw==", "dev": true, - "license": "MIT", "dependencies": { "tslib": "^1.7.1" }, @@ -19935,8 +19522,9 @@ }, "node_modules/tslint-react": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/tslint-react/-/tslint-react-4.1.0.tgz", + "integrity": "sha512-Y7CbFn09X7Mpg6rc7t/WPbmjx9xPI8p1RsQyiGCLWgDR6sh3+IBSlT+bEkc0PSZcWwClOkqq2wPsID8Vep6szQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "tsutils": "^3.9.1" }, @@ -19945,10 +19533,72 @@ "typescript": ">=2.8.0" } }, + "node_modules/tslint-react/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tslint-react/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tslint/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/tslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/tslint/node_modules/builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/tslint/node_modules/chalk": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -19958,61 +19608,133 @@ "node": ">=4" } }, + "node_modules/tslint/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/tslint/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, "node_modules/tslint/node_modules/escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.0" } }, - "node_modules/tslint/node_modules/mkdirp": { - "version": "0.5.5", + "node_modules/tslint/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tslint/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "MIT", "dependencies": { - "minimist": "^1.2.5" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, "bin": { - "mkdirp": "bin/cmd.js" + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/tslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, "node_modules/tslint/node_modules/semver": { - "version": "5.7.1", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "license": "ISC", "bin": { "semver": "bin/semver" } }, - "node_modules/tslint/node_modules/tsutils": { - "version": "2.29.0", + "node_modules/tslint/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "license": "MIT", "dependencies": { - "tslib": "^1.8.1" + "has-flag": "^3.0.0" }, - "peerDependencies": { - "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + "engines": { + "node": ">=4" } }, + "node_modules/tslint/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/tsutils": { - "version": "3.21.0", + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", "dev": true, - "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, - "engines": { - "node": ">= 6" - }, "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" } }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/tunnel-agent": { "version": "0.6.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -20021,12 +19743,14 @@ } }, "node_modules/tweetnacl": { - "version": "0.14.5", - "license": "Unlicense" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" }, "node_modules/type": { - "version": "1.2.0", - "license": "ISC" + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" }, "node_modules/type-check": { "version": "0.4.0", @@ -20042,16 +19766,17 @@ }, "node_modules/type-detect": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, "engines": { "node": ">=10" @@ -20062,7 +19787,8 @@ }, "node_modules/type-is": { "version": "1.6.18", - "license": "MIT", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -20072,9 +19798,9 @@ } }, "node_modules/typechain": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.1.0.tgz", - "integrity": "sha512-5jToLgKTjHdI1VKqs/K8BLYy42Sr3o8bV5ojh4MnR9ExHO83cyyUdw+7+vMJCpKXUiVUvARM4qmHTFuyaCMAZQ==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", + "integrity": "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==", "dev": true, "dependencies": { "@types/prettier": "^2.1.1", @@ -20095,24 +19821,87 @@ "typescript": ">=4.3.0" } }, - "node_modules/typechain/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "node_modules/typechain/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/typechain/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/typechain/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typechain/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/typechain/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=6 <7 || >=8" + "node": "*" + } + }, + "node_modules/typechain/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/typechain/node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -20124,6 +19913,15 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/typechain/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/typed-url-params": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/typed-url-params/-/typed-url-params-1.0.1.tgz", @@ -20131,22 +19929,24 @@ }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dependencies": { "is-typedarray": "^1.0.0" } }, "node_modules/typesafe-actions": { "version": "5.1.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/typesafe-actions/-/typesafe-actions-5.1.0.tgz", + "integrity": "sha512-bna6Yi1pRznoo6Bz1cE6btB/Yy8Xywytyfrzu/wc+NFW3ZF0I+2iCGImhBsoYYCOWuICtRO4yHcnDlzgo1AdNg==", "engines": { "node": ">= 4" } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -20157,18 +19957,21 @@ }, "node_modules/typescript-compare": { "version": "0.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz", + "integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==", "dependencies": { "typescript-logic": "^0.0.0" } }, "node_modules/typescript-logic": { "version": "0.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/typescript-logic/-/typescript-logic-0.0.0.tgz", + "integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==" }, "node_modules/typescript-tuple": { "version": "2.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/typescript-tuple/-/typescript-tuple-2.2.1.tgz", + "integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==", "dependencies": { "typescript-compare": "^0.0.2" } @@ -20188,9 +19991,9 @@ "integrity": "sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==" }, "node_modules/uint8arrays": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", - "integrity": "sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", + "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", "dependencies": { "multiformats": "^9.4.2" } @@ -20222,422 +20025,804 @@ "pathe": "^1.1.1" } }, - "node_modules/unenv/node_modules/mime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", - "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", - "bin": { - "mime": "cli.js" + "node_modules/unfetch": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", + "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unorm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", + "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unstorage": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.10.1.tgz", + "integrity": "sha512-rWQvLRfZNBpF+x8D3/gda5nUCQL2PgXy2jNG4U7/Rc9BGEv9+CAJd0YyGCROUBKs9v49Hg8huw3aih5Bf5TAVw==", + "dependencies": { + "anymatch": "^3.1.3", + "chokidar": "^3.5.3", + "destr": "^2.0.2", + "h3": "^1.8.2", + "ioredis": "^5.3.2", + "listhen": "^1.5.5", + "lru-cache": "^10.0.2", + "mri": "^1.2.0", + "node-fetch-native": "^1.4.1", + "ofetch": "^1.3.3", + "ufo": "^1.3.1" + }, + "peerDependencies": { + "@azure/app-configuration": "^1.4.1", + "@azure/cosmos": "^4.0.0", + "@azure/data-tables": "^13.2.2", + "@azure/identity": "^3.3.2", + "@azure/keyvault-secrets": "^4.7.0", + "@azure/storage-blob": "^12.16.0", + "@capacitor/preferences": "^5.0.6", + "@netlify/blobs": "^6.2.0", + "@planetscale/database": "^1.11.0", + "@upstash/redis": "^1.23.4", + "@vercel/kv": "^0.2.3", + "idb-keyval": "^6.2.1" + }, + "peerDependenciesMeta": { + "@azure/app-configuration": { + "optional": true + }, + "@azure/cosmos": { + "optional": true + }, + "@azure/data-tables": { + "optional": true + }, + "@azure/identity": { + "optional": true + }, + "@azure/keyvault-secrets": { + "optional": true + }, + "@azure/storage-blob": { + "optional": true + }, + "@capacitor/preferences": { + "optional": true + }, + "@netlify/blobs": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/kv": { + "optional": true + }, + "idb-keyval": { + "optional": true + } + } + }, + "node_modules/unstorage/node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/untun": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/untun/-/untun-0.1.3.tgz", + "integrity": "sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ==", + "dependencies": { + "citty": "^0.1.5", + "consola": "^3.2.3", + "pathe": "^1.1.1" + }, + "bin": { + "untun": "bin/untun.mjs" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uqr": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/uqr/-/uqr-0.1.2.tgz", + "integrity": "sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA==" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==" + }, + "node_modules/use-sync-external-store": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/utf-8-validate": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", + "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=10.12.0" } }, - "node_modules/universalify": { - "version": "0.1.2", - "license": "MIT", + "node_modules/validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", "engines": { - "node": ">= 4.0.0" + "node": ">= 0.10" } }, - "node_modules/unorm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", - "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==", + "node_modules/valtio": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.11.2.tgz", + "integrity": "sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==", + "dependencies": { + "proxy-compare": "2.5.1", + "use-sync-external-store": "1.2.0" + }, "engines": { - "node": ">= 0.4.0" + "node": ">=12.20.0" + }, + "peerDependencies": { + "@types/react": ">=16.8", + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + } } }, - "node_modules/unpipe": { - "version": "1.0.0", - "license": "MIT", + "node_modules/value-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==" + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "engines": { "node": ">= 0.8" } }, - "node_modules/unstorage": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.10.1.tgz", - "integrity": "sha512-rWQvLRfZNBpF+x8D3/gda5nUCQL2PgXy2jNG4U7/Rc9BGEv9+CAJd0YyGCROUBKs9v49Hg8huw3aih5Bf5TAVw==", + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], "dependencies": { - "anymatch": "^3.1.3", - "chokidar": "^3.5.3", - "destr": "^2.0.2", - "h3": "^1.8.2", - "ioredis": "^5.3.2", - "listhen": "^1.5.5", - "lru-cache": "^10.0.2", - "mri": "^1.2.0", - "node-fetch-native": "^1.4.1", - "ofetch": "^1.3.3", - "ufo": "^1.3.1" + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/victory-vendor": { + "version": "36.9.1", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.9.1.tgz", + "integrity": "sha512-+pZIP+U3pEJdDCeFmsXwHzV7vNHQC/eIbHklfe2ZCZqayYRH7lQbHcVgsJ0XOOv27hWs4jH4MONgXxHMObTMSA==", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, + "node_modules/vite": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.6.tgz", + "integrity": "sha512-yYIAZs9nVfRJ/AiOLCA91zzhjsHUgMjB+EigzFb6W2XTLO8JixBCKCjvhKZaye+NKYHCrkv3Oh50dH9EdLU2RA==", + "dev": true, + "dependencies": { + "esbuild": "^0.19.3", + "postcss": "^8.4.35", + "rollup": "^4.2.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" }, "peerDependencies": { - "@azure/app-configuration": "^1.4.1", - "@azure/cosmos": "^4.0.0", - "@azure/data-tables": "^13.2.2", - "@azure/identity": "^3.3.2", - "@azure/keyvault-secrets": "^4.7.0", - "@azure/storage-blob": "^12.16.0", - "@capacitor/preferences": "^5.0.6", - "@netlify/blobs": "^6.2.0", - "@planetscale/database": "^1.11.0", - "@upstash/redis": "^1.23.4", - "@vercel/kv": "^0.2.3", - "idb-keyval": "^6.2.1" + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" }, "peerDependenciesMeta": { - "@azure/app-configuration": { - "optional": true - }, - "@azure/cosmos": { - "optional": true - }, - "@azure/data-tables": { - "optional": true - }, - "@azure/identity": { - "optional": true - }, - "@azure/keyvault-secrets": { - "optional": true - }, - "@azure/storage-blob": { + "@types/node": { "optional": true }, - "@capacitor/preferences": { + "less": { "optional": true }, - "@netlify/blobs": { + "lightningcss": { "optional": true }, - "@planetscale/database": { + "sass": { "optional": true }, - "@upstash/redis": { + "stylus": { "optional": true }, - "@vercel/kv": { + "sugarss": { "optional": true }, - "idb-keyval": { + "terser": { "optional": true } } }, - "node_modules/unstorage/node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": "14 || >=16.14" + "node": ">=12" } }, - "node_modules/untun": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/untun/-/untun-0.1.3.tgz", - "integrity": "sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ==", - "dependencies": { - "citty": "^0.1.5", - "consola": "^3.2.3", - "pathe": "^1.1.1" - }, - "bin": { - "untun": "bin/untun.mjs" + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } + "optional": true, + "os": [ + "freebsd" ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" + "engines": { + "node": ">=12" } }, - "node_modules/uqr": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/uqr/-/uqr-0.1.2.tgz", - "integrity": "sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA==" - }, - "node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/url-parse": { - "version": "1.5.10", + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg==" - }, - "node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", - "hasInstallScript": true, - "dependencies": { - "node-gyp-build": "^4.3.0" - }, + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.14.2" + "node": ">=12" } }, - "node_modules/utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "license": "MIT", + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.4.0" + "node": ">=12" } }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" ], - "bin": { - "uuid": "dist/bin/uuid" + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, - "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10.12.0" + "node": ">=12" } }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/validator": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", - "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 0.10" + "node": ">=12" } }, - "node_modules/valtio": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.11.2.tgz", - "integrity": "sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw==", - "dependencies": { - "proxy-compare": "2.5.1", - "use-sync-external-store": "1.2.0" - }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=12.20.0" - }, - "peerDependencies": { - "@types/react": ">=16.8", - "react": ">=16.8" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react": { - "optional": true - } + "node": ">=12" } }, - "node_modules/value-equal": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" - }, - "node_modules/vary": { - "version": "1.1.2", - "license": "MIT", + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">= 0.8" + "node": ">=12" } }, - "node_modules/verror": { - "version": "1.10.0", - "engines": [ - "node >=0.6.0" + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" ], - "license": "MIT", - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/victory-vendor": { - "version": "36.6.8", - "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.6.8.tgz", - "integrity": "sha512-H3kyQ+2zgjMPvbPqAl7Vwm2FD5dU7/4bCTQakFQnpIsfDljeOMDojRsrmJfwh4oAlNnWhpAf+mbAoLh8u7dwyQ==", - "dependencies": { - "@types/d3-array": "^3.0.3", - "@types/d3-ease": "^3.0.0", - "@types/d3-interpolate": "^3.0.1", - "@types/d3-scale": "^4.0.2", - "@types/d3-shape": "^3.1.0", - "@types/d3-time": "^3.0.0", - "@types/d3-timer": "^3.0.0", - "d3-array": "^3.1.6", - "d3-ease": "^3.0.1", - "d3-interpolate": "^3.0.1", - "d3-scale": "^4.0.2", - "d3-shape": "^3.1.0", - "d3-time": "^3.0.0", - "d3-timer": "^3.0.1" + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" } }, - "node_modules/vite": { - "version": "5.0.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.11.tgz", - "integrity": "sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==", + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "esbuild": "^0.19.3", - "postcss": "^8.4.32", - "rollup": "^4.2.0" - }, - "bin": { - "vite": "bin/vite.js" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } + "node": ">=12" } }, - "node_modules/vite/node_modules/postcss": { - "version": "8.4.33", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", - "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } + "optional": true, + "os": [ + "win32" ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" }, "engines": { - "node": "^10 || ^12 || >=14" + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" } }, "node_modules/w3c-xmlserializer": { @@ -20654,8 +20839,9 @@ }, "node_modules/walker": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "makeerror": "1.0.12" } @@ -20744,18 +20930,6 @@ "node": ">=8.0.0" } }, - "node_modules/web3-core-requestmanager/node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/web3-core-subscriptions": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.2.tgz", @@ -20773,6 +20947,14 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" }, + "node_modules/web3-core/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/web3-core/node_modules/@types/node": { "version": "12.20.55", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", @@ -20884,16 +21066,37 @@ "ws": "^6.1.0" } }, + "node_modules/web3x/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/web3x/node_modules/@types/node": { "version": "10.17.60", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" }, + "node_modules/web3x/node_modules/@types/ws": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-6.0.4.tgz", + "integrity": "sha512-PpPrX7SZW9re6+Ha8ojZG4Se8AZXgf0GK6zmfqEuCsY49LFDNXO3SByp44X3dFEqtB73lkCDAdUazhAjVPiNwg==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/web3x/node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, + "node_modules/web3x/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/web3x/node_modules/ws": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", @@ -20903,8 +21106,13 @@ } }, "node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "engines": { + "node": ">=12" + } }, "node_modules/websocket": { "version": "1.0.34", @@ -20948,8 +21156,9 @@ } }, "node_modules/whatwg-fetch": { - "version": "3.6.2", - "license": "MIT" + "version": "3.6.20", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", + "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==" }, "node_modules/whatwg-mimetype": { "version": "3.0.0", @@ -20961,16 +21170,22 @@ } }, "node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", + "dev": true, "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/which": { "version": "2.0.2", - "license": "ISC", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dependencies": { "isexe": "^2.0.0" }, @@ -20983,7 +21198,8 @@ }, "node_modules/which-boxed-primitive": { "version": "1.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -20996,33 +21212,37 @@ } }, "node_modules/which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dependencies": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-module": { - "version": "2.0.0", - "license": "ISC" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -21053,19 +21273,51 @@ "node": ">=8" } }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, "node_modules/ws": { - "version": "7.4.6", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -21078,7 +21330,8 @@ }, "node_modules/xhr": { "version": "2.6.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", + "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", "dependencies": { "global": "~4.4.0", "is-function": "^1.0.1", @@ -21108,6 +21361,27 @@ "xhr-request": "^1.1.0" } }, + "node_modules/xhr-request/node_modules/query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dependencies": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/xhr-request/node_modules/strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/xhr2-cookies": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", @@ -21150,14 +21424,20 @@ }, "node_modules/xtend": { "version": "4.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "engines": { "node": ">=0.4" } }, "node_modules/y18n": { - "version": "4.0.3", - "license": "ISC" + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } }, "node_modules/yaeti": { "version": "0.0.6", @@ -21168,8 +21448,36 @@ } }, "node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } }, "node_modules/yn": { "version": "3.1.1", @@ -21182,8 +21490,9 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, From daf4051c9b1c8dc11f511e7018d4040922fdcafd Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Mon, 11 Mar 2024 17:01:47 -0300 Subject: [PATCH 28/36] fix: Dependencies --- webapp/package-lock.json | 129 ++++++--------------------------------- webapp/package.json | 3 +- 2 files changed, 21 insertions(+), 111 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index e0ccc6586a..f02debb8ed 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -46,7 +46,7 @@ "react-window": "^1.8.8", "react-window-infinite-loader": "^1.0.8", "recharts": "^2.3.2", - "redux": "^4.1.1", + "redux": "4.1.1", "redux-logger": "^3.0.6", "redux-saga": "^1.1.3", "reselect": "4.0.0", @@ -60,6 +60,7 @@ "@sentry/cli": "^2.20.5", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", + "@testing-library/dom": "^9.3.4", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.4", "@testing-library/react-hooks": "^8.0.1", @@ -4488,6 +4489,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "android" @@ -4500,6 +4502,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "android" @@ -4512,6 +4515,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -4524,6 +4528,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -4536,6 +4541,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "linux" @@ -4548,6 +4554,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -4560,6 +4567,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -4572,6 +4580,7 @@ "cpu": [ "riscv64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -4584,6 +4593,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -4596,6 +4606,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -4608,6 +4619,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -4620,6 +4632,7 @@ "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "win32" @@ -4632,6 +4645,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -5437,7 +5451,6 @@ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", "dev": true, - "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -7385,30 +7398,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/babel-plugin-module-resolver": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", - "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", - "dev": true, - "peer": true, - "dependencies": { - "find-babel-config": "^2.0.0", - "glob": "^8.0.3", - "pkg-up": "^3.1.0", - "reselect": "^4.1.7", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">= 16" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/reselect": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", - "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", - "dev": true, - "peer": true - }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", @@ -9047,20 +9036,6 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, - "node_modules/dcl-tslint-config-standard/node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -9340,20 +9315,6 @@ "node": ">= 4" } }, - "node_modules/decentraland-dapps/node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "optional": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/decentraland-transactions": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-2.3.1.tgz", @@ -10078,45 +10039,6 @@ "node": ">=0.12" } }, - "node_modules/esbuild": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz", - "integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==", - "dev": true, - "hasInstallScript": true, - "peer": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.20.1", - "@esbuild/android-arm": "0.20.1", - "@esbuild/android-arm64": "0.20.1", - "@esbuild/android-x64": "0.20.1", - "@esbuild/darwin-arm64": "0.20.1", - "@esbuild/darwin-x64": "0.20.1", - "@esbuild/freebsd-arm64": "0.20.1", - "@esbuild/freebsd-x64": "0.20.1", - "@esbuild/linux-arm": "0.20.1", - "@esbuild/linux-arm64": "0.20.1", - "@esbuild/linux-ia32": "0.20.1", - "@esbuild/linux-loong64": "0.20.1", - "@esbuild/linux-mips64el": "0.20.1", - "@esbuild/linux-ppc64": "0.20.1", - "@esbuild/linux-riscv64": "0.20.1", - "@esbuild/linux-s390x": "0.20.1", - "@esbuild/linux-x64": "0.20.1", - "@esbuild/netbsd-x64": "0.20.1", - "@esbuild/openbsd-x64": "0.20.1", - "@esbuild/sunos-x64": "0.20.1", - "@esbuild/win32-arm64": "0.20.1", - "@esbuild/win32-ia32": "0.20.1", - "@esbuild/win32-x64": "0.20.1" - } - }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -12268,20 +12190,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/find-babel-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", - "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", - "dev": true, - "peer": true, - "dependencies": { - "json5": "^2.1.1", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -17584,9 +17492,9 @@ } }, "node_modules/redux": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", - "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.1.tgz", + "integrity": "sha512-hZQZdDEM25UY2P493kPYuKqviVwZ58lEmGQNeQ+gXa+U0gYPUBf7NKYazbe3m+bs/DzM/ahN12DbF+NG8i0CWw==", "dependencies": { "@babel/runtime": "^7.9.2" } @@ -17996,6 +17904,7 @@ "version": "4.12.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.1.tgz", "integrity": "sha512-ggqQKvx/PsB0FaWXhIvVkSWh7a/PCLQAsMjBc+nA2M8Rv2/HG0X6zvixAB7KyZBRtifBUhy5k8voQX/mRnABPg==", + "dev": true, "dependencies": { "@types/estree": "1.0.5" }, diff --git a/webapp/package.json b/webapp/package.json index a28aaff6d5..f86f9d903d 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -41,7 +41,7 @@ "react-window": "^1.8.8", "react-window-infinite-loader": "^1.0.8", "recharts": "^2.3.2", - "redux": "^4.1.1", + "redux": "4.1.1", "redux-logger": "^3.0.6", "redux-saga": "^1.1.3", "reselect": "4.0.0", @@ -55,6 +55,7 @@ "@sentry/cli": "^2.20.5", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", + "@testing-library/dom": "^9.3.4", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.4", "@testing-library/react-hooks": "^8.0.1", From 9a5c2de30bf60d2efd105cd176ead9802dca0bee Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Mon, 11 Mar 2024 17:11:33 -0300 Subject: [PATCH 29/36] fix: React-redux --- webapp/package-lock.json | 2 +- webapp/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index f02debb8ed..40eeb5a54f 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -78,7 +78,7 @@ "@types/react-virtualized-auto-sizer": "^1.0.1", "@types/react-window": "^1.8.5", "@types/react-window-infinite-loader": "^1.0.6", - "@types/redux": "^3.6.0", + "@types/redux": "3.6.0", "@types/redux-logger": "^3.0.9", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", diff --git a/webapp/package.json b/webapp/package.json index f86f9d903d..cd68780f15 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -73,7 +73,7 @@ "@types/react-virtualized-auto-sizer": "^1.0.1", "@types/react-window": "^1.8.5", "@types/react-window-infinite-loader": "^1.0.6", - "@types/redux": "^3.6.0", + "@types/redux": "3.6.0", "@types/redux-logger": "^3.0.9", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", From d188ea449e7aacbc89ccdec97d045380811ac9dc Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Mon, 11 Mar 2024 17:13:37 -0300 Subject: [PATCH 30/36] Revert "fix: React-redux" This reverts commit 9a5c2de30bf60d2efd105cd176ead9802dca0bee. --- webapp/package-lock.json | 2 +- webapp/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 40eeb5a54f..f02debb8ed 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -78,7 +78,7 @@ "@types/react-virtualized-auto-sizer": "^1.0.1", "@types/react-window": "^1.8.5", "@types/react-window-infinite-loader": "^1.0.6", - "@types/redux": "3.6.0", + "@types/redux": "^3.6.0", "@types/redux-logger": "^3.0.9", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", diff --git a/webapp/package.json b/webapp/package.json index cd68780f15..f86f9d903d 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -73,7 +73,7 @@ "@types/react-virtualized-auto-sizer": "^1.0.1", "@types/react-window": "^1.8.5", "@types/react-window-infinite-loader": "^1.0.6", - "@types/redux": "3.6.0", + "@types/redux": "^3.6.0", "@types/redux-logger": "^3.0.9", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", From 9f4a6859388cb26724bbabfe14d8d744b449c0b1 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Mon, 11 Mar 2024 17:17:42 -0300 Subject: [PATCH 31/36] fix: Redux-logger version --- webapp/package-lock.json | 2 +- webapp/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index f02debb8ed..cb804a2745 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -47,7 +47,7 @@ "react-window-infinite-loader": "^1.0.8", "recharts": "^2.3.2", "redux": "4.1.1", - "redux-logger": "^3.0.6", + "redux-logger": "3.0.6", "redux-saga": "^1.1.3", "reselect": "4.0.0", "typesafe-actions": "^5.1.0", diff --git a/webapp/package.json b/webapp/package.json index f86f9d903d..0510e8b22f 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -42,7 +42,7 @@ "react-window-infinite-loader": "^1.0.8", "recharts": "^2.3.2", "redux": "4.1.1", - "redux-logger": "^3.0.6", + "redux-logger": "3.0.6", "redux-saga": "^1.1.3", "reselect": "4.0.0", "typesafe-actions": "^5.1.0", From 8facb02f807d746ccb36197e3c034b4a31337c32 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Mon, 11 Mar 2024 17:30:36 -0300 Subject: [PATCH 32/36] fix: Redux-logger types --- webapp/package-lock.json | 33 ++++++++++++++++++++++++--------- webapp/package.json | 2 +- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index cb804a2745..1401b2a2ec 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -79,7 +79,7 @@ "@types/react-window": "^1.8.5", "@types/react-window-infinite-loader": "^1.0.6", "@types/redux": "^3.6.0", - "@types/redux-logger": "^3.0.9", + "@types/redux-logger": "3.0.6", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "@vitejs/plugin-react-swc": "^3.5.0", @@ -6111,19 +6111,34 @@ } }, "node_modules/@types/redux-logger": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/@types/redux-logger/-/redux-logger-3.0.13.tgz", - "integrity": "sha512-jylqZXQfMxahkuPcO8J12AKSSCQngdEWQrw7UiLUJzMBcv1r4Qg77P6mjGLjM27e5gFQDPD8vwUMJ9AyVxFSsg==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/redux-logger/-/redux-logger-3.0.6.tgz", + "integrity": "sha512-HXVJnbyuTcVtQ+qiwDcbLEMoOgNjKnNYVKx29P4NhV+FIgVVRCFILEPzjgSxlmMLc6aBVaEew7PfE3421DZ6Jw==", "dev": true, "dependencies": { - "redux": "^5.0.0" + "redux": "^3.6.0" } }, "node_modules/@types/redux-logger/node_modules/redux": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", - "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", - "dev": true + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", + "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==", + "dev": true, + "dependencies": { + "lodash": "^4.2.1", + "lodash-es": "^4.2.1", + "loose-envify": "^1.1.0", + "symbol-observable": "^1.0.3" + } + }, + "node_modules/@types/redux-logger/node_modules/symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, "node_modules/@types/resolve": { "version": "1.20.2", diff --git a/webapp/package.json b/webapp/package.json index 0510e8b22f..de8b671447 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -74,7 +74,7 @@ "@types/react-window": "^1.8.5", "@types/react-window-infinite-loader": "^1.0.6", "@types/redux": "^3.6.0", - "@types/redux-logger": "^3.0.9", + "@types/redux-logger": "3.0.6", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "@vitejs/plugin-react-swc": "^3.5.0", From 22d8e37aa3740d32416615c2548e6b5d474c53a5 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz <gabrieldiaz31@gmail.com> Date: Mon, 11 Mar 2024 17:33:48 -0300 Subject: [PATCH 33/36] fix: package-lock.json --- webapp/package-lock.json | 119 ++++++++++++++++++++++++++++++++++----- 1 file changed, 105 insertions(+), 14 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 1401b2a2ec..f493659ac5 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -4489,7 +4489,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "android" @@ -4502,7 +4501,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "android" @@ -4515,7 +4513,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -4528,7 +4525,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -4541,7 +4537,6 @@ "cpu": [ "arm" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4554,7 +4549,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4567,7 +4561,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4580,7 +4573,6 @@ "cpu": [ "riscv64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4593,7 +4585,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4606,7 +4597,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -4619,7 +4609,6 @@ "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -4632,7 +4621,6 @@ "cpu": [ "ia32" ], - "dev": true, "optional": true, "os": [ "win32" @@ -4645,7 +4633,6 @@ "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -7413,6 +7400,30 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/babel-plugin-module-resolver": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", + "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", + "dev": true, + "peer": true, + "dependencies": { + "find-babel-config": "^2.0.0", + "glob": "^8.0.3", + "pkg-up": "^3.1.0", + "reselect": "^4.1.7", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/reselect": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", + "dev": true, + "peer": true + }, "node_modules/babel-preset-current-node-syntax": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", @@ -9051,6 +9062,20 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, + "node_modules/dcl-tslint-config-standard/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -9330,6 +9355,20 @@ "node": ">= 4" } }, + "node_modules/decentraland-dapps/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "optional": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/decentraland-transactions": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-2.3.1.tgz", @@ -10054,6 +10093,45 @@ "node": ">=0.12" } }, + "node_modules/esbuild": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz", + "integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==", + "dev": true, + "hasInstallScript": true, + "peer": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.20.1", + "@esbuild/android-arm": "0.20.1", + "@esbuild/android-arm64": "0.20.1", + "@esbuild/android-x64": "0.20.1", + "@esbuild/darwin-arm64": "0.20.1", + "@esbuild/darwin-x64": "0.20.1", + "@esbuild/freebsd-arm64": "0.20.1", + "@esbuild/freebsd-x64": "0.20.1", + "@esbuild/linux-arm": "0.20.1", + "@esbuild/linux-arm64": "0.20.1", + "@esbuild/linux-ia32": "0.20.1", + "@esbuild/linux-loong64": "0.20.1", + "@esbuild/linux-mips64el": "0.20.1", + "@esbuild/linux-ppc64": "0.20.1", + "@esbuild/linux-riscv64": "0.20.1", + "@esbuild/linux-s390x": "0.20.1", + "@esbuild/linux-x64": "0.20.1", + "@esbuild/netbsd-x64": "0.20.1", + "@esbuild/openbsd-x64": "0.20.1", + "@esbuild/sunos-x64": "0.20.1", + "@esbuild/win32-arm64": "0.20.1", + "@esbuild/win32-ia32": "0.20.1", + "@esbuild/win32-x64": "0.20.1" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -12205,6 +12283,20 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/find-babel-config": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", + "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", + "dev": true, + "peer": true, + "dependencies": { + "json5": "^2.1.1", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -17919,7 +18011,6 @@ "version": "4.12.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.1.tgz", "integrity": "sha512-ggqQKvx/PsB0FaWXhIvVkSWh7a/PCLQAsMjBc+nA2M8Rv2/HG0X6zvixAB7KyZBRtifBUhy5k8voQX/mRnABPg==", - "dev": true, "dependencies": { "@types/estree": "1.0.5" }, From 9e49665fce5db216f6afab9564dd69a425f9e281 Mon Sep 17 00:00:00 2001 From: Gabriel Diaz <gabrieldiaz31@gmail.com> Date: Mon, 11 Mar 2024 17:36:52 -0300 Subject: [PATCH 34/36] chore: Upgrade audit workflow --- .github/workflows/audit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 1300c4f8ed..f9ffd36503 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -16,6 +16,8 @@ jobs: node-version: 18.x cache: "npm" cache-dependency-path: webapp/package-lock.json + - name: Upgrade npm + run: npm i -g npm - name: Install run: npm i --legacy-peer-deps - name: Audit signatures From 33445648239ff9a90f030b71818189daf165f300 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Mon, 11 Mar 2024 18:25:10 -0300 Subject: [PATCH 35/36] fix: Removed unecessary override --- webapp/.eslintrc.cjs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/webapp/.eslintrc.cjs b/webapp/.eslintrc.cjs index cd87ec3421..eb81ca74cf 100644 --- a/webapp/.eslintrc.cjs +++ b/webapp/.eslintrc.cjs @@ -7,22 +7,6 @@ module.exports = { }, plugins: ['react-hooks'], overrides: [ - { - files: ['*.js', '*.ts', '*.tsx'], - rules: { - ['prettier/prettier']: [ - 'error', - { - semi: false, - singleQuote: true, - printWidth: 140, - tabWidth: 2, - trailingComma: 'none', - arrowParens: 'avoid' - } - ] - } - }, { files: ['*.ts', '*.tsx', '*.cjs'], extends: ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'prettier'], From e7bff2db650b881297a32cbde1ca69c7c8bdb560 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <lausuper@gmail.com> Date: Mon, 11 Mar 2024 18:40:16 -0300 Subject: [PATCH 36/36] fix: Job name --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6f339ad644..779b600345 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -3,7 +3,7 @@ name: Lint on: [push, pull_request] jobs: - test: + lint: runs-on: ubuntu-latest defaults: run: