From 63c17c0e4acd9f348029e00632ee936b51c9725f Mon Sep 17 00:00:00 2001 From: Albert Folch Date: Thu, 16 Jan 2025 19:49:09 +0100 Subject: [PATCH] wip --- .eslintrc | 13 +- .gitignore | 3 +- .husky/pre-commit | 4 + package-lock.json | 52 +- package.json | 3 +- packages/react-kit/.eslintignore | 32 + packages/react-kit/.gitignore | 3 +- packages/react-kit/.husky/pre-commit | 1 - packages/react-kit/CHANGELOG.md | 734 ++-- packages/react-kit/package.json | 6 +- .../src/components/avatar/SellerID.tsx | 4 +- .../components/Commit/OfferVariantView.tsx | 2 +- .../Redeem/Confirmation/ConfirmationView.tsx | 2 +- .../components/Redeem/RedeemNonModal.tsx | 6 +- .../FairExchangePolicy.tsx | 2 +- .../components/common/detail/Detail.style.tsx | 1 - .../detail/InnerDetailViewWithPortal.tsx | 1 - .../react-kit/src/components/price/Price.tsx | 4 +- .../convertion-rate/useUniswapPools.ts | 1 + .../typechain/BosonSnapshotGate.js | 1 - .../BosonSnapshotGate/typechain/common.js | 1 - .../factories/BosonSnapshotGate__factory.js | 1 - .../typechain/factories/index.js | 1 - .../BosonSnapshotGate/typechain/index.js | 2 +- .../src/hooks/uniswap/useInterval.ts | 6 +- .../react-kit/src/hooks/useCtaClickHandler.ts | 1 + .../react-kit/src/hooks/useCurrentSellers.ts | 2 +- packages/react-kit/src/hooks/useLast.ts | 4 +- packages/react-kit/src/lib/address/address.ts | 2 +- packages/react-kit/src/lib/const/chainInfo.ts | 8 +- packages/react-kit/src/lib/const/chains.ts | 4 +- packages/react-kit/src/lib/numbers/numbers.ts | 10 +- .../src/lib/offer/getOfferDetails.ts | 2 +- .../src/lib/signer/externalSigner.ts | 1 + .../__generated__/validateTokenList.js | 3347 ++++++++++++++++- .../uniswap/__generated__/validateTokens.js | 3342 +++++++++++++++- .../src/lib/uniswap/contenthashToUri.ts | 2 +- .../src/lib/uniswap/formatNumbers.ts | 4 +- .../src/lib/uniswap/resolveENSContentHash.ts | 4 +- .../src/lib/uniswap/validateTokenList.ts | 2 +- packages/react-kit/src/lib/url/uriToHttp.ts | 2 +- .../src/stories/helpers/connect-wallet.ts | 1 + 42 files changed, 7065 insertions(+), 559 deletions(-) create mode 100644 .husky/pre-commit create mode 100644 packages/react-kit/.eslintignore delete mode 100644 packages/react-kit/.husky/pre-commit diff --git a/.eslintrc b/.eslintrc index a87e39bad..0b9b7b7f1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -4,7 +4,12 @@ "ecmaVersion": 2021, "sourceType": "module" }, - "plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"], + "plugins": [ + "@typescript-eslint", + "eslint-plugin-tsdoc", + "unused-imports", + "tsdoc" + ], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", @@ -22,7 +27,7 @@ "endOfLine": "auto" } ], - "tsdoc/syntax": "warn" - }, - "ignorePatterns": ["packages/react-kit/src/lib/uniswap/__generated__"] + "tsdoc/syntax": "warn", + "unused-imports/no-unused-imports": "warn" + } } diff --git a/.gitignore b/.gitignore index c7165926b..a750d286c 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,5 @@ coverage/ scripts/abi-signatures.csv # temp directory -/temp \ No newline at end of file +/temp +storybook-static \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 000000000..b9cf0077c --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged packages/react-kit diff --git a/package-lock.json b/package-lock.json index 83c3e3b44..334f73f8b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,8 +30,9 @@ "assemblyscript": "0.19.23", "commander": "^9.4.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-prettier": "^5.2.2", "eslint-plugin-tsdoc": "^0.2.17", + "eslint-plugin-unused-imports": "^4.1.4", "ethers-v6": "npm:ethers@^6.10.0", "form-data": "^4.0.0", "graphql": "^16.8.1", @@ -9114,8 +9115,9 @@ }, "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, - "license": "MIT", "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, @@ -20037,12 +20039,13 @@ "license": "MIT" }, "node_modules/eslint-plugin-prettier": { - "version": "5.1.3", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.2.tgz", + "integrity": "sha512-1yI3/hf35wmlq66C8yOyrujQnel+v5l1Vop5Cl2I6ylyNTT1JbuUUnV3/41PzwTzcyDp/oF0jWE3HXvcH5AQOQ==", "dev": true, - "license": "MIT", "dependencies": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.6" + "synckit": "^0.9.1" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -20307,6 +20310,21 @@ "@microsoft/tsdoc-config": "0.16.2" } }, + "node_modules/eslint-plugin-unused-imports": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", + "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "dev": true, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", + "eslint": "^9.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "dev": true, @@ -41699,9 +41717,10 @@ } }, "node_modules/synckit": { - "version": "0.8.8", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", "dev": true, - "license": "MIT", "dependencies": { "@pkgr/core": "^0.1.0", "tslib": "^2.6.2" @@ -53379,6 +53398,8 @@ }, "@pkgr/core": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true }, "@pmmmwh/react-refresh-webpack-plugin": { @@ -60648,11 +60669,13 @@ } }, "eslint-plugin-prettier": { - "version": "5.1.3", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.2.tgz", + "integrity": "sha512-1yI3/hf35wmlq66C8yOyrujQnel+v5l1Vop5Cl2I6ylyNTT1JbuUUnV3/41PzwTzcyDp/oF0jWE3HXvcH5AQOQ==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.6" + "synckit": "^0.9.1" } }, "eslint-plugin-react": { @@ -60797,6 +60820,13 @@ "@microsoft/tsdoc-config": "0.16.2" } }, + "eslint-plugin-unused-imports": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", + "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "dev": true, + "requires": {} + }, "eslint-scope": { "version": "5.1.1", "dev": true, @@ -74500,7 +74530,9 @@ } }, "synckit": { - "version": "0.8.8", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", "dev": true, "requires": { "@pkgr/core": "^0.1.0", diff --git a/package.json b/package.json index c6bd41912..ec93a38ef 100644 --- a/package.json +++ b/package.json @@ -76,8 +76,9 @@ "assemblyscript": "0.19.23", "commander": "^9.4.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-prettier": "^5.2.2", "eslint-plugin-tsdoc": "^0.2.17", + "eslint-plugin-unused-imports": "^4.1.4", "ethers-v6": "npm:ethers@^6.10.0", "form-data": "^4.0.0", "graphql": "^16.8.1", diff --git a/packages/react-kit/.eslintignore b/packages/react-kit/.eslintignore new file mode 100644 index 000000000..b6d7716c5 --- /dev/null +++ b/packages/react-kit/.eslintignore @@ -0,0 +1,32 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +storybook-static + +.env +*storybook.log +dist + +packages/react-kit/src/lib/uniswap/__generated__ +packages/react-kit/src/lib/lens/generated.ts \ No newline at end of file diff --git a/packages/react-kit/.gitignore b/packages/react-kit/.gitignore index 2179fd15b..10e678f96 100644 --- a/packages/react-kit/.gitignore +++ b/packages/react-kit/.gitignore @@ -25,4 +25,5 @@ yarn-error.log* storybook-static .env -*storybook.log \ No newline at end of file +*storybook.log +dist \ No newline at end of file diff --git a/packages/react-kit/.husky/pre-commit b/packages/react-kit/.husky/pre-commit deleted file mode 100644 index 2312dc587..000000000 --- a/packages/react-kit/.husky/pre-commit +++ /dev/null @@ -1 +0,0 @@ -npx lint-staged diff --git a/packages/react-kit/CHANGELOG.md b/packages/react-kit/CHANGELOG.md index 0e8c3e0f8..46dcb3432 100644 --- a/packages/react-kit/CHANGELOG.md +++ b/packages/react-kit/CHANGELOG.md @@ -5,775 +5,527 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline # [0.35.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.34.0...@bosonprotocol/react-kit@0.35.0) (2024-11-22) - ### Features -* add getSupportedChainIdsFromWalletConnectSession ([#855](https://github.com/bosonprotocol/core-components/issues/855)) ([6863857](https://github.com/bosonprotocol/core-components/commit/68638576d4067bacd6135aa43f5d6f9a2369d3b9)) - - - - +- add getSupportedChainIdsFromWalletConnectSession ([#855](https://github.com/bosonprotocol/core-components/issues/855)) ([6863857](https://github.com/bosonprotocol/core-components/commit/68638576d4067bacd6135aa43f5d6f9a2369d3b9)) # [0.34.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.33.0...@bosonprotocol/react-kit@0.34.0) (2024-11-20) - ### Bug Fixes -* 819 upload component improvements ([#820](https://github.com/bosonprotocol/core-components/issues/820)) ([323e876](https://github.com/bosonprotocol/core-components/commit/323e87680514711d9b5af43d9a2698c48e9a858b)) -* base button props ([#828](https://github.com/bosonprotocol/core-components/issues/828)) ([ea7969d](https://github.com/bosonprotocol/core-components/commit/ea7969d116cc31a242f368c024c0a429f7a1d688)) -* build ([#824](https://github.com/bosonprotocol/core-components/issues/824)) ([7072f05](https://github.com/bosonprotocol/core-components/commit/7072f05095a1f8df11be9daf0ef9312adbf3a0bb)) -* checkboox and add more props ([#827](https://github.com/bosonprotocol/core-components/issues/827)) ([7a4b4ba](https://github.com/bosonprotocol/core-components/commit/7a4b4ba08efef7eed8e09f39f108bbab935b2bbf)) -* remove check if magicLinkKey is defined in configuration ([#816](https://github.com/bosonprotocol/core-components/issues/816)) ([30fead6](https://github.com/bosonprotocol/core-components/commit/30fead64a22128e6c8ad10c6db714bc90bba3e1d)) -* remove min height, products skeleton changes ([#812](https://github.com/bosonprotocol/core-components/issues/812)) ([f6a4d70](https://github.com/bosonprotocol/core-components/commit/f6a4d70c0ba93ed87a13160c821aa8118da9810b)) -* styles checkbox ([#837](https://github.com/bosonprotocol/core-components/issues/837)) ([98b01f3](https://github.com/bosonprotocol/core-components/commit/98b01f38325d02807677fad8487eb2e7565da7da)) -* type of select component when isMulti is true or false ([#783](https://github.com/bosonprotocol/core-components/issues/783)) ([1d6e60e](https://github.com/bosonprotocol/core-components/commit/1d6e60eb7944522e05f3a07f585e5c023bf7439c)) -* update file preview display in BaseUpload component ([#838](https://github.com/bosonprotocol/core-components/issues/838)) ([ab04d71](https://github.com/bosonprotocol/core-components/commit/ab04d71bd240df818d0975432359118b32031f5c)) -* value type ([#833](https://github.com/bosonprotocol/core-components/issues/833)) ([905d3e1](https://github.com/bosonprotocol/core-components/commit/905d3e11bf9f849082fa9e68afb6d091fc923fb8)) -* video upload component ([#822](https://github.com/bosonprotocol/core-components/issues/822)) ([2fe943c](https://github.com/bosonprotocol/core-components/commit/2fe943cee1dc817a5b855c685abfd6dc952699cd)) - - -### Features - -* add asBlob parameter to baseIpfsStorage to retrieve ipfs item as a blob ([#787](https://github.com/bosonprotocol/core-components/issues/787)) ([1b8a762](https://github.com/bosonprotocol/core-components/commit/1b8a762f3213aadd04ee9e72db11baae0111020f)) -* add children prop to checkbox ([#836](https://github.com/bosonprotocol/core-components/issues/836)) ([93cfec5](https://github.com/bosonprotocol/core-components/commit/93cfec5035ef411b3afa8750a348d7b6a91c5068)) -* add default tokens to account drawer and themes to connection error view ([#806](https://github.com/bosonprotocol/core-components/issues/806)) ([ae1a69a](https://github.com/bosonprotocol/core-components/commit/ae1a69acdf56cf3837973801e02ed1e00987ea13)) -* add estimateGas in Web3LibAdapter ([#803](https://github.com/bosonprotocol/core-components/issues/803)) ([3be665b](https://github.com/bosonprotocol/core-components/commit/3be665b1dca4249c627b89eb76bc6b61a914b2f0)) -* add more props to connect wallet button to further customise its look ([#798](https://github.com/bosonprotocol/core-components/issues/798)) ([cf2525a](https://github.com/bosonprotocol/core-components/commit/cf2525af2c9b6f48abd0d477826d240400238a27)) -* add more props to select ([#834](https://github.com/bosonprotocol/core-components/issues/834)) ([348fc0e](https://github.com/bosonprotocol/core-components/commit/348fc0ee8a50e383d29de35b3c74472248360802)) -* add onOptionClick to accountDrawer ([#801](https://github.com/bosonprotocol/core-components/issues/801)) ([0926e31](https://github.com/bosonprotocol/core-components/commit/0926e31334ce8e4f3c1bc6baee309677c7711ce1)) -* add prop to disable magic link ([#804](https://github.com/bosonprotocol/core-components/issues/804)) ([2857edd](https://github.com/bosonprotocol/core-components/commit/2857edd840a9ff95287b00c2c19943621c69ee56)) -* add upload file type ([#835](https://github.com/bosonprotocol/core-components/issues/835)) ([dcba7e5](https://github.com/bosonprotocol/core-components/commit/dcba7e5cbc75fe2fefd5a31d868cdf3ae9ec2eea)) -* allow applying custom styles to basebutton and fix country select props ([#839](https://github.com/bosonprotocol/core-components/issues/839)) ([c0357de](https://github.com/bosonprotocol/core-components/commit/c0357de9b66c9b8673e145a5c354818484d438fe)) -* extend select props in select component in react kit ([#823](https://github.com/bosonprotocol/core-components/issues/823)) ([a39d82d](https://github.com/bosonprotocol/core-components/commit/a39d82d484b341ec2e89d79fa8ccb4d194b5a234)) -* fix collection skeleton ([#813](https://github.com/bosonprotocol/core-components/issues/813)) ([283f06f](https://github.com/bosonprotocol/core-components/commit/283f06f03450a0a7eb486554c2187206951cf05a)) -* homepage design fixes ([#830](https://github.com/bosonprotocol/core-components/issues/830)) ([fb6129f](https://github.com/bosonprotocol/core-components/commit/fb6129f253fbd4c0feeafc838f52b9b01de3fae2)) -* improve value types in select component ([#832](https://github.com/bosonprotocol/core-components/issues/832)) ([7b7c262](https://github.com/bosonprotocol/core-components/commit/7b7c262b38a551419618d7784cd557ded079526e)) -* make select take into account value type ([#831](https://github.com/bosonprotocol/core-components/issues/831)) ([82e189f](https://github.com/bosonprotocol/core-components/commit/82e189fd989323ffc421f149aa9468ae2c95f853)) -* product card update ([#808](https://github.com/bosonprotocol/core-components/issues/808)) ([1cf62d4](https://github.com/bosonprotocol/core-components/commit/1cf62d4b6426e43a5da4bffc76794b4eb5e45fe5)) -* remove magic provider if disabled ([#815](https://github.com/bosonprotocol/core-components/issues/815)) ([c08b17c](https://github.com/bosonprotocol/core-components/commit/c08b17c6c9c7a032bf8a435048c152d3d8e07822)) -* skeleton cards update ([#811](https://github.com/bosonprotocol/core-components/issues/811)) ([6754899](https://github.com/bosonprotocol/core-components/commit/67548999e700d07b6a967be82168b5f73a28ec92)) - - - - +- 819 upload component improvements ([#820](https://github.com/bosonprotocol/core-components/issues/820)) ([323e876](https://github.com/bosonprotocol/core-components/commit/323e87680514711d9b5af43d9a2698c48e9a858b)) +- base button props ([#828](https://github.com/bosonprotocol/core-components/issues/828)) ([ea7969d](https://github.com/bosonprotocol/core-components/commit/ea7969d116cc31a242f368c024c0a429f7a1d688)) +- build ([#824](https://github.com/bosonprotocol/core-components/issues/824)) ([7072f05](https://github.com/bosonprotocol/core-components/commit/7072f05095a1f8df11be9daf0ef9312adbf3a0bb)) +- checkboox and add more props ([#827](https://github.com/bosonprotocol/core-components/issues/827)) ([7a4b4ba](https://github.com/bosonprotocol/core-components/commit/7a4b4ba08efef7eed8e09f39f108bbab935b2bbf)) +- remove check if magicLinkKey is defined in configuration ([#816](https://github.com/bosonprotocol/core-components/issues/816)) ([30fead6](https://github.com/bosonprotocol/core-components/commit/30fead64a22128e6c8ad10c6db714bc90bba3e1d)) +- remove min height, products skeleton changes ([#812](https://github.com/bosonprotocol/core-components/issues/812)) ([f6a4d70](https://github.com/bosonprotocol/core-components/commit/f6a4d70c0ba93ed87a13160c821aa8118da9810b)) +- styles checkbox ([#837](https://github.com/bosonprotocol/core-components/issues/837)) ([98b01f3](https://github.com/bosonprotocol/core-components/commit/98b01f38325d02807677fad8487eb2e7565da7da)) +- type of select component when isMulti is true or false ([#783](https://github.com/bosonprotocol/core-components/issues/783)) ([1d6e60e](https://github.com/bosonprotocol/core-components/commit/1d6e60eb7944522e05f3a07f585e5c023bf7439c)) +- update file preview display in BaseUpload component ([#838](https://github.com/bosonprotocol/core-components/issues/838)) ([ab04d71](https://github.com/bosonprotocol/core-components/commit/ab04d71bd240df818d0975432359118b32031f5c)) +- value type ([#833](https://github.com/bosonprotocol/core-components/issues/833)) ([905d3e1](https://github.com/bosonprotocol/core-components/commit/905d3e11bf9f849082fa9e68afb6d091fc923fb8)) +- video upload component ([#822](https://github.com/bosonprotocol/core-components/issues/822)) ([2fe943c](https://github.com/bosonprotocol/core-components/commit/2fe943cee1dc817a5b855c685abfd6dc952699cd)) + +### Features + +- add asBlob parameter to baseIpfsStorage to retrieve ipfs item as a blob ([#787](https://github.com/bosonprotocol/core-components/issues/787)) ([1b8a762](https://github.com/bosonprotocol/core-components/commit/1b8a762f3213aadd04ee9e72db11baae0111020f)) +- add children prop to checkbox ([#836](https://github.com/bosonprotocol/core-components/issues/836)) ([93cfec5](https://github.com/bosonprotocol/core-components/commit/93cfec5035ef411b3afa8750a348d7b6a91c5068)) +- add default tokens to account drawer and themes to connection error view ([#806](https://github.com/bosonprotocol/core-components/issues/806)) ([ae1a69a](https://github.com/bosonprotocol/core-components/commit/ae1a69acdf56cf3837973801e02ed1e00987ea13)) +- add estimateGas in Web3LibAdapter ([#803](https://github.com/bosonprotocol/core-components/issues/803)) ([3be665b](https://github.com/bosonprotocol/core-components/commit/3be665b1dca4249c627b89eb76bc6b61a914b2f0)) +- add more props to connect wallet button to further customise its look ([#798](https://github.com/bosonprotocol/core-components/issues/798)) ([cf2525a](https://github.com/bosonprotocol/core-components/commit/cf2525af2c9b6f48abd0d477826d240400238a27)) +- add more props to select ([#834](https://github.com/bosonprotocol/core-components/issues/834)) ([348fc0e](https://github.com/bosonprotocol/core-components/commit/348fc0ee8a50e383d29de35b3c74472248360802)) +- add onOptionClick to accountDrawer ([#801](https://github.com/bosonprotocol/core-components/issues/801)) ([0926e31](https://github.com/bosonprotocol/core-components/commit/0926e31334ce8e4f3c1bc6baee309677c7711ce1)) +- add prop to disable magic link ([#804](https://github.com/bosonprotocol/core-components/issues/804)) ([2857edd](https://github.com/bosonprotocol/core-components/commit/2857edd840a9ff95287b00c2c19943621c69ee56)) +- add upload file type ([#835](https://github.com/bosonprotocol/core-components/issues/835)) ([dcba7e5](https://github.com/bosonprotocol/core-components/commit/dcba7e5cbc75fe2fefd5a31d868cdf3ae9ec2eea)) +- allow applying custom styles to basebutton and fix country select props ([#839](https://github.com/bosonprotocol/core-components/issues/839)) ([c0357de](https://github.com/bosonprotocol/core-components/commit/c0357de9b66c9b8673e145a5c354818484d438fe)) +- extend select props in select component in react kit ([#823](https://github.com/bosonprotocol/core-components/issues/823)) ([a39d82d](https://github.com/bosonprotocol/core-components/commit/a39d82d484b341ec2e89d79fa8ccb4d194b5a234)) +- fix collection skeleton ([#813](https://github.com/bosonprotocol/core-components/issues/813)) ([283f06f](https://github.com/bosonprotocol/core-components/commit/283f06f03450a0a7eb486554c2187206951cf05a)) +- homepage design fixes ([#830](https://github.com/bosonprotocol/core-components/issues/830)) ([fb6129f](https://github.com/bosonprotocol/core-components/commit/fb6129f253fbd4c0feeafc838f52b9b01de3fae2)) +- improve value types in select component ([#832](https://github.com/bosonprotocol/core-components/issues/832)) ([7b7c262](https://github.com/bosonprotocol/core-components/commit/7b7c262b38a551419618d7784cd557ded079526e)) +- make select take into account value type ([#831](https://github.com/bosonprotocol/core-components/issues/831)) ([82e189f](https://github.com/bosonprotocol/core-components/commit/82e189fd989323ffc421f149aa9468ae2c95f853)) +- product card update ([#808](https://github.com/bosonprotocol/core-components/issues/808)) ([1cf62d4](https://github.com/bosonprotocol/core-components/commit/1cf62d4b6426e43a5da4bffc76794b4eb5e45fe5)) +- remove magic provider if disabled ([#815](https://github.com/bosonprotocol/core-components/issues/815)) ([c08b17c](https://github.com/bosonprotocol/core-components/commit/c08b17c6c9c7a032bf8a435048c152d3d8e07822)) +- skeleton cards update ([#811](https://github.com/bosonprotocol/core-components/issues/811)) ([6754899](https://github.com/bosonprotocol/core-components/commit/67548999e700d07b6a967be82168b5f73a28ec92)) # [0.33.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.32.0...@bosonprotocol/react-kit@0.33.0) (2024-07-29) - ### Bug Fixes -* add Local chain in chain info ([#777](https://github.com/bosonprotocol/core-components/issues/777)) ([8d3a446](https://github.com/bosonprotocol/core-components/commit/8d3a44679ee0ff83d626abba6971c3c4bbac324c)) -* country select issue ([#767](https://github.com/bosonprotocol/core-components/issues/767)) ([fb9c74f](https://github.com/bosonprotocol/core-components/commit/fb9c74f7a83b816d0d0a9e96472cc4bef52238d4)) -* grid and typography components ([#758](https://github.com/bosonprotocol/core-components/issues/758)) ([874192b](https://github.com/bosonprotocol/core-components/commit/874192bca265c21dbe12421c2f6d1c6f2ce41eee)) -* missing use of hideError prop in checkbox, not it's used ([#773](https://github.com/bosonprotocol/core-components/issues/773)) ([99cc9cf](https://github.com/bosonprotocol/core-components/commit/99cc9cf3429c16ca7e0df5e4c6170c744d6df999)) -* remove timeout video component ([#764](https://github.com/bosonprotocol/core-components/issues/764)) ([80f3761](https://github.com/bosonprotocol/core-components/commit/80f376111b4900907ec68bbe8abf2325f991b08f)) -* set touched and add border when error ([#768](https://github.com/bosonprotocol/core-components/issues/768)) ([cf066e0](https://github.com/bosonprotocol/core-components/commit/cf066e0530207a09995db548e40f7ba6f7c439de)) -* useProvider ([#756](https://github.com/bosonprotocol/core-components/issues/756)) ([fa6ad68](https://github.com/bosonprotocol/core-components/commit/fa6ad68614b6478227ef098586560f4e0a87d9ab)) -* video component ([#765](https://github.com/bosonprotocol/core-components/issues/765)) ([7c19ad8](https://github.com/bosonprotocol/core-components/commit/7c19ad8cdf3cd98ab5e75fb5d1d7cc1bba9c3440)) -* video error state ([#763](https://github.com/bosonprotocol/core-components/issues/763)) ([f123c52](https://github.com/bosonprotocol/core-components/commit/f123c52352a60b4f976d0e230a0aeabb4f6ccdb0)) - +- add Local chain in chain info ([#777](https://github.com/bosonprotocol/core-components/issues/777)) ([8d3a446](https://github.com/bosonprotocol/core-components/commit/8d3a44679ee0ff83d626abba6971c3c4bbac324c)) +- country select issue ([#767](https://github.com/bosonprotocol/core-components/issues/767)) ([fb9c74f](https://github.com/bosonprotocol/core-components/commit/fb9c74f7a83b816d0d0a9e96472cc4bef52238d4)) +- grid and typography components ([#758](https://github.com/bosonprotocol/core-components/issues/758)) ([874192b](https://github.com/bosonprotocol/core-components/commit/874192bca265c21dbe12421c2f6d1c6f2ce41eee)) +- missing use of hideError prop in checkbox, not it's used ([#773](https://github.com/bosonprotocol/core-components/issues/773)) ([99cc9cf](https://github.com/bosonprotocol/core-components/commit/99cc9cf3429c16ca7e0df5e4c6170c744d6df999)) +- remove timeout video component ([#764](https://github.com/bosonprotocol/core-components/issues/764)) ([80f3761](https://github.com/bosonprotocol/core-components/commit/80f376111b4900907ec68bbe8abf2325f991b08f)) +- set touched and add border when error ([#768](https://github.com/bosonprotocol/core-components/issues/768)) ([cf066e0](https://github.com/bosonprotocol/core-components/commit/cf066e0530207a09995db548e40f7ba6f7c439de)) +- useProvider ([#756](https://github.com/bosonprotocol/core-components/issues/756)) ([fa6ad68](https://github.com/bosonprotocol/core-components/commit/fa6ad68614b6478227ef098586560f4e0a87d9ab)) +- video component ([#765](https://github.com/bosonprotocol/core-components/issues/765)) ([7c19ad8](https://github.com/bosonprotocol/core-components/commit/7c19ad8cdf3cd98ab5e75fb5d1d7cc1bba9c3440)) +- video error state ([#763](https://github.com/bosonprotocol/core-components/issues/763)) ([f123c52](https://github.com/bosonprotocol/core-components/commit/f123c52352a60b4f976d0e230a0aeabb4f6ccdb0)) ### Features -* add border radius unit to upload component in react-kit ([#775](https://github.com/bosonprotocol/core-components/issues/775)) ([f54a140](https://github.com/bosonprotocol/core-components/commit/f54a140a9ef08be0a2447c8629e66414d3aa1380)) -* add cardCta component ([#761](https://github.com/bosonprotocol/core-components/issues/761)) ([8248515](https://github.com/bosonprotocol/core-components/commit/8248515dd1ff61283245f5d1175d775f709a8332)) -* add more styles to regular select and country select ([#769](https://github.com/bosonprotocol/core-components/issues/769)) ([1d29415](https://github.com/bosonprotocol/core-components/commit/1d2941564bf2d2e1f897404b3d2fd4e32eb9237d)) -* add props to various components and theme prop to upload ([#770](https://github.com/bosonprotocol/core-components/issues/770)) ([994fcd4](https://github.com/bosonprotocol/core-components/commit/994fcd4ec44e98de16bd2c3bdc84d4d4150e185a)) -* add some more stylying props to selects ([#771](https://github.com/bosonprotocol/core-components/issues/771)) ([3ea1c21](https://github.com/bosonprotocol/core-components/commit/3ea1c218d5de11c3da08a141f8745ef3b4593bf4)) -* export country select ([#755](https://github.com/bosonprotocol/core-components/issues/755)) ([afb0bba](https://github.com/bosonprotocol/core-components/commit/afb0bbab4587315b8b89908b57fe9f79c629136b)) -* make checkbox generic ([#772](https://github.com/bosonprotocol/core-components/issues/772)) ([a495789](https://github.com/bosonprotocol/core-components/commit/a495789989325100cc565d9dcae8127f1d420b04)) -* make select component generic via a theme prop ([#766](https://github.com/bosonprotocol/core-components/issues/766)) ([e334aed](https://github.com/bosonprotocol/core-components/commit/e334aed0b8332555b6bf8e081c3a49e973fe0c3d)) - - - - +- add border radius unit to upload component in react-kit ([#775](https://github.com/bosonprotocol/core-components/issues/775)) ([f54a140](https://github.com/bosonprotocol/core-components/commit/f54a140a9ef08be0a2447c8629e66414d3aa1380)) +- add cardCta component ([#761](https://github.com/bosonprotocol/core-components/issues/761)) ([8248515](https://github.com/bosonprotocol/core-components/commit/8248515dd1ff61283245f5d1175d775f709a8332)) +- add more styles to regular select and country select ([#769](https://github.com/bosonprotocol/core-components/issues/769)) ([1d29415](https://github.com/bosonprotocol/core-components/commit/1d2941564bf2d2e1f897404b3d2fd4e32eb9237d)) +- add props to various components and theme prop to upload ([#770](https://github.com/bosonprotocol/core-components/issues/770)) ([994fcd4](https://github.com/bosonprotocol/core-components/commit/994fcd4ec44e98de16bd2c3bdc84d4d4150e185a)) +- add some more stylying props to selects ([#771](https://github.com/bosonprotocol/core-components/issues/771)) ([3ea1c21](https://github.com/bosonprotocol/core-components/commit/3ea1c218d5de11c3da08a141f8745ef3b4593bf4)) +- export country select ([#755](https://github.com/bosonprotocol/core-components/issues/755)) ([afb0bba](https://github.com/bosonprotocol/core-components/commit/afb0bbab4587315b8b89908b57fe9f79c629136b)) +- make checkbox generic ([#772](https://github.com/bosonprotocol/core-components/issues/772)) ([a495789](https://github.com/bosonprotocol/core-components/commit/a495789989325100cc565d9dcae8127f1d420b04)) +- make select component generic via a theme prop ([#766](https://github.com/bosonprotocol/core-components/issues/766)) ([e334aed](https://github.com/bosonprotocol/core-components/commit/e334aed0b8332555b6bf8e081c3a49e973fe0c3d)) # [0.32.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.31.1...@bosonprotocol/react-kit@0.32.0) (2024-06-11) - ### Bug Fixes -* redeem modal ([#752](https://github.com/bosonprotocol/core-components/issues/752)) ([cc4b230](https://github.com/bosonprotocol/core-components/commit/cc4b230e9232ab446275597f53e605d1c9660e95)) - +- redeem modal ([#752](https://github.com/bosonprotocol/core-components/issues/752)) ([cc4b230](https://github.com/bosonprotocol/core-components/commit/cc4b230e9232ab446275597f53e605d1c9660e95)) ### Features -* create multisteps component ([#750](https://github.com/bosonprotocol/core-components/issues/750)) ([a14ce87](https://github.com/bosonprotocol/core-components/commit/a14ce8706d43d2784acaea76e6c92d0750bd833d)) -* extract wallet components from interface ([#743](https://github.com/bosonprotocol/core-components/issues/743)) ([91d0aef](https://github.com/bosonprotocol/core-components/commit/91d0aeff23fb7b82d41c907b05b25c395422d3c0)) -* make components more generic ([#738](https://github.com/bosonprotocol/core-components/issues/738)) ([b1663cc](https://github.com/bosonprotocol/core-components/commit/b1663ccadfae8102f285e90842eb2f154bff34ea)) -* unify loading components ([#748](https://github.com/bosonprotocol/core-components/issues/748)) ([941f12f](https://github.com/bosonprotocol/core-components/commit/941f12f0718137041c6628e7d819524a939728a7)) -* update upload component with editor ([#751](https://github.com/bosonprotocol/core-components/issues/751)) ([3b58261](https://github.com/bosonprotocol/core-components/commit/3b582617b600cc09593f0e7044be19d0aaa5692a)) - - - - +- create multisteps component ([#750](https://github.com/bosonprotocol/core-components/issues/750)) ([a14ce87](https://github.com/bosonprotocol/core-components/commit/a14ce8706d43d2784acaea76e6c92d0750bd833d)) +- extract wallet components from interface ([#743](https://github.com/bosonprotocol/core-components/issues/743)) ([91d0aef](https://github.com/bosonprotocol/core-components/commit/91d0aeff23fb7b82d41c907b05b25c395422d3c0)) +- make components more generic ([#738](https://github.com/bosonprotocol/core-components/issues/738)) ([b1663cc](https://github.com/bosonprotocol/core-components/commit/b1663ccadfae8102f285e90842eb2f154bff34ea)) +- unify loading components ([#748](https://github.com/bosonprotocol/core-components/issues/748)) ([941f12f](https://github.com/bosonprotocol/core-components/commit/941f12f0718137041c6628e7d819524a939728a7)) +- update upload component with editor ([#751](https://github.com/bosonprotocol/core-components/issues/751)) ([3b58261](https://github.com/bosonprotocol/core-components/commit/3b582617b600cc09593f0e7044be19d0aaa5692a)) ## [0.31.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.31.0...@bosonprotocol/react-kit@0.31.1) (2024-05-23) - ### Bug Fixes -* alignment digital product data ([#740](https://github.com/bosonprotocol/core-components/issues/740)) ([a326fb0](https://github.com/bosonprotocol/core-components/commit/a326fb0ddbe9022d169a547e9cc4937825336104)) - - - - +- alignment digital product data ([#740](https://github.com/bosonprotocol/core-components/issues/740)) ([a326fb0](https://github.com/bosonprotocol/core-components/commit/a326fb0ddbe9022d169a547e9cc4937825336104)) # [0.31.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.30.1...@bosonprotocol/react-kit@0.31.0) (2024-05-22) - ### Bug Fixes -* modal inner scroll ([#739](https://github.com/bosonprotocol/core-components/issues/739)) ([7259677](https://github.com/bosonprotocol/core-components/commit/7259677c9b4745a9128527c971bddeb72b8f3813)) - +- modal inner scroll ([#739](https://github.com/bosonprotocol/core-components/issues/739)) ([7259677](https://github.com/bosonprotocol/core-components/commit/7259677c9b4745a9128527c971bddeb72b8f3813)) ### Features -* make modal content scrollable ([#737](https://github.com/bosonprotocol/core-components/issues/737)) ([f3cc99a](https://github.com/bosonprotocol/core-components/commit/f3cc99a8b024b7068ba777c2b04361e976f5115f)) - - - - +- make modal content scrollable ([#737](https://github.com/bosonprotocol/core-components/issues/737)) ([f3cc99a](https://github.com/bosonprotocol/core-components/commit/f3cc99a8b024b7068ba777c2b04361e976f5115f)) ## [0.30.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.30.0...@bosonprotocol/react-kit@0.30.1) (2024-05-21) - ### Bug Fixes -* ipfs logic for when uri is just cid ([#736](https://github.com/bosonprotocol/core-components/issues/736)) ([54ce588](https://github.com/bosonprotocol/core-components/commit/54ce5889cc9b65c660924337c076c8a0d4db46da)) - - - - +- ipfs logic for when uri is just cid ([#736](https://github.com/bosonprotocol/core-components/issues/736)) ([54ce588](https://github.com/bosonprotocol/core-components/commit/54ce5889cc9b65c660924337c076c8a0d4db46da)) # [0.30.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.29.1...@bosonprotocol/react-kit@0.30.0) (2024-05-13) - ### Bug Fixes -* get offer details ([#726](https://github.com/bosonprotocol/core-components/issues/726)) ([80712b0](https://github.com/bosonprotocol/core-components/commit/80712b0adb87373f6b2029cdfbb757559ebde891)) -* minor issues phygitals ([#730](https://github.com/bosonprotocol/core-components/issues/730)) ([95c7724](https://github.com/bosonprotocol/core-components/commit/95c7724fb88d31873151dfaf917c57c7c572380e)) -* minor phygital issues ([#719](https://github.com/bosonprotocol/core-components/issues/719)) ([43669a4](https://github.com/bosonprotocol/core-components/commit/43669a45e8ae3f59c2bf2b1258cc088a4da27790)) -* phygital minor fixes ([#728](https://github.com/bosonprotocol/core-components/issues/728)) ([8a5d789](https://github.com/bosonprotocol/core-components/commit/8a5d7893f919f1e396d11dd7b67a3593146c33c6)) -* phygital ribbon to support extra props ([#723](https://github.com/bosonprotocol/core-components/issues/723)) ([9a6272c](https://github.com/bosonprotocol/core-components/commit/9a6272cbfb1bbdb8fd676b866f09285d8082573c)) -* phygitals ([#729](https://github.com/bosonprotocol/core-components/issues/729)) ([c7c0531](https://github.com/bosonprotocol/core-components/commit/c7c0531802f8621b5757111e3b5abb9b06e20bbd)) -* phygitals related code ([#722](https://github.com/bosonprotocol/core-components/issues/722)) ([f486b2a](https://github.com/bosonprotocol/core-components/commit/f486b2aa72239bb87ac7e80cb1b98c43950425a3)) -* typography props ([#731](https://github.com/bosonprotocol/core-components/issues/731)) ([02077a3](https://github.com/bosonprotocol/core-components/commit/02077a3fb6190055807a2db0df55459025122305)) -* when phygital label is displayed in offer variant view ([#733](https://github.com/bosonprotocol/core-components/issues/733)) ([45f6117](https://github.com/bosonprotocol/core-components/commit/45f6117b74ed9e0636317e83702c7a5b92647430)) - +- get offer details ([#726](https://github.com/bosonprotocol/core-components/issues/726)) ([80712b0](https://github.com/bosonprotocol/core-components/commit/80712b0adb87373f6b2029cdfbb757559ebde891)) +- minor issues phygitals ([#730](https://github.com/bosonprotocol/core-components/issues/730)) ([95c7724](https://github.com/bosonprotocol/core-components/commit/95c7724fb88d31873151dfaf917c57c7c572380e)) +- minor phygital issues ([#719](https://github.com/bosonprotocol/core-components/issues/719)) ([43669a4](https://github.com/bosonprotocol/core-components/commit/43669a45e8ae3f59c2bf2b1258cc088a4da27790)) +- phygital minor fixes ([#728](https://github.com/bosonprotocol/core-components/issues/728)) ([8a5d789](https://github.com/bosonprotocol/core-components/commit/8a5d7893f919f1e396d11dd7b67a3593146c33c6)) +- phygital ribbon to support extra props ([#723](https://github.com/bosonprotocol/core-components/issues/723)) ([9a6272c](https://github.com/bosonprotocol/core-components/commit/9a6272cbfb1bbdb8fd676b866f09285d8082573c)) +- phygitals ([#729](https://github.com/bosonprotocol/core-components/issues/729)) ([c7c0531](https://github.com/bosonprotocol/core-components/commit/c7c0531802f8621b5757111e3b5abb9b06e20bbd)) +- phygitals related code ([#722](https://github.com/bosonprotocol/core-components/issues/722)) ([f486b2a](https://github.com/bosonprotocol/core-components/commit/f486b2aa72239bb87ac7e80cb1b98c43950425a3)) +- typography props ([#731](https://github.com/bosonprotocol/core-components/issues/731)) ([02077a3](https://github.com/bosonprotocol/core-components/commit/02077a3fb6190055807a2db0df55459025122305)) +- when phygital label is displayed in offer variant view ([#733](https://github.com/bosonprotocol/core-components/issues/733)) ([45f6117](https://github.com/bosonprotocol/core-components/commit/45f6117b74ed9e0636317e83702c7a5b92647430)) ### Features -* add buyer contract address in redeem form ([#724](https://github.com/bosonprotocol/core-components/issues/724)) ([f6b182a](https://github.com/bosonprotocol/core-components/commit/f6b182a532c6ea974c1f989e6cd8759e7e50471c)) -* add more content into purchase overview modal ([#710](https://github.com/bosonprotocol/core-components/issues/710)) ([24a5686](https://github.com/bosonprotocol/core-components/commit/24a5686e5b7ade99eef8f59fa0e2b1e68db5c78b)) - - - - +- add buyer contract address in redeem form ([#724](https://github.com/bosonprotocol/core-components/issues/724)) ([f6b182a](https://github.com/bosonprotocol/core-components/commit/f6b182a532c6ea974c1f989e6cd8759e7e50471c)) +- add more content into purchase overview modal ([#710](https://github.com/bosonprotocol/core-components/issues/710)) ([24a5686](https://github.com/bosonprotocol/core-components/commit/24a5686e5b7ade99eef8f59fa0e2b1e68db5c78b)) ## [0.29.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.29.0...@bosonprotocol/react-kit@0.29.1) (2024-04-15) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - # [0.29.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.28.1...@bosonprotocol/react-kit@0.29.0) (2024-04-05) - ### Bug Fixes -* connection to metamask for all ctas in storybook ([#696](https://github.com/bosonprotocol/core-components/issues/696)) ([3c9c236](https://github.com/bosonprotocol/core-components/commit/3c9c2361d2f83c646a505d73bd605d39b54cce6f)) -* env names ([#681](https://github.com/bosonprotocol/core-components/issues/681)) ([fc972d2](https://github.com/bosonprotocol/core-components/commit/fc972d2a83cca5a88d995a87fb768046d0a471b0)) -* finance widget is not loading ([#705](https://github.com/bosonprotocol/core-components/issues/705)) ([98681d2](https://github.com/bosonprotocol/core-components/commit/98681d253d7643f90d8d84b5a4d7b29cb47f705d)) -* force the infuraKey for the web3 provider to be different from t… ([#683](https://github.com/bosonprotocol/core-components/issues/683)) ([cc35d57](https://github.com/bosonprotocol/core-components/commit/cc35d57ae64496c83db502d501622a12d6e2d57c)) -* images when used in dapp ([#682](https://github.com/bosonprotocol/core-components/issues/682)) ([46c2912](https://github.com/bosonprotocol/core-components/commit/46c291223065f4165203f5bc0a7e0afddc6c9410)) -* race condition in useSignerAddress and add uuid to web3lib adapters ([#685](https://github.com/bosonprotocol/core-components/issues/685)) ([f8e37e9](https://github.com/bosonprotocol/core-components/commit/f8e37e9dda6730c720817e093ae1a5d906b4f472)) -* rounded values may be wrong ([#707](https://github.com/bosonprotocol/core-components/issues/707)) ([75a85e2](https://github.com/bosonprotocol/core-components/commit/75a85e2f8871eec60f9ca2f9956a14ba4544121c)) -* unexpected blank page after committing to a product ([#684](https://github.com/bosonprotocol/core-components/issues/684)) ([f571d28](https://github.com/bosonprotocol/core-components/commit/f571d28609544497d2c2c19f132b6792df025d06)) - +- connection to metamask for all ctas in storybook ([#696](https://github.com/bosonprotocol/core-components/issues/696)) ([3c9c236](https://github.com/bosonprotocol/core-components/commit/3c9c2361d2f83c646a505d73bd605d39b54cce6f)) +- env names ([#681](https://github.com/bosonprotocol/core-components/issues/681)) ([fc972d2](https://github.com/bosonprotocol/core-components/commit/fc972d2a83cca5a88d995a87fb768046d0a471b0)) +- finance widget is not loading ([#705](https://github.com/bosonprotocol/core-components/issues/705)) ([98681d2](https://github.com/bosonprotocol/core-components/commit/98681d253d7643f90d8d84b5a4d7b29cb47f705d)) +- force the infuraKey for the web3 provider to be different from t… ([#683](https://github.com/bosonprotocol/core-components/issues/683)) ([cc35d57](https://github.com/bosonprotocol/core-components/commit/cc35d57ae64496c83db502d501622a12d6e2d57c)) +- images when used in dapp ([#682](https://github.com/bosonprotocol/core-components/issues/682)) ([46c2912](https://github.com/bosonprotocol/core-components/commit/46c291223065f4165203f5bc0a7e0afddc6c9410)) +- race condition in useSignerAddress and add uuid to web3lib adapters ([#685](https://github.com/bosonprotocol/core-components/issues/685)) ([f8e37e9](https://github.com/bosonprotocol/core-components/commit/f8e37e9dda6730c720817e093ae1a5d906b4f472)) +- rounded values may be wrong ([#707](https://github.com/bosonprotocol/core-components/issues/707)) ([75a85e2](https://github.com/bosonprotocol/core-components/commit/75a85e2f8871eec60f9ca2f9956a14ba4544121c)) +- unexpected blank page after committing to a product ([#684](https://github.com/bosonprotocol/core-components/issues/684)) ([f571d28](https://github.com/bosonprotocol/core-components/commit/f571d28609544497d2c2c19f132b6792df025d06)) ### Features -* add mute button to videos ([#691](https://github.com/bosonprotocol/core-components/issues/691)) ([fb181fd](https://github.com/bosonprotocol/core-components/commit/fb181fd137df2141e3bc67a51c596e7c42121783)) -* export purchase overview modal and commit button view (with no functionality) ([#699](https://github.com/bosonprotocol/core-components/issues/699)) ([648a15b](https://github.com/bosonprotocol/core-components/commit/648a15bccb40a8a66fb4f2ecfa95128bec282a68)) -* make mute button optional ([#693](https://github.com/bosonprotocol/core-components/issues/693)) ([848883c](https://github.com/bosonprotocol/core-components/commit/848883c521d4a068c6a060714d154c35ce4541ac)) -* upgrade protocol 2.4.0 + royalties management ([#674](https://github.com/bosonprotocol/core-components/issues/674)) ([00fe7b5](https://github.com/bosonprotocol/core-components/commit/00fe7b58c309bf5280a0451ec69d74fd59293767)) - - - - +- add mute button to videos ([#691](https://github.com/bosonprotocol/core-components/issues/691)) ([fb181fd](https://github.com/bosonprotocol/core-components/commit/fb181fd137df2141e3bc67a51c596e7c42121783)) +- export purchase overview modal and commit button view (with no functionality) ([#699](https://github.com/bosonprotocol/core-components/issues/699)) ([648a15b](https://github.com/bosonprotocol/core-components/commit/648a15bccb40a8a66fb4f2ecfa95128bec282a68)) +- make mute button optional ([#693](https://github.com/bosonprotocol/core-components/issues/693)) ([848883c](https://github.com/bosonprotocol/core-components/commit/848883c521d4a068c6a060714d154c35ce4541ac)) +- upgrade protocol 2.4.0 + royalties management ([#674](https://github.com/bosonprotocol/core-components/issues/674)) ([00fe7b5](https://github.com/bosonprotocol/core-components/commit/00fe7b58c309bf5280a0451ec69d74fd59293767)) ## [0.28.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.28.0...@bosonprotocol/react-kit@0.28.1) (2024-03-13) - ### Bug Fixes -* commit widget is not loading ([#679](https://github.com/bosonprotocol/core-components/issues/679)) ([1c0d168](https://github.com/bosonprotocol/core-components/commit/1c0d1682731dc7e43bf805c03b0d7f8ef2e621b0)) - - - - +- commit widget is not loading ([#679](https://github.com/bosonprotocol/core-components/issues/679)) ([1c0d168](https://github.com/bosonprotocol/core-components/commit/1c0d1682731dc7e43bf805c03b0d7f8ef2e621b0)) # [0.28.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.27.1...@bosonprotocol/react-kit@0.28.0) (2024-03-13) - ### Features -* add phygitals ([#673](https://github.com/bosonprotocol/core-components/issues/673)) ([e233f8c](https://github.com/bosonprotocol/core-components/commit/e233f8c44c8a234d6556a361905a2c59c4b9958e)) - - - - +- add phygitals ([#673](https://github.com/bosonprotocol/core-components/issues/673)) ([e233f8c](https://github.com/bosonprotocol/core-components/commit/e233f8c44c8a234d6556a361905a2c59c4b9958e)) ## [0.27.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.27.0...@bosonprotocol/react-kit@0.27.1) (2024-03-08) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - # [0.27.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.26.1...@bosonprotocol/react-kit@0.27.0) (2024-02-23) - ### Bug Fixes -* most react-kit circular dependencies ([#664](https://github.com/bosonprotocol/core-components/issues/664)) ([b57cd0a](https://github.com/bosonprotocol/core-components/commit/b57cd0a55772926f3d307c5fc135628c22e5adc0)) -* testing issues ([#666](https://github.com/bosonprotocol/core-components/issues/666)) ([453de61](https://github.com/bosonprotocol/core-components/commit/453de61c9e5299a1c8381b4b568d06ba29de3d7d)) - +- most react-kit circular dependencies ([#664](https://github.com/bosonprotocol/core-components/issues/664)) ([b57cd0a](https://github.com/bosonprotocol/core-components/commit/b57cd0a55772926f3d307c5fc135628c22e5adc0)) +- testing issues ([#666](https://github.com/bosonprotocol/core-components/issues/666)) ([453de61](https://github.com/bosonprotocol/core-components/commit/453de61c9e5299a1c8381b4b568d06ba29de3d7d)) ### Features -* deactivate use of meta-transaction when the connected wallet is… ([#671](https://github.com/bosonprotocol/core-components/issues/671)) ([20cadab](https://github.com/bosonprotocol/core-components/commit/20cadaba47310d905d626b12f374fbfe92baeb10)) - - - - +- deactivate use of meta-transaction when the connected wallet is… ([#671](https://github.com/bosonprotocol/core-components/issues/671)) ([20cadab](https://github.com/bosonprotocol/core-components/commit/20cadaba47310d905d626b12f374fbfe92baeb10)) ## [0.26.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.26.0...@bosonprotocol/react-kit@0.26.1) (2024-02-06) - ### Bug Fixes -* connect wallet issue ([#660](https://github.com/bosonprotocol/core-components/issues/660)) ([ace6010](https://github.com/bosonprotocol/core-components/commit/ace6010ccd80883d882ac640bae9d02d2c41d46f)) - - - - +- connect wallet issue ([#660](https://github.com/bosonprotocol/core-components/issues/660)) ([ace6010](https://github.com/bosonprotocol/core-components/commit/ace6010ccd80883d882ac640bae9d02d2c41d46f)) # [0.26.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.25.0...@bosonprotocol/react-kit@0.26.0) (2024-02-05) - ### Bug Fixes -* colors custom store ([#655](https://github.com/bosonprotocol/core-components/issues/655)) ([4c095f8](https://github.com/bosonprotocol/core-components/commit/4c095f821e826ced9c8747799c0034180a77e5d4)) -* ensure useSellers refresh when seller curation list is fetched ([#656](https://github.com/bosonprotocol/core-components/issues/656)) ([196735a](https://github.com/bosonprotocol/core-components/commit/196735af36c498bffa08b344ca7702041e63ea3d)) -* some commit widget issues ([#654](https://github.com/bosonprotocol/core-components/issues/654)) ([d1452c4](https://github.com/bosonprotocol/core-components/commit/d1452c497dfd2700062d85ccb664e5bd4d9ea2c2)) - +- colors custom store ([#655](https://github.com/bosonprotocol/core-components/issues/655)) ([4c095f8](https://github.com/bosonprotocol/core-components/commit/4c095f821e826ced9c8747799c0034180a77e5d4)) +- ensure useSellers refresh when seller curation list is fetched ([#656](https://github.com/bosonprotocol/core-components/issues/656)) ([196735a](https://github.com/bosonprotocol/core-components/commit/196735af36c498bffa08b344ca7702041e63ea3d)) +- some commit widget issues ([#654](https://github.com/bosonprotocol/core-components/issues/654)) ([d1452c4](https://github.com/bosonprotocol/core-components/commit/d1452c497dfd2700062d85ccb664e5bd4d9ea2c2)) ### Features -* add option to commit widget to make it a modal ([#652](https://github.com/bosonprotocol/core-components/issues/652)) ([bd144af](https://github.com/bosonprotocol/core-components/commit/bd144afb46e3716290b3f888af25ca581d5ce1dd)) -* export commit widget ([#651](https://github.com/bosonprotocol/core-components/issues/651)) ([72a92a4](https://github.com/bosonprotocol/core-components/commit/72a92a46891e78899a529353e1171e9b7b4ab4ab)) - - - - +- add option to commit widget to make it a modal ([#652](https://github.com/bosonprotocol/core-components/issues/652)) ([bd144af](https://github.com/bosonprotocol/core-components/commit/bd144afb46e3716290b3f888af25ca581d5ce1dd)) +- export commit widget ([#651](https://github.com/bosonprotocol/core-components/issues/651)) ([72a92a4](https://github.com/bosonprotocol/core-components/commit/72a92a46891e78899a529353e1171e9b7b4ab4ab)) # [0.25.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.24.1...@bosonprotocol/react-kit@0.25.0) (2024-01-24) - ### Bug Fixes -* avoid crashing when lens profile can't be fetched ([#637](https://github.com/bosonprotocol/core-components/issues/637)) ([dc9e501](https://github.com/bosonprotocol/core-components/commit/dc9e501da098f5b0e11adafa6466e0c450ea5310)) -* change getSellerByAddress in case the seller owns a LENS token ([#642](https://github.com/bosonprotocol/core-components/issues/642)) ([a19f68e](https://github.com/bosonprotocol/core-components/commit/a19f68e713415da25e253ed4443f595f6ea30081)) -* redemption widget - verify seller signature with assistant wallet instead of admin on ([#640](https://github.com/bosonprotocol/core-components/issues/640)) ([5e51107](https://github.com/bosonprotocol/core-components/commit/5e5110741a72112564626040ffedb25d37ec7f49)) -* vulnerability issue ([#635](https://github.com/bosonprotocol/core-components/issues/635)) ([ac0940e](https://github.com/bosonprotocol/core-components/commit/ac0940eb8c2bb1682e7761b8d9a85730bf4d7f57)) - +- avoid crashing when lens profile can't be fetched ([#637](https://github.com/bosonprotocol/core-components/issues/637)) ([dc9e501](https://github.com/bosonprotocol/core-components/commit/dc9e501da098f5b0e11adafa6466e0c450ea5310)) +- change getSellerByAddress in case the seller owns a LENS token ([#642](https://github.com/bosonprotocol/core-components/issues/642)) ([a19f68e](https://github.com/bosonprotocol/core-components/commit/a19f68e713415da25e253ed4443f595f6ea30081)) +- redemption widget - verify seller signature with assistant wallet instead of admin on ([#640](https://github.com/bosonprotocol/core-components/issues/640)) ([5e51107](https://github.com/bosonprotocol/core-components/commit/5e5110741a72112564626040ffedb25d37ec7f49)) +- vulnerability issue ([#635](https://github.com/bosonprotocol/core-components/issues/635)) ([ac0940e](https://github.com/bosonprotocol/core-components/commit/ac0940eb8c2bb1682e7761b8d9a85730bf4d7f57)) ### Features -* commit widget ([#612](https://github.com/bosonprotocol/core-components/issues/612)) ([5c80a06](https://github.com/bosonprotocol/core-components/commit/5c80a06b00b377f24acacfaef0f648cde09b4d74)) -* export useOffersBacked and create getIsOfferExpired ([#646](https://github.com/bosonprotocol/core-components/issues/646)) ([b2882d7](https://github.com/bosonprotocol/core-components/commit/b2882d7590a793aea9ae53887f573cd8e2e00a39)) -* make useHandleText support offers that do not expire ([#645](https://github.com/bosonprotocol/core-components/issues/645)) ([5751d34](https://github.com/bosonprotocol/core-components/commit/5751d34b2c3958c1a1b0b65ae4ee4c0eb5ed10b2)) -* support coinbase wallet ([#649](https://github.com/bosonprotocol/core-components/issues/649)) ([f887b2f](https://github.com/bosonprotocol/core-components/commit/f887b2f37dad549c2b947094792fbd6817723e9e)) - - - - +- commit widget ([#612](https://github.com/bosonprotocol/core-components/issues/612)) ([5c80a06](https://github.com/bosonprotocol/core-components/commit/5c80a06b00b377f24acacfaef0f648cde09b4d74)) +- export useOffersBacked and create getIsOfferExpired ([#646](https://github.com/bosonprotocol/core-components/issues/646)) ([b2882d7](https://github.com/bosonprotocol/core-components/commit/b2882d7590a793aea9ae53887f573cd8e2e00a39)) +- make useHandleText support offers that do not expire ([#645](https://github.com/bosonprotocol/core-components/issues/645)) ([5751d34](https://github.com/bosonprotocol/core-components/commit/5751d34b2c3958c1a1b0b65ae4ee4c0eb5ed10b2)) +- support coinbase wallet ([#649](https://github.com/bosonprotocol/core-components/issues/649)) ([f887b2f](https://github.com/bosonprotocol/core-components/commit/f887b2f37dad549c2b947094792fbd6817723e9e)) ## [0.24.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.24.0...@bosonprotocol/react-kit@0.24.1) (2023-12-18) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - # [0.24.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.23.1...@bosonprotocol/react-kit@0.24.0) (2023-12-18) - ### Bug Fixes -* responsiveness header redemption widget ([#626](https://github.com/bosonprotocol/core-components/issues/626)) ([c9b1dfe](https://github.com/bosonprotocol/core-components/commit/c9b1dfe03e946e754178701ed9326c21e3f70f92)) -* useCallSignerFromIframe ([#629](https://github.com/bosonprotocol/core-components/issues/629)) ([8531ee9](https://github.com/bosonprotocol/core-components/commit/8531ee9eee841fc6d0c6eca1451e0db1937036b0)) - +- responsiveness header redemption widget ([#626](https://github.com/bosonprotocol/core-components/issues/626)) ([c9b1dfe](https://github.com/bosonprotocol/core-components/commit/c9b1dfe03e946e754178701ed9326c21e3f70f92)) +- useCallSignerFromIframe ([#629](https://github.com/bosonprotocol/core-components/issues/629)) ([8531ee9](https://github.com/bosonprotocol/core-components/commit/8531ee9eee841fc6d0c6eca1451e0db1937036b0)) ### Features -* create product card and collections card skeleton components ([#631](https://github.com/bosonprotocol/core-components/issues/631)) ([7aa283d](https://github.com/bosonprotocol/core-components/commit/7aa283d8b767e52cb58ed289aeeb2d5a2a600f84)) -* redemption widget without connecting wallet ([#627](https://github.com/bosonprotocol/core-components/issues/627)) ([241fbcb](https://github.com/bosonprotocol/core-components/commit/241fbcbdc5c2be1b60d1b4097e3388c36c00beed)) - - - - +- create product card and collections card skeleton components ([#631](https://github.com/bosonprotocol/core-components/issues/631)) ([7aa283d](https://github.com/bosonprotocol/core-components/commit/7aa283d8b767e52cb58ed289aeeb2d5a2a600f84)) +- redemption widget without connecting wallet ([#627](https://github.com/bosonprotocol/core-components/issues/627)) ([241fbcb](https://github.com/bosonprotocol/core-components/commit/241fbcbdc5c2be1b60d1b4097e3388c36c00beed)) ## [0.23.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.23.0...@bosonprotocol/react-kit@0.23.1) (2023-12-08) - ### Bug Fixes -* price currency ([#624](https://github.com/bosonprotocol/core-components/issues/624)) ([673f478](https://github.com/bosonprotocol/core-components/commit/673f478a74309cfaf1d20e710683372fb56fe226)) - - - - +- price currency ([#624](https://github.com/bosonprotocol/core-components/issues/624)) ([673f478](https://github.com/bosonprotocol/core-components/commit/673f478a74309cfaf1d20e710683372fb56fe226)) # [0.23.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.22.0...@bosonprotocol/react-kit@0.23.0) (2023-12-08) - ### Features -* add more props to magic login button ([#622](https://github.com/bosonprotocol/core-components/issues/622)) ([5eb46fb](https://github.com/bosonprotocol/core-components/commit/5eb46fb2f087b0fe75aa35be7c7351e9c567e381)) - - - - +- add more props to magic login button ([#622](https://github.com/bosonprotocol/core-components/issues/622)) ([5eb46fb](https://github.com/bosonprotocol/core-components/commit/5eb46fb2f087b0fe75aa35be7c7351e9c567e381)) # [0.22.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.21.0...@bosonprotocol/react-kit@0.22.0) (2023-12-05) - ### Bug Fixes -* checkTokenGatedCondition and typescript compilation warning ([#608](https://github.com/bosonprotocol/core-components/issues/608)) ([e466832](https://github.com/bosonprotocol/core-components/commit/e46683256877ef831e0897cf5e00d3249534a2dc)) -* disconnect and reset flow ([#588](https://github.com/bosonprotocol/core-components/issues/588)) ([22c4b03](https://github.com/bosonprotocol/core-components/commit/22c4b03654ca7d6b1a48d5d40e4fa7f33dfd603b)) -* disconnect should use same wagmi than useConfig+ upgrade wagmi and rainbowkit ([#597](https://github.com/bosonprotocol/core-components/issues/597)) ([9992101](https://github.com/bosonprotocol/core-components/commit/999210150fb490455e1f15bdd307537d7b0221e3)) -* eth-reverse-reason ([#603](https://github.com/bosonprotocol/core-components/issues/603)) ([f7884e2](https://github.com/bosonprotocol/core-components/commit/f7884e236b5f700e2603fe06a17704fb77f0100a)) -* excessive calls to infura provider (querying eth_chainId) ([#619](https://github.com/bosonprotocol/core-components/issues/619)) ([112bdce](https://github.com/bosonprotocol/core-components/commit/112bdce0b81ebd865ec61c3cc7017d302273e10a)) -* use offers backed ([#604](https://github.com/bosonprotocol/core-components/issues/604)) ([0563904](https://github.com/bosonprotocol/core-components/commit/05639048c9183619b0c5f005b059f89e8323fed1)) - +- checkTokenGatedCondition and typescript compilation warning ([#608](https://github.com/bosonprotocol/core-components/issues/608)) ([e466832](https://github.com/bosonprotocol/core-components/commit/e46683256877ef831e0897cf5e00d3249534a2dc)) +- disconnect and reset flow ([#588](https://github.com/bosonprotocol/core-components/issues/588)) ([22c4b03](https://github.com/bosonprotocol/core-components/commit/22c4b03654ca7d6b1a48d5d40e4fa7f33dfd603b)) +- disconnect should use same wagmi than useConfig+ upgrade wagmi and rainbowkit ([#597](https://github.com/bosonprotocol/core-components/issues/597)) ([9992101](https://github.com/bosonprotocol/core-components/commit/999210150fb490455e1f15bdd307537d7b0221e3)) +- eth-reverse-reason ([#603](https://github.com/bosonprotocol/core-components/issues/603)) ([f7884e2](https://github.com/bosonprotocol/core-components/commit/f7884e236b5f700e2603fe06a17704fb77f0100a)) +- excessive calls to infura provider (querying eth_chainId) ([#619](https://github.com/bosonprotocol/core-components/issues/619)) ([112bdce](https://github.com/bosonprotocol/core-components/commit/112bdce0b81ebd865ec61c3cc7017d302273e10a)) +- use offers backed ([#604](https://github.com/bosonprotocol/core-components/issues/604)) ([0563904](https://github.com/bosonprotocol/core-components/commit/05639048c9183619b0c5f005b059f89e8323fed1)) ### Features -* add code from eth-reverse-reason dependency ([#601](https://github.com/bosonprotocol/core-components/issues/601)) ([571bf58](https://github.com/bosonprotocol/core-components/commit/571bf58f05a0f86459a5680709b268dfef88342e)) -* add redemption widget parameters to allow several usecases ([#587](https://github.com/bosonprotocol/core-components/issues/587)) ([116640e](https://github.com/bosonprotocol/core-components/commit/116640e3c649a39d6986f65bbf1750ff5eb2ed6e)) -* add tx response to on error handlers in ctas ([#599](https://github.com/bosonprotocol/core-components/issues/599)) ([b7bbf37](https://github.com/bosonprotocol/core-components/commit/b7bbf379b9c819e9b719eb98ecd4756a3e54ec99)) -* disable redeem confirmation based on supported or unsupported c… ([#589](https://github.com/bosonprotocol/core-components/issues/589)) ([81e3456](https://github.com/bosonprotocol/core-components/commit/81e3456e73b6487b692b2195c4720399337f051f)) -* display sucess message after cancelling exchange ([#586](https://github.com/bosonprotocol/core-components/issues/586)) ([425c93c](https://github.com/bosonprotocol/core-components/commit/425c93ce4d0e7ac537991f73294bf320364c8859)) -* extend check offer condition to check if a buyer can commit to a token gated offer ([#592](https://github.com/bosonprotocol/core-components/issues/592)) ([16b69ec](https://github.com/bosonprotocol/core-components/commit/16b69ecd91370c76cddd2452999cfa8ed751c790)) -* improve errors ([#600](https://github.com/bosonprotocol/core-components/issues/600)) ([951ffa1](https://github.com/bosonprotocol/core-components/commit/951ffa128746b3d24fd85f9b401ba53dbe9688d5)) -* integrate finance widget ([#609](https://github.com/bosonprotocol/core-components/issues/609)) ([79983d1](https://github.com/bosonprotocol/core-components/commit/79983d15468e86f71bd6e15b5154a7b21fe24798)) -* redemption widget - manage callbacks ([#594](https://github.com/bosonprotocol/core-components/issues/594)) ([c56c682](https://github.com/bosonprotocol/core-components/commit/c56c6825c7097c6c4fd3aa3eaa6699395ef824b1)) -* redemption widget add handlers ([#605](https://github.com/bosonprotocol/core-components/issues/605)) ([a40cd39](https://github.com/bosonprotocol/core-components/commit/a40cd3966d8d3c2c7127c64b3d797d8efd587d3d)) - - - - +- add code from eth-reverse-reason dependency ([#601](https://github.com/bosonprotocol/core-components/issues/601)) ([571bf58](https://github.com/bosonprotocol/core-components/commit/571bf58f05a0f86459a5680709b268dfef88342e)) +- add redemption widget parameters to allow several usecases ([#587](https://github.com/bosonprotocol/core-components/issues/587)) ([116640e](https://github.com/bosonprotocol/core-components/commit/116640e3c649a39d6986f65bbf1750ff5eb2ed6e)) +- add tx response to on error handlers in ctas ([#599](https://github.com/bosonprotocol/core-components/issues/599)) ([b7bbf37](https://github.com/bosonprotocol/core-components/commit/b7bbf379b9c819e9b719eb98ecd4756a3e54ec99)) +- disable redeem confirmation based on supported or unsupported c… ([#589](https://github.com/bosonprotocol/core-components/issues/589)) ([81e3456](https://github.com/bosonprotocol/core-components/commit/81e3456e73b6487b692b2195c4720399337f051f)) +- display sucess message after cancelling exchange ([#586](https://github.com/bosonprotocol/core-components/issues/586)) ([425c93c](https://github.com/bosonprotocol/core-components/commit/425c93ce4d0e7ac537991f73294bf320364c8859)) +- extend check offer condition to check if a buyer can commit to a token gated offer ([#592](https://github.com/bosonprotocol/core-components/issues/592)) ([16b69ec](https://github.com/bosonprotocol/core-components/commit/16b69ecd91370c76cddd2452999cfa8ed751c790)) +- improve errors ([#600](https://github.com/bosonprotocol/core-components/issues/600)) ([951ffa1](https://github.com/bosonprotocol/core-components/commit/951ffa128746b3d24fd85f9b401ba53dbe9688d5)) +- integrate finance widget ([#609](https://github.com/bosonprotocol/core-components/issues/609)) ([79983d1](https://github.com/bosonprotocol/core-components/commit/79983d15468e86f71bd6e15b5154a7b21fe24798)) +- redemption widget - manage callbacks ([#594](https://github.com/bosonprotocol/core-components/issues/594)) ([c56c682](https://github.com/bosonprotocol/core-components/commit/c56c6825c7097c6c4fd3aa3eaa6699395ef824b1)) +- redemption widget add handlers ([#605](https://github.com/bosonprotocol/core-components/issues/605)) ([a40cd39](https://github.com/bosonprotocol/core-components/commit/a40cd3966d8d3c2c7127c64b3d797d8efd587d3d)) # [0.21.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.20.2...@bosonprotocol/react-kit@0.21.0) (2023-10-10) - ### Bug Fixes -* adapt widget config ([#581](https://github.com/bosonprotocol/core-components/issues/581)) ([e7b8a44](https://github.com/bosonprotocol/core-components/commit/e7b8a44273044bb7afdceede97c118d15de2acfb)) - +- adapt widget config ([#581](https://github.com/bosonprotocol/core-components/issues/581)) ([e7b8a44](https://github.com/bosonprotocol/core-components/commit/e7b8a44273044bb7afdceede97c118d15de2acfb)) ### Features -* add magic link ([#582](https://github.com/bosonprotocol/core-components/issues/582)) ([59cf87e](https://github.com/bosonprotocol/core-components/commit/59cf87ec55763766ea781fb174137aa046983300)) -* add sellerIds for redemption widget ([#583](https://github.com/bosonprotocol/core-components/issues/583)) ([0ad1e76](https://github.com/bosonprotocol/core-components/commit/0ad1e760f43da4c62a9f36bef8a832b96495791d)) -* export magic hooks ([#584](https://github.com/bosonprotocol/core-components/issues/584)) ([2033685](https://github.com/bosonprotocol/core-components/commit/20336852249a3583057e13c9a4d7a980e439f084)) - - - - +- add magic link ([#582](https://github.com/bosonprotocol/core-components/issues/582)) ([59cf87e](https://github.com/bosonprotocol/core-components/commit/59cf87ec55763766ea781fb174137aa046983300)) +- add sellerIds for redemption widget ([#583](https://github.com/bosonprotocol/core-components/issues/583)) ([0ad1e76](https://github.com/bosonprotocol/core-components/commit/0ad1e760f43da4c62a9f36bef8a832b96495791d)) +- export magic hooks ([#584](https://github.com/bosonprotocol/core-components/issues/584)) ([2033685](https://github.com/bosonprotocol/core-components/commit/20336852249a3583057e13c9a4d7a980e439f084)) ## [0.20.2](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.20.1...@bosonprotocol/react-kit@0.20.2) (2023-10-03) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - ## [0.20.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.20.0...@bosonprotocol/react-kit@0.20.1) (2023-09-29) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - # [0.20.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.19.0...@bosonprotocol/react-kit@0.20.0) (2023-09-27) - ### Bug Fixes -* adapt opensea link wrt chain used in the env ([#564](https://github.com/bosonprotocol/core-components/issues/564)) ([59c26e9](https://github.com/bosonprotocol/core-components/commit/59c26e941fbe383ef256c80c5cd772a3c330510a)) -* add content-type header when POST message to redeemCallbackUrl ([#537](https://github.com/bosonprotocol/core-components/issues/537)) ([0ee30f3](https://github.com/bosonprotocol/core-components/commit/0ee30f389a9f5c8a2af84441bc2431b65d79c5b7)) -* button ref ([#546](https://github.com/bosonprotocol/core-components/issues/546)) ([125050f](https://github.com/bosonprotocol/core-components/commit/125050f4110458d4491dff3f6a24eee126a866d3)) -* change secondary colour to map dapp colour scheme ([#536](https://github.com/bosonprotocol/core-components/issues/536)) ([68e9f20](https://github.com/bosonprotocol/core-components/commit/68e9f201960afbab47e217b0c4cb8446dce13737)) -* check the exchange is owned by the user and in correct state to be redeemed/cancelled ([#538](https://github.com/bosonprotocol/core-components/issues/538)) ([7fb50bc](https://github.com/bosonprotocol/core-components/commit/7fb50bc8f0b37664437078da76d43639c05f19b9)) -* compilation widgets ([#560](https://github.com/bosonprotocol/core-components/issues/560)) ([faa72e5](https://github.com/bosonprotocol/core-components/commit/faa72e5eddac9d224c2f23a0110bdf5a19577321)) -* type config provider ([#558](https://github.com/bosonprotocol/core-components/issues/558)) ([db9fc9f](https://github.com/bosonprotocol/core-components/commit/db9fc9fe12a4883e9c33b50fad26b284d8969ba4)) - +- adapt opensea link wrt chain used in the env ([#564](https://github.com/bosonprotocol/core-components/issues/564)) ([59c26e9](https://github.com/bosonprotocol/core-components/commit/59c26e941fbe383ef256c80c5cd772a3c330510a)) +- add content-type header when POST message to redeemCallbackUrl ([#537](https://github.com/bosonprotocol/core-components/issues/537)) ([0ee30f3](https://github.com/bosonprotocol/core-components/commit/0ee30f389a9f5c8a2af84441bc2431b65d79c5b7)) +- button ref ([#546](https://github.com/bosonprotocol/core-components/issues/546)) ([125050f](https://github.com/bosonprotocol/core-components/commit/125050f4110458d4491dff3f6a24eee126a866d3)) +- change secondary colour to map dapp colour scheme ([#536](https://github.com/bosonprotocol/core-components/issues/536)) ([68e9f20](https://github.com/bosonprotocol/core-components/commit/68e9f201960afbab47e217b0c4cb8446dce13737)) +- check the exchange is owned by the user and in correct state to be redeemed/cancelled ([#538](https://github.com/bosonprotocol/core-components/issues/538)) ([7fb50bc](https://github.com/bosonprotocol/core-components/commit/7fb50bc8f0b37664437078da76d43639c05f19b9)) +- compilation widgets ([#560](https://github.com/bosonprotocol/core-components/issues/560)) ([faa72e5](https://github.com/bosonprotocol/core-components/commit/faa72e5eddac9d224c2f23a0110bdf5a19577321)) +- type config provider ([#558](https://github.com/bosonprotocol/core-components/issues/558)) ([db9fc9f](https://github.com/bosonprotocol/core-components/commit/db9fc9fe12a4883e9c33b50fad26b284d8969ba4)) ### Features -* add coreSdkConfig prop to cta button ([#550](https://github.com/bosonprotocol/core-components/issues/550)) ([087c7f9](https://github.com/bosonprotocol/core-components/commit/087c7f9cb68b5911bb427ca3ff604abe5be02194)) -* add forcedAccount property on RedemptionWidget ([#566](https://github.com/bosonprotocol/core-components/issues/566)) ([fa907fe](https://github.com/bosonprotocol/core-components/commit/fa907fe7be4796d15caa604a53b0294995e633a4)) -* multi chain widget ([#557](https://github.com/bosonprotocol/core-components/issues/557)) ([3301a7c](https://github.com/bosonprotocol/core-components/commit/3301a7c64de1f5d5795c770655326e8271405ae9)) -* multiple configs per env ([#542](https://github.com/bosonprotocol/core-components/issues/542)) ([9221cfd](https://github.com/bosonprotocol/core-components/commit/9221cfd47d766b9079d04bcb271e79578d6e3798)) -* new core sdk on config id switch ([#544](https://github.com/bosonprotocol/core-components/issues/544)) ([12a7652](https://github.com/bosonprotocol/core-components/commit/12a7652a55073df4290e21848d108c7e36c71359)) -* remove unused button styles and fix svg hover styles ([#565](https://github.com/bosonprotocol/core-components/issues/565)) ([8879bf2](https://github.com/bosonprotocol/core-components/commit/8879bf21d7c15010c65657d16e917595642b3ff4)) - - - - +- add coreSdkConfig prop to cta button ([#550](https://github.com/bosonprotocol/core-components/issues/550)) ([087c7f9](https://github.com/bosonprotocol/core-components/commit/087c7f9cb68b5911bb427ca3ff604abe5be02194)) +- add forcedAccount property on RedemptionWidget ([#566](https://github.com/bosonprotocol/core-components/issues/566)) ([fa907fe](https://github.com/bosonprotocol/core-components/commit/fa907fe7be4796d15caa604a53b0294995e633a4)) +- multi chain widget ([#557](https://github.com/bosonprotocol/core-components/issues/557)) ([3301a7c](https://github.com/bosonprotocol/core-components/commit/3301a7c64de1f5d5795c770655326e8271405ae9)) +- multiple configs per env ([#542](https://github.com/bosonprotocol/core-components/issues/542)) ([9221cfd](https://github.com/bosonprotocol/core-components/commit/9221cfd47d766b9079d04bcb271e79578d6e3798)) +- new core sdk on config id switch ([#544](https://github.com/bosonprotocol/core-components/issues/544)) ([12a7652](https://github.com/bosonprotocol/core-components/commit/12a7652a55073df4290e21848d108c7e36c71359)) +- remove unused button styles and fix svg hover styles ([#565](https://github.com/bosonprotocol/core-components/issues/565)) ([8879bf2](https://github.com/bosonprotocol/core-components/commit/8879bf21d7c15010c65657d16e917595642b3ff4)) # [0.19.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.18.0...@bosonprotocol/react-kit@0.19.0) (2023-08-14) - ### Features -* redemption widget - allow to switch direct to redeem or cancel … ([#535](https://github.com/bosonprotocol/core-components/issues/535)) ([aa7c7f9](https://github.com/bosonprotocol/core-components/commit/aa7c7f96a64ff4d4f27d2a0118163f0d98fc8c2f)) - - - - +- redemption widget - allow to switch direct to redeem or cancel … ([#535](https://github.com/bosonprotocol/core-components/issues/535)) ([aa7c7f9](https://github.com/bosonprotocol/core-components/commit/aa7c7f96a64ff4d4f27d2a0118163f0d98fc8c2f)) # [0.18.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.17.6...@bosonprotocol/react-kit@0.18.0) (2023-08-10) - ### Bug Fixes -* ensure connection with wallet connect (upgrade wagmi / rainbowkit) ([#524](https://github.com/bosonprotocol/core-components/issues/524)) ([4b372ea](https://github.com/bosonprotocol/core-components/commit/4b372ea1e9a448764d9eda50e38c2093219e5ccd)) -* opensea link is not correct ([#523](https://github.com/bosonprotocol/core-components/issues/523)) ([45354d6](https://github.com/bosonprotocol/core-components/commit/45354d6eb86746d4c5c5cd9158532e35313cf0a9)) -* redemption widget - direct click on Redeem exchange ([#531](https://github.com/bosonprotocol/core-components/issues/531)) ([3412855](https://github.com/bosonprotocol/core-components/commit/3412855006938c998c938cfd4eb64947b252815b)) -* redemption widget: change initialise button colour ([#529](https://github.com/bosonprotocol/core-components/issues/529)) ([5771c51](https://github.com/bosonprotocol/core-components/commit/5771c51edfa52f865a45b1ab5fa53c6b5b705c82)) -* report check exchange policy in Redemption Widget ([#525](https://github.com/bosonprotocol/core-components/issues/525)) ([1fadde5](https://github.com/bosonprotocol/core-components/commit/1fadde5b2ecf1afe34c1d888483e473f459b4396)) -* upgrade chat-sdk version in react-kit ([#526](https://github.com/bosonprotocol/core-components/issues/526)) ([5d6f996](https://github.com/bosonprotocol/core-components/commit/5d6f996e57a9f6fb453151b9347b1fc8495003cd)) - +- ensure connection with wallet connect (upgrade wagmi / rainbowkit) ([#524](https://github.com/bosonprotocol/core-components/issues/524)) ([4b372ea](https://github.com/bosonprotocol/core-components/commit/4b372ea1e9a448764d9eda50e38c2093219e5ccd)) +- opensea link is not correct ([#523](https://github.com/bosonprotocol/core-components/issues/523)) ([45354d6](https://github.com/bosonprotocol/core-components/commit/45354d6eb86746d4c5c5cd9158532e35313cf0a9)) +- redemption widget - direct click on Redeem exchange ([#531](https://github.com/bosonprotocol/core-components/issues/531)) ([3412855](https://github.com/bosonprotocol/core-components/commit/3412855006938c998c938cfd4eb64947b252815b)) +- redemption widget: change initialise button colour ([#529](https://github.com/bosonprotocol/core-components/issues/529)) ([5771c51](https://github.com/bosonprotocol/core-components/commit/5771c51edfa52f865a45b1ab5fa53c6b5b705c82)) +- report check exchange policy in Redemption Widget ([#525](https://github.com/bosonprotocol/core-components/issues/525)) ([1fadde5](https://github.com/bosonprotocol/core-components/commit/1fadde5b2ecf1afe34c1d888483e473f459b4396)) +- upgrade chat-sdk version in react-kit ([#526](https://github.com/bosonprotocol/core-components/issues/526)) ([5d6f996](https://github.com/bosonprotocol/core-components/commit/5d6f996e57a9f6fb453151b9347b1fc8495003cd)) ### Features -* add biconomy metaTx configuration to widgets ([#532](https://github.com/bosonprotocol/core-components/issues/532)) ([90790bb](https://github.com/bosonprotocol/core-components/commit/90790bb520761fe0dcad005487e58940a241bda8)) -* change redemption widget to be the redeem form instead of the redeem button ([#527](https://github.com/bosonprotocol/core-components/issues/527)) ([512260a](https://github.com/bosonprotocol/core-components/commit/512260a2cefea2868953727c8537bc6dd7407ba1)) -* link "raise dispute" button to dr center according to env ([#533](https://github.com/bosonprotocol/core-components/issues/533)) ([ce6533f](https://github.com/bosonprotocol/core-components/commit/ce6533f3a8e4e011056722cff8fd2ecbd06014a1)) -* redemption widget - allow to hide modal ([#534](https://github.com/bosonprotocol/core-components/issues/534)) ([276eb8e](https://github.com/bosonprotocol/core-components/commit/276eb8e9620d81ed4047b881b4fba6049d3ac942)) -* redemption widget ([#460](https://github.com/bosonprotocol/core-components/issues/460)) ([953d9c3](https://github.com/bosonprotocol/core-components/commit/953d9c3ad2caafc0a8028637ad25afbebab7c9e2)) -* reinitialize the redeem modal steps when switching wallet ([#528](https://github.com/bosonprotocol/core-components/issues/528)) ([dc9521b](https://github.com/bosonprotocol/core-components/commit/dc9521b4738292f7a6ac00164d4920270d351e53)) - - - - +- add biconomy metaTx configuration to widgets ([#532](https://github.com/bosonprotocol/core-components/issues/532)) ([90790bb](https://github.com/bosonprotocol/core-components/commit/90790bb520761fe0dcad005487e58940a241bda8)) +- change redemption widget to be the redeem form instead of the redeem button ([#527](https://github.com/bosonprotocol/core-components/issues/527)) ([512260a](https://github.com/bosonprotocol/core-components/commit/512260a2cefea2868953727c8537bc6dd7407ba1)) +- link "raise dispute" button to dr center according to env ([#533](https://github.com/bosonprotocol/core-components/issues/533)) ([ce6533f](https://github.com/bosonprotocol/core-components/commit/ce6533f3a8e4e011056722cff8fd2ecbd06014a1)) +- redemption widget - allow to hide modal ([#534](https://github.com/bosonprotocol/core-components/issues/534)) ([276eb8e](https://github.com/bosonprotocol/core-components/commit/276eb8e9620d81ed4047b881b4fba6049d3ac942)) +- redemption widget ([#460](https://github.com/bosonprotocol/core-components/issues/460)) ([953d9c3](https://github.com/bosonprotocol/core-components/commit/953d9c3ad2caafc0a8028637ad25afbebab7c9e2)) +- reinitialize the redeem modal steps when switching wallet ([#528](https://github.com/bosonprotocol/core-components/issues/528)) ([dc9521b](https://github.com/bosonprotocol/core-components/commit/dc9521b4738292f7a6ac00164d4920270d351e53)) ## [0.17.6](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.17.5...@bosonprotocol/react-kit@0.17.6) (2023-07-05) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - ## [0.17.5](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.17.4...@bosonprotocol/react-kit@0.17.5) (2023-06-28) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - ## [0.17.4](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.17.3...@bosonprotocol/react-kit@0.17.4) (2023-06-22) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - ## [0.17.3](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.17.2...@bosonprotocol/react-kit@0.17.3) (2023-05-19) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - ## [0.17.2](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.17.1...@bosonprotocol/react-kit@0.17.2) (2023-05-17) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - ## [0.17.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.17.0...@bosonprotocol/react-kit@0.17.1) (2023-05-15) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - # [0.17.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.16.1...@bosonprotocol/react-kit@0.17.0) (2023-05-12) - ### Bug Fixes -* attempt to fix core-sdk prototype ([#457](https://github.com/bosonprotocol/core-components/issues/457)) ([68c6631](https://github.com/bosonprotocol/core-components/commit/68c66319ab9f60c8d88ed48daeba3d05b4fbb7ab)) -* build ([#455](https://github.com/bosonprotocol/core-components/issues/455)) ([bcab586](https://github.com/bosonprotocol/core-components/commit/bcab5869a4a4752912afb1006bc2383f68df93b4)) - +- attempt to fix core-sdk prototype ([#457](https://github.com/bosonprotocol/core-components/issues/457)) ([68c6631](https://github.com/bosonprotocol/core-components/commit/68c66319ab9f60c8d88ed48daeba3d05b4fbb7ab)) +- build ([#455](https://github.com/bosonprotocol/core-components/issues/455)) ([bcab586](https://github.com/bosonprotocol/core-components/commit/bcab5869a4a4752912afb1006bc2383f68df93b4)) ### Features -* add finance widget to react kit ([#452](https://github.com/bosonprotocol/core-components/issues/452)) ([4740742](https://github.com/bosonprotocol/core-components/commit/474074234fadcf9c3cae5e821c2694e5eafa521e)) -* add seller metadata ([#479](https://github.com/bosonprotocol/core-components/issues/479)) ([c988d5b](https://github.com/bosonprotocol/core-components/commit/c988d5b336f6813a0848033d27c88d451c0b86c1)) -* upgrade to contracts v2.2.0 ([#450](https://github.com/bosonprotocol/core-components/issues/450)) ([039d41e](https://github.com/bosonprotocol/core-components/commit/039d41e37caa067ca48f9d47bb8bc336ddfbafca)) - - - - +- add finance widget to react kit ([#452](https://github.com/bosonprotocol/core-components/issues/452)) ([4740742](https://github.com/bosonprotocol/core-components/commit/474074234fadcf9c3cae5e821c2694e5eafa521e)) +- add seller metadata ([#479](https://github.com/bosonprotocol/core-components/issues/479)) ([c988d5b](https://github.com/bosonprotocol/core-components/commit/c988d5b336f6813a0848033d27c88d451c0b86c1)) +- upgrade to contracts v2.2.0 ([#450](https://github.com/bosonprotocol/core-components/issues/450)) ([039d41e](https://github.com/bosonprotocol/core-components/commit/039d41e37caa067ca48f9d47bb8bc336ddfbafca)) ## [0.16.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.16.0...@bosonprotocol/react-kit@0.16.1) (2022-12-23) - ### Bug Fixes -* add action name to handle approval of erc20 token ([#410](https://github.com/bosonprotocol/core-components/issues/410)) ([b68a43c](https://github.com/bosonprotocol/core-components/commit/b68a43c5f0c05aa30f79b8755cb7d21a03f4527a)) - - - - +- add action name to handle approval of erc20 token ([#410](https://github.com/bosonprotocol/core-components/issues/410)) ([b68a43c](https://github.com/bosonprotocol/core-components/commit/b68a43c5f0c05aa30f79b8755cb7d21a03f4527a)) # [0.16.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.15.0...@bosonprotocol/react-kit@0.16.0) (2022-12-01) - ### Features -* cta button types update ([#400](https://github.com/bosonprotocol/core-components/issues/400)) ([2c6e743](https://github.com/bosonprotocol/core-components/commit/2c6e74335e4ee5621663d8195793eec02b0cd214)) - - - - +- cta button types update ([#400](https://github.com/bosonprotocol/core-components/issues/400)) ([2c6e743](https://github.com/bosonprotocol/core-components/commit/2c6e74335e4ee5621663d8195793eec02b0cd214)) # [0.15.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.14.0...@bosonprotocol/react-kit@0.15.0) (2022-11-22) - ### Features -* add name property to useCtaClickHandler ([#399](https://github.com/bosonprotocol/core-components/issues/399)) ([faa06ff](https://github.com/bosonprotocol/core-components/commit/faa06ffab5f7e535878c6cd1a1922b5c8bc4e8ee)) -* **react-kit:** support fallback image src ([#398](https://github.com/bosonprotocol/core-components/issues/398)) ([fc4522d](https://github.com/bosonprotocol/core-components/commit/fc4522d06d99480a35917d68e54016bbdf5fc9c4)) - - - - +- add name property to useCtaClickHandler ([#399](https://github.com/bosonprotocol/core-components/issues/399)) ([faa06ff](https://github.com/bosonprotocol/core-components/commit/faa06ffab5f7e535878c6cd1a1922b5c8bc4e8ee)) +- **react-kit:** support fallback image src ([#398](https://github.com/bosonprotocol/core-components/issues/398)) ([fc4522d](https://github.com/bosonprotocol/core-components/commit/fc4522d06d99480a35917d68e54016bbdf5fc9c4)) # [0.14.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.13.0...@bosonprotocol/react-kit@0.14.0) (2022-11-17) - ### Bug Fixes -* images cutting off text below ([#378](https://github.com/bosonprotocol/core-components/issues/378)) ([5786cea](https://github.com/bosonprotocol/core-components/commit/5786ceae81e9060f2876a6f139c9484c59c1066f)) - +- images cutting off text below ([#378](https://github.com/bosonprotocol/core-components/issues/378)) ([5786cea](https://github.com/bosonprotocol/core-components/commit/5786ceae81e9060f2876a6f139c9484c59c1066f)) ### Features -* activate meta-transactions for revokeVoucher()/completeExchangem()/extendDisputeTimeout() ([#367](https://github.com/bosonprotocol/core-components/issues/367)) ([9a7888e](https://github.com/bosonprotocol/core-components/commit/9a7888ec3d66b072604c7802a0834549f656bf19)) -* add funts ctas ([#372](https://github.com/bosonprotocol/core-components/issues/372)) ([3bca4e9](https://github.com/bosonprotocol/core-components/commit/3bca4e994b71f1b84dddd0f9e36f475ae2cd0f88)) -* add onError handler for avatar image ([#379](https://github.com/bosonprotocol/core-components/issues/379)) ([3160bb5](https://github.com/bosonprotocol/core-components/commit/3160bb558c18bac03f5daeb79ed72cbfe1508259)) -* implement dispute CTAs ([#368](https://github.com/bosonprotocol/core-components/issues/368)) ([28cb98a](https://github.com/bosonprotocol/core-components/commit/28cb98aa5e289da7e8051a3341343ac7b420732f)) - - - - +- activate meta-transactions for revokeVoucher()/completeExchangem()/extendDisputeTimeout() ([#367](https://github.com/bosonprotocol/core-components/issues/367)) ([9a7888e](https://github.com/bosonprotocol/core-components/commit/9a7888ec3d66b072604c7802a0834549f656bf19)) +- add funts ctas ([#372](https://github.com/bosonprotocol/core-components/issues/372)) ([3bca4e9](https://github.com/bosonprotocol/core-components/commit/3bca4e994b71f1b84dddd0f9e36f475ae2cd0f88)) +- add onError handler for avatar image ([#379](https://github.com/bosonprotocol/core-components/issues/379)) ([3160bb5](https://github.com/bosonprotocol/core-components/commit/3160bb558c18bac03f5daeb79ed72cbfe1508259)) +- implement dispute CTAs ([#368](https://github.com/bosonprotocol/core-components/issues/368)) ([28cb98a](https://github.com/bosonprotocol/core-components/commit/28cb98aa5e289da7e8051a3341343ac7b420732f)) # [0.13.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.12.0...@bosonprotocol/react-kit@0.13.0) (2022-10-28) - ### Bug Fixes -* add wrapper to fix type inside productCard ([#360](https://github.com/bosonprotocol/core-components/issues/360)) ([12452f2](https://github.com/bosonprotocol/core-components/commit/12452f21be58603518f37bd02b8ea79ae11dbc5c)) - +- add wrapper to fix type inside productCard ([#360](https://github.com/bosonprotocol/core-components/issues/360)) ([12452f2](https://github.com/bosonprotocol/core-components/commit/12452f21be58603518f37bd02b8ea79ae11dbc5c)) ### Features -* add support for replaced transactions ([#364](https://github.com/bosonprotocol/core-components/issues/364)) ([111f91e](https://github.com/bosonprotocol/core-components/commit/111f91ea83bd1411f57324114eecbbf9a3d8dbdc)) -* add tooltip for product card ([#359](https://github.com/bosonprotocol/core-components/issues/359)) ([d60887d](https://github.com/bosonprotocol/core-components/commit/d60887d8f0b57eddb858e41f5cfa7c1202cb2d09)) -* bp436 react kit ctas offer ([#352](https://github.com/bosonprotocol/core-components/issues/352)) ([4843d7d](https://github.com/bosonprotocol/core-components/commit/4843d7d7159c26de988b9b54dc48b07ef126d8d3)) -* create and manage token gated offers ([#363](https://github.com/bosonprotocol/core-components/issues/363)) ([94978e8](https://github.com/bosonprotocol/core-components/commit/94978e81957bbca5c4cd28a5375be1b579a013c8)) -* support meta transactions ([#348](https://github.com/bosonprotocol/core-components/issues/348)) ([1fa0992](https://github.com/bosonprotocol/core-components/commit/1fa0992b6fc426597565ce517cebef9d82d5875f)) - - - - +- add support for replaced transactions ([#364](https://github.com/bosonprotocol/core-components/issues/364)) ([111f91e](https://github.com/bosonprotocol/core-components/commit/111f91ea83bd1411f57324114eecbbf9a3d8dbdc)) +- add tooltip for product card ([#359](https://github.com/bosonprotocol/core-components/issues/359)) ([d60887d](https://github.com/bosonprotocol/core-components/commit/d60887d8f0b57eddb858e41f5cfa7c1202cb2d09)) +- bp436 react kit ctas offer ([#352](https://github.com/bosonprotocol/core-components/issues/352)) ([4843d7d](https://github.com/bosonprotocol/core-components/commit/4843d7d7159c26de988b9b54dc48b07ef126d8d3)) +- create and manage token gated offers ([#363](https://github.com/bosonprotocol/core-components/issues/363)) ([94978e8](https://github.com/bosonprotocol/core-components/commit/94978e81957bbca5c4cd28a5375be1b579a013c8)) +- support meta transactions ([#348](https://github.com/bosonprotocol/core-components/issues/348)) ([1fa0992](https://github.com/bosonprotocol/core-components/commit/1fa0992b6fc426597565ce517cebef9d82d5875f)) # [0.12.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.11.0...@bosonprotocol/react-kit@0.12.0) (2022-10-26) - ### Bug Fixes -* change accent color ([#344](https://github.com/bosonprotocol/core-components/issues/344)) ([a96a747](https://github.com/bosonprotocol/core-components/commit/a96a747d89005729ad414dd7a6974c53deb56614)) -* change cards colors ([#357](https://github.com/bosonprotocol/core-components/issues/357)) ([bceb29b](https://github.com/bosonprotocol/core-components/commit/bceb29bd25fca228e449a8ac479cc6d0721628cc)) -* exchange cancel color ([#345](https://github.com/bosonprotocol/core-components/issues/345)) ([73c528c](https://github.com/bosonprotocol/core-components/commit/73c528c6d53f83cd804c8083def79df973d533d9)) - +- change accent color ([#344](https://github.com/bosonprotocol/core-components/issues/344)) ([a96a747](https://github.com/bosonprotocol/core-components/commit/a96a747d89005729ad414dd7a6974c53deb56614)) +- change cards colors ([#357](https://github.com/bosonprotocol/core-components/issues/357)) ([bceb29b](https://github.com/bosonprotocol/core-components/commit/bceb29bd25fca228e449a8ac479cc6d0721628cc)) +- exchange cancel color ([#345](https://github.com/bosonprotocol/core-components/issues/345)) ([73c528c](https://github.com/bosonprotocol/core-components/commit/73c528c6d53f83cd804c8083def79df973d533d9)) ### Features -* add missing ctas ([#334](https://github.com/bosonprotocol/core-components/issues/334)) ([094153a](https://github.com/bosonprotocol/core-components/commit/094153a824ff5bc39dbf829f3526fc84e1f677eb)) -* bp349 buttons themes ([#341](https://github.com/bosonprotocol/core-components/issues/341)) ([5ac2801](https://github.com/bosonprotocol/core-components/commit/5ac28010d65cb01bfbf8864a4ce9724f8d2d673a)) -* ensure approve is called when needed before committing to an offer ([#326](https://github.com/bosonprotocol/core-components/issues/326)) ([cb20d73](https://github.com/bosonprotocol/core-components/commit/cb20d73a418a6c07aea325553a4646ed9ac925a9)) -* exchange cta updates ([#354](https://github.com/bosonprotocol/core-components/issues/354)) ([3383185](https://github.com/bosonprotocol/core-components/commit/33831850945ccb41a07196ebb84dff9d844d9941)) -* export theme add ([#346](https://github.com/bosonprotocol/core-components/issues/346)) ([0e9cb58](https://github.com/bosonprotocol/core-components/commit/0e9cb5805add2f1fd97035e014411ad21dbfdb51)) - - - - +- add missing ctas ([#334](https://github.com/bosonprotocol/core-components/issues/334)) ([094153a](https://github.com/bosonprotocol/core-components/commit/094153a824ff5bc39dbf829f3526fc84e1f677eb)) +- bp349 buttons themes ([#341](https://github.com/bosonprotocol/core-components/issues/341)) ([5ac2801](https://github.com/bosonprotocol/core-components/commit/5ac28010d65cb01bfbf8864a4ce9724f8d2d673a)) +- ensure approve is called when needed before committing to an offer ([#326](https://github.com/bosonprotocol/core-components/issues/326)) ([cb20d73](https://github.com/bosonprotocol/core-components/commit/cb20d73a418a6c07aea325553a4646ed9ac925a9)) +- exchange cta updates ([#354](https://github.com/bosonprotocol/core-components/issues/354)) ([3383185](https://github.com/bosonprotocol/core-components/commit/33831850945ccb41a07196ebb84dff9d844d9941)) +- export theme add ([#346](https://github.com/bosonprotocol/core-components/issues/346)) ([0e9cb58](https://github.com/bosonprotocol/core-components/commit/0e9cb5805add2f1fd97035e014411ad21dbfdb51)) # [0.11.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.10.0...@bosonprotocol/react-kit@0.11.0) (2022-10-19) - ### Bug Fixes -* remove margin to prevent overlap on grid ([#338](https://github.com/bosonprotocol/core-components/issues/338)) ([79f999c](https://github.com/bosonprotocol/core-components/commit/79f999cff035687ac107b9d1c920345bbadfecca)) - +- remove margin to prevent overlap on grid ([#338](https://github.com/bosonprotocol/core-components/issues/338)) ([79f999c](https://github.com/bosonprotocol/core-components/commit/79f999cff035687ac107b9d1c920345bbadfecca)) ### Features -* add `isMetaTx` to `onPendingTransaction` hook ([#340](https://github.com/bosonprotocol/core-components/issues/340)) ([b8667ab](https://github.com/bosonprotocol/core-components/commit/b8667ab3c81f6181ace45302dd1c22d19e1d4a51)) - - - - +- add `isMetaTx` to `onPendingTransaction` hook ([#340](https://github.com/bosonprotocol/core-components/issues/340)) ([b8667ab](https://github.com/bosonprotocol/core-components/commit/b8667ab3c81f6181ace45302dd1c22d19e1d4a51)) # [0.10.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.9.2...@bosonprotocol/react-kit@0.10.0) (2022-10-18) - ### Features -* commit button pas ref add ([#315](https://github.com/bosonprotocol/core-components/issues/315)) ([8f9ff14](https://github.com/bosonprotocol/core-components/commit/8f9ff14815b4a7d9136af95ea87eddc7dd5e45a8)) -* getsignerAddress add to commit button ([#331](https://github.com/bosonprotocol/core-components/issues/331)) ([720f269](https://github.com/bosonprotocol/core-components/commit/720f269ddb510d8997ad319f101fe46d7c020f2e)) - - - - +- commit button pas ref add ([#315](https://github.com/bosonprotocol/core-components/issues/315)) ([8f9ff14](https://github.com/bosonprotocol/core-components/commit/8f9ff14815b4a7d9136af95ea87eddc7dd5e45a8)) +- getsignerAddress add to commit button ([#331](https://github.com/bosonprotocol/core-components/issues/331)) ([720f269](https://github.com/bosonprotocol/core-components/commit/720f269ddb510d8997ad319f101fe46d7c020f2e)) ## [0.9.2](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.9.1...@bosonprotocol/react-kit@0.9.2) (2022-10-13) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - ## [0.9.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.9.0...@bosonprotocol/react-kit@0.9.1) (2022-10-13) **Note:** Version bump only for package @bosonprotocol/react-kit - - - - # [0.9.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.8.0...@bosonprotocol/react-kit@0.9.0) (2022-10-12) - ### Bug Fixes -* revert buttons changes ([#298](https://github.com/bosonprotocol/core-components/issues/298)) ([6e6cb9c](https://github.com/bosonprotocol/core-components/commit/6e6cb9ced923b96f23a0b51211317240588c5700)) - +- revert buttons changes ([#298](https://github.com/bosonprotocol/core-components/issues/298)) ([6e6cb9c](https://github.com/bosonprotocol/core-components/commit/6e6cb9ced923b96f23a0b51211317240588c5700)) ### Features -* add lensContracts config to useCoreSdk ([#302](https://github.com/bosonprotocol/core-components/issues/302)) ([b5faadd](https://github.com/bosonprotocol/core-components/commit/b5faaddd9dea670cecc9057b0ae6bed6a3640573)) -* bp349 react kit update theme ([#285](https://github.com/bosonprotocol/core-components/issues/285)) ([4df66e9](https://github.com/bosonprotocol/core-components/commit/4df66e99568aa0a0b8390d4f151baa3f1433f2ab)) -* bp349 react kit update theme ([#296](https://github.com/bosonprotocol/core-components/issues/296)) ([bd572c8](https://github.com/bosonprotocol/core-components/commit/bd572c886fc13d1d845212f844987bbc655138b8)) -* exchange product card avatarname update ([#294](https://github.com/bosonprotocol/core-components/issues/294)) ([178d462](https://github.com/bosonprotocol/core-components/commit/178d462a23534a926e58967414bf834d7c8816c8)) -* expire cta add ([#304](https://github.com/bosonprotocol/core-components/issues/304)) ([53f2024](https://github.com/bosonprotocol/core-components/commit/53f2024a27a70c033e1be5c1580c852696b86e49)) -* return all seller accounts linked to auth tokens ([#306](https://github.com/bosonprotocol/core-components/issues/306)) ([ad2c61a](https://github.com/bosonprotocol/core-components/commit/ad2c61a1c1276af696787c474050f75c45cda663)) -* seller meta tx + batch methods ([#292](https://github.com/bosonprotocol/core-components/issues/292)) ([c7acc0d](https://github.com/bosonprotocol/core-components/commit/c7acc0d75c2b80896dc44250a03c99f7dbdc9aff)) -* update lens authtokentype from 1 -> 2 ([#307](https://github.com/bosonprotocol/core-components/issues/307)) ([fb3c86c](https://github.com/bosonprotocol/core-components/commit/fb3c86c4ddb1b7cd40ac5c7c29af5cff7a1ee48d)) - - - - +- add lensContracts config to useCoreSdk ([#302](https://github.com/bosonprotocol/core-components/issues/302)) ([b5faadd](https://github.com/bosonprotocol/core-components/commit/b5faaddd9dea670cecc9057b0ae6bed6a3640573)) +- bp349 react kit update theme ([#285](https://github.com/bosonprotocol/core-components/issues/285)) ([4df66e9](https://github.com/bosonprotocol/core-components/commit/4df66e99568aa0a0b8390d4f151baa3f1433f2ab)) +- bp349 react kit update theme ([#296](https://github.com/bosonprotocol/core-components/issues/296)) ([bd572c8](https://github.com/bosonprotocol/core-components/commit/bd572c886fc13d1d845212f844987bbc655138b8)) +- exchange product card avatarname update ([#294](https://github.com/bosonprotocol/core-components/issues/294)) ([178d462](https://github.com/bosonprotocol/core-components/commit/178d462a23534a926e58967414bf834d7c8816c8)) +- expire cta add ([#304](https://github.com/bosonprotocol/core-components/issues/304)) ([53f2024](https://github.com/bosonprotocol/core-components/commit/53f2024a27a70c033e1be5c1580c852696b86e49)) +- return all seller accounts linked to auth tokens ([#306](https://github.com/bosonprotocol/core-components/issues/306)) ([ad2c61a](https://github.com/bosonprotocol/core-components/commit/ad2c61a1c1276af696787c474050f75c45cda663)) +- seller meta tx + batch methods ([#292](https://github.com/bosonprotocol/core-components/issues/292)) ([c7acc0d](https://github.com/bosonprotocol/core-components/commit/c7acc0d75c2b80896dc44250a03c99f7dbdc9aff)) +- update lens authtokentype from 1 -> 2 ([#307](https://github.com/bosonprotocol/core-components/issues/307)) ([fb3c86c](https://github.com/bosonprotocol/core-components/commit/fb3c86c4ddb1b7cd40ac5c7c29af5cff7a1ee48d)) # [0.8.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.7.0...@bosonprotocol/react-kit@0.8.0) (2022-10-05) - ### Features -* fix npm publish config ([#286](https://github.com/bosonprotocol/core-components/issues/286)) ([d57bc91](https://github.com/bosonprotocol/core-components/commit/d57bc91b348f5225d0890cc3256ac464bb8ad122)) -* mkae npm packages public ([#287](https://github.com/bosonprotocol/core-components/issues/287)) ([98927c2](https://github.com/bosonprotocol/core-components/commit/98927c233740616b80da66a7de30e911e85ab09c)) -* set up prod config & ci ([#284](https://github.com/bosonprotocol/core-components/issues/284)) ([830f193](https://github.com/bosonprotocol/core-components/commit/830f1939de1e4c232b5b575d391bff3d3ccfdbe7)) - - - - +- fix npm publish config ([#286](https://github.com/bosonprotocol/core-components/issues/286)) ([d57bc91](https://github.com/bosonprotocol/core-components/commit/d57bc91b348f5225d0890cc3256ac464bb8ad122)) +- mkae npm packages public ([#287](https://github.com/bosonprotocol/core-components/issues/287)) ([98927c2](https://github.com/bosonprotocol/core-components/commit/98927c233740616b80da66a7de30e911e85ab09c)) +- set up prod config & ci ([#284](https://github.com/bosonprotocol/core-components/issues/284)) ([830f193](https://github.com/bosonprotocol/core-components/commit/830f1939de1e4c232b5b575d391bff3d3ccfdbe7)) # [0.7.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.6.0...@bosonprotocol/react-kit@0.7.0) (2022-10-03) - ### Bug Fixes -* card loader position ([#256](https://github.com/bosonprotocol/core-components/issues/256)) ([48099a5](https://github.com/bosonprotocol/core-components/commit/48099a577f3ec2b2fe47835777e37d9a4fbdb9e4)) -* fix hook useIpfsMetadataStorage ([#259](https://github.com/bosonprotocol/core-components/issues/259)) ([63e7939](https://github.com/bosonprotocol/core-components/commit/63e79391d7934e5620a2fbfd32360e43171df73f)) -* wrong dataCard type fix ([#260](https://github.com/bosonprotocol/core-components/issues/260)) ([896c03c](https://github.com/bosonprotocol/core-components/commit/896c03c0d857d9d436988d9e7c93fd7fa8c1f837)) - +- card loader position ([#256](https://github.com/bosonprotocol/core-components/issues/256)) ([48099a5](https://github.com/bosonprotocol/core-components/commit/48099a577f3ec2b2fe47835777e37d9a4fbdb9e4)) +- fix hook useIpfsMetadataStorage ([#259](https://github.com/bosonprotocol/core-components/issues/259)) ([63e7939](https://github.com/bosonprotocol/core-components/commit/63e79391d7934e5620a2fbfd32360e43171df73f)) +- wrong dataCard type fix ([#260](https://github.com/bosonprotocol/core-components/issues/260)) ([896c03c](https://github.com/bosonprotocol/core-components/commit/896c03c0d857d9d436988d9e7c93fd7fa8c1f837)) ### Features -* add a method to relay meta transactions through native API ([#239](https://github.com/bosonprotocol/core-components/issues/239)) ([51e370e](https://github.com/bosonprotocol/core-components/commit/51e370eaaa2466cf5c8f06116e705f6e01843d12)), closes [#268](https://github.com/bosonprotocol/core-components/issues/268) -* add showLoading prop to all CTAs ([#275](https://github.com/bosonprotocol/core-components/issues/275)) ([c1006f8](https://github.com/bosonprotocol/core-components/commit/c1006f882bb0866720dd0b87d35726b6613ff76f)) -* batch complete cta button add ([#266](https://github.com/bosonprotocol/core-components/issues/266)) ([396b50d](https://github.com/bosonprotocol/core-components/commit/396b50d2dcea7b46e58c37ee6ce9ca424d34d418)) -* complete exchange button add ([#265](https://github.com/bosonprotocol/core-components/issues/265)) ([336b5d5](https://github.com/bosonprotocol/core-components/commit/336b5d51736bf4d3f2d71a5701553acca573cadf)) -* exchange card cta section hover animation add ([#269](https://github.com/bosonprotocol/core-components/issues/269)) ([de9ac50](https://github.com/bosonprotocol/core-components/commit/de9ac509d9e2e8d64c9bd3eb20147bbb775154c4)) -* fixed card image responsive ([#252](https://github.com/bosonprotocol/core-components/issues/252)) ([4a7f3e1](https://github.com/bosonprotocol/core-components/commit/4a7f3e16b440790dd9ade7a48582cfcd8d247b77)) -* migrate TESTING env to Mumbai ([#254](https://github.com/bosonprotocol/core-components/issues/254)) ([ebfc5eb](https://github.com/bosonprotocol/core-components/commit/ebfc5eb3bf633ac317068b11dade7be3c78be1b2)) -* missing product card export add ([#250](https://github.com/bosonprotocol/core-components/issues/250)) ([0d034bf](https://github.com/bosonprotocol/core-components/commit/0d034bf9466c9794ac42fa6f60a432994bdd10d4)) -* new card props ([#251](https://github.com/bosonprotocol/core-components/issues/251)) ([e4e3f21](https://github.com/bosonprotocol/core-components/commit/e4e3f215a7915298aa64fb8ea4695601361771bd)) -* new tokens images ([#262](https://github.com/bosonprotocol/core-components/issues/262)) ([f3b9c93](https://github.com/bosonprotocol/core-components/commit/f3b9c93efda14eb30a4426376e325aeffee8165a)) -* productCard update ([#249](https://github.com/bosonprotocol/core-components/issues/249)) ([ad4a8e7](https://github.com/bosonprotocol/core-components/commit/ad4a8e75b5ee29c5046d0491b00374f3068dc7b1)) -* update svgs ([#267](https://github.com/bosonprotocol/core-components/issues/267)) ([a75a5d3](https://github.com/bosonprotocol/core-components/commit/a75a5d316f3bef5cda9d546d3fa4fc5566771723)) - - - - +- add a method to relay meta transactions through native API ([#239](https://github.com/bosonprotocol/core-components/issues/239)) ([51e370e](https://github.com/bosonprotocol/core-components/commit/51e370eaaa2466cf5c8f06116e705f6e01843d12)), closes [#268](https://github.com/bosonprotocol/core-components/issues/268) +- add showLoading prop to all CTAs ([#275](https://github.com/bosonprotocol/core-components/issues/275)) ([c1006f8](https://github.com/bosonprotocol/core-components/commit/c1006f882bb0866720dd0b87d35726b6613ff76f)) +- batch complete cta button add ([#266](https://github.com/bosonprotocol/core-components/issues/266)) ([396b50d](https://github.com/bosonprotocol/core-components/commit/396b50d2dcea7b46e58c37ee6ce9ca424d34d418)) +- complete exchange button add ([#265](https://github.com/bosonprotocol/core-components/issues/265)) ([336b5d5](https://github.com/bosonprotocol/core-components/commit/336b5d51736bf4d3f2d71a5701553acca573cadf)) +- exchange card cta section hover animation add ([#269](https://github.com/bosonprotocol/core-components/issues/269)) ([de9ac50](https://github.com/bosonprotocol/core-components/commit/de9ac509d9e2e8d64c9bd3eb20147bbb775154c4)) +- fixed card image responsive ([#252](https://github.com/bosonprotocol/core-components/issues/252)) ([4a7f3e1](https://github.com/bosonprotocol/core-components/commit/4a7f3e16b440790dd9ade7a48582cfcd8d247b77)) +- migrate TESTING env to Mumbai ([#254](https://github.com/bosonprotocol/core-components/issues/254)) ([ebfc5eb](https://github.com/bosonprotocol/core-components/commit/ebfc5eb3bf633ac317068b11dade7be3c78be1b2)) +- missing product card export add ([#250](https://github.com/bosonprotocol/core-components/issues/250)) ([0d034bf](https://github.com/bosonprotocol/core-components/commit/0d034bf9466c9794ac42fa6f60a432994bdd10d4)) +- new card props ([#251](https://github.com/bosonprotocol/core-components/issues/251)) ([e4e3f21](https://github.com/bosonprotocol/core-components/commit/e4e3f215a7915298aa64fb8ea4695601361771bd)) +- new tokens images ([#262](https://github.com/bosonprotocol/core-components/issues/262)) ([f3b9c93](https://github.com/bosonprotocol/core-components/commit/f3b9c93efda14eb30a4426376e325aeffee8165a)) +- productCard update ([#249](https://github.com/bosonprotocol/core-components/issues/249)) ([ad4a8e7](https://github.com/bosonprotocol/core-components/commit/ad4a8e75b5ee29c5046d0491b00374f3068dc7b1)) +- update svgs ([#267](https://github.com/bosonprotocol/core-components/issues/267)) ([a75a5d3](https://github.com/bosonprotocol/core-components/commit/a75a5d316f3bef5cda9d546d3fa4fc5566771723)) # [0.6.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.5.0...@bosonprotocol/react-kit@0.6.0) (2022-09-13) ### Features -* cta removed from exchange card ([#247](https://github.com/bosonprotocol/core-components/issues/247)) ([2f2e614](https://github.com/bosonprotocol/core-components/commit/2f2e614fcaab07b8d7544b4a4cea9ec54afaac67)) -* dispute cta, exchange, image, stream fix ([#237](https://github.com/bosonprotocol/core-components/issues/237)) ([a9ba585](https://github.com/bosonprotocol/core-components/commit/a9ba585958a92eea6e18768436a6770ef12f06d6)) -* export currency logo ([#245](https://github.com/bosonprotocol/core-components/issues/245)) ([0103077](https://github.com/bosonprotocol/core-components/commit/0103077dddee626db47f81df2438f3503a301017)) +- cta removed from exchange card ([#247](https://github.com/bosonprotocol/core-components/issues/247)) ([2f2e614](https://github.com/bosonprotocol/core-components/commit/2f2e614fcaab07b8d7544b4a4cea9ec54afaac67)) +- dispute cta, exchange, image, stream fix ([#237](https://github.com/bosonprotocol/core-components/issues/237)) ([a9ba585](https://github.com/bosonprotocol/core-components/commit/a9ba585958a92eea6e18768436a6770ef12f06d6)) +- export currency logo ([#245](https://github.com/bosonprotocol/core-components/issues/245)) ([0103077](https://github.com/bosonprotocol/core-components/commit/0103077dddee626db47f81df2438f3503a301017)) # [0.5.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.4.2...@bosonprotocol/react-kit@0.5.0) (2022-09-08) ### Features -* build product card ([#230](https://github.com/bosonprotocol/core-components/issues/230)) ([9f64d9c](https://github.com/bosonprotocol/core-components/commit/9f64d9c3f45a0c7621a7b1f5df66d13b34fdca05)) -* currency display component ([#225](https://github.com/bosonprotocol/core-components/issues/225)) ([d012ba0](https://github.com/bosonprotocol/core-components/commit/d012ba055f059b978dae769d1df7d24e7f464f44)) -* deprecate widgets, widgets-sdk and parent-app ([#226](https://github.com/bosonprotocol/core-components/issues/226)) ([a7fb47c](https://github.com/bosonprotocol/core-components/commit/a7fb47cbbc8c46ae738dd29e010f40db7f9b0abe)) -* exchange card component add ([#235](https://github.com/bosonprotocol/core-components/issues/235)) ([67bd4f5](https://github.com/bosonprotocol/core-components/commit/67bd4f59d72cae8d972e4c2e4ccc4c6bf8b1b4d4)) +- build product card ([#230](https://github.com/bosonprotocol/core-components/issues/230)) ([9f64d9c](https://github.com/bosonprotocol/core-components/commit/9f64d9c3f45a0c7621a7b1f5df66d13b34fdca05)) +- currency display component ([#225](https://github.com/bosonprotocol/core-components/issues/225)) ([d012ba0](https://github.com/bosonprotocol/core-components/commit/d012ba055f059b978dae769d1df7d24e7f464f44)) +- deprecate widgets, widgets-sdk and parent-app ([#226](https://github.com/bosonprotocol/core-components/issues/226)) ([a7fb47c](https://github.com/bosonprotocol/core-components/commit/a7fb47cbbc8c46ae738dd29e010f40db7f9b0abe)) +- exchange card component add ([#235](https://github.com/bosonprotocol/core-components/issues/235)) ([67bd4f5](https://github.com/bosonprotocol/core-components/commit/67bd4f59d72cae8d972e4c2e4ccc4c6bf8b1b4d4)) ## [0.4.2](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.4.1...@bosonprotocol/react-kit@0.4.2) (2022-08-30) ### Bug Fixes -* default the graph storage url ([#219](https://github.com/bosonprotocol/core-components/issues/219)) ([7ecdb97](https://github.com/bosonprotocol/core-components/commit/7ecdb97fb77a4d4cda7eba217cb748a1c832a004)) -* the graph ipfs storage url on staging ([#218](https://github.com/bosonprotocol/core-components/issues/218)) ([d6db3e3](https://github.com/bosonprotocol/core-components/commit/d6db3e3d89a1f20849d3f03807c3bd9a70c839e8)) +- default the graph storage url ([#219](https://github.com/bosonprotocol/core-components/issues/219)) ([7ecdb97](https://github.com/bosonprotocol/core-components/commit/7ecdb97fb77a4d4cda7eba217cb748a1c832a004)) +- the graph ipfs storage url on staging ([#218](https://github.com/bosonprotocol/core-components/issues/218)) ([d6db3e3](https://github.com/bosonprotocol/core-components/commit/d6db3e3d89a1f20849d3f03807c3bd9a70c839e8)) ## [0.4.1](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.4.0...@bosonprotocol/react-kit@0.4.1) (2022-08-26) @@ -783,8 +535,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Features -* add ipfs gateway headers ([#216](https://github.com/bosonprotocol/core-components/issues/216)) ([45f9ebf](https://github.com/bosonprotocol/core-components/commit/45f9ebf97e6e26d9d9cbc082cdb5b0bdbda88352)) -* cta variant styles consistency ([#215](https://github.com/bosonprotocol/core-components/issues/215)) ([44eaf7c](https://github.com/bosonprotocol/core-components/commit/44eaf7c78d5c4e703102a9af12ecdcc917b32403)) +- add ipfs gateway headers ([#216](https://github.com/bosonprotocol/core-components/issues/216)) ([45f9ebf](https://github.com/bosonprotocol/core-components/commit/45f9ebf97e6e26d9d9cbc082cdb5b0bdbda88352)) +- cta variant styles consistency ([#215](https://github.com/bosonprotocol/core-components/issues/215)) ([44eaf7c](https://github.com/bosonprotocol/core-components/commit/44eaf7c78d5c4e703102a9af12ecdcc917b32403)) ## [0.3.4](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.3.3...@bosonprotocol/react-kit@0.3.4) (2022-08-25) @@ -806,38 +558,38 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Bug Fixes -* add cta button variant option ([#205](https://github.com/bosonprotocol/core-components/issues/205)) ([fc75c0a](https://github.com/bosonprotocol/core-components/commit/fc75c0af5a363a0bd9888b6af9e9e78a1dacbcb1)) -* fix typo on core sdk ([#182](https://github.com/bosonprotocol/core-components/issues/182)) ([a2b7ee7](https://github.com/bosonprotocol/core-components/commit/a2b7ee7e124716e6d3a50a1faabc8170df9b5cba)) +- add cta button variant option ([#205](https://github.com/bosonprotocol/core-components/issues/205)) ([fc75c0a](https://github.com/bosonprotocol/core-components/commit/fc75c0af5a363a0bd9888b6af9e9e78a1dacbcb1)) +- fix typo on core sdk ([#182](https://github.com/bosonprotocol/core-components/issues/182)) ([a2b7ee7](https://github.com/bosonprotocol/core-components/commit/a2b7ee7e124716e6d3a50a1faabc8170df9b5cba)) ### Features -* contracts update ([#181](https://github.com/bosonprotocol/core-components/issues/181)) ([599a518](https://github.com/bosonprotocol/core-components/commit/599a5188cd350defe22c49626370b198c49bd6f7)) -* contracts update ([#188](https://github.com/bosonprotocol/core-components/issues/188)) ([be1dbe4](https://github.com/bosonprotocol/core-components/commit/be1dbe43740b4a2fcd5c7a06147bcdb8f9c7b1b0)) -* **react-kit:** allow custom ipfs http client headers ([#190](https://github.com/bosonprotocol/core-components/issues/190)) ([dca2555](https://github.com/bosonprotocol/core-components/commit/dca2555a64237a729b078a6b670a88450a5b733b)) +- contracts update ([#181](https://github.com/bosonprotocol/core-components/issues/181)) ([599a518](https://github.com/bosonprotocol/core-components/commit/599a5188cd350defe22c49626370b198c49bd6f7)) +- contracts update ([#188](https://github.com/bosonprotocol/core-components/issues/188)) ([be1dbe4](https://github.com/bosonprotocol/core-components/commit/be1dbe43740b4a2fcd5c7a06147bcdb8f9c7b1b0)) +- **react-kit:** allow custom ipfs http client headers ([#190](https://github.com/bosonprotocol/core-components/issues/190)) ([dca2555](https://github.com/bosonprotocol/core-components/commit/dca2555a64237a729b078a6b670a88450a5b733b)) # [0.2.0](https://github.com/bosonprotocol/core-components/compare/@bosonprotocol/react-kit@0.1.0...@bosonprotocol/react-kit@0.2.0) (2022-07-26) ### Bug Fixes -* move ui components to dapp ([#171](https://github.com/bosonprotocol/core-components/issues/171)) ([9653ef5](https://github.com/bosonprotocol/core-components/commit/9653ef55ea7d0970ee9f6a409691d246276ca41f)) -* remove duplicates from search result set ([#176](https://github.com/bosonprotocol/core-components/issues/176)) ([755d67b](https://github.com/bosonprotocol/core-components/commit/755d67bfa6b01395715ab90fcfe78cbfb1d64fee)) -* update imports ([#163](https://github.com/bosonprotocol/core-components/issues/163)) ([bf0f6dd](https://github.com/bosonprotocol/core-components/commit/bf0f6ddb0f1f81ee3e67047aa4cc325aabcc4ebd)) +- move ui components to dapp ([#171](https://github.com/bosonprotocol/core-components/issues/171)) ([9653ef5](https://github.com/bosonprotocol/core-components/commit/9653ef55ea7d0970ee9f6a409691d246276ca41f)) +- remove duplicates from search result set ([#176](https://github.com/bosonprotocol/core-components/issues/176)) ([755d67b](https://github.com/bosonprotocol/core-components/commit/755d67bfa6b01395715ab90fcfe78cbfb1d64fee)) +- update imports ([#163](https://github.com/bosonprotocol/core-components/issues/163)) ([bf0f6dd](https://github.com/bosonprotocol/core-components/commit/bf0f6ddb0f1f81ee3e67047aa4cc325aabcc4ebd)) ### Features -* add loading state on CTA ([#159](https://github.com/bosonprotocol/core-components/issues/159)) ([6c5c409](https://github.com/bosonprotocol/core-components/commit/6c5c409f6916cd24045bb1af37cc16a19681914e)) -* build redeem cta ([#162](https://github.com/bosonprotocol/core-components/issues/162)) ([b046a4f](https://github.com/bosonprotocol/core-components/commit/b046a4f5ff2c287155207744fb7a5f64cc7521bb)) -* build search bar ([#169](https://github.com/bosonprotocol/core-components/issues/169)) ([4e1e90a](https://github.com/bosonprotocol/core-components/commit/4e1e90a9cdc83910fb443bca43efc790507f8683)) -* get users by id and address ([#179](https://github.com/bosonprotocol/core-components/issues/179)) ([959bc11](https://github.com/bosonprotocol/core-components/commit/959bc119c45aa3db2af23aadfef38f6208acf580)) -* make callback optional ([#158](https://github.com/bosonprotocol/core-components/issues/158)) ([9474cae](https://github.com/bosonprotocol/core-components/commit/9474cae11af4cffc61e5136216d4a538dcdcba9c)) -* multi step component ([#168](https://github.com/bosonprotocol/core-components/issues/168)) ([757a803](https://github.com/bosonprotocol/core-components/commit/757a8034d3f962e5aa8cd8879a1d372eecfc2bb7)) -* **react-kit:** add hook to use ipfs metadata storage ([#180](https://github.com/bosonprotocol/core-components/issues/180)) ([878a93a](https://github.com/bosonprotocol/core-components/commit/878a93a4507f043eb80882b8edc7a283e0120119)) -* simple input implementation ([#170](https://github.com/bosonprotocol/core-components/issues/170)) ([8aa31f2](https://github.com/bosonprotocol/core-components/commit/8aa31f21326e9e4b8ca86b4f85f310fa73eeb00f)) +- add loading state on CTA ([#159](https://github.com/bosonprotocol/core-components/issues/159)) ([6c5c409](https://github.com/bosonprotocol/core-components/commit/6c5c409f6916cd24045bb1af37cc16a19681914e)) +- build redeem cta ([#162](https://github.com/bosonprotocol/core-components/issues/162)) ([b046a4f](https://github.com/bosonprotocol/core-components/commit/b046a4f5ff2c287155207744fb7a5f64cc7521bb)) +- build search bar ([#169](https://github.com/bosonprotocol/core-components/issues/169)) ([4e1e90a](https://github.com/bosonprotocol/core-components/commit/4e1e90a9cdc83910fb443bca43efc790507f8683)) +- get users by id and address ([#179](https://github.com/bosonprotocol/core-components/issues/179)) ([959bc11](https://github.com/bosonprotocol/core-components/commit/959bc119c45aa3db2af23aadfef38f6208acf580)) +- make callback optional ([#158](https://github.com/bosonprotocol/core-components/issues/158)) ([9474cae](https://github.com/bosonprotocol/core-components/commit/9474cae11af4cffc61e5136216d4a538dcdcba9c)) +- multi step component ([#168](https://github.com/bosonprotocol/core-components/issues/168)) ([757a803](https://github.com/bosonprotocol/core-components/commit/757a8034d3f962e5aa8cd8879a1d372eecfc2bb7)) +- **react-kit:** add hook to use ipfs metadata storage ([#180](https://github.com/bosonprotocol/core-components/issues/180)) ([878a93a](https://github.com/bosonprotocol/core-components/commit/878a93a4507f043eb80882b8edc7a283e0120119)) +- simple input implementation ([#170](https://github.com/bosonprotocol/core-components/issues/170)) ([8aa31f2](https://github.com/bosonprotocol/core-components/commit/8aa31f21326e9e4b8ca86b4f85f310fa73eeb00f)) # 0.1.0 (2022-07-12) ### Features -* allow the cta to select the size of the button ([#157](https://github.com/bosonprotocol/core-components/issues/157)) ([d3b4031](https://github.com/bosonprotocol/core-components/commit/d3b40319c001e284095508217c0459a644a0d2b9)) -* build void cta ([#149](https://github.com/bosonprotocol/core-components/issues/149)) ([7e8df96](https://github.com/bosonprotocol/core-components/commit/7e8df967c813789f0ded786a6aa1905f5ae9c4c5)) -* create visual components package ([#139](https://github.com/bosonprotocol/core-components/issues/139)) ([7e1a99d](https://github.com/bosonprotocol/core-components/commit/7e1a99d819789a42044d15093050dfe086cfbff0)) +- allow the cta to select the size of the button ([#157](https://github.com/bosonprotocol/core-components/issues/157)) ([d3b4031](https://github.com/bosonprotocol/core-components/commit/d3b40319c001e284095508217c0459a644a0d2b9)) +- build void cta ([#149](https://github.com/bosonprotocol/core-components/issues/149)) ([7e8df96](https://github.com/bosonprotocol/core-components/commit/7e8df967c813789f0ded786a6aa1905f5ae9c4c5)) +- create visual components package ([#139](https://github.com/bosonprotocol/core-components/issues/139)) ([7e1a99d](https://github.com/bosonprotocol/core-components/commit/7e1a99d819789a42044d15093050dfe086cfbff0)) diff --git a/packages/react-kit/package.json b/packages/react-kit/package.json index 45269c1b8..960b1a478 100644 --- a/packages/react-kit/package.json +++ b/packages/react-kit/package.json @@ -109,10 +109,10 @@ }, "lint-staged": { "*.+(js|ts|tsx)": [ - "eslint --fix ." + "eslint --fix packages/react-kit/. --ignore-path packages/react-kit/.eslintignore" ], - "*.{js,jsx,ts,tsx,json,css,scss,md}": [ - "prettier --write ." + "*.{js,jsx,ts,tsx,json,css,scss}": [ + "prettier --write packages/react-kit/." ] }, "eslintConfig": { diff --git a/packages/react-kit/src/components/avatar/SellerID.tsx b/packages/react-kit/src/components/avatar/SellerID.tsx index 6f83df775..770f420ac 100644 --- a/packages/react-kit/src/components/avatar/SellerID.tsx +++ b/packages/react-kit/src/components/avatar/SellerID.tsx @@ -1,8 +1,8 @@ import React from "react"; import { Image as AccountImage } from "@davatar/react"; -import styled, { css } from "styled-components"; +import styled from "styled-components"; import { Grid, GridProps } from "../../components/ui/Grid"; -import { colors, getCssVar } from "../../theme"; +import { getCssVar } from "../../theme"; import { subgraph } from "@bosonprotocol/core-sdk"; import { Offer } from "../../types/offer"; import { MediaSet } from "../../lib/lens/generated"; diff --git a/packages/react-kit/src/components/modal/components/Commit/OfferVariantView.tsx b/packages/react-kit/src/components/modal/components/Commit/OfferVariantView.tsx index 7cfd5484c..3a0614c21 100644 --- a/packages/react-kit/src/components/modal/components/Commit/OfferVariantView.tsx +++ b/packages/react-kit/src/components/modal/components/Commit/OfferVariantView.tsx @@ -6,7 +6,7 @@ import React, { useMemo, useState } from "react"; -import styled, { css } from "styled-components"; +import styled from "styled-components"; import { getOfferDetails } from "../../../../lib/offer/getOfferDetails"; import { breakpoint } from "../../../../lib/ui/breakpoint"; import { isTruthy } from "../../../../types/helpers"; diff --git a/packages/react-kit/src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx b/packages/react-kit/src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx index 8b21bb440..fe4cc53ec 100644 --- a/packages/react-kit/src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx +++ b/packages/react-kit/src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx @@ -3,7 +3,7 @@ import React, { useEffect } from "react"; import { Exchange } from "../../../../../types/exchange"; import { Confirmation, ConfirmationProps } from "./Confirmation"; import { NonModalProps, useNonModalContext } from "../../../nonModal/NonModal"; -import { colors, getCssVar } from "../../../../../theme"; +import { getCssVar } from "../../../../../theme"; import { RedeemHeader } from "../RedeemHeader"; import { useAccount } from "../../../../../hooks/connection/connection"; import { diff --git a/packages/react-kit/src/components/modal/components/Redeem/RedeemNonModal.tsx b/packages/react-kit/src/components/modal/components/Redeem/RedeemNonModal.tsx index 5eff3bef9..a91a32260 100644 --- a/packages/react-kit/src/components/modal/components/Redeem/RedeemNonModal.tsx +++ b/packages/react-kit/src/components/modal/components/Redeem/RedeemNonModal.tsx @@ -21,9 +21,8 @@ import { FormModel } from "./RedeemFormModel"; import { useAccount } from "../../../../hooks/connection/connection"; import { useCurrentSellers } from "../../../../hooks/useCurrentSellers"; -import { colors, getCssVar } from "../../../../theme"; +import { getCssVar } from "../../../../theme"; import { Loading } from "../../../ui/loading/Loading"; -import { useConfigContext } from "../../../config/ConfigContext"; import { Typography } from "../../../ui/Typography"; import { RedemptionContextProps, @@ -226,9 +225,6 @@ function RedeemNonModal({ currentStep: getInitialStep(widgetAction, showRedemptionOverview) }); - const { config: coreConfig } = useConfigContext(); - const defaultDisputeResolverId = coreConfig?.defaultDisputeResolverId; - const setActiveStep = (newCurrentStep: ActiveStep) => { setStep((prev) => ({ previousStep: [...prev.previousStep, prev.currentStep], diff --git a/packages/react-kit/src/components/modal/components/RequestShipment/exchangePolicyOverview/FairExchangePolicy.tsx b/packages/react-kit/src/components/modal/components/RequestShipment/exchangePolicyOverview/FairExchangePolicy.tsx index 486e9c75e..2aa7a7079 100644 --- a/packages/react-kit/src/components/modal/components/RequestShipment/exchangePolicyOverview/FairExchangePolicy.tsx +++ b/packages/react-kit/src/components/modal/components/RequestShipment/exchangePolicyOverview/FairExchangePolicy.tsx @@ -2,7 +2,7 @@ import React, { ReactNode } from "react"; import styled, { css } from "styled-components"; import { CONFIG } from "../../../../../lib/config/config"; import { Typography } from "../../../../ui/Typography"; -import { colors, getCssVar } from "../../../../../theme"; +import { getCssVar } from "../../../../../theme"; import { onlyFairExchangePolicyLabel } from "../../../../../lib/const/policies"; const InfoTitleWrapper = styled.div` diff --git a/packages/react-kit/src/components/modal/components/common/detail/Detail.style.tsx b/packages/react-kit/src/components/modal/components/common/detail/Detail.style.tsx index 435bfb162..52ffe1679 100644 --- a/packages/react-kit/src/components/modal/components/common/detail/Detail.style.tsx +++ b/packages/react-kit/src/components/modal/components/common/detail/Detail.style.tsx @@ -7,7 +7,6 @@ import { zIndex } from "../../../../ui/zIndex"; import frameImage from "../../../../../assets/frame.png"; import { buttonText } from "../../../../ui/styles"; -import { Typography } from "../../../../ui/Typography"; export const ChartWrapper = styled.div` canvas { diff --git a/packages/react-kit/src/components/modal/components/common/detail/InnerDetailViewWithPortal.tsx b/packages/react-kit/src/components/modal/components/common/detail/InnerDetailViewWithPortal.tsx index d94b888a3..bbb8e1756 100644 --- a/packages/react-kit/src/components/modal/components/common/detail/InnerDetailViewWithPortal.tsx +++ b/packages/react-kit/src/components/modal/components/common/detail/InnerDetailViewWithPortal.tsx @@ -4,7 +4,6 @@ import { Grid } from "../../../../ui/Grid"; import { DetailViewCore } from "./DetailViewCore"; import { DetailViewProps } from "./types"; import { useIsBosonExclusive } from "../../../../../hooks/offer/useIsBosonExclusive"; -import { getCssVar } from "../../../../../theme"; const BosonExclusive = styled.div<{ $hasVariations: boolean; diff --git a/packages/react-kit/src/components/price/Price.tsx b/packages/react-kit/src/components/price/Price.tsx index 7616b1fc0..0d8ea4978 100644 --- a/packages/react-kit/src/components/price/Price.tsx +++ b/packages/react-kit/src/components/price/Price.tsx @@ -1,5 +1,5 @@ -import React, { useState, useEffect } from "react"; -import styled, { css } from "styled-components"; +import React, { useState } from "react"; +import styled from "styled-components"; import { useDisplayFloatWithConfig } from "../../lib/price/prices"; import { breakpoint } from "../../lib/ui/breakpoint"; import { diff --git a/packages/react-kit/src/components/widgets/finance/convertion-rate/useUniswapPools.ts b/packages/react-kit/src/components/widgets/finance/convertion-rate/useUniswapPools.ts index 8089e46eb..0b81fb45e 100644 --- a/packages/react-kit/src/components/widgets/finance/convertion-rate/useUniswapPools.ts +++ b/packages/react-kit/src/components/widgets/finance/convertion-rate/useUniswapPools.ts @@ -131,6 +131,7 @@ export function useUniswapPools({ tokens }: Props) { const bosonToken = useQuery( ["pools-boson"], async () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const poolsIdsQuery = await request(UNISWAP_API_URL, poolsId, { token0: "USDC", token1: "WETH" diff --git a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/BosonSnapshotGate.js b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/BosonSnapshotGate.js index c8ad2e549..a6a850fe2 100644 --- a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/BosonSnapshotGate.js +++ b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/BosonSnapshotGate.js @@ -1,2 +1 @@ -"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/common.js b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/common.js index c8ad2e549..a6a850fe2 100644 --- a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/common.js +++ b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/common.js @@ -1,2 +1 @@ -"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/BosonSnapshotGate__factory.js b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/BosonSnapshotGate__factory.js index ac829313e..c92dc8f13 100644 --- a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/BosonSnapshotGate__factory.js +++ b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/BosonSnapshotGate__factory.js @@ -1,4 +1,3 @@ -"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BosonSnapshotGate__factory = void 0; /* Autogenerated file. Do not edit manually. */ diff --git a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/index.js b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/index.js index 32b0d7ad9..a1d1b5d91 100644 --- a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/index.js +++ b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/factories/index.js @@ -1,4 +1,3 @@ -"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BosonSnapshotGate__factory = void 0; /* Autogenerated file. Do not edit manually. */ diff --git a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/index.js b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/index.js index 55527a2a8..a1d09d5ce 100644 --- a/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/index.js +++ b/packages/react-kit/src/hooks/tokenGated/BosonSnapshotGate/typechain/index.js @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck -"use strict"; + var __createBinding = (this && this.__createBinding) || (Object.create diff --git a/packages/react-kit/src/hooks/uniswap/useInterval.ts b/packages/react-kit/src/hooks/uniswap/useInterval.ts index 0efe92dba..f3de6be5f 100644 --- a/packages/react-kit/src/hooks/uniswap/useInterval.ts +++ b/packages/react-kit/src/hooks/uniswap/useInterval.ts @@ -3,9 +3,9 @@ import { useEffect } from "react"; /** * Invokes callback repeatedly over an interval defined by the delay * - * @param callback - * @param delay if null, the callback will not be invoked - * @param leading by default, the callback will be invoked immediately (on the leading edge); + * @param callback - + * @param delay - if null, the callback will not be invoked + * @param leading - by default, the callback will be invoked immediately (on the leading edge); * if false, the callback will not be invoked until a first delay */ export function useInterval( diff --git a/packages/react-kit/src/hooks/useCtaClickHandler.ts b/packages/react-kit/src/hooks/useCtaClickHandler.ts index 668478fff..00389e743 100644 --- a/packages/react-kit/src/hooks/useCtaClickHandler.ts +++ b/packages/react-kit/src/hooks/useCtaClickHandler.ts @@ -96,6 +96,7 @@ export function useCtaClickHandler({ try { onPendingTransaction?.(txResponse.hash, isMetaTx, name); receipt = await txResponse.wait(waitBlocks); + // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (error: any) { // Handle transaction that was replaced, canceled or repriced. // See https://docs.ethers.io/v5/api/utils/logger/#errors--transaction-replaced diff --git a/packages/react-kit/src/hooks/useCurrentSellers.ts b/packages/react-kit/src/hooks/useCurrentSellers.ts index c108bd467..175901882 100644 --- a/packages/react-kit/src/hooks/useCurrentSellers.ts +++ b/packages/react-kit/src/hooks/useCurrentSellers.ts @@ -105,7 +105,7 @@ const getSellersByIds = * This hook returns the current seller or sellers in a list. It will return more than one * seller if you have more than one Lens profile and you had sent your Lens NFT that * identifies your profile to another user. - * @param + * @param arg0 - * @returns */ export function useCurrentSellers( diff --git a/packages/react-kit/src/hooks/useLast.ts b/packages/react-kit/src/hooks/useLast.ts index f188d4c05..5d09b1dd0 100644 --- a/packages/react-kit/src/hooks/useLast.ts +++ b/packages/react-kit/src/hooks/useLast.ts @@ -2,8 +2,8 @@ import { useEffect, useState } from "react"; /** * Returns the last value of type T that passes a filter function - * @param value changing value - * @param filterFn function that determines whether a given value should be considered for the last value + * @param value - changing value + * @param filterFn - function that determines whether a given value should be considered for the last value */ export function useLast(value: T, filterFn?: (value: T) => boolean): T { const [last, setLast] = useState(value); diff --git a/packages/react-kit/src/lib/address/address.ts b/packages/react-kit/src/lib/address/address.ts index 991881fc9..b7922796d 100644 --- a/packages/react-kit/src/lib/address/address.ts +++ b/packages/react-kit/src/lib/address/address.ts @@ -21,7 +21,7 @@ export function isAddress(value: any): string | false { /** * Returns true if the string value is zero in hex - * @param hexNumberString + * @param hexNumberString - */ export function isZero(hexNumberString: string) { return /^0x0*$/.test(hexNumberString); diff --git a/packages/react-kit/src/lib/const/chainInfo.ts b/packages/react-kit/src/lib/const/chainInfo.ts index 4ec19d5d9..f1fdc4ac1 100644 --- a/packages/react-kit/src/lib/const/chainInfo.ts +++ b/packages/react-kit/src/lib/const/chainInfo.ts @@ -162,10 +162,10 @@ export function getChainInfo( /** * Overloaded method for returning ChainInfo given a chainID * Return type varies depending on input type: - * number | undefined -> returns chaininfo | undefined - * ChainId -> returns L1ChainInfo | L2ChainInfo - * SupportedL1ChainId -> returns L1ChainInfo - * SupportedL2ChainId -> returns L2ChainInfo + * number | undefined -\> returns chaininfo | undefined + * ChainId -\> returns L1ChainInfo | L2ChainInfo + * SupportedL1ChainId -\> returns L1ChainInfo + * SupportedL2ChainId -\> returns L2ChainInfo */ export function getChainInfo( // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/packages/react-kit/src/lib/const/chains.ts b/packages/react-kit/src/lib/const/chains.ts index caca38f16..89ba553f3 100644 --- a/packages/react-kit/src/lib/const/chains.ts +++ b/packages/react-kit/src/lib/const/chains.ts @@ -137,8 +137,8 @@ export type SupportedL2ChainId = (typeof L2_CHAIN_IDS)[number]; /** * Get the priority of a chainId based on its relevance to the user. - * @param {ChainId} chainId - The chainId to determine the priority for. - * @returns {number} The priority of the chainId, the lower the priority, the earlier it should be displayed, with base of MAINNET=0. + * @param ChainId - chainId - The chainId to determine the priority for. + * @returns number The priority of the chainId, the lower the priority, the earlier it should be displayed, with base of MAINNET=0. */ export function getChainPriority(chainId: number): number { switch (chainId) { diff --git a/packages/react-kit/src/lib/numbers/numbers.ts b/packages/react-kit/src/lib/numbers/numbers.ts index 09e7fd06f..88ff657c3 100644 --- a/packages/react-kit/src/lib/numbers/numbers.ts +++ b/packages/react-kit/src/lib/numbers/numbers.ts @@ -17,11 +17,11 @@ export const getNumberWithDecimals = ( /** * Given a small number, it returns its string representation without the scientific 'e' notation. * For example: - * 1e-112 => 1e-112 (too small to change) - * 1e-7 => 0.0000001 - * 0.0001 => 0.0001 - * 9e+99 => 9e+99 - * @param num + * 1e-112 =\> 1e-112 (too small to change) + * 1e-7 =\> 0.0000001 + * 0.0001 =\> 0.0001 + * 9e+99 =\> 9e+99 + * @param num - * @returns */ export const fixformattedString = (num: number): string => { diff --git a/packages/react-kit/src/lib/offer/getOfferDetails.ts b/packages/react-kit/src/lib/offer/getOfferDetails.ts index 6398a8dfc..79e16342d 100644 --- a/packages/react-kit/src/lib/offer/getOfferDetails.ts +++ b/packages/react-kit/src/lib/offer/getOfferDetails.ts @@ -97,7 +97,7 @@ export const getOfferDetails = ( (productV1ItemMetadataEntity?.shipping || isProductV1(offer) ? (offer.metadata as ProductV1Sub).shipping : undefined - )?.supportedJurisdictions?.map((jurisdiction: any) => ({ + )?.supportedJurisdictions?.map((jurisdiction) => ({ name: jurisdiction.label, value: jurisdiction.deliveryTime })) || [] diff --git a/packages/react-kit/src/lib/signer/externalSigner.ts b/packages/react-kit/src/lib/signer/externalSigner.ts index 6a52b6dc9..23635b2e5 100644 --- a/packages/react-kit/src/lib/signer/externalSigner.ts +++ b/packages/react-kit/src/lib/signer/externalSigner.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { Web3LibAdapter, TransactionRequest, diff --git a/packages/react-kit/src/lib/uniswap/__generated__/validateTokenList.js b/packages/react-kit/src/lib/uniswap/__generated__/validateTokenList.js index d4adda56c..ed5aa82c6 100644 --- a/packages/react-kit/src/lib/uniswap/__generated__/validateTokenList.js +++ b/packages/react-kit/src/lib/uniswap/__generated__/validateTokenList.js @@ -1 +1,3346 @@ -"use strict";export const validate = validate10;export default validate10;const schema11 = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://uniswap.org/tokenlist.schema.json","title":"Uniswap Token List","description":"Schema for lists of tokens compatible with the Uniswap Interface","definitions":{"Version":{"type":"object","description":"The version of the list, used in change detection","examples":[{"major":1,"minor":0,"patch":0}],"additionalProperties":false,"properties":{"major":{"type":"integer","description":"The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.","minimum":0,"examples":[1,2]},"minor":{"type":"integer","description":"The minor version of the list. Must be incremented when tokens are added to the list.","minimum":0,"examples":[0,1]},"patch":{"type":"integer","description":"The patch version of the list. Must be incremented for any changes to the list.","minimum":0,"examples":[0,1]}},"required":["major","minor","patch"]},"TagIdentifier":{"type":"string","description":"The unique identifier of a tag","minLength":1,"maxLength":10,"pattern":"^[\\w]+$","examples":["compound","stablecoin"]},"ExtensionIdentifier":{"type":"string","description":"The name of a token extension property","minLength":1,"maxLength":40,"pattern":"^[\\w]+$","examples":["color","is_fee_on_transfer","aliases"]},"ExtensionMap":{"type":"object","description":"An object containing any arbitrary or vendor-specific token metadata","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValue"},"examples":[{"color":"#000000","is_verified_by_me":true},{"x-bridged-addresses-by-chain":{"1":{"bridgeAddress":"0x4200000000000000000000000000000000000010","tokenAddress":"0x4200000000000000000000000000000000000010"}}}]},"ExtensionPrimitiveValue":{"anyOf":[{"type":"string","minLength":1,"maxLength":42,"examples":["#00000"]},{"type":"boolean","examples":[true]},{"type":"number","examples":[15]},{"type":"null"}]},"ExtensionValue":{"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"},{"type":"object","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValueInner0"}}]},"ExtensionValueInner0":{"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"},{"type":"object","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValueInner1"}}]},"ExtensionValueInner1":{"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"}]},"TagDefinition":{"type":"object","description":"Definition of a tag that can be associated with a token via its identifier","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the tag","pattern":"^[ \\w]+$","minLength":1,"maxLength":20},"description":{"type":"string","description":"A user-friendly description of the tag","pattern":"^[ \\w\\.,:]+$","minLength":1,"maxLength":200}},"required":["name","description"],"examples":[{"name":"Stablecoin","description":"A token with value pegged to another asset"}]},"TokenInfo":{"type":"object","description":"Metadata for a single token in a token list","additionalProperties":false,"properties":{"chainId":{"type":"integer","description":"The chain ID of the Ethereum network where this token is deployed","minimum":1,"examples":[1,42]},"address":{"type":"string","description":"The checksummed address of the token on the specified chain ID","pattern":"^0x[a-fA-F0-9]{40}$","examples":["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]},"decimals":{"type":"integer","description":"The number of decimals for the token balance","minimum":0,"maximum":255,"examples":[18]},"name":{"type":"string","description":"The name of the token","minLength":0,"maxLength":40,"anyOf":[{"const":""},{"pattern":"^[ \\S+]+$"}],"examples":["USD Coin"]},"symbol":{"type":"string","description":"The symbol for the token","minLength":0,"maxLength":20,"anyOf":[{"const":""},{"pattern":"^\\S+$"}],"examples":["USDC"]},"logoURI":{"type":"string","description":"A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64","format":"uri","examples":["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]},"tags":{"type":"array","description":"An array of tag identifiers associated with the token; tags are defined at the list level","items":{"$ref":"#/definitions/TagIdentifier"},"maxItems":10,"examples":["stablecoin","compound"]},"extensions":{"$ref":"#/definitions/ExtensionMap"}},"required":["chainId","address","decimals","name","symbol"]}},"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the token list","minLength":1,"maxLength":30,"pattern":"^[\\w ]+$","examples":["My Token List"]},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of this list version; i.e. when this immutable version of the list was created"},"version":{"$ref":"#/definitions/Version"},"tokens":{"type":"array","description":"The list of tokens included in the list","items":{"$ref":"#/definitions/TokenInfo"},"minItems":1,"maxItems":10000},"tokenMap":{"type":"object","description":"A mapping of key 'chainId_tokenAddress' to its corresponding token object","minProperties":1,"maxProperties":10000,"propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/definitions/TokenInfo"},"examples":[{"4_0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984":{"name":"Uniswap","address":"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984","symbol":"UNI","decimals":18,"chainId":4,"logoURI":"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg"}}]},"keywords":{"type":"array","description":"Keywords associated with the contents of the list; may be used in list discoverability","items":{"type":"string","description":"A keyword to describe the contents of the list","minLength":1,"maxLength":20,"pattern":"^[\\w ]+$","examples":["compound","lending","personal tokens"]},"maxItems":20,"uniqueItems":true},"tags":{"type":"object","description":"A mapping of tag identifiers to their name and description","propertyNames":{"$ref":"#/definitions/TagIdentifier"},"additionalProperties":{"$ref":"#/definitions/TagDefinition"},"maxProperties":20,"examples":[{"stablecoin":{"name":"Stablecoin","description":"A token with value pegged to another asset"}}]},"logoURI":{"type":"string","description":"A URI for the logo of the token list; prefer SVG or PNG of size 256x256","format":"uri","examples":["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]}},"required":["name","timestamp","version","tokens"]};const schema12 = {"type":"object","description":"The version of the list, used in change detection","examples":[{"major":1,"minor":0,"patch":0}],"additionalProperties":false,"properties":{"major":{"type":"integer","description":"The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.","minimum":0,"examples":[1,2]},"minor":{"type":"integer","description":"The minor version of the list. Must be incremented when tokens are added to the list.","minimum":0,"examples":[0,1]},"patch":{"type":"integer","description":"The patch version of the list. Must be incremented for any changes to the list.","minimum":0,"examples":[0,1]}},"required":["major","minor","patch"]};const schema14 = {"type":"string","description":"The unique identifier of a tag","minLength":1,"maxLength":10,"pattern":"^[\\w]+$","examples":["compound","stablecoin"]};const schema26 = {"type":"object","description":"Definition of a tag that can be associated with a token via its identifier","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the tag","pattern":"^[ \\w]+$","minLength":1,"maxLength":20},"description":{"type":"string","description":"A user-friendly description of the tag","pattern":"^[ \\w\\.,:]+$","minLength":1,"maxLength":200}},"required":["name","description"],"examples":[{"name":"Stablecoin","description":"A token with value pegged to another asset"}]};const func2 = require("ajv/dist/runtime/ucs2length").default;const pattern0 = new RegExp("^[\\w ]+$", "u");const pattern4 = new RegExp("^[\\w]+$", "u");const pattern10 = new RegExp("^[ \\w]+$", "u");const pattern11 = new RegExp("^[ \\w\\.,:]+$", "u");const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"];const formats2 = require("ajv-formats/dist/formats").fullFormats.uri;const schema13 = {"type":"object","description":"Metadata for a single token in a token list","additionalProperties":false,"properties":{"chainId":{"type":"integer","description":"The chain ID of the Ethereum network where this token is deployed","minimum":1,"examples":[1,42]},"address":{"type":"string","description":"The checksummed address of the token on the specified chain ID","pattern":"^0x[a-fA-F0-9]{40}$","examples":["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]},"decimals":{"type":"integer","description":"The number of decimals for the token balance","minimum":0,"maximum":255,"examples":[18]},"name":{"type":"string","description":"The name of the token","minLength":0,"maxLength":40,"anyOf":[{"const":""},{"pattern":"^[ \\S+]+$"}],"examples":["USD Coin"]},"symbol":{"type":"string","description":"The symbol for the token","minLength":0,"maxLength":20,"anyOf":[{"const":""},{"pattern":"^\\S+$"}],"examples":["USDC"]},"logoURI":{"type":"string","description":"A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64","format":"uri","examples":["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]},"tags":{"type":"array","description":"An array of tag identifiers associated with the token; tags are defined at the list level","items":{"$ref":"#/definitions/TagIdentifier"},"maxItems":10,"examples":["stablecoin","compound"]},"extensions":{"$ref":"#/definitions/ExtensionMap"}},"required":["chainId","address","decimals","name","symbol"]};const pattern1 = new RegExp("^0x[a-fA-F0-9]{40}$", "u");const pattern2 = new RegExp("^[ \\S+]+$", "u");const pattern3 = new RegExp("^\\S+$", "u");const schema15 = {"type":"object","description":"An object containing any arbitrary or vendor-specific token metadata","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValue"},"examples":[{"color":"#000000","is_verified_by_me":true},{"x-bridged-addresses-by-chain":{"1":{"bridgeAddress":"0x4200000000000000000000000000000000000010","tokenAddress":"0x4200000000000000000000000000000000000010"}}}]};const schema16 = {"type":"string","description":"The name of a token extension property","minLength":1,"maxLength":40,"pattern":"^[\\w]+$","examples":["color","is_fee_on_transfer","aliases"]};const schema17 = {"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"},{"type":"object","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValueInner0"}}]};const schema18 = {"anyOf":[{"type":"string","minLength":1,"maxLength":42,"examples":["#00000"]},{"type":"boolean","examples":[true]},{"type":"number","examples":[15]},{"type":"null"}]};const schema20 = {"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"},{"type":"object","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValueInner1"}}]};const schema23 = {"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"}]};function validate15(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;const _errs3 = errors;let valid2 = false;const _errs4 = errors;if(errors === _errs4){if(typeof data === "string"){if(func2(data) > 42){const err0 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength",keyword:"maxLength",params:{limit: 42},message:"must NOT have more than 42 characters"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(func2(data) < 1){const err1 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid1 = _errs4 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs6 = errors;if(typeof data !== "boolean"){const err3 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/1/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs6 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs8 = errors;if(!((typeof data == "number") && (isFinite(data)))){const err4 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/2/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs8 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs10 = errors;if(data !== null){const err5 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/3/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid1 = _errs10 === errors;valid2 = valid2 || _valid1;}}}if(!valid2){const err6 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const err7 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;validate15.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate15.errors = vErrors;return errors === 0;}function validate14(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;const _errs3 = errors;let valid2 = false;const _errs4 = errors;if(errors === _errs4){if(typeof data === "string"){if(func2(data) > 42){const err0 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength",keyword:"maxLength",params:{limit: 42},message:"must NOT have more than 42 characters"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(func2(data) < 1){const err1 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid1 = _errs4 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs6 = errors;if(typeof data !== "boolean"){const err3 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/1/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs6 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs8 = errors;if(!((typeof data == "number") && (isFinite(data)))){const err4 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/2/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs8 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs10 = errors;if(data !== null){const err5 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/3/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid1 = _errs10 === errors;valid2 = valid2 || _valid1;}}}if(!valid2){const err6 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs12 = errors;if(errors === _errs12){if(data && typeof data == "object" && !Array.isArray(data)){if(Object.keys(data).length > 10){const err7 = {instancePath,schemaPath:"#/anyOf/1/maxProperties",keyword:"maxProperties",params:{limit: 10},message:"must NOT have more than 10 properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {for(const key0 in data){const _errs14 = errors;const _errs15 = errors;if(errors === _errs15){if(typeof key0 === "string"){if(func2(key0) > 40){const err8 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/maxLength",keyword:"maxLength",params:{limit: 40},message:"must NOT have more than 40 characters",propertyName:key0};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {if(func2(key0) < 1){const err9 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters",propertyName:key0};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(!pattern4.test(key0)){const err10 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\"",propertyName:key0};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}else {const err11 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key0};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}var valid3 = _errs14 === errors;if(!valid3){const err12 = {instancePath,schemaPath:"#/anyOf/1/propertyNames",keyword:"propertyNames",params:{propertyName: key0},message:"property name must be valid"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;break;}}if(valid3){for(const key1 in data){const _errs18 = errors;if(!(validate15(data[key1], {instancePath:instancePath+"/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data,parentDataProperty:key1,rootData}))){vErrors = vErrors === null ? validate15.errors : vErrors.concat(validate15.errors);errors = vErrors.length;}var valid5 = _errs18 === errors;if(!valid5){break;}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs12 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate14.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate14.errors = vErrors;return errors === 0;}function validate13(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;const _errs3 = errors;let valid2 = false;const _errs4 = errors;if(errors === _errs4){if(typeof data === "string"){if(func2(data) > 42){const err0 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength",keyword:"maxLength",params:{limit: 42},message:"must NOT have more than 42 characters"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(func2(data) < 1){const err1 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid1 = _errs4 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs6 = errors;if(typeof data !== "boolean"){const err3 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/1/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs6 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs8 = errors;if(!((typeof data == "number") && (isFinite(data)))){const err4 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/2/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs8 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs10 = errors;if(data !== null){const err5 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/3/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid1 = _errs10 === errors;valid2 = valid2 || _valid1;}}}if(!valid2){const err6 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs12 = errors;if(errors === _errs12){if(data && typeof data == "object" && !Array.isArray(data)){if(Object.keys(data).length > 10){const err7 = {instancePath,schemaPath:"#/anyOf/1/maxProperties",keyword:"maxProperties",params:{limit: 10},message:"must NOT have more than 10 properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {for(const key0 in data){const _errs14 = errors;const _errs15 = errors;if(errors === _errs15){if(typeof key0 === "string"){if(func2(key0) > 40){const err8 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/maxLength",keyword:"maxLength",params:{limit: 40},message:"must NOT have more than 40 characters",propertyName:key0};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {if(func2(key0) < 1){const err9 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters",propertyName:key0};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(!pattern4.test(key0)){const err10 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\"",propertyName:key0};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}else {const err11 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key0};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}var valid3 = _errs14 === errors;if(!valid3){const err12 = {instancePath,schemaPath:"#/anyOf/1/propertyNames",keyword:"propertyNames",params:{propertyName: key0},message:"property name must be valid"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;break;}}if(valid3){for(const key1 in data){const _errs18 = errors;if(!(validate14(data[key1], {instancePath:instancePath+"/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data,parentDataProperty:key1,rootData}))){vErrors = vErrors === null ? validate14.errors : vErrors.concat(validate14.errors);errors = vErrors.length;}var valid5 = _errs18 === errors;if(!valid5){break;}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs12 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate13.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate13.errors = vErrors;return errors === 0;}function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(Object.keys(data).length > 10){validate12.errors = [{instancePath,schemaPath:"#/maxProperties",keyword:"maxProperties",params:{limit: 10},message:"must NOT have more than 10 properties"}];return false;}else {for(const key0 in data){const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(typeof key0 === "string"){if(func2(key0) > 40){const err0 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/maxLength",keyword:"maxLength",params:{limit: 40},message:"must NOT have more than 40 characters",propertyName:key0};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(func2(key0) < 1){const err1 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters",propertyName:key0};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {if(!pattern4.test(key0)){const err2 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\"",propertyName:key0};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}}else {const err3 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key0};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var valid0 = _errs1 === errors;if(!valid0){const err4 = {instancePath,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName: key0},message:"property name must be valid"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;validate12.errors = vErrors;return false;break;}}if(valid0){for(const key1 in data){const _errs5 = errors;if(!(validate13(data[key1], {instancePath:instancePath+"/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data,parentDataProperty:key1,rootData}))){vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);errors = vErrors.length;}var valid2 = _errs5 === errors;if(!valid2){break;}}}}}else {validate12.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate12.errors = vErrors;return errors === 0;}function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((((data.chainId === undefined) && (missing0 = "chainId")) || ((data.address === undefined) && (missing0 = "address"))) || ((data.decimals === undefined) && (missing0 = "decimals"))) || ((data.name === undefined) && (missing0 = "name"))) || ((data.symbol === undefined) && (missing0 = "symbol"))){validate11.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs1 = errors;for(const key0 in data){if(!((((((((key0 === "chainId") || (key0 === "address")) || (key0 === "decimals")) || (key0 === "name")) || (key0 === "symbol")) || (key0 === "logoURI")) || (key0 === "tags")) || (key0 === "extensions"))){validate11.errors = [{instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs1 === errors){if(data.chainId !== undefined){let data0 = data.chainId;const _errs2 = errors;if(!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){validate11.errors = [{instancePath:instancePath+"/chainId",schemaPath:"#/properties/chainId/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs2){if((typeof data0 == "number") && (isFinite(data0))){if(data0 < 1 || isNaN(data0)){validate11.errors = [{instancePath:instancePath+"/chainId",schemaPath:"#/properties/chainId/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.address !== undefined){let data1 = data.address;const _errs4 = errors;if(errors === _errs4){if(typeof data1 === "string"){if(!pattern1.test(data1)){validate11.errors = [{instancePath:instancePath+"/address",schemaPath:"#/properties/address/pattern",keyword:"pattern",params:{pattern: "^0x[a-fA-F0-9]{40}$"},message:"must match pattern \""+"^0x[a-fA-F0-9]{40}$"+"\""}];return false;}}else {validate11.errors = [{instancePath:instancePath+"/address",schemaPath:"#/properties/address/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.decimals !== undefined){let data2 = data.decimals;const _errs6 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){validate11.errors = [{instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs6){if((typeof data2 == "number") && (isFinite(data2))){if(data2 > 255 || isNaN(data2)){validate11.errors = [{instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"}];return false;}else {if(data2 < 0 || isNaN(data2)){validate11.errors = [{instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}}var valid0 = _errs6 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){let data3 = data.name;const _errs8 = errors;const _errs10 = errors;let valid1 = false;const _errs11 = errors;if("" !== data3){const err0 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/0/const",keyword:"const",params:{allowedValue: ""},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs11 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs12 = errors;if(typeof data3 === "string"){if(!pattern2.test(data3)){const err1 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/1/pattern",keyword:"pattern",params:{pattern: "^[ \\S+]+$"},message:"must match pattern \""+"^[ \\S+]+$"+"\""};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}var _valid0 = _errs12 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err2 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate11.errors = vErrors;return false;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}if(errors === _errs8){if(typeof data3 === "string"){if(func2(data3) > 40){validate11.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/maxLength",keyword:"maxLength",params:{limit: 40},message:"must NOT have more than 40 characters"}];return false;}else {if(func2(data3) < 0){validate11.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit: 0},message:"must NOT have fewer than 0 characters"}];return false;}}}else {validate11.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs8 === errors;}else {var valid0 = true;}if(valid0){if(data.symbol !== undefined){let data4 = data.symbol;const _errs13 = errors;const _errs15 = errors;let valid2 = false;const _errs16 = errors;if("" !== data4){const err3 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/anyOf/0/const",keyword:"const",params:{allowedValue: ""},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs16 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs17 = errors;if(typeof data4 === "string"){if(!pattern3.test(data4)){const err4 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/anyOf/1/pattern",keyword:"pattern",params:{pattern: "^\\S+$"},message:"must match pattern \""+"^\\S+$"+"\""};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid1 = _errs17 === errors;valid2 = valid2 || _valid1;}if(!valid2){const err5 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate11.errors = vErrors;return false;}else {errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}}if(errors === _errs13){if(typeof data4 === "string"){if(func2(data4) > 20){validate11.errors = [{instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/maxLength",keyword:"maxLength",params:{limit: 20},message:"must NOT have more than 20 characters"}];return false;}else {if(func2(data4) < 0){validate11.errors = [{instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/minLength",keyword:"minLength",params:{limit: 0},message:"must NOT have fewer than 0 characters"}];return false;}}}else {validate11.errors = [{instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs13 === errors;}else {var valid0 = true;}if(valid0){if(data.logoURI !== undefined){let data5 = data.logoURI;const _errs18 = errors;if(errors === _errs18){if(errors === _errs18){if(typeof data5 === "string"){if(!(formats2(data5))){validate11.errors = [{instancePath:instancePath+"/logoURI",schemaPath:"#/properties/logoURI/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\""}];return false;}}else {validate11.errors = [{instancePath:instancePath+"/logoURI",schemaPath:"#/properties/logoURI/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs18 === errors;}else {var valid0 = true;}if(valid0){if(data.tags !== undefined){let data6 = data.tags;const _errs20 = errors;if(errors === _errs20){if(Array.isArray(data6)){if(data6.length > 10){validate11.errors = [{instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/maxItems",keyword:"maxItems",params:{limit: 10},message:"must NOT have more than 10 items"}];return false;}else {var valid3 = true;const len0 = data6.length;for(let i0=0; i0 10){validate11.errors = [{instancePath:instancePath+"/tags/" + i0,schemaPath:"#/definitions/TagIdentifier/maxLength",keyword:"maxLength",params:{limit: 10},message:"must NOT have more than 10 characters"}];return false;}else {if(func2(data7) < 1){validate11.errors = [{instancePath:instancePath+"/tags/" + i0,schemaPath:"#/definitions/TagIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern4.test(data7)){validate11.errors = [{instancePath:instancePath+"/tags/" + i0,schemaPath:"#/definitions/TagIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\""}];return false;}}}}else {validate11.errors = [{instancePath:instancePath+"/tags/" + i0,schemaPath:"#/definitions/TagIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid3 = _errs22 === errors;if(!valid3){break;}}}}else {validate11.errors = [{instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs20 === errors;}else {var valid0 = true;}if(valid0){if(data.extensions !== undefined){const _errs25 = errors;if(!(validate12(data.extensions, {instancePath:instancePath+"/extensions",parentData:data,parentDataProperty:"extensions",rootData}))){vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors);errors = vErrors.length;}var valid0 = _errs25 === errors;}else {var valid0 = true;}}}}}}}}}}}else {validate11.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate11.errors = vErrors;return errors === 0;}function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://uniswap.org/tokenlist.schema.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.name === undefined) && (missing0 = "name")) || ((data.timestamp === undefined) && (missing0 = "timestamp"))) || ((data.version === undefined) && (missing0 = "version"))) || ((data.tokens === undefined) && (missing0 = "tokens"))){validate10.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs1 = errors;for(const key0 in data){if(!((((((((key0 === "name") || (key0 === "timestamp")) || (key0 === "version")) || (key0 === "tokens")) || (key0 === "tokenMap")) || (key0 === "keywords")) || (key0 === "tags")) || (key0 === "logoURI"))){validate10.errors = [{instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs1 === errors){if(data.name !== undefined){let data0 = data.name;const _errs2 = errors;if(errors === _errs2){if(typeof data0 === "string"){if(func2(data0) > 30){validate10.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/maxLength",keyword:"maxLength",params:{limit: 30},message:"must NOT have more than 30 characters"}];return false;}else {if(func2(data0) < 1){validate10.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern0.test(data0)){validate10.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern: "^[\\w ]+$"},message:"must match pattern \""+"^[\\w ]+$"+"\""}];return false;}}}}else {validate10.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.timestamp !== undefined){let data1 = data.timestamp;const _errs4 = errors;if(errors === _errs4){if(errors === _errs4){if(typeof data1 === "string"){if(!(formats0.validate(data1))){validate10.errors = [{instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate10.errors = [{instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.version !== undefined){let data2 = data.version;const _errs6 = errors;const _errs7 = errors;if(errors === _errs7){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){let missing1;if((((data2.major === undefined) && (missing1 = "major")) || ((data2.minor === undefined) && (missing1 = "minor"))) || ((data2.patch === undefined) && (missing1 = "patch"))){validate10.errors = [{instancePath:instancePath+"/version",schemaPath:"#/definitions/Version/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs9 = errors;for(const key1 in data2){if(!(((key1 === "major") || (key1 === "minor")) || (key1 === "patch"))){validate10.errors = [{instancePath:instancePath+"/version",schemaPath:"#/definitions/Version/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs9 === errors){if(data2.major !== undefined){let data3 = data2.major;const _errs10 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate10.errors = [{instancePath:instancePath+"/version/major",schemaPath:"#/definitions/Version/properties/major/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs10){if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){validate10.errors = [{instancePath:instancePath+"/version/major",schemaPath:"#/definitions/Version/properties/major/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data2.minor !== undefined){let data4 = data2.minor;const _errs12 = errors;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){validate10.errors = [{instancePath:instancePath+"/version/minor",schemaPath:"#/definitions/Version/properties/minor/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs12){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){validate10.errors = [{instancePath:instancePath+"/version/minor",schemaPath:"#/definitions/Version/properties/minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid2 = _errs12 === errors;}else {var valid2 = true;}if(valid2){if(data2.patch !== undefined){let data5 = data2.patch;const _errs14 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){validate10.errors = [{instancePath:instancePath+"/version/patch",schemaPath:"#/definitions/Version/properties/patch/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs14){if((typeof data5 == "number") && (isFinite(data5))){if(data5 < 0 || isNaN(data5)){validate10.errors = [{instancePath:instancePath+"/version/patch",schemaPath:"#/definitions/Version/properties/patch/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid2 = _errs14 === errors;}else {var valid2 = true;}}}}}}else {validate10.errors = [{instancePath:instancePath+"/version",schemaPath:"#/definitions/Version/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs6 === errors;}else {var valid0 = true;}if(valid0){if(data.tokens !== undefined){let data6 = data.tokens;const _errs16 = errors;if(errors === _errs16){if(Array.isArray(data6)){if(data6.length > 10000){validate10.errors = [{instancePath:instancePath+"/tokens",schemaPath:"#/properties/tokens/maxItems",keyword:"maxItems",params:{limit: 10000},message:"must NOT have more than 10000 items"}];return false;}else {if(data6.length < 1){validate10.errors = [{instancePath:instancePath+"/tokens",schemaPath:"#/properties/tokens/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid3 = true;const len0 = data6.length;for(let i0=0; i0 10000){validate10.errors = [{instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/maxProperties",keyword:"maxProperties",params:{limit: 10000},message:"must NOT have more than 10000 properties"}];return false;}else {if(Object.keys(data8).length < 1){validate10.errors = [{instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/minProperties",keyword:"minProperties",params:{limit: 1},message:"must NOT have fewer than 1 properties"}];return false;}else {for(const key2 in data8){const _errs21 = errors;if(typeof key2 !== "string"){const err0 = {instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/propertyNames/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key2};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var valid4 = _errs21 === errors;if(!valid4){const err1 = {instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/propertyNames",keyword:"propertyNames",params:{propertyName: key2},message:"property name must be valid"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;validate10.errors = vErrors;return false;break;}}if(valid4){for(const key3 in data8){const _errs24 = errors;if(!(validate11(data8[key3], {instancePath:instancePath+"/tokenMap/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data8,parentDataProperty:key3,rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}var valid5 = _errs24 === errors;if(!valid5){break;}}}}}}else {validate10.errors = [{instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs19 === errors;}else {var valid0 = true;}if(valid0){if(data.keywords !== undefined){let data10 = data.keywords;const _errs25 = errors;if(errors === _errs25){if(Array.isArray(data10)){if(data10.length > 20){validate10.errors = [{instancePath:instancePath+"/keywords",schemaPath:"#/properties/keywords/maxItems",keyword:"maxItems",params:{limit: 20},message:"must NOT have more than 20 items"}];return false;}else {var valid6 = true;const len1 = data10.length;for(let i1=0; i1 20){validate10.errors = [{instancePath:instancePath+"/keywords/" + i1,schemaPath:"#/properties/keywords/items/maxLength",keyword:"maxLength",params:{limit: 20},message:"must NOT have more than 20 characters"}];return false;}else {if(func2(data11) < 1){validate10.errors = [{instancePath:instancePath+"/keywords/" + i1,schemaPath:"#/properties/keywords/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern0.test(data11)){validate10.errors = [{instancePath:instancePath+"/keywords/" + i1,schemaPath:"#/properties/keywords/items/pattern",keyword:"pattern",params:{pattern: "^[\\w ]+$"},message:"must match pattern \""+"^[\\w ]+$"+"\""}];return false;}}}}else {validate10.errors = [{instancePath:instancePath+"/keywords/" + i1,schemaPath:"#/properties/keywords/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid6 = _errs27 === errors;if(!valid6){break;}}if(valid6){let i2 = data10.length;let j0;if(i2 > 1){const indices0 = {};for(;i2--;){let item0 = data10[i2];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];validate10.errors = [{instancePath:instancePath+"/keywords",schemaPath:"#/properties/keywords/uniqueItems",keyword:"uniqueItems",params:{i: i2, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i2+" are identical)"}];return false;break;}indices0[item0] = i2;}}}}}else {validate10.errors = [{instancePath:instancePath+"/keywords",schemaPath:"#/properties/keywords/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs25 === errors;}else {var valid0 = true;}if(valid0){if(data.tags !== undefined){let data12 = data.tags;const _errs29 = errors;if(errors === _errs29){if(data12 && typeof data12 == "object" && !Array.isArray(data12)){if(Object.keys(data12).length > 20){validate10.errors = [{instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/maxProperties",keyword:"maxProperties",params:{limit: 20},message:"must NOT have more than 20 properties"}];return false;}else {for(const key4 in data12){const _errs31 = errors;const _errs32 = errors;if(errors === _errs32){if(typeof key4 === "string"){if(func2(key4) > 10){const err2 = {instancePath:instancePath+"/tags",schemaPath:"#/definitions/TagIdentifier/maxLength",keyword:"maxLength",params:{limit: 10},message:"must NOT have more than 10 characters",propertyName:key4};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {if(func2(key4) < 1){const err3 = {instancePath:instancePath+"/tags",schemaPath:"#/definitions/TagIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters",propertyName:key4};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(!pattern4.test(key4)){const err4 = {instancePath:instancePath+"/tags",schemaPath:"#/definitions/TagIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\"",propertyName:key4};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}else {const err5 = {instancePath:instancePath+"/tags",schemaPath:"#/definitions/TagIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key4};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var valid8 = _errs31 === errors;if(!valid8){const err6 = {instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/propertyNames",keyword:"propertyNames",params:{propertyName: key4},message:"property name must be valid"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;validate10.errors = vErrors;return false;break;}}if(valid8){for(const key5 in data12){let data13 = data12[key5];const _errs35 = errors;const _errs36 = errors;if(errors === _errs36){if(data13 && typeof data13 == "object" && !Array.isArray(data13)){let missing2;if(((data13.name === undefined) && (missing2 = "name")) || ((data13.description === undefined) && (missing2 = "description"))){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/TagDefinition/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {const _errs38 = errors;for(const key6 in data13){if(!((key6 === "name") || (key6 === "description"))){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/TagDefinition/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"}];return false;break;}}if(_errs38 === errors){if(data13.name !== undefined){let data14 = data13.name;const _errs39 = errors;if(errors === _errs39){if(typeof data14 === "string"){if(func2(data14) > 20){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/definitions/TagDefinition/properties/name/maxLength",keyword:"maxLength",params:{limit: 20},message:"must NOT have more than 20 characters"}];return false;}else {if(func2(data14) < 1){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/definitions/TagDefinition/properties/name/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern10.test(data14)){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/definitions/TagDefinition/properties/name/pattern",keyword:"pattern",params:{pattern: "^[ \\w]+$"},message:"must match pattern \""+"^[ \\w]+$"+"\""}];return false;}}}}else {validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/definitions/TagDefinition/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid12 = _errs39 === errors;}else {var valid12 = true;}if(valid12){if(data13.description !== undefined){let data15 = data13.description;const _errs41 = errors;if(errors === _errs41){if(typeof data15 === "string"){if(func2(data15) > 200){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/description",schemaPath:"#/definitions/TagDefinition/properties/description/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"}];return false;}else {if(func2(data15) < 1){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/description",schemaPath:"#/definitions/TagDefinition/properties/description/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern11.test(data15)){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/description",schemaPath:"#/definitions/TagDefinition/properties/description/pattern",keyword:"pattern",params:{pattern: "^[ \\w\\.,:]+$"},message:"must match pattern \""+"^[ \\w\\.,:]+$"+"\""}];return false;}}}}else {validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/description",schemaPath:"#/definitions/TagDefinition/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid12 = _errs41 === errors;}else {var valid12 = true;}}}}}else {validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/TagDefinition/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid10 = _errs35 === errors;if(!valid10){break;}}}}}else {validate10.errors = [{instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs29 === errors;}else {var valid0 = true;}if(valid0){if(data.logoURI !== undefined){let data16 = data.logoURI;const _errs43 = errors;if(errors === _errs43){if(errors === _errs43){if(typeof data16 === "string"){if(!(formats2(data16))){validate10.errors = [{instancePath:instancePath+"/logoURI",schemaPath:"#/properties/logoURI/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\""}];return false;}}else {validate10.errors = [{instancePath:instancePath+"/logoURI",schemaPath:"#/properties/logoURI/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs43 === errors;}else {var valid0 = true;}}}}}}}}}}}else {validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate10.errors = vErrors;return errors === 0;} \ No newline at end of file +export const validate = validate10; +export default validate10; +const schema11 = { + $schema: "http://json-schema.org/draft-07/schema#", + $id: "https://uniswap.org/tokenlist.schema.json", + title: "Uniswap Token List", + description: + "Schema for lists of tokens compatible with the Uniswap Interface", + definitions: { + Version: { + type: "object", + description: "The version of the list, used in change detection", + examples: [{ major: 1, minor: 0, patch: 0 }], + additionalProperties: false, + properties: { + major: { + type: "integer", + description: + "The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.", + minimum: 0, + examples: [1, 2] + }, + minor: { + type: "integer", + description: + "The minor version of the list. Must be incremented when tokens are added to the list.", + minimum: 0, + examples: [0, 1] + }, + patch: { + type: "integer", + description: + "The patch version of the list. Must be incremented for any changes to the list.", + minimum: 0, + examples: [0, 1] + } + }, + required: ["major", "minor", "patch"] + }, + TagIdentifier: { + type: "string", + description: "The unique identifier of a tag", + minLength: 1, + maxLength: 10, + pattern: "^[\\w]+$", + examples: ["compound", "stablecoin"] + }, + ExtensionIdentifier: { + type: "string", + description: "The name of a token extension property", + minLength: 1, + maxLength: 40, + pattern: "^[\\w]+$", + examples: ["color", "is_fee_on_transfer", "aliases"] + }, + ExtensionMap: { + type: "object", + description: + "An object containing any arbitrary or vendor-specific token metadata", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValue" }, + examples: [ + { color: "#000000", is_verified_by_me: true }, + { + "x-bridged-addresses-by-chain": { + 1: { + bridgeAddress: "0x4200000000000000000000000000000000000010", + tokenAddress: "0x4200000000000000000000000000000000000010" + } + } + } + ] + }, + ExtensionPrimitiveValue: { + anyOf: [ + { type: "string", minLength: 1, maxLength: 42, examples: ["#00000"] }, + { type: "boolean", examples: [true] }, + { type: "number", examples: [15] }, + { type: "null" } + ] + }, + ExtensionValue: { + anyOf: [ + { $ref: "#/definitions/ExtensionPrimitiveValue" }, + { + type: "object", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValueInner0" } + } + ] + }, + ExtensionValueInner0: { + anyOf: [ + { $ref: "#/definitions/ExtensionPrimitiveValue" }, + { + type: "object", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValueInner1" } + } + ] + }, + ExtensionValueInner1: { + anyOf: [{ $ref: "#/definitions/ExtensionPrimitiveValue" }] + }, + TagDefinition: { + type: "object", + description: + "Definition of a tag that can be associated with a token via its identifier", + additionalProperties: false, + properties: { + name: { + type: "string", + description: "The name of the tag", + pattern: "^[ \\w]+$", + minLength: 1, + maxLength: 20 + }, + description: { + type: "string", + description: "A user-friendly description of the tag", + pattern: "^[ \\w\\.,:]+$", + minLength: 1, + maxLength: 200 + } + }, + required: ["name", "description"], + examples: [ + { + name: "Stablecoin", + description: "A token with value pegged to another asset" + } + ] + }, + TokenInfo: { + type: "object", + description: "Metadata for a single token in a token list", + additionalProperties: false, + properties: { + chainId: { + type: "integer", + description: + "The chain ID of the Ethereum network where this token is deployed", + minimum: 1, + examples: [1, 42] + }, + address: { + type: "string", + description: + "The checksummed address of the token on the specified chain ID", + pattern: "^0x[a-fA-F0-9]{40}$", + examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"] + }, + decimals: { + type: "integer", + description: "The number of decimals for the token balance", + minimum: 0, + maximum: 255, + examples: [18] + }, + name: { + type: "string", + description: "The name of the token", + minLength: 0, + maxLength: 40, + anyOf: [{ const: "" }, { pattern: "^[ \\S+]+$" }], + examples: ["USD Coin"] + }, + symbol: { + type: "string", + description: "The symbol for the token", + minLength: 0, + maxLength: 20, + anyOf: [{ const: "" }, { pattern: "^\\S+$" }], + examples: ["USDC"] + }, + logoURI: { + type: "string", + description: + "A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64", + format: "uri", + examples: ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"] + }, + tags: { + type: "array", + description: + "An array of tag identifiers associated with the token; tags are defined at the list level", + items: { $ref: "#/definitions/TagIdentifier" }, + maxItems: 10, + examples: ["stablecoin", "compound"] + }, + extensions: { $ref: "#/definitions/ExtensionMap" } + }, + required: ["chainId", "address", "decimals", "name", "symbol"] + } + }, + type: "object", + additionalProperties: false, + properties: { + name: { + type: "string", + description: "The name of the token list", + minLength: 1, + maxLength: 30, + pattern: "^[\\w ]+$", + examples: ["My Token List"] + }, + timestamp: { + type: "string", + format: "date-time", + description: + "The timestamp of this list version; i.e. when this immutable version of the list was created" + }, + version: { $ref: "#/definitions/Version" }, + tokens: { + type: "array", + description: "The list of tokens included in the list", + items: { $ref: "#/definitions/TokenInfo" }, + minItems: 1, + maxItems: 10000 + }, + tokenMap: { + type: "object", + description: + "A mapping of key 'chainId_tokenAddress' to its corresponding token object", + minProperties: 1, + maxProperties: 10000, + propertyNames: { type: "string" }, + additionalProperties: { $ref: "#/definitions/TokenInfo" }, + examples: [ + { + "4_0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984": { + name: "Uniswap", + address: "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", + symbol: "UNI", + decimals: 18, + chainId: 4, + logoURI: "ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg" + } + } + ] + }, + keywords: { + type: "array", + description: + "Keywords associated with the contents of the list; may be used in list discoverability", + items: { + type: "string", + description: "A keyword to describe the contents of the list", + minLength: 1, + maxLength: 20, + pattern: "^[\\w ]+$", + examples: ["compound", "lending", "personal tokens"] + }, + maxItems: 20, + uniqueItems: true + }, + tags: { + type: "object", + description: "A mapping of tag identifiers to their name and description", + propertyNames: { $ref: "#/definitions/TagIdentifier" }, + additionalProperties: { $ref: "#/definitions/TagDefinition" }, + maxProperties: 20, + examples: [ + { + stablecoin: { + name: "Stablecoin", + description: "A token with value pegged to another asset" + } + } + ] + }, + logoURI: { + type: "string", + description: + "A URI for the logo of the token list; prefer SVG or PNG of size 256x256", + format: "uri", + examples: ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"] + } + }, + required: ["name", "timestamp", "version", "tokens"] +}; +const schema12 = { + type: "object", + description: "The version of the list, used in change detection", + examples: [{ major: 1, minor: 0, patch: 0 }], + additionalProperties: false, + properties: { + major: { + type: "integer", + description: + "The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.", + minimum: 0, + examples: [1, 2] + }, + minor: { + type: "integer", + description: + "The minor version of the list. Must be incremented when tokens are added to the list.", + minimum: 0, + examples: [0, 1] + }, + patch: { + type: "integer", + description: + "The patch version of the list. Must be incremented for any changes to the list.", + minimum: 0, + examples: [0, 1] + } + }, + required: ["major", "minor", "patch"] +}; +const schema14 = { + type: "string", + description: "The unique identifier of a tag", + minLength: 1, + maxLength: 10, + pattern: "^[\\w]+$", + examples: ["compound", "stablecoin"] +}; +const schema26 = { + type: "object", + description: + "Definition of a tag that can be associated with a token via its identifier", + additionalProperties: false, + properties: { + name: { + type: "string", + description: "The name of the tag", + pattern: "^[ \\w]+$", + minLength: 1, + maxLength: 20 + }, + description: { + type: "string", + description: "A user-friendly description of the tag", + pattern: "^[ \\w\\.,:]+$", + minLength: 1, + maxLength: 200 + } + }, + required: ["name", "description"], + examples: [ + { + name: "Stablecoin", + description: "A token with value pegged to another asset" + } + ] +}; +const func2 = require("ajv/dist/runtime/ucs2length").default; +const pattern0 = new RegExp("^[\\w ]+$", "u"); +const pattern4 = new RegExp("^[\\w]+$", "u"); +const pattern10 = new RegExp("^[ \\w]+$", "u"); +const pattern11 = new RegExp("^[ \\w\\.,:]+$", "u"); +const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"]; +const formats2 = require("ajv-formats/dist/formats").fullFormats.uri; +const schema13 = { + type: "object", + description: "Metadata for a single token in a token list", + additionalProperties: false, + properties: { + chainId: { + type: "integer", + description: + "The chain ID of the Ethereum network where this token is deployed", + minimum: 1, + examples: [1, 42] + }, + address: { + type: "string", + description: + "The checksummed address of the token on the specified chain ID", + pattern: "^0x[a-fA-F0-9]{40}$", + examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"] + }, + decimals: { + type: "integer", + description: "The number of decimals for the token balance", + minimum: 0, + maximum: 255, + examples: [18] + }, + name: { + type: "string", + description: "The name of the token", + minLength: 0, + maxLength: 40, + anyOf: [{ const: "" }, { pattern: "^[ \\S+]+$" }], + examples: ["USD Coin"] + }, + symbol: { + type: "string", + description: "The symbol for the token", + minLength: 0, + maxLength: 20, + anyOf: [{ const: "" }, { pattern: "^\\S+$" }], + examples: ["USDC"] + }, + logoURI: { + type: "string", + description: + "A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64", + format: "uri", + examples: ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"] + }, + tags: { + type: "array", + description: + "An array of tag identifiers associated with the token; tags are defined at the list level", + items: { $ref: "#/definitions/TagIdentifier" }, + maxItems: 10, + examples: ["stablecoin", "compound"] + }, + extensions: { $ref: "#/definitions/ExtensionMap" } + }, + required: ["chainId", "address", "decimals", "name", "symbol"] +}; +const pattern1 = new RegExp("^0x[a-fA-F0-9]{40}$", "u"); +const pattern2 = new RegExp("^[ \\S+]+$", "u"); +const pattern3 = new RegExp("^\\S+$", "u"); +const schema15 = { + type: "object", + description: + "An object containing any arbitrary or vendor-specific token metadata", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValue" }, + examples: [ + { color: "#000000", is_verified_by_me: true }, + { + "x-bridged-addresses-by-chain": { + 1: { + bridgeAddress: "0x4200000000000000000000000000000000000010", + tokenAddress: "0x4200000000000000000000000000000000000010" + } + } + } + ] +}; +const schema16 = { + type: "string", + description: "The name of a token extension property", + minLength: 1, + maxLength: 40, + pattern: "^[\\w]+$", + examples: ["color", "is_fee_on_transfer", "aliases"] +}; +const schema17 = { + anyOf: [ + { $ref: "#/definitions/ExtensionPrimitiveValue" }, + { + type: "object", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValueInner0" } + } + ] +}; +const schema18 = { + anyOf: [ + { type: "string", minLength: 1, maxLength: 42, examples: ["#00000"] }, + { type: "boolean", examples: [true] }, + { type: "number", examples: [15] }, + { type: "null" } + ] +}; +const schema20 = { + anyOf: [ + { $ref: "#/definitions/ExtensionPrimitiveValue" }, + { + type: "object", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValueInner1" } + } + ] +}; +const schema23 = { anyOf: [{ $ref: "#/definitions/ExtensionPrimitiveValue" }] }; +function validate15( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs3 = errors; + let valid2 = false; + const _errs4 = errors; + if (errors === _errs4) { + if (typeof data === "string") { + if (func2(data) > 42) { + const err0 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength", + keyword: "maxLength", + params: { limit: 42 }, + message: "must NOT have more than 42 characters" + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (func2(data) < 1) { + const err1 = { + instancePath, + schemaPath: + "#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters" + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } else { + const err2 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var _valid1 = _errs4 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs6 = errors; + if (typeof data !== "boolean") { + const err3 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/1/type", + keyword: "type", + params: { type: "boolean" }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var _valid1 = _errs6 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs8 = errors; + if (!(typeof data == "number" && isFinite(data))) { + const err4 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/2/type", + keyword: "type", + params: { type: "number" }, + message: "must be number" + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var _valid1 = _errs8 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs10 = errors; + if (data !== null) { + const err5 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/3/type", + keyword: "type", + params: { type: "null" }, + message: "must be null" + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var _valid1 = _errs10 === errors; + valid2 = valid2 || _valid1; + } + } + } + if (!valid2) { + const err6 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + errors = _errs3; + if (vErrors !== null) { + if (_errs3) { + vErrors.length = _errs3; + } else { + vErrors = null; + } + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const err7 = { + instancePath, + schemaPath: "#/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + validate15.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate15.errors = vErrors; + return errors === 0; +} +function validate14( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs3 = errors; + let valid2 = false; + const _errs4 = errors; + if (errors === _errs4) { + if (typeof data === "string") { + if (func2(data) > 42) { + const err0 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength", + keyword: "maxLength", + params: { limit: 42 }, + message: "must NOT have more than 42 characters" + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (func2(data) < 1) { + const err1 = { + instancePath, + schemaPath: + "#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters" + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } else { + const err2 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var _valid1 = _errs4 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs6 = errors; + if (typeof data !== "boolean") { + const err3 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/1/type", + keyword: "type", + params: { type: "boolean" }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var _valid1 = _errs6 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs8 = errors; + if (!(typeof data == "number" && isFinite(data))) { + const err4 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/2/type", + keyword: "type", + params: { type: "number" }, + message: "must be number" + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var _valid1 = _errs8 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs10 = errors; + if (data !== null) { + const err5 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/3/type", + keyword: "type", + params: { type: "null" }, + message: "must be null" + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var _valid1 = _errs10 === errors; + valid2 = valid2 || _valid1; + } + } + } + if (!valid2) { + const err6 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + errors = _errs3; + if (vErrors !== null) { + if (_errs3) { + vErrors.length = _errs3; + } else { + vErrors = null; + } + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs12 = errors; + if (errors === _errs12) { + if (data && typeof data == "object" && !Array.isArray(data)) { + if (Object.keys(data).length > 10) { + const err7 = { + instancePath, + schemaPath: "#/anyOf/1/maxProperties", + keyword: "maxProperties", + params: { limit: 10 }, + message: "must NOT have more than 10 properties" + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + for (const key0 in data) { + const _errs14 = errors; + const _errs15 = errors; + if (errors === _errs15) { + if (typeof key0 === "string") { + if (func2(key0) > 40) { + const err8 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 40 }, + message: "must NOT have more than 40 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (func2(key0) < 1) { + const err9 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } else { + if (!pattern4.test(key0)) { + const err10 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: 'must match pattern "' + "^[\\w]+$" + '"', + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } else { + const err11 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + const err12 = { + instancePath, + schemaPath: "#/anyOf/1/propertyNames", + keyword: "propertyNames", + params: { propertyName: key0 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + break; + } + } + if (valid3) { + for (const key1 in data) { + const _errs18 = errors; + if ( + !validate15(data[key1], { + instancePath: + instancePath + + "/" + + key1.replace(/~/g, "~0").replace(/\//g, "~1"), + parentData: data, + parentDataProperty: key1, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate15.errors + : vErrors.concat(validate15.errors); + errors = vErrors.length; + } + var valid5 = _errs18 === errors; + if (!valid5) { + break; + } + } + } + } + } else { + const err13 = { + instancePath, + schemaPath: "#/anyOf/1/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + var _valid0 = _errs12 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err14 = { + instancePath, + schemaPath: "#/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + validate14.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate14.errors = vErrors; + return errors === 0; +} +function validate13( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs3 = errors; + let valid2 = false; + const _errs4 = errors; + if (errors === _errs4) { + if (typeof data === "string") { + if (func2(data) > 42) { + const err0 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength", + keyword: "maxLength", + params: { limit: 42 }, + message: "must NOT have more than 42 characters" + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (func2(data) < 1) { + const err1 = { + instancePath, + schemaPath: + "#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters" + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } else { + const err2 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var _valid1 = _errs4 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs6 = errors; + if (typeof data !== "boolean") { + const err3 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/1/type", + keyword: "type", + params: { type: "boolean" }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var _valid1 = _errs6 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs8 = errors; + if (!(typeof data == "number" && isFinite(data))) { + const err4 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/2/type", + keyword: "type", + params: { type: "number" }, + message: "must be number" + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var _valid1 = _errs8 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs10 = errors; + if (data !== null) { + const err5 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/3/type", + keyword: "type", + params: { type: "null" }, + message: "must be null" + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var _valid1 = _errs10 === errors; + valid2 = valid2 || _valid1; + } + } + } + if (!valid2) { + const err6 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + errors = _errs3; + if (vErrors !== null) { + if (_errs3) { + vErrors.length = _errs3; + } else { + vErrors = null; + } + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs12 = errors; + if (errors === _errs12) { + if (data && typeof data == "object" && !Array.isArray(data)) { + if (Object.keys(data).length > 10) { + const err7 = { + instancePath, + schemaPath: "#/anyOf/1/maxProperties", + keyword: "maxProperties", + params: { limit: 10 }, + message: "must NOT have more than 10 properties" + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + for (const key0 in data) { + const _errs14 = errors; + const _errs15 = errors; + if (errors === _errs15) { + if (typeof key0 === "string") { + if (func2(key0) > 40) { + const err8 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 40 }, + message: "must NOT have more than 40 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (func2(key0) < 1) { + const err9 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } else { + if (!pattern4.test(key0)) { + const err10 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: 'must match pattern "' + "^[\\w]+$" + '"', + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } else { + const err11 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + const err12 = { + instancePath, + schemaPath: "#/anyOf/1/propertyNames", + keyword: "propertyNames", + params: { propertyName: key0 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + break; + } + } + if (valid3) { + for (const key1 in data) { + const _errs18 = errors; + if ( + !validate14(data[key1], { + instancePath: + instancePath + + "/" + + key1.replace(/~/g, "~0").replace(/\//g, "~1"), + parentData: data, + parentDataProperty: key1, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate14.errors + : vErrors.concat(validate14.errors); + errors = vErrors.length; + } + var valid5 = _errs18 === errors; + if (!valid5) { + break; + } + } + } + } + } else { + const err13 = { + instancePath, + schemaPath: "#/anyOf/1/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + var _valid0 = _errs12 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err14 = { + instancePath, + schemaPath: "#/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + validate13.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate13.errors = vErrors; + return errors === 0; +} +function validate12( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == "object" && !Array.isArray(data)) { + if (Object.keys(data).length > 10) { + validate12.errors = [ + { + instancePath, + schemaPath: "#/maxProperties", + keyword: "maxProperties", + params: { limit: 10 }, + message: "must NOT have more than 10 properties" + } + ]; + return false; + } else { + for (const key0 in data) { + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (typeof key0 === "string") { + if (func2(key0) > 40) { + const err0 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 40 }, + message: "must NOT have more than 40 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (func2(key0) < 1) { + const err1 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } else { + if (!pattern4.test(key0)) { + const err2 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: 'must match pattern "' + "^[\\w]+$" + '"', + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + } else { + const err3 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + const err4 = { + instancePath, + schemaPath: "#/propertyNames", + keyword: "propertyNames", + params: { propertyName: key0 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + validate12.errors = vErrors; + return false; + break; + } + } + if (valid0) { + for (const key1 in data) { + const _errs5 = errors; + if ( + !validate13(data[key1], { + instancePath: + instancePath + + "/" + + key1.replace(/~/g, "~0").replace(/\//g, "~1"), + parentData: data, + parentDataProperty: key1, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate13.errors + : vErrors.concat(validate13.errors); + errors = vErrors.length; + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } + } + } else { + validate12.errors = [ + { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + validate12.errors = vErrors; + return errors === 0; +} +function validate11( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == "object" && !Array.isArray(data)) { + let missing0; + if ( + (data.chainId === undefined && (missing0 = "chainId")) || + (data.address === undefined && (missing0 = "address")) || + (data.decimals === undefined && (missing0 = "decimals")) || + (data.name === undefined && (missing0 = "name")) || + (data.symbol === undefined && (missing0 = "symbol")) + ) { + validate11.errors = [ + { + instancePath, + schemaPath: "#/required", + keyword: "required", + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'" + } + ]; + return false; + } else { + const _errs1 = errors; + for (const key0 in data) { + if ( + !( + key0 === "chainId" || + key0 === "address" || + key0 === "decimals" || + key0 === "name" || + key0 === "symbol" || + key0 === "logoURI" || + key0 === "tags" || + key0 === "extensions" + ) + ) { + validate11.errors = [ + { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { additionalProperty: key0 }, + message: "must NOT have additional properties" + } + ]; + return false; + break; + } + } + if (_errs1 === errors) { + if (data.chainId !== undefined) { + let data0 = data.chainId; + const _errs2 = errors; + if ( + !( + typeof data0 == "number" && + !(data0 % 1) && + !isNaN(data0) && + isFinite(data0) + ) + ) { + validate11.errors = [ + { + instancePath: instancePath + "/chainId", + schemaPath: "#/properties/chainId/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs2) { + if (typeof data0 == "number" && isFinite(data0)) { + if (data0 < 1 || isNaN(data0)) { + validate11.errors = [ + { + instancePath: instancePath + "/chainId", + schemaPath: "#/properties/chainId/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 1 }, + message: "must be >= 1" + } + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.address !== undefined) { + let data1 = data.address; + const _errs4 = errors; + if (errors === _errs4) { + if (typeof data1 === "string") { + if (!pattern1.test(data1)) { + validate11.errors = [ + { + instancePath: instancePath + "/address", + schemaPath: "#/properties/address/pattern", + keyword: "pattern", + params: { pattern: "^0x[a-fA-F0-9]{40}$" }, + message: + 'must match pattern "' + "^0x[a-fA-F0-9]{40}$" + '"' + } + ]; + return false; + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/address", + schemaPath: "#/properties/address/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.decimals !== undefined) { + let data2 = data.decimals; + const _errs6 = errors; + if ( + !( + typeof data2 == "number" && + !(data2 % 1) && + !isNaN(data2) && + isFinite(data2) + ) + ) { + validate11.errors = [ + { + instancePath: instancePath + "/decimals", + schemaPath: "#/properties/decimals/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs6) { + if (typeof data2 == "number" && isFinite(data2)) { + if (data2 > 255 || isNaN(data2)) { + validate11.errors = [ + { + instancePath: instancePath + "/decimals", + schemaPath: "#/properties/decimals/maximum", + keyword: "maximum", + params: { comparison: "<=", limit: 255 }, + message: "must be <= 255" + } + ]; + return false; + } else { + if (data2 < 0 || isNaN(data2)) { + validate11.errors = [ + { + instancePath: instancePath + "/decimals", + schemaPath: "#/properties/decimals/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 0 }, + message: "must be >= 0" + } + ]; + return false; + } + } + } + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.name !== undefined) { + let data3 = data.name; + const _errs8 = errors; + const _errs10 = errors; + let valid1 = false; + const _errs11 = errors; + if ("" !== data3) { + const err0 = { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/anyOf/0/const", + keyword: "const", + params: { allowedValue: "" }, + message: "must be equal to constant" + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var _valid0 = _errs11 === errors; + valid1 = valid1 || _valid0; + if (!valid1) { + const _errs12 = errors; + if (typeof data3 === "string") { + if (!pattern2.test(data3)) { + const err1 = { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/anyOf/1/pattern", + keyword: "pattern", + params: { pattern: "^[ \\S+]+$" }, + message: 'must match pattern "' + "^[ \\S+]+$" + '"' + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + var _valid0 = _errs12 === errors; + valid1 = valid1 || _valid0; + } + if (!valid1) { + const err2 = { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + validate11.errors = vErrors; + return false; + } else { + errors = _errs10; + if (vErrors !== null) { + if (_errs10) { + vErrors.length = _errs10; + } else { + vErrors = null; + } + } + } + if (errors === _errs8) { + if (typeof data3 === "string") { + if (func2(data3) > 40) { + validate11.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/maxLength", + keyword: "maxLength", + params: { limit: 40 }, + message: "must NOT have more than 40 characters" + } + ]; + return false; + } else { + if (func2(data3) < 0) { + validate11.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/minLength", + keyword: "minLength", + params: { limit: 0 }, + message: "must NOT have fewer than 0 characters" + } + ]; + return false; + } + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.symbol !== undefined) { + let data4 = data.symbol; + const _errs13 = errors; + const _errs15 = errors; + let valid2 = false; + const _errs16 = errors; + if ("" !== data4) { + const err3 = { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/anyOf/0/const", + keyword: "const", + params: { allowedValue: "" }, + message: "must be equal to constant" + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var _valid1 = _errs16 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs17 = errors; + if (typeof data4 === "string") { + if (!pattern3.test(data4)) { + const err4 = { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/anyOf/1/pattern", + keyword: "pattern", + params: { pattern: "^\\S+$" }, + message: 'must match pattern "' + "^\\S+$" + '"' + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + var _valid1 = _errs17 === errors; + valid2 = valid2 || _valid1; + } + if (!valid2) { + const err5 = { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + validate11.errors = vErrors; + return false; + } else { + errors = _errs15; + if (vErrors !== null) { + if (_errs15) { + vErrors.length = _errs15; + } else { + vErrors = null; + } + } + } + if (errors === _errs13) { + if (typeof data4 === "string") { + if (func2(data4) > 20) { + validate11.errors = [ + { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/maxLength", + keyword: "maxLength", + params: { limit: 20 }, + message: "must NOT have more than 20 characters" + } + ]; + return false; + } else { + if (func2(data4) < 0) { + validate11.errors = [ + { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/minLength", + keyword: "minLength", + params: { limit: 0 }, + message: "must NOT have fewer than 0 characters" + } + ]; + return false; + } + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.logoURI !== undefined) { + let data5 = data.logoURI; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === "string") { + if (!formats2(data5)) { + validate11.errors = [ + { + instancePath: instancePath + "/logoURI", + schemaPath: "#/properties/logoURI/format", + keyword: "format", + params: { format: "uri" }, + message: 'must match format "' + "uri" + '"' + } + ]; + return false; + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/logoURI", + schemaPath: "#/properties/logoURI/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + } + var valid0 = _errs18 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.tags !== undefined) { + let data6 = data.tags; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data6)) { + if (data6.length > 10) { + validate11.errors = [ + { + instancePath: instancePath + "/tags", + schemaPath: "#/properties/tags/maxItems", + keyword: "maxItems", + params: { limit: 10 }, + message: "must NOT have more than 10 items" + } + ]; + return false; + } else { + var valid3 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs22 = errors; + const _errs23 = errors; + if (errors === _errs23) { + if (typeof data7 === "string") { + if (func2(data7) > 10) { + validate11.errors = [ + { + instancePath: + instancePath + "/tags/" + i0, + schemaPath: + "#/definitions/TagIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 10 }, + message: + "must NOT have more than 10 characters" + } + ]; + return false; + } else { + if (func2(data7) < 1) { + validate11.errors = [ + { + instancePath: + instancePath + "/tags/" + i0, + schemaPath: + "#/definitions/TagIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if (!pattern4.test(data7)) { + validate11.errors = [ + { + instancePath: + instancePath + "/tags/" + i0, + schemaPath: + "#/definitions/TagIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: + 'must match pattern "' + + "^[\\w]+$" + + '"' + } + ]; + return false; + } + } + } + } else { + validate11.errors = [ + { + instancePath: + instancePath + "/tags/" + i0, + schemaPath: + "#/definitions/TagIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid3 = _errs22 === errors; + if (!valid3) { + break; + } + } + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/tags", + schemaPath: "#/properties/tags/type", + keyword: "type", + params: { type: "array" }, + message: "must be array" + } + ]; + return false; + } + } + var valid0 = _errs20 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.extensions !== undefined) { + const _errs25 = errors; + if ( + !validate12(data.extensions, { + instancePath: instancePath + "/extensions", + parentData: data, + parentDataProperty: "extensions", + rootData + }) + ) { + vErrors = + vErrors === null + ? validate12.errors + : vErrors.concat(validate12.errors); + errors = vErrors.length; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } + } else { + validate11.errors = [ + { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + validate11.errors = vErrors; + return errors === 0; +} +function validate10( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + /*# sourceURL="https://uniswap.org/tokenlist.schema.json" */ let vErrors = + null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == "object" && !Array.isArray(data)) { + let missing0; + if ( + (data.name === undefined && (missing0 = "name")) || + (data.timestamp === undefined && (missing0 = "timestamp")) || + (data.version === undefined && (missing0 = "version")) || + (data.tokens === undefined && (missing0 = "tokens")) + ) { + validate10.errors = [ + { + instancePath, + schemaPath: "#/required", + keyword: "required", + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'" + } + ]; + return false; + } else { + const _errs1 = errors; + for (const key0 in data) { + if ( + !( + key0 === "name" || + key0 === "timestamp" || + key0 === "version" || + key0 === "tokens" || + key0 === "tokenMap" || + key0 === "keywords" || + key0 === "tags" || + key0 === "logoURI" + ) + ) { + validate10.errors = [ + { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { additionalProperty: key0 }, + message: "must NOT have additional properties" + } + ]; + return false; + break; + } + } + if (_errs1 === errors) { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (errors === _errs2) { + if (typeof data0 === "string") { + if (func2(data0) > 30) { + validate10.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/maxLength", + keyword: "maxLength", + params: { limit: 30 }, + message: "must NOT have more than 30 characters" + } + ]; + return false; + } else { + if (func2(data0) < 1) { + validate10.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if (!pattern0.test(data0)) { + validate10.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/pattern", + keyword: "pattern", + params: { pattern: "^[\\w ]+$" }, + message: 'must match pattern "' + "^[\\w ]+$" + '"' + } + ]; + return false; + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.timestamp !== undefined) { + let data1 = data.timestamp; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === "string") { + if (!formats0.validate(data1)) { + validate10.errors = [ + { + instancePath: instancePath + "/timestamp", + schemaPath: "#/properties/timestamp/format", + keyword: "format", + params: { format: "date-time" }, + message: 'must match format "' + "date-time" + '"' + } + ]; + return false; + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/timestamp", + schemaPath: "#/properties/timestamp/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.version !== undefined) { + let data2 = data.version; + const _errs6 = errors; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data2 && + typeof data2 == "object" && + !Array.isArray(data2) + ) { + let missing1; + if ( + (data2.major === undefined && (missing1 = "major")) || + (data2.minor === undefined && (missing1 = "minor")) || + (data2.patch === undefined && (missing1 = "patch")) + ) { + validate10.errors = [ + { + instancePath: instancePath + "/version", + schemaPath: "#/definitions/Version/required", + keyword: "required", + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'" + } + ]; + return false; + } else { + const _errs9 = errors; + for (const key1 in data2) { + if ( + !( + key1 === "major" || + key1 === "minor" || + key1 === "patch" + ) + ) { + validate10.errors = [ + { + instancePath: instancePath + "/version", + schemaPath: + "#/definitions/Version/additionalProperties", + keyword: "additionalProperties", + params: { additionalProperty: key1 }, + message: "must NOT have additional properties" + } + ]; + return false; + break; + } + } + if (_errs9 === errors) { + if (data2.major !== undefined) { + let data3 = data2.major; + const _errs10 = errors; + if ( + !( + typeof data3 == "number" && + !(data3 % 1) && + !isNaN(data3) && + isFinite(data3) + ) + ) { + validate10.errors = [ + { + instancePath: instancePath + "/version/major", + schemaPath: + "#/definitions/Version/properties/major/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs10) { + if (typeof data3 == "number" && isFinite(data3)) { + if (data3 < 0 || isNaN(data3)) { + validate10.errors = [ + { + instancePath: + instancePath + "/version/major", + schemaPath: + "#/definitions/Version/properties/major/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 0 }, + message: "must be >= 0" + } + ]; + return false; + } + } + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.minor !== undefined) { + let data4 = data2.minor; + const _errs12 = errors; + if ( + !( + typeof data4 == "number" && + !(data4 % 1) && + !isNaN(data4) && + isFinite(data4) + ) + ) { + validate10.errors = [ + { + instancePath: instancePath + "/version/minor", + schemaPath: + "#/definitions/Version/properties/minor/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs12) { + if (typeof data4 == "number" && isFinite(data4)) { + if (data4 < 0 || isNaN(data4)) { + validate10.errors = [ + { + instancePath: + instancePath + "/version/minor", + schemaPath: + "#/definitions/Version/properties/minor/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 0 }, + message: "must be >= 0" + } + ]; + return false; + } + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.patch !== undefined) { + let data5 = data2.patch; + const _errs14 = errors; + if ( + !( + typeof data5 == "number" && + !(data5 % 1) && + !isNaN(data5) && + isFinite(data5) + ) + ) { + validate10.errors = [ + { + instancePath: + instancePath + "/version/patch", + schemaPath: + "#/definitions/Version/properties/patch/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs14) { + if ( + typeof data5 == "number" && + isFinite(data5) + ) { + if (data5 < 0 || isNaN(data5)) { + validate10.errors = [ + { + instancePath: + instancePath + "/version/patch", + schemaPath: + "#/definitions/Version/properties/patch/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 0 }, + message: "must be >= 0" + } + ]; + return false; + } + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/version", + schemaPath: "#/definitions/Version/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.tokens !== undefined) { + let data6 = data.tokens; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data6)) { + if (data6.length > 10000) { + validate10.errors = [ + { + instancePath: instancePath + "/tokens", + schemaPath: "#/properties/tokens/maxItems", + keyword: "maxItems", + params: { limit: 10000 }, + message: "must NOT have more than 10000 items" + } + ]; + return false; + } else { + if (data6.length < 1) { + validate10.errors = [ + { + instancePath: instancePath + "/tokens", + schemaPath: "#/properties/tokens/minItems", + keyword: "minItems", + params: { limit: 1 }, + message: "must NOT have fewer than 1 items" + } + ]; + return false; + } else { + var valid3 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + const _errs18 = errors; + if ( + !validate11(data6[i0], { + instancePath: instancePath + "/tokens/" + i0, + parentData: data6, + parentDataProperty: i0, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate11.errors + : vErrors.concat(validate11.errors); + errors = vErrors.length; + } + var valid3 = _errs18 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/tokens", + schemaPath: "#/properties/tokens/type", + keyword: "type", + params: { type: "array" }, + message: "must be array" + } + ]; + return false; + } + } + var valid0 = _errs16 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.tokenMap !== undefined) { + let data8 = data.tokenMap; + const _errs19 = errors; + if (errors === _errs19) { + if ( + data8 && + typeof data8 == "object" && + !Array.isArray(data8) + ) { + if (Object.keys(data8).length > 10000) { + validate10.errors = [ + { + instancePath: instancePath + "/tokenMap", + schemaPath: "#/properties/tokenMap/maxProperties", + keyword: "maxProperties", + params: { limit: 10000 }, + message: + "must NOT have more than 10000 properties" + } + ]; + return false; + } else { + if (Object.keys(data8).length < 1) { + validate10.errors = [ + { + instancePath: instancePath + "/tokenMap", + schemaPath: + "#/properties/tokenMap/minProperties", + keyword: "minProperties", + params: { limit: 1 }, + message: "must NOT have fewer than 1 properties" + } + ]; + return false; + } else { + for (const key2 in data8) { + const _errs21 = errors; + if (typeof key2 !== "string") { + const err0 = { + instancePath: instancePath + "/tokenMap", + schemaPath: + "#/properties/tokenMap/propertyNames/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key2 + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid4 = _errs21 === errors; + if (!valid4) { + const err1 = { + instancePath: instancePath + "/tokenMap", + schemaPath: + "#/properties/tokenMap/propertyNames", + keyword: "propertyNames", + params: { propertyName: key2 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + validate10.errors = vErrors; + return false; + break; + } + } + if (valid4) { + for (const key3 in data8) { + const _errs24 = errors; + if ( + !validate11(data8[key3], { + instancePath: + instancePath + + "/tokenMap/" + + key3 + .replace(/~/g, "~0") + .replace(/\//g, "~1"), + parentData: data8, + parentDataProperty: key3, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate11.errors + : vErrors.concat(validate11.errors); + errors = vErrors.length; + } + var valid5 = _errs24 === errors; + if (!valid5) { + break; + } + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/tokenMap", + schemaPath: "#/properties/tokenMap/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.keywords !== undefined) { + let data10 = data.keywords; + const _errs25 = errors; + if (errors === _errs25) { + if (Array.isArray(data10)) { + if (data10.length > 20) { + validate10.errors = [ + { + instancePath: instancePath + "/keywords", + schemaPath: "#/properties/keywords/maxItems", + keyword: "maxItems", + params: { limit: 20 }, + message: "must NOT have more than 20 items" + } + ]; + return false; + } else { + var valid6 = true; + const len1 = data10.length; + for (let i1 = 0; i1 < len1; i1++) { + let data11 = data10[i1]; + const _errs27 = errors; + if (errors === _errs27) { + if (typeof data11 === "string") { + if (func2(data11) > 20) { + validate10.errors = [ + { + instancePath: + instancePath + "/keywords/" + i1, + schemaPath: + "#/properties/keywords/items/maxLength", + keyword: "maxLength", + params: { limit: 20 }, + message: + "must NOT have more than 20 characters" + } + ]; + return false; + } else { + if (func2(data11) < 1) { + validate10.errors = [ + { + instancePath: + instancePath + "/keywords/" + i1, + schemaPath: + "#/properties/keywords/items/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if (!pattern0.test(data11)) { + validate10.errors = [ + { + instancePath: + instancePath + "/keywords/" + i1, + schemaPath: + "#/properties/keywords/items/pattern", + keyword: "pattern", + params: { pattern: "^[\\w ]+$" }, + message: + 'must match pattern "' + + "^[\\w ]+$" + + '"' + } + ]; + return false; + } + } + } + } else { + validate10.errors = [ + { + instancePath: + instancePath + "/keywords/" + i1, + schemaPath: + "#/properties/keywords/items/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid6 = _errs27 === errors; + if (!valid6) { + break; + } + } + if (valid6) { + let i2 = data10.length; + let j0; + if (i2 > 1) { + const indices0 = {}; + for (; i2--; ) { + let item0 = data10[i2]; + if (typeof item0 !== "string") { + continue; + } + if (typeof indices0[item0] == "number") { + j0 = indices0[item0]; + validate10.errors = [ + { + instancePath: + instancePath + "/keywords", + schemaPath: + "#/properties/keywords/uniqueItems", + keyword: "uniqueItems", + params: { i: i2, j: j0 }, + message: + "must NOT have duplicate items (items ## " + + j0 + + " and " + + i2 + + " are identical)" + } + ]; + return false; + break; + } + indices0[item0] = i2; + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/keywords", + schemaPath: "#/properties/keywords/type", + keyword: "type", + params: { type: "array" }, + message: "must be array" + } + ]; + return false; + } + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.tags !== undefined) { + let data12 = data.tags; + const _errs29 = errors; + if (errors === _errs29) { + if ( + data12 && + typeof data12 == "object" && + !Array.isArray(data12) + ) { + if (Object.keys(data12).length > 20) { + validate10.errors = [ + { + instancePath: instancePath + "/tags", + schemaPath: "#/properties/tags/maxProperties", + keyword: "maxProperties", + params: { limit: 20 }, + message: + "must NOT have more than 20 properties" + } + ]; + return false; + } else { + for (const key4 in data12) { + const _errs31 = errors; + const _errs32 = errors; + if (errors === _errs32) { + if (typeof key4 === "string") { + if (func2(key4) > 10) { + const err2 = { + instancePath: instancePath + "/tags", + schemaPath: + "#/definitions/TagIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 10 }, + message: + "must NOT have more than 10 characters", + propertyName: key4 + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } else { + if (func2(key4) < 1) { + const err3 = { + instancePath: instancePath + "/tags", + schemaPath: + "#/definitions/TagIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters", + propertyName: key4 + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } else { + if (!pattern4.test(key4)) { + const err4 = { + instancePath: + instancePath + "/tags", + schemaPath: + "#/definitions/TagIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: + 'must match pattern "' + + "^[\\w]+$" + + '"', + propertyName: key4 + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + } + } else { + const err5 = { + instancePath: instancePath + "/tags", + schemaPath: + "#/definitions/TagIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key4 + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + const err6 = { + instancePath: instancePath + "/tags", + schemaPath: + "#/properties/tags/propertyNames", + keyword: "propertyNames", + params: { propertyName: key4 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + validate10.errors = vErrors; + return false; + break; + } + } + if (valid8) { + for (const key5 in data12) { + let data13 = data12[key5]; + const _errs35 = errors; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == "object" && + !Array.isArray(data13) + ) { + let missing2; + if ( + (data13.name === undefined && + (missing2 = "name")) || + (data13.description === undefined && + (missing2 = "description")) + ) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace(/\//g, "~1"), + schemaPath: + "#/definitions/TagDefinition/required", + keyword: "required", + params: { + missingProperty: missing2 + }, + message: + "must have required property '" + + missing2 + + "'" + } + ]; + return false; + } else { + const _errs38 = errors; + for (const key6 in data13) { + if ( + !( + key6 === "name" || + key6 === "description" + ) + ) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace(/\//g, "~1"), + schemaPath: + "#/definitions/TagDefinition/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key6 + }, + message: + "must NOT have additional properties" + } + ]; + return false; + break; + } + } + if (_errs38 === errors) { + if (data13.name !== undefined) { + let data14 = data13.name; + const _errs39 = errors; + if (errors === _errs39) { + if (typeof data14 === "string") { + if (func2(data14) > 20) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace( + /\//g, + "~1" + ) + + "/name", + schemaPath: + "#/definitions/TagDefinition/properties/name/maxLength", + keyword: "maxLength", + params: { limit: 20 }, + message: + "must NOT have more than 20 characters" + } + ]; + return false; + } else { + if (func2(data14) < 1) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace( + /\//g, + "~1" + ) + + "/name", + schemaPath: + "#/definitions/TagDefinition/properties/name/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if ( + !pattern10.test(data14) + ) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace( + /~/g, + "~0" + ) + .replace( + /\//g, + "~1" + ) + + "/name", + schemaPath: + "#/definitions/TagDefinition/properties/name/pattern", + keyword: "pattern", + params: { + pattern: "^[ \\w]+$" + }, + message: + 'must match pattern "' + + "^[ \\w]+$" + + '"' + } + ]; + return false; + } + } + } + } else { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace(/\//g, "~1") + + "/name", + schemaPath: + "#/definitions/TagDefinition/properties/name/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid12 = _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.description !== undefined + ) { + let data15 = data13.description; + const _errs41 = errors; + if (errors === _errs41) { + if ( + typeof data15 === "string" + ) { + if (func2(data15) > 200) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace( + /\//g, + "~1" + ) + + "/description", + schemaPath: + "#/definitions/TagDefinition/properties/description/maxLength", + keyword: "maxLength", + params: { limit: 200 }, + message: + "must NOT have more than 200 characters" + } + ]; + return false; + } else { + if (func2(data15) < 1) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace( + /~/g, + "~0" + ) + .replace( + /\//g, + "~1" + ) + + "/description", + schemaPath: + "#/definitions/TagDefinition/properties/description/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if ( + !pattern11.test(data15) + ) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace( + /~/g, + "~0" + ) + .replace( + /\//g, + "~1" + ) + + "/description", + schemaPath: + "#/definitions/TagDefinition/properties/description/pattern", + keyword: "pattern", + params: { + pattern: + "^[ \\w\\.,:]+$" + }, + message: + 'must match pattern "' + + "^[ \\w\\.,:]+$" + + '"' + } + ]; + return false; + } + } + } + } else { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace( + /\//g, + "~1" + ) + + "/description", + schemaPath: + "#/definitions/TagDefinition/properties/description/type", + keyword: "type", + params: { + type: "string" + }, + message: "must be string" + } + ]; + return false; + } + } + var valid12 = _errs41 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace(/\//g, "~1"), + schemaPath: + "#/definitions/TagDefinition/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + var valid10 = _errs35 === errors; + if (!valid10) { + break; + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/tags", + schemaPath: "#/properties/tags/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + var valid0 = _errs29 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.logoURI !== undefined) { + let data16 = data.logoURI; + const _errs43 = errors; + if (errors === _errs43) { + if (errors === _errs43) { + if (typeof data16 === "string") { + if (!formats2(data16)) { + validate10.errors = [ + { + instancePath: instancePath + "/logoURI", + schemaPath: "#/properties/logoURI/format", + keyword: "format", + params: { format: "uri" }, + message: + 'must match format "' + "uri" + '"' + } + ]; + return false; + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/logoURI", + schemaPath: "#/properties/logoURI/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + } + var valid0 = _errs43 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } + } else { + validate10.errors = [ + { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + validate10.errors = vErrors; + return errors === 0; +} diff --git a/packages/react-kit/src/lib/uniswap/__generated__/validateTokens.js b/packages/react-kit/src/lib/uniswap/__generated__/validateTokens.js index 74da3358f..44b27edc1 100644 --- a/packages/react-kit/src/lib/uniswap/__generated__/validateTokens.js +++ b/packages/react-kit/src/lib/uniswap/__generated__/validateTokens.js @@ -1 +1,3341 @@ -"use strict";export const validate = validate10;export default validate10;const schema11 = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://uniswap.org/tokenlist.schema.json","title":"Uniswap Token List","description":"Schema for lists of tokens compatible with the Uniswap Interface","definitions":{"Version":{"type":"object","description":"The version of the list, used in change detection","examples":[{"major":1,"minor":0,"patch":0}],"additionalProperties":false,"properties":{"major":{"type":"integer","description":"The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.","minimum":0,"examples":[1,2]},"minor":{"type":"integer","description":"The minor version of the list. Must be incremented when tokens are added to the list.","minimum":0,"examples":[0,1]},"patch":{"type":"integer","description":"The patch version of the list. Must be incremented for any changes to the list.","minimum":0,"examples":[0,1]}},"required":["major","minor","patch"]},"TagIdentifier":{"type":"string","description":"The unique identifier of a tag","minLength":1,"maxLength":10,"pattern":"^[\\w]+$","examples":["compound","stablecoin"]},"ExtensionIdentifier":{"type":"string","description":"The name of a token extension property","minLength":1,"maxLength":40,"pattern":"^[\\w]+$","examples":["color","is_fee_on_transfer","aliases"]},"ExtensionMap":{"type":"object","description":"An object containing any arbitrary or vendor-specific token metadata","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValue"},"examples":[{"color":"#000000","is_verified_by_me":true},{"x-bridged-addresses-by-chain":{"1":{"bridgeAddress":"0x4200000000000000000000000000000000000010","tokenAddress":"0x4200000000000000000000000000000000000010"}}}]},"ExtensionPrimitiveValue":{"anyOf":[{"type":"string","minLength":1,"maxLength":42,"examples":["#00000"]},{"type":"boolean","examples":[true]},{"type":"number","examples":[15]},{"type":"null"}]},"ExtensionValue":{"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"},{"type":"object","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValueInner0"}}]},"ExtensionValueInner0":{"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"},{"type":"object","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValueInner1"}}]},"ExtensionValueInner1":{"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"}]},"TagDefinition":{"type":"object","description":"Definition of a tag that can be associated with a token via its identifier","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the tag","pattern":"^[ \\w]+$","minLength":1,"maxLength":20},"description":{"type":"string","description":"A user-friendly description of the tag","pattern":"^[ \\w\\.,:]+$","minLength":1,"maxLength":200}},"required":["name","description"],"examples":[{"name":"Stablecoin","description":"A token with value pegged to another asset"}]},"TokenInfo":{"type":"object","description":"Metadata for a single token in a token list","additionalProperties":false,"properties":{"chainId":{"type":"integer","description":"The chain ID of the Ethereum network where this token is deployed","minimum":1,"examples":[1,42]},"address":{"type":"string","description":"The checksummed address of the token on the specified chain ID","pattern":"^0x[a-fA-F0-9]{40}$","examples":["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]},"decimals":{"type":"integer","description":"The number of decimals for the token balance","minimum":0,"maximum":255,"examples":[18]},"name":{"type":"string","description":"The name of the token","minLength":0,"maxLength":40,"anyOf":[{"const":""},{"pattern":"^[ \\S+]+$"}],"examples":["USD Coin"]},"symbol":{"type":"string","description":"The symbol for the token","minLength":0,"maxLength":20,"anyOf":[{"const":""},{"pattern":"^\\S+$"}],"examples":["USDC"]},"logoURI":{"type":"string","description":"A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64","format":"uri","examples":["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]},"tags":{"type":"array","description":"An array of tag identifiers associated with the token; tags are defined at the list level","items":{"$ref":"#/definitions/TagIdentifier"},"maxItems":10,"examples":["stablecoin","compound"]},"extensions":{"$ref":"#/definitions/ExtensionMap"}},"required":["chainId","address","decimals","name","symbol"]}},"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the token list","minLength":1,"maxLength":30,"pattern":"^[\\w ]+$","examples":["My Token List"]},"timestamp":{"type":"string","format":"date-time","description":"The timestamp of this list version; i.e. when this immutable version of the list was created"},"version":{"$ref":"#/definitions/Version"},"tokens":{"type":"array","description":"The list of tokens included in the list","items":{"$ref":"#/definitions/TokenInfo"},"minItems":1,"maxItems":10000},"tokenMap":{"type":"object","description":"A mapping of key 'chainId_tokenAddress' to its corresponding token object","minProperties":1,"maxProperties":10000,"propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/definitions/TokenInfo"},"examples":[{"4_0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984":{"name":"Uniswap","address":"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984","symbol":"UNI","decimals":18,"chainId":4,"logoURI":"ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg"}}]},"keywords":{"type":"array","description":"Keywords associated with the contents of the list; may be used in list discoverability","items":{"type":"string","description":"A keyword to describe the contents of the list","minLength":1,"maxLength":20,"pattern":"^[\\w ]+$","examples":["compound","lending","personal tokens"]},"maxItems":20,"uniqueItems":true},"tags":{"type":"object","description":"A mapping of tag identifiers to their name and description","propertyNames":{"$ref":"#/definitions/TagIdentifier"},"additionalProperties":{"$ref":"#/definitions/TagDefinition"},"maxProperties":20,"examples":[{"stablecoin":{"name":"Stablecoin","description":"A token with value pegged to another asset"}}]},"logoURI":{"type":"string","description":"A URI for the logo of the token list; prefer SVG or PNG of size 256x256","format":"uri","examples":["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]}},"required":["tokens"]};const schema12 = {"type":"object","description":"The version of the list, used in change detection","examples":[{"major":1,"minor":0,"patch":0}],"additionalProperties":false,"properties":{"major":{"type":"integer","description":"The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.","minimum":0,"examples":[1,2]},"minor":{"type":"integer","description":"The minor version of the list. Must be incremented when tokens are added to the list.","minimum":0,"examples":[0,1]},"patch":{"type":"integer","description":"The patch version of the list. Must be incremented for any changes to the list.","minimum":0,"examples":[0,1]}},"required":["major","minor","patch"]};const schema14 = {"type":"string","description":"The unique identifier of a tag","minLength":1,"maxLength":10,"pattern":"^[\\w]+$","examples":["compound","stablecoin"]};const schema26 = {"type":"object","description":"Definition of a tag that can be associated with a token via its identifier","additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the tag","pattern":"^[ \\w]+$","minLength":1,"maxLength":20},"description":{"type":"string","description":"A user-friendly description of the tag","pattern":"^[ \\w\\.,:]+$","minLength":1,"maxLength":200}},"required":["name","description"],"examples":[{"name":"Stablecoin","description":"A token with value pegged to another asset"}]};const func2 = require("ajv/dist/runtime/ucs2length").default;const pattern0 = new RegExp("^[\\w ]+$", "u");const pattern4 = new RegExp("^[\\w]+$", "u");const pattern10 = new RegExp("^[ \\w]+$", "u");const pattern11 = new RegExp("^[ \\w\\.,:]+$", "u");const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"];const formats2 = require("ajv-formats/dist/formats").fullFormats.uri;const schema13 = {"type":"object","description":"Metadata for a single token in a token list","additionalProperties":false,"properties":{"chainId":{"type":"integer","description":"The chain ID of the Ethereum network where this token is deployed","minimum":1,"examples":[1,42]},"address":{"type":"string","description":"The checksummed address of the token on the specified chain ID","pattern":"^0x[a-fA-F0-9]{40}$","examples":["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]},"decimals":{"type":"integer","description":"The number of decimals for the token balance","minimum":0,"maximum":255,"examples":[18]},"name":{"type":"string","description":"The name of the token","minLength":0,"maxLength":40,"anyOf":[{"const":""},{"pattern":"^[ \\S+]+$"}],"examples":["USD Coin"]},"symbol":{"type":"string","description":"The symbol for the token","minLength":0,"maxLength":20,"anyOf":[{"const":""},{"pattern":"^\\S+$"}],"examples":["USDC"]},"logoURI":{"type":"string","description":"A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64","format":"uri","examples":["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]},"tags":{"type":"array","description":"An array of tag identifiers associated with the token; tags are defined at the list level","items":{"$ref":"#/definitions/TagIdentifier"},"maxItems":10,"examples":["stablecoin","compound"]},"extensions":{"$ref":"#/definitions/ExtensionMap"}},"required":["chainId","address","decimals","name","symbol"]};const pattern1 = new RegExp("^0x[a-fA-F0-9]{40}$", "u");const pattern2 = new RegExp("^[ \\S+]+$", "u");const pattern3 = new RegExp("^\\S+$", "u");const schema15 = {"type":"object","description":"An object containing any arbitrary or vendor-specific token metadata","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValue"},"examples":[{"color":"#000000","is_verified_by_me":true},{"x-bridged-addresses-by-chain":{"1":{"bridgeAddress":"0x4200000000000000000000000000000000000010","tokenAddress":"0x4200000000000000000000000000000000000010"}}}]};const schema16 = {"type":"string","description":"The name of a token extension property","minLength":1,"maxLength":40,"pattern":"^[\\w]+$","examples":["color","is_fee_on_transfer","aliases"]};const schema17 = {"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"},{"type":"object","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValueInner0"}}]};const schema18 = {"anyOf":[{"type":"string","minLength":1,"maxLength":42,"examples":["#00000"]},{"type":"boolean","examples":[true]},{"type":"number","examples":[15]},{"type":"null"}]};const schema20 = {"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"},{"type":"object","maxProperties":10,"propertyNames":{"$ref":"#/definitions/ExtensionIdentifier"},"additionalProperties":{"$ref":"#/definitions/ExtensionValueInner1"}}]};const schema23 = {"anyOf":[{"$ref":"#/definitions/ExtensionPrimitiveValue"}]};function validate15(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;const _errs3 = errors;let valid2 = false;const _errs4 = errors;if(errors === _errs4){if(typeof data === "string"){if(func2(data) > 42){const err0 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength",keyword:"maxLength",params:{limit: 42},message:"must NOT have more than 42 characters"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(func2(data) < 1){const err1 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid1 = _errs4 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs6 = errors;if(typeof data !== "boolean"){const err3 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/1/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs6 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs8 = errors;if(!((typeof data == "number") && (isFinite(data)))){const err4 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/2/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs8 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs10 = errors;if(data !== null){const err5 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/3/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid1 = _errs10 === errors;valid2 = valid2 || _valid1;}}}if(!valid2){const err6 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const err7 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;validate15.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate15.errors = vErrors;return errors === 0;}function validate14(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;const _errs3 = errors;let valid2 = false;const _errs4 = errors;if(errors === _errs4){if(typeof data === "string"){if(func2(data) > 42){const err0 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength",keyword:"maxLength",params:{limit: 42},message:"must NOT have more than 42 characters"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(func2(data) < 1){const err1 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid1 = _errs4 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs6 = errors;if(typeof data !== "boolean"){const err3 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/1/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs6 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs8 = errors;if(!((typeof data == "number") && (isFinite(data)))){const err4 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/2/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs8 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs10 = errors;if(data !== null){const err5 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/3/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid1 = _errs10 === errors;valid2 = valid2 || _valid1;}}}if(!valid2){const err6 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs12 = errors;if(errors === _errs12){if(data && typeof data == "object" && !Array.isArray(data)){if(Object.keys(data).length > 10){const err7 = {instancePath,schemaPath:"#/anyOf/1/maxProperties",keyword:"maxProperties",params:{limit: 10},message:"must NOT have more than 10 properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {for(const key0 in data){const _errs14 = errors;const _errs15 = errors;if(errors === _errs15){if(typeof key0 === "string"){if(func2(key0) > 40){const err8 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/maxLength",keyword:"maxLength",params:{limit: 40},message:"must NOT have more than 40 characters",propertyName:key0};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {if(func2(key0) < 1){const err9 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters",propertyName:key0};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(!pattern4.test(key0)){const err10 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\"",propertyName:key0};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}else {const err11 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key0};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}var valid3 = _errs14 === errors;if(!valid3){const err12 = {instancePath,schemaPath:"#/anyOf/1/propertyNames",keyword:"propertyNames",params:{propertyName: key0},message:"property name must be valid"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;break;}}if(valid3){for(const key1 in data){const _errs18 = errors;if(!(validate15(data[key1], {instancePath:instancePath+"/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data,parentDataProperty:key1,rootData}))){vErrors = vErrors === null ? validate15.errors : vErrors.concat(validate15.errors);errors = vErrors.length;}var valid5 = _errs18 === errors;if(!valid5){break;}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs12 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate14.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate14.errors = vErrors;return errors === 0;}function validate13(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;const _errs3 = errors;let valid2 = false;const _errs4 = errors;if(errors === _errs4){if(typeof data === "string"){if(func2(data) > 42){const err0 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength",keyword:"maxLength",params:{limit: 42},message:"must NOT have more than 42 characters"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(func2(data) < 1){const err1 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}else {const err2 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid1 = _errs4 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs6 = errors;if(typeof data !== "boolean"){const err3 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/1/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs6 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs8 = errors;if(!((typeof data == "number") && (isFinite(data)))){const err4 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/2/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs8 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs10 = errors;if(data !== null){const err5 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf/3/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var _valid1 = _errs10 === errors;valid2 = valid2 || _valid1;}}}if(!valid2){const err6 = {instancePath,schemaPath:"#/definitions/ExtensionPrimitiveValue/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs12 = errors;if(errors === _errs12){if(data && typeof data == "object" && !Array.isArray(data)){if(Object.keys(data).length > 10){const err7 = {instancePath,schemaPath:"#/anyOf/1/maxProperties",keyword:"maxProperties",params:{limit: 10},message:"must NOT have more than 10 properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {for(const key0 in data){const _errs14 = errors;const _errs15 = errors;if(errors === _errs15){if(typeof key0 === "string"){if(func2(key0) > 40){const err8 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/maxLength",keyword:"maxLength",params:{limit: 40},message:"must NOT have more than 40 characters",propertyName:key0};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}else {if(func2(key0) < 1){const err9 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters",propertyName:key0};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(!pattern4.test(key0)){const err10 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\"",propertyName:key0};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}}else {const err11 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key0};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}var valid3 = _errs14 === errors;if(!valid3){const err12 = {instancePath,schemaPath:"#/anyOf/1/propertyNames",keyword:"propertyNames",params:{propertyName: key0},message:"property name must be valid"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;break;}}if(valid3){for(const key1 in data){const _errs18 = errors;if(!(validate14(data[key1], {instancePath:instancePath+"/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data,parentDataProperty:key1,rootData}))){vErrors = vErrors === null ? validate14.errors : vErrors.concat(validate14.errors);errors = vErrors.length;}var valid5 = _errs18 === errors;if(!valid5){break;}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs12 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate13.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate13.errors = vErrors;return errors === 0;}function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(Object.keys(data).length > 10){validate12.errors = [{instancePath,schemaPath:"#/maxProperties",keyword:"maxProperties",params:{limit: 10},message:"must NOT have more than 10 properties"}];return false;}else {for(const key0 in data){const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(typeof key0 === "string"){if(func2(key0) > 40){const err0 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/maxLength",keyword:"maxLength",params:{limit: 40},message:"must NOT have more than 40 characters",propertyName:key0};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(func2(key0) < 1){const err1 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters",propertyName:key0};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {if(!pattern4.test(key0)){const err2 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\"",propertyName:key0};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}}else {const err3 = {instancePath,schemaPath:"#/definitions/ExtensionIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key0};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var valid0 = _errs1 === errors;if(!valid0){const err4 = {instancePath,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName: key0},message:"property name must be valid"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;validate12.errors = vErrors;return false;break;}}if(valid0){for(const key1 in data){const _errs5 = errors;if(!(validate13(data[key1], {instancePath:instancePath+"/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data,parentDataProperty:key1,rootData}))){vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);errors = vErrors.length;}var valid2 = _errs5 === errors;if(!valid2){break;}}}}}else {validate12.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate12.errors = vErrors;return errors === 0;}function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((((data.chainId === undefined) && (missing0 = "chainId")) || ((data.address === undefined) && (missing0 = "address"))) || ((data.decimals === undefined) && (missing0 = "decimals"))) || ((data.name === undefined) && (missing0 = "name"))) || ((data.symbol === undefined) && (missing0 = "symbol"))){validate11.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs1 = errors;for(const key0 in data){if(!((((((((key0 === "chainId") || (key0 === "address")) || (key0 === "decimals")) || (key0 === "name")) || (key0 === "symbol")) || (key0 === "logoURI")) || (key0 === "tags")) || (key0 === "extensions"))){validate11.errors = [{instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs1 === errors){if(data.chainId !== undefined){let data0 = data.chainId;const _errs2 = errors;if(!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){validate11.errors = [{instancePath:instancePath+"/chainId",schemaPath:"#/properties/chainId/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs2){if((typeof data0 == "number") && (isFinite(data0))){if(data0 < 1 || isNaN(data0)){validate11.errors = [{instancePath:instancePath+"/chainId",schemaPath:"#/properties/chainId/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"}];return false;}}}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.address !== undefined){let data1 = data.address;const _errs4 = errors;if(errors === _errs4){if(typeof data1 === "string"){if(!pattern1.test(data1)){validate11.errors = [{instancePath:instancePath+"/address",schemaPath:"#/properties/address/pattern",keyword:"pattern",params:{pattern: "^0x[a-fA-F0-9]{40}$"},message:"must match pattern \""+"^0x[a-fA-F0-9]{40}$"+"\""}];return false;}}else {validate11.errors = [{instancePath:instancePath+"/address",schemaPath:"#/properties/address/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.decimals !== undefined){let data2 = data.decimals;const _errs6 = errors;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){validate11.errors = [{instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs6){if((typeof data2 == "number") && (isFinite(data2))){if(data2 > 255 || isNaN(data2)){validate11.errors = [{instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"}];return false;}else {if(data2 < 0 || isNaN(data2)){validate11.errors = [{instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}}var valid0 = _errs6 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){let data3 = data.name;const _errs8 = errors;const _errs10 = errors;let valid1 = false;const _errs11 = errors;if("" !== data3){const err0 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/0/const",keyword:"const",params:{allowedValue: ""},message:"must be equal to constant"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs11 === errors;valid1 = valid1 || _valid0;if(!valid1){const _errs12 = errors;if(typeof data3 === "string"){if(!pattern2.test(data3)){const err1 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf/1/pattern",keyword:"pattern",params:{pattern: "^[ \\S+]+$"},message:"must match pattern \""+"^[ \\S+]+$"+"\""};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}var _valid0 = _errs12 === errors;valid1 = valid1 || _valid0;}if(!valid1){const err2 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate11.errors = vErrors;return false;}else {errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}}if(errors === _errs8){if(typeof data3 === "string"){if(func2(data3) > 40){validate11.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/maxLength",keyword:"maxLength",params:{limit: 40},message:"must NOT have more than 40 characters"}];return false;}else {if(func2(data3) < 0){validate11.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit: 0},message:"must NOT have fewer than 0 characters"}];return false;}}}else {validate11.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs8 === errors;}else {var valid0 = true;}if(valid0){if(data.symbol !== undefined){let data4 = data.symbol;const _errs13 = errors;const _errs15 = errors;let valid2 = false;const _errs16 = errors;if("" !== data4){const err3 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/anyOf/0/const",keyword:"const",params:{allowedValue: ""},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs16 === errors;valid2 = valid2 || _valid1;if(!valid2){const _errs17 = errors;if(typeof data4 === "string"){if(!pattern3.test(data4)){const err4 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/anyOf/1/pattern",keyword:"pattern",params:{pattern: "^\\S+$"},message:"must match pattern \""+"^\\S+$"+"\""};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid1 = _errs17 === errors;valid2 = valid2 || _valid1;}if(!valid2){const err5 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate11.errors = vErrors;return false;}else {errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}}if(errors === _errs13){if(typeof data4 === "string"){if(func2(data4) > 20){validate11.errors = [{instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/maxLength",keyword:"maxLength",params:{limit: 20},message:"must NOT have more than 20 characters"}];return false;}else {if(func2(data4) < 0){validate11.errors = [{instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/minLength",keyword:"minLength",params:{limit: 0},message:"must NOT have fewer than 0 characters"}];return false;}}}else {validate11.errors = [{instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs13 === errors;}else {var valid0 = true;}if(valid0){if(data.logoURI !== undefined){let data5 = data.logoURI;const _errs18 = errors;if(errors === _errs18){if(errors === _errs18){if(typeof data5 === "string"){if(!(formats2(data5))){validate11.errors = [{instancePath:instancePath+"/logoURI",schemaPath:"#/properties/logoURI/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\""}];return false;}}else {validate11.errors = [{instancePath:instancePath+"/logoURI",schemaPath:"#/properties/logoURI/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs18 === errors;}else {var valid0 = true;}if(valid0){if(data.tags !== undefined){let data6 = data.tags;const _errs20 = errors;if(errors === _errs20){if(Array.isArray(data6)){if(data6.length > 10){validate11.errors = [{instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/maxItems",keyword:"maxItems",params:{limit: 10},message:"must NOT have more than 10 items"}];return false;}else {var valid3 = true;const len0 = data6.length;for(let i0=0; i0 10){validate11.errors = [{instancePath:instancePath+"/tags/" + i0,schemaPath:"#/definitions/TagIdentifier/maxLength",keyword:"maxLength",params:{limit: 10},message:"must NOT have more than 10 characters"}];return false;}else {if(func2(data7) < 1){validate11.errors = [{instancePath:instancePath+"/tags/" + i0,schemaPath:"#/definitions/TagIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern4.test(data7)){validate11.errors = [{instancePath:instancePath+"/tags/" + i0,schemaPath:"#/definitions/TagIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\""}];return false;}}}}else {validate11.errors = [{instancePath:instancePath+"/tags/" + i0,schemaPath:"#/definitions/TagIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid3 = _errs22 === errors;if(!valid3){break;}}}}else {validate11.errors = [{instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs20 === errors;}else {var valid0 = true;}if(valid0){if(data.extensions !== undefined){const _errs25 = errors;if(!(validate12(data.extensions, {instancePath:instancePath+"/extensions",parentData:data,parentDataProperty:"extensions",rootData}))){vErrors = vErrors === null ? validate12.errors : vErrors.concat(validate12.errors);errors = vErrors.length;}var valid0 = _errs25 === errors;}else {var valid0 = true;}}}}}}}}}}}else {validate11.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate11.errors = vErrors;return errors === 0;}function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://uniswap.org/tokenlist.schema.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.tokens === undefined) && (missing0 = "tokens")){validate10.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {const _errs1 = errors;for(const key0 in data){if(!((((((((key0 === "name") || (key0 === "timestamp")) || (key0 === "version")) || (key0 === "tokens")) || (key0 === "tokenMap")) || (key0 === "keywords")) || (key0 === "tags")) || (key0 === "logoURI"))){validate10.errors = [{instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"}];return false;break;}}if(_errs1 === errors){if(data.name !== undefined){let data0 = data.name;const _errs2 = errors;if(errors === _errs2){if(typeof data0 === "string"){if(func2(data0) > 30){validate10.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/maxLength",keyword:"maxLength",params:{limit: 30},message:"must NOT have more than 30 characters"}];return false;}else {if(func2(data0) < 1){validate10.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern0.test(data0)){validate10.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern: "^[\\w ]+$"},message:"must match pattern \""+"^[\\w ]+$"+"\""}];return false;}}}}else {validate10.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.timestamp !== undefined){let data1 = data.timestamp;const _errs4 = errors;if(errors === _errs4){if(errors === _errs4){if(typeof data1 === "string"){if(!(formats0.validate(data1))){validate10.errors = [{instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/format",keyword:"format",params:{format: "date-time"},message:"must match format \""+"date-time"+"\""}];return false;}}else {validate10.errors = [{instancePath:instancePath+"/timestamp",schemaPath:"#/properties/timestamp/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.version !== undefined){let data2 = data.version;const _errs6 = errors;const _errs7 = errors;if(errors === _errs7){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){let missing1;if((((data2.major === undefined) && (missing1 = "major")) || ((data2.minor === undefined) && (missing1 = "minor"))) || ((data2.patch === undefined) && (missing1 = "patch"))){validate10.errors = [{instancePath:instancePath+"/version",schemaPath:"#/definitions/Version/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {const _errs9 = errors;for(const key1 in data2){if(!(((key1 === "major") || (key1 === "minor")) || (key1 === "patch"))){validate10.errors = [{instancePath:instancePath+"/version",schemaPath:"#/definitions/Version/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"}];return false;break;}}if(_errs9 === errors){if(data2.major !== undefined){let data3 = data2.major;const _errs10 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate10.errors = [{instancePath:instancePath+"/version/major",schemaPath:"#/definitions/Version/properties/major/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs10){if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){validate10.errors = [{instancePath:instancePath+"/version/major",schemaPath:"#/definitions/Version/properties/major/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data2.minor !== undefined){let data4 = data2.minor;const _errs12 = errors;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){validate10.errors = [{instancePath:instancePath+"/version/minor",schemaPath:"#/definitions/Version/properties/minor/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs12){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){validate10.errors = [{instancePath:instancePath+"/version/minor",schemaPath:"#/definitions/Version/properties/minor/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid2 = _errs12 === errors;}else {var valid2 = true;}if(valid2){if(data2.patch !== undefined){let data5 = data2.patch;const _errs14 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){validate10.errors = [{instancePath:instancePath+"/version/patch",schemaPath:"#/definitions/Version/properties/patch/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs14){if((typeof data5 == "number") && (isFinite(data5))){if(data5 < 0 || isNaN(data5)){validate10.errors = [{instancePath:instancePath+"/version/patch",schemaPath:"#/definitions/Version/properties/patch/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid2 = _errs14 === errors;}else {var valid2 = true;}}}}}}else {validate10.errors = [{instancePath:instancePath+"/version",schemaPath:"#/definitions/Version/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs6 === errors;}else {var valid0 = true;}if(valid0){if(data.tokens !== undefined){let data6 = data.tokens;const _errs16 = errors;if(errors === _errs16){if(Array.isArray(data6)){if(data6.length > 10000){validate10.errors = [{instancePath:instancePath+"/tokens",schemaPath:"#/properties/tokens/maxItems",keyword:"maxItems",params:{limit: 10000},message:"must NOT have more than 10000 items"}];return false;}else {if(data6.length < 1){validate10.errors = [{instancePath:instancePath+"/tokens",schemaPath:"#/properties/tokens/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid3 = true;const len0 = data6.length;for(let i0=0; i0 10000){validate10.errors = [{instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/maxProperties",keyword:"maxProperties",params:{limit: 10000},message:"must NOT have more than 10000 properties"}];return false;}else {if(Object.keys(data8).length < 1){validate10.errors = [{instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/minProperties",keyword:"minProperties",params:{limit: 1},message:"must NOT have fewer than 1 properties"}];return false;}else {for(const key2 in data8){const _errs21 = errors;if(typeof key2 !== "string"){const err0 = {instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/propertyNames/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key2};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var valid4 = _errs21 === errors;if(!valid4){const err1 = {instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/propertyNames",keyword:"propertyNames",params:{propertyName: key2},message:"property name must be valid"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;validate10.errors = vErrors;return false;break;}}if(valid4){for(const key3 in data8){const _errs24 = errors;if(!(validate11(data8[key3], {instancePath:instancePath+"/tokenMap/" + key3.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data8,parentDataProperty:key3,rootData}))){vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);errors = vErrors.length;}var valid5 = _errs24 === errors;if(!valid5){break;}}}}}}else {validate10.errors = [{instancePath:instancePath+"/tokenMap",schemaPath:"#/properties/tokenMap/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs19 === errors;}else {var valid0 = true;}if(valid0){if(data.keywords !== undefined){let data10 = data.keywords;const _errs25 = errors;if(errors === _errs25){if(Array.isArray(data10)){if(data10.length > 20){validate10.errors = [{instancePath:instancePath+"/keywords",schemaPath:"#/properties/keywords/maxItems",keyword:"maxItems",params:{limit: 20},message:"must NOT have more than 20 items"}];return false;}else {var valid6 = true;const len1 = data10.length;for(let i1=0; i1 20){validate10.errors = [{instancePath:instancePath+"/keywords/" + i1,schemaPath:"#/properties/keywords/items/maxLength",keyword:"maxLength",params:{limit: 20},message:"must NOT have more than 20 characters"}];return false;}else {if(func2(data11) < 1){validate10.errors = [{instancePath:instancePath+"/keywords/" + i1,schemaPath:"#/properties/keywords/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern0.test(data11)){validate10.errors = [{instancePath:instancePath+"/keywords/" + i1,schemaPath:"#/properties/keywords/items/pattern",keyword:"pattern",params:{pattern: "^[\\w ]+$"},message:"must match pattern \""+"^[\\w ]+$"+"\""}];return false;}}}}else {validate10.errors = [{instancePath:instancePath+"/keywords/" + i1,schemaPath:"#/properties/keywords/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid6 = _errs27 === errors;if(!valid6){break;}}if(valid6){let i2 = data10.length;let j0;if(i2 > 1){const indices0 = {};for(;i2--;){let item0 = data10[i2];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];validate10.errors = [{instancePath:instancePath+"/keywords",schemaPath:"#/properties/keywords/uniqueItems",keyword:"uniqueItems",params:{i: i2, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i2+" are identical)"}];return false;break;}indices0[item0] = i2;}}}}}else {validate10.errors = [{instancePath:instancePath+"/keywords",schemaPath:"#/properties/keywords/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs25 === errors;}else {var valid0 = true;}if(valid0){if(data.tags !== undefined){let data12 = data.tags;const _errs29 = errors;if(errors === _errs29){if(data12 && typeof data12 == "object" && !Array.isArray(data12)){if(Object.keys(data12).length > 20){validate10.errors = [{instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/maxProperties",keyword:"maxProperties",params:{limit: 20},message:"must NOT have more than 20 properties"}];return false;}else {for(const key4 in data12){const _errs31 = errors;const _errs32 = errors;if(errors === _errs32){if(typeof key4 === "string"){if(func2(key4) > 10){const err2 = {instancePath:instancePath+"/tags",schemaPath:"#/definitions/TagIdentifier/maxLength",keyword:"maxLength",params:{limit: 10},message:"must NOT have more than 10 characters",propertyName:key4};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {if(func2(key4) < 1){const err3 = {instancePath:instancePath+"/tags",schemaPath:"#/definitions/TagIdentifier/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters",propertyName:key4};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(!pattern4.test(key4)){const err4 = {instancePath:instancePath+"/tags",schemaPath:"#/definitions/TagIdentifier/pattern",keyword:"pattern",params:{pattern: "^[\\w]+$"},message:"must match pattern \""+"^[\\w]+$"+"\"",propertyName:key4};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}else {const err5 = {instancePath:instancePath+"/tags",schemaPath:"#/definitions/TagIdentifier/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key4};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var valid8 = _errs31 === errors;if(!valid8){const err6 = {instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/propertyNames",keyword:"propertyNames",params:{propertyName: key4},message:"property name must be valid"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;validate10.errors = vErrors;return false;break;}}if(valid8){for(const key5 in data12){let data13 = data12[key5];const _errs35 = errors;const _errs36 = errors;if(errors === _errs36){if(data13 && typeof data13 == "object" && !Array.isArray(data13)){let missing2;if(((data13.name === undefined) && (missing2 = "name")) || ((data13.description === undefined) && (missing2 = "description"))){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/TagDefinition/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {const _errs38 = errors;for(const key6 in data13){if(!((key6 === "name") || (key6 === "description"))){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/TagDefinition/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"}];return false;break;}}if(_errs38 === errors){if(data13.name !== undefined){let data14 = data13.name;const _errs39 = errors;if(errors === _errs39){if(typeof data14 === "string"){if(func2(data14) > 20){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/definitions/TagDefinition/properties/name/maxLength",keyword:"maxLength",params:{limit: 20},message:"must NOT have more than 20 characters"}];return false;}else {if(func2(data14) < 1){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/definitions/TagDefinition/properties/name/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern10.test(data14)){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/definitions/TagDefinition/properties/name/pattern",keyword:"pattern",params:{pattern: "^[ \\w]+$"},message:"must match pattern \""+"^[ \\w]+$"+"\""}];return false;}}}}else {validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/name",schemaPath:"#/definitions/TagDefinition/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid12 = _errs39 === errors;}else {var valid12 = true;}if(valid12){if(data13.description !== undefined){let data15 = data13.description;const _errs41 = errors;if(errors === _errs41){if(typeof data15 === "string"){if(func2(data15) > 200){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/description",schemaPath:"#/definitions/TagDefinition/properties/description/maxLength",keyword:"maxLength",params:{limit: 200},message:"must NOT have more than 200 characters"}];return false;}else {if(func2(data15) < 1){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/description",schemaPath:"#/definitions/TagDefinition/properties/description/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"}];return false;}else {if(!pattern11.test(data15)){validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/description",schemaPath:"#/definitions/TagDefinition/properties/description/pattern",keyword:"pattern",params:{pattern: "^[ \\w\\.,:]+$"},message:"must match pattern \""+"^[ \\w\\.,:]+$"+"\""}];return false;}}}}else {validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1")+"/description",schemaPath:"#/definitions/TagDefinition/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid12 = _errs41 === errors;}else {var valid12 = true;}}}}}else {validate10.errors = [{instancePath:instancePath+"/tags/" + key5.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/definitions/TagDefinition/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid10 = _errs35 === errors;if(!valid10){break;}}}}}else {validate10.errors = [{instancePath:instancePath+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs29 === errors;}else {var valid0 = true;}if(valid0){if(data.logoURI !== undefined){let data16 = data.logoURI;const _errs43 = errors;if(errors === _errs43){if(errors === _errs43){if(typeof data16 === "string"){if(!(formats2(data16))){validate10.errors = [{instancePath:instancePath+"/logoURI",schemaPath:"#/properties/logoURI/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\""}];return false;}}else {validate10.errors = [{instancePath:instancePath+"/logoURI",schemaPath:"#/properties/logoURI/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs43 === errors;}else {var valid0 = true;}}}}}}}}}}}else {validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate10.errors = vErrors;return errors === 0;} \ No newline at end of file +export const validate = validate10; +export default validate10; +const schema11 = { + $schema: "http://json-schema.org/draft-07/schema#", + $id: "https://uniswap.org/tokenlist.schema.json", + title: "Uniswap Token List", + description: + "Schema for lists of tokens compatible with the Uniswap Interface", + definitions: { + Version: { + type: "object", + description: "The version of the list, used in change detection", + examples: [{ major: 1, minor: 0, patch: 0 }], + additionalProperties: false, + properties: { + major: { + type: "integer", + description: + "The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.", + minimum: 0, + examples: [1, 2] + }, + minor: { + type: "integer", + description: + "The minor version of the list. Must be incremented when tokens are added to the list.", + minimum: 0, + examples: [0, 1] + }, + patch: { + type: "integer", + description: + "The patch version of the list. Must be incremented for any changes to the list.", + minimum: 0, + examples: [0, 1] + } + }, + required: ["major", "minor", "patch"] + }, + TagIdentifier: { + type: "string", + description: "The unique identifier of a tag", + minLength: 1, + maxLength: 10, + pattern: "^[\\w]+$", + examples: ["compound", "stablecoin"] + }, + ExtensionIdentifier: { + type: "string", + description: "The name of a token extension property", + minLength: 1, + maxLength: 40, + pattern: "^[\\w]+$", + examples: ["color", "is_fee_on_transfer", "aliases"] + }, + ExtensionMap: { + type: "object", + description: + "An object containing any arbitrary or vendor-specific token metadata", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValue" }, + examples: [ + { color: "#000000", is_verified_by_me: true }, + { + "x-bridged-addresses-by-chain": { + 1: { + bridgeAddress: "0x4200000000000000000000000000000000000010", + tokenAddress: "0x4200000000000000000000000000000000000010" + } + } + } + ] + }, + ExtensionPrimitiveValue: { + anyOf: [ + { type: "string", minLength: 1, maxLength: 42, examples: ["#00000"] }, + { type: "boolean", examples: [true] }, + { type: "number", examples: [15] }, + { type: "null" } + ] + }, + ExtensionValue: { + anyOf: [ + { $ref: "#/definitions/ExtensionPrimitiveValue" }, + { + type: "object", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValueInner0" } + } + ] + }, + ExtensionValueInner0: { + anyOf: [ + { $ref: "#/definitions/ExtensionPrimitiveValue" }, + { + type: "object", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValueInner1" } + } + ] + }, + ExtensionValueInner1: { + anyOf: [{ $ref: "#/definitions/ExtensionPrimitiveValue" }] + }, + TagDefinition: { + type: "object", + description: + "Definition of a tag that can be associated with a token via its identifier", + additionalProperties: false, + properties: { + name: { + type: "string", + description: "The name of the tag", + pattern: "^[ \\w]+$", + minLength: 1, + maxLength: 20 + }, + description: { + type: "string", + description: "A user-friendly description of the tag", + pattern: "^[ \\w\\.,:]+$", + minLength: 1, + maxLength: 200 + } + }, + required: ["name", "description"], + examples: [ + { + name: "Stablecoin", + description: "A token with value pegged to another asset" + } + ] + }, + TokenInfo: { + type: "object", + description: "Metadata for a single token in a token list", + additionalProperties: false, + properties: { + chainId: { + type: "integer", + description: + "The chain ID of the Ethereum network where this token is deployed", + minimum: 1, + examples: [1, 42] + }, + address: { + type: "string", + description: + "The checksummed address of the token on the specified chain ID", + pattern: "^0x[a-fA-F0-9]{40}$", + examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"] + }, + decimals: { + type: "integer", + description: "The number of decimals for the token balance", + minimum: 0, + maximum: 255, + examples: [18] + }, + name: { + type: "string", + description: "The name of the token", + minLength: 0, + maxLength: 40, + anyOf: [{ const: "" }, { pattern: "^[ \\S+]+$" }], + examples: ["USD Coin"] + }, + symbol: { + type: "string", + description: "The symbol for the token", + minLength: 0, + maxLength: 20, + anyOf: [{ const: "" }, { pattern: "^\\S+$" }], + examples: ["USDC"] + }, + logoURI: { + type: "string", + description: + "A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64", + format: "uri", + examples: ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"] + }, + tags: { + type: "array", + description: + "An array of tag identifiers associated with the token; tags are defined at the list level", + items: { $ref: "#/definitions/TagIdentifier" }, + maxItems: 10, + examples: ["stablecoin", "compound"] + }, + extensions: { $ref: "#/definitions/ExtensionMap" } + }, + required: ["chainId", "address", "decimals", "name", "symbol"] + } + }, + type: "object", + additionalProperties: false, + properties: { + name: { + type: "string", + description: "The name of the token list", + minLength: 1, + maxLength: 30, + pattern: "^[\\w ]+$", + examples: ["My Token List"] + }, + timestamp: { + type: "string", + format: "date-time", + description: + "The timestamp of this list version; i.e. when this immutable version of the list was created" + }, + version: { $ref: "#/definitions/Version" }, + tokens: { + type: "array", + description: "The list of tokens included in the list", + items: { $ref: "#/definitions/TokenInfo" }, + minItems: 1, + maxItems: 10000 + }, + tokenMap: { + type: "object", + description: + "A mapping of key 'chainId_tokenAddress' to its corresponding token object", + minProperties: 1, + maxProperties: 10000, + propertyNames: { type: "string" }, + additionalProperties: { $ref: "#/definitions/TokenInfo" }, + examples: [ + { + "4_0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984": { + name: "Uniswap", + address: "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", + symbol: "UNI", + decimals: 18, + chainId: 4, + logoURI: "ipfs://QmXttGpZrECX5qCyXbBQiqgQNytVGeZW5Anewvh2jc4psg" + } + } + ] + }, + keywords: { + type: "array", + description: + "Keywords associated with the contents of the list; may be used in list discoverability", + items: { + type: "string", + description: "A keyword to describe the contents of the list", + minLength: 1, + maxLength: 20, + pattern: "^[\\w ]+$", + examples: ["compound", "lending", "personal tokens"] + }, + maxItems: 20, + uniqueItems: true + }, + tags: { + type: "object", + description: "A mapping of tag identifiers to their name and description", + propertyNames: { $ref: "#/definitions/TagIdentifier" }, + additionalProperties: { $ref: "#/definitions/TagDefinition" }, + maxProperties: 20, + examples: [ + { + stablecoin: { + name: "Stablecoin", + description: "A token with value pegged to another asset" + } + } + ] + }, + logoURI: { + type: "string", + description: + "A URI for the logo of the token list; prefer SVG or PNG of size 256x256", + format: "uri", + examples: ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"] + } + }, + required: ["tokens"] +}; +const schema12 = { + type: "object", + description: "The version of the list, used in change detection", + examples: [{ major: 1, minor: 0, patch: 0 }], + additionalProperties: false, + properties: { + major: { + type: "integer", + description: + "The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.", + minimum: 0, + examples: [1, 2] + }, + minor: { + type: "integer", + description: + "The minor version of the list. Must be incremented when tokens are added to the list.", + minimum: 0, + examples: [0, 1] + }, + patch: { + type: "integer", + description: + "The patch version of the list. Must be incremented for any changes to the list.", + minimum: 0, + examples: [0, 1] + } + }, + required: ["major", "minor", "patch"] +}; +const schema14 = { + type: "string", + description: "The unique identifier of a tag", + minLength: 1, + maxLength: 10, + pattern: "^[\\w]+$", + examples: ["compound", "stablecoin"] +}; +const schema26 = { + type: "object", + description: + "Definition of a tag that can be associated with a token via its identifier", + additionalProperties: false, + properties: { + name: { + type: "string", + description: "The name of the tag", + pattern: "^[ \\w]+$", + minLength: 1, + maxLength: 20 + }, + description: { + type: "string", + description: "A user-friendly description of the tag", + pattern: "^[ \\w\\.,:]+$", + minLength: 1, + maxLength: 200 + } + }, + required: ["name", "description"], + examples: [ + { + name: "Stablecoin", + description: "A token with value pegged to another asset" + } + ] +}; +const func2 = require("ajv/dist/runtime/ucs2length").default; +const pattern0 = new RegExp("^[\\w ]+$", "u"); +const pattern4 = new RegExp("^[\\w]+$", "u"); +const pattern10 = new RegExp("^[ \\w]+$", "u"); +const pattern11 = new RegExp("^[ \\w\\.,:]+$", "u"); +const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"]; +const formats2 = require("ajv-formats/dist/formats").fullFormats.uri; +const schema13 = { + type: "object", + description: "Metadata for a single token in a token list", + additionalProperties: false, + properties: { + chainId: { + type: "integer", + description: + "The chain ID of the Ethereum network where this token is deployed", + minimum: 1, + examples: [1, 42] + }, + address: { + type: "string", + description: + "The checksummed address of the token on the specified chain ID", + pattern: "^0x[a-fA-F0-9]{40}$", + examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"] + }, + decimals: { + type: "integer", + description: "The number of decimals for the token balance", + minimum: 0, + maximum: 255, + examples: [18] + }, + name: { + type: "string", + description: "The name of the token", + minLength: 0, + maxLength: 40, + anyOf: [{ const: "" }, { pattern: "^[ \\S+]+$" }], + examples: ["USD Coin"] + }, + symbol: { + type: "string", + description: "The symbol for the token", + minLength: 0, + maxLength: 20, + anyOf: [{ const: "" }, { pattern: "^\\S+$" }], + examples: ["USDC"] + }, + logoURI: { + type: "string", + description: + "A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64", + format: "uri", + examples: ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"] + }, + tags: { + type: "array", + description: + "An array of tag identifiers associated with the token; tags are defined at the list level", + items: { $ref: "#/definitions/TagIdentifier" }, + maxItems: 10, + examples: ["stablecoin", "compound"] + }, + extensions: { $ref: "#/definitions/ExtensionMap" } + }, + required: ["chainId", "address", "decimals", "name", "symbol"] +}; +const pattern1 = new RegExp("^0x[a-fA-F0-9]{40}$", "u"); +const pattern2 = new RegExp("^[ \\S+]+$", "u"); +const pattern3 = new RegExp("^\\S+$", "u"); +const schema15 = { + type: "object", + description: + "An object containing any arbitrary or vendor-specific token metadata", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValue" }, + examples: [ + { color: "#000000", is_verified_by_me: true }, + { + "x-bridged-addresses-by-chain": { + 1: { + bridgeAddress: "0x4200000000000000000000000000000000000010", + tokenAddress: "0x4200000000000000000000000000000000000010" + } + } + } + ] +}; +const schema16 = { + type: "string", + description: "The name of a token extension property", + minLength: 1, + maxLength: 40, + pattern: "^[\\w]+$", + examples: ["color", "is_fee_on_transfer", "aliases"] +}; +const schema17 = { + anyOf: [ + { $ref: "#/definitions/ExtensionPrimitiveValue" }, + { + type: "object", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValueInner0" } + } + ] +}; +const schema18 = { + anyOf: [ + { type: "string", minLength: 1, maxLength: 42, examples: ["#00000"] }, + { type: "boolean", examples: [true] }, + { type: "number", examples: [15] }, + { type: "null" } + ] +}; +const schema20 = { + anyOf: [ + { $ref: "#/definitions/ExtensionPrimitiveValue" }, + { + type: "object", + maxProperties: 10, + propertyNames: { $ref: "#/definitions/ExtensionIdentifier" }, + additionalProperties: { $ref: "#/definitions/ExtensionValueInner1" } + } + ] +}; +const schema23 = { anyOf: [{ $ref: "#/definitions/ExtensionPrimitiveValue" }] }; +function validate15( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs3 = errors; + let valid2 = false; + const _errs4 = errors; + if (errors === _errs4) { + if (typeof data === "string") { + if (func2(data) > 42) { + const err0 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength", + keyword: "maxLength", + params: { limit: 42 }, + message: "must NOT have more than 42 characters" + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (func2(data) < 1) { + const err1 = { + instancePath, + schemaPath: + "#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters" + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } else { + const err2 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var _valid1 = _errs4 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs6 = errors; + if (typeof data !== "boolean") { + const err3 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/1/type", + keyword: "type", + params: { type: "boolean" }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var _valid1 = _errs6 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs8 = errors; + if (!(typeof data == "number" && isFinite(data))) { + const err4 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/2/type", + keyword: "type", + params: { type: "number" }, + message: "must be number" + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var _valid1 = _errs8 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs10 = errors; + if (data !== null) { + const err5 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/3/type", + keyword: "type", + params: { type: "null" }, + message: "must be null" + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var _valid1 = _errs10 === errors; + valid2 = valid2 || _valid1; + } + } + } + if (!valid2) { + const err6 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + errors = _errs3; + if (vErrors !== null) { + if (_errs3) { + vErrors.length = _errs3; + } else { + vErrors = null; + } + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const err7 = { + instancePath, + schemaPath: "#/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + validate15.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate15.errors = vErrors; + return errors === 0; +} +function validate14( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs3 = errors; + let valid2 = false; + const _errs4 = errors; + if (errors === _errs4) { + if (typeof data === "string") { + if (func2(data) > 42) { + const err0 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength", + keyword: "maxLength", + params: { limit: 42 }, + message: "must NOT have more than 42 characters" + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (func2(data) < 1) { + const err1 = { + instancePath, + schemaPath: + "#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters" + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } else { + const err2 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var _valid1 = _errs4 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs6 = errors; + if (typeof data !== "boolean") { + const err3 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/1/type", + keyword: "type", + params: { type: "boolean" }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var _valid1 = _errs6 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs8 = errors; + if (!(typeof data == "number" && isFinite(data))) { + const err4 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/2/type", + keyword: "type", + params: { type: "number" }, + message: "must be number" + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var _valid1 = _errs8 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs10 = errors; + if (data !== null) { + const err5 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/3/type", + keyword: "type", + params: { type: "null" }, + message: "must be null" + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var _valid1 = _errs10 === errors; + valid2 = valid2 || _valid1; + } + } + } + if (!valid2) { + const err6 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + errors = _errs3; + if (vErrors !== null) { + if (_errs3) { + vErrors.length = _errs3; + } else { + vErrors = null; + } + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs12 = errors; + if (errors === _errs12) { + if (data && typeof data == "object" && !Array.isArray(data)) { + if (Object.keys(data).length > 10) { + const err7 = { + instancePath, + schemaPath: "#/anyOf/1/maxProperties", + keyword: "maxProperties", + params: { limit: 10 }, + message: "must NOT have more than 10 properties" + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + for (const key0 in data) { + const _errs14 = errors; + const _errs15 = errors; + if (errors === _errs15) { + if (typeof key0 === "string") { + if (func2(key0) > 40) { + const err8 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 40 }, + message: "must NOT have more than 40 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (func2(key0) < 1) { + const err9 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } else { + if (!pattern4.test(key0)) { + const err10 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: 'must match pattern "' + "^[\\w]+$" + '"', + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } else { + const err11 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + const err12 = { + instancePath, + schemaPath: "#/anyOf/1/propertyNames", + keyword: "propertyNames", + params: { propertyName: key0 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + break; + } + } + if (valid3) { + for (const key1 in data) { + const _errs18 = errors; + if ( + !validate15(data[key1], { + instancePath: + instancePath + + "/" + + key1.replace(/~/g, "~0").replace(/\//g, "~1"), + parentData: data, + parentDataProperty: key1, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate15.errors + : vErrors.concat(validate15.errors); + errors = vErrors.length; + } + var valid5 = _errs18 === errors; + if (!valid5) { + break; + } + } + } + } + } else { + const err13 = { + instancePath, + schemaPath: "#/anyOf/1/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + var _valid0 = _errs12 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err14 = { + instancePath, + schemaPath: "#/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + validate14.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate14.errors = vErrors; + return errors === 0; +} +function validate13( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + const _errs1 = errors; + const _errs3 = errors; + let valid2 = false; + const _errs4 = errors; + if (errors === _errs4) { + if (typeof data === "string") { + if (func2(data) > 42) { + const err0 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/maxLength", + keyword: "maxLength", + params: { limit: 42 }, + message: "must NOT have more than 42 characters" + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (func2(data) < 1) { + const err1 = { + instancePath, + schemaPath: + "#/definitions/ExtensionPrimitiveValue/anyOf/0/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters" + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + } else { + const err2 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/0/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + var _valid1 = _errs4 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs6 = errors; + if (typeof data !== "boolean") { + const err3 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/1/type", + keyword: "type", + params: { type: "boolean" }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var _valid1 = _errs6 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs8 = errors; + if (!(typeof data == "number" && isFinite(data))) { + const err4 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/2/type", + keyword: "type", + params: { type: "number" }, + message: "must be number" + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + var _valid1 = _errs8 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs10 = errors; + if (data !== null) { + const err5 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf/3/type", + keyword: "type", + params: { type: "null" }, + message: "must be null" + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + var _valid1 = _errs10 === errors; + valid2 = valid2 || _valid1; + } + } + } + if (!valid2) { + const err6 = { + instancePath, + schemaPath: "#/definitions/ExtensionPrimitiveValue/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + } else { + errors = _errs3; + if (vErrors !== null) { + if (_errs3) { + vErrors.length = _errs3; + } else { + vErrors = null; + } + } + } + var _valid0 = _errs1 === errors; + valid0 = valid0 || _valid0; + if (!valid0) { + const _errs12 = errors; + if (errors === _errs12) { + if (data && typeof data == "object" && !Array.isArray(data)) { + if (Object.keys(data).length > 10) { + const err7 = { + instancePath, + schemaPath: "#/anyOf/1/maxProperties", + keyword: "maxProperties", + params: { limit: 10 }, + message: "must NOT have more than 10 properties" + }; + if (vErrors === null) { + vErrors = [err7]; + } else { + vErrors.push(err7); + } + errors++; + } else { + for (const key0 in data) { + const _errs14 = errors; + const _errs15 = errors; + if (errors === _errs15) { + if (typeof key0 === "string") { + if (func2(key0) > 40) { + const err8 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 40 }, + message: "must NOT have more than 40 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err8]; + } else { + vErrors.push(err8); + } + errors++; + } else { + if (func2(key0) < 1) { + const err9 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err9]; + } else { + vErrors.push(err9); + } + errors++; + } else { + if (!pattern4.test(key0)) { + const err10 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: 'must match pattern "' + "^[\\w]+$" + '"', + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err10]; + } else { + vErrors.push(err10); + } + errors++; + } + } + } + } else { + const err11 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err11]; + } else { + vErrors.push(err11); + } + errors++; + } + } + var valid3 = _errs14 === errors; + if (!valid3) { + const err12 = { + instancePath, + schemaPath: "#/anyOf/1/propertyNames", + keyword: "propertyNames", + params: { propertyName: key0 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err12]; + } else { + vErrors.push(err12); + } + errors++; + break; + } + } + if (valid3) { + for (const key1 in data) { + const _errs18 = errors; + if ( + !validate14(data[key1], { + instancePath: + instancePath + + "/" + + key1.replace(/~/g, "~0").replace(/\//g, "~1"), + parentData: data, + parentDataProperty: key1, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate14.errors + : vErrors.concat(validate14.errors); + errors = vErrors.length; + } + var valid5 = _errs18 === errors; + if (!valid5) { + break; + } + } + } + } + } else { + const err13 = { + instancePath, + schemaPath: "#/anyOf/1/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err13]; + } else { + vErrors.push(err13); + } + errors++; + } + } + var _valid0 = _errs12 === errors; + valid0 = valid0 || _valid0; + } + if (!valid0) { + const err14 = { + instancePath, + schemaPath: "#/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err14]; + } else { + vErrors.push(err14); + } + errors++; + validate13.errors = vErrors; + return false; + } else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } else { + vErrors = null; + } + } + } + validate13.errors = vErrors; + return errors === 0; +} +function validate12( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == "object" && !Array.isArray(data)) { + if (Object.keys(data).length > 10) { + validate12.errors = [ + { + instancePath, + schemaPath: "#/maxProperties", + keyword: "maxProperties", + params: { limit: 10 }, + message: "must NOT have more than 10 properties" + } + ]; + return false; + } else { + for (const key0 in data) { + const _errs1 = errors; + const _errs2 = errors; + if (errors === _errs2) { + if (typeof key0 === "string") { + if (func2(key0) > 40) { + const err0 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 40 }, + message: "must NOT have more than 40 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } else { + if (func2(key0) < 1) { + const err1 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } else { + if (!pattern4.test(key0)) { + const err2 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: 'must match pattern "' + "^[\\w]+$" + '"', + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } + } + } + } else { + const err3 = { + instancePath, + schemaPath: "#/definitions/ExtensionIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key0 + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + } + var valid0 = _errs1 === errors; + if (!valid0) { + const err4 = { + instancePath, + schemaPath: "#/propertyNames", + keyword: "propertyNames", + params: { propertyName: key0 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + validate12.errors = vErrors; + return false; + break; + } + } + if (valid0) { + for (const key1 in data) { + const _errs5 = errors; + if ( + !validate13(data[key1], { + instancePath: + instancePath + + "/" + + key1.replace(/~/g, "~0").replace(/\//g, "~1"), + parentData: data, + parentDataProperty: key1, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate13.errors + : vErrors.concat(validate13.errors); + errors = vErrors.length; + } + var valid2 = _errs5 === errors; + if (!valid2) { + break; + } + } + } + } + } else { + validate12.errors = [ + { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + validate12.errors = vErrors; + return errors === 0; +} +function validate11( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + let vErrors = null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == "object" && !Array.isArray(data)) { + let missing0; + if ( + (data.chainId === undefined && (missing0 = "chainId")) || + (data.address === undefined && (missing0 = "address")) || + (data.decimals === undefined && (missing0 = "decimals")) || + (data.name === undefined && (missing0 = "name")) || + (data.symbol === undefined && (missing0 = "symbol")) + ) { + validate11.errors = [ + { + instancePath, + schemaPath: "#/required", + keyword: "required", + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'" + } + ]; + return false; + } else { + const _errs1 = errors; + for (const key0 in data) { + if ( + !( + key0 === "chainId" || + key0 === "address" || + key0 === "decimals" || + key0 === "name" || + key0 === "symbol" || + key0 === "logoURI" || + key0 === "tags" || + key0 === "extensions" + ) + ) { + validate11.errors = [ + { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { additionalProperty: key0 }, + message: "must NOT have additional properties" + } + ]; + return false; + break; + } + } + if (_errs1 === errors) { + if (data.chainId !== undefined) { + let data0 = data.chainId; + const _errs2 = errors; + if ( + !( + typeof data0 == "number" && + !(data0 % 1) && + !isNaN(data0) && + isFinite(data0) + ) + ) { + validate11.errors = [ + { + instancePath: instancePath + "/chainId", + schemaPath: "#/properties/chainId/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs2) { + if (typeof data0 == "number" && isFinite(data0)) { + if (data0 < 1 || isNaN(data0)) { + validate11.errors = [ + { + instancePath: instancePath + "/chainId", + schemaPath: "#/properties/chainId/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 1 }, + message: "must be >= 1" + } + ]; + return false; + } + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.address !== undefined) { + let data1 = data.address; + const _errs4 = errors; + if (errors === _errs4) { + if (typeof data1 === "string") { + if (!pattern1.test(data1)) { + validate11.errors = [ + { + instancePath: instancePath + "/address", + schemaPath: "#/properties/address/pattern", + keyword: "pattern", + params: { pattern: "^0x[a-fA-F0-9]{40}$" }, + message: + 'must match pattern "' + "^0x[a-fA-F0-9]{40}$" + '"' + } + ]; + return false; + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/address", + schemaPath: "#/properties/address/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.decimals !== undefined) { + let data2 = data.decimals; + const _errs6 = errors; + if ( + !( + typeof data2 == "number" && + !(data2 % 1) && + !isNaN(data2) && + isFinite(data2) + ) + ) { + validate11.errors = [ + { + instancePath: instancePath + "/decimals", + schemaPath: "#/properties/decimals/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs6) { + if (typeof data2 == "number" && isFinite(data2)) { + if (data2 > 255 || isNaN(data2)) { + validate11.errors = [ + { + instancePath: instancePath + "/decimals", + schemaPath: "#/properties/decimals/maximum", + keyword: "maximum", + params: { comparison: "<=", limit: 255 }, + message: "must be <= 255" + } + ]; + return false; + } else { + if (data2 < 0 || isNaN(data2)) { + validate11.errors = [ + { + instancePath: instancePath + "/decimals", + schemaPath: "#/properties/decimals/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 0 }, + message: "must be >= 0" + } + ]; + return false; + } + } + } + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.name !== undefined) { + let data3 = data.name; + const _errs8 = errors; + const _errs10 = errors; + let valid1 = false; + const _errs11 = errors; + if ("" !== data3) { + const err0 = { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/anyOf/0/const", + keyword: "const", + params: { allowedValue: "" }, + message: "must be equal to constant" + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var _valid0 = _errs11 === errors; + valid1 = valid1 || _valid0; + if (!valid1) { + const _errs12 = errors; + if (typeof data3 === "string") { + if (!pattern2.test(data3)) { + const err1 = { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/anyOf/1/pattern", + keyword: "pattern", + params: { pattern: "^[ \\S+]+$" }, + message: 'must match pattern "' + "^[ \\S+]+$" + '"' + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + } + } + var _valid0 = _errs12 === errors; + valid1 = valid1 || _valid0; + } + if (!valid1) { + const err2 = { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + validate11.errors = vErrors; + return false; + } else { + errors = _errs10; + if (vErrors !== null) { + if (_errs10) { + vErrors.length = _errs10; + } else { + vErrors = null; + } + } + } + if (errors === _errs8) { + if (typeof data3 === "string") { + if (func2(data3) > 40) { + validate11.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/maxLength", + keyword: "maxLength", + params: { limit: 40 }, + message: "must NOT have more than 40 characters" + } + ]; + return false; + } else { + if (func2(data3) < 0) { + validate11.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/minLength", + keyword: "minLength", + params: { limit: 0 }, + message: "must NOT have fewer than 0 characters" + } + ]; + return false; + } + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid0 = _errs8 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.symbol !== undefined) { + let data4 = data.symbol; + const _errs13 = errors; + const _errs15 = errors; + let valid2 = false; + const _errs16 = errors; + if ("" !== data4) { + const err3 = { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/anyOf/0/const", + keyword: "const", + params: { allowedValue: "" }, + message: "must be equal to constant" + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } + var _valid1 = _errs16 === errors; + valid2 = valid2 || _valid1; + if (!valid2) { + const _errs17 = errors; + if (typeof data4 === "string") { + if (!pattern3.test(data4)) { + const err4 = { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/anyOf/1/pattern", + keyword: "pattern", + params: { pattern: "^\\S+$" }, + message: 'must match pattern "' + "^\\S+$" + '"' + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + var _valid1 = _errs17 === errors; + valid2 = valid2 || _valid1; + } + if (!valid2) { + const err5 = { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/anyOf", + keyword: "anyOf", + params: {}, + message: "must match a schema in anyOf" + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + validate11.errors = vErrors; + return false; + } else { + errors = _errs15; + if (vErrors !== null) { + if (_errs15) { + vErrors.length = _errs15; + } else { + vErrors = null; + } + } + } + if (errors === _errs13) { + if (typeof data4 === "string") { + if (func2(data4) > 20) { + validate11.errors = [ + { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/maxLength", + keyword: "maxLength", + params: { limit: 20 }, + message: "must NOT have more than 20 characters" + } + ]; + return false; + } else { + if (func2(data4) < 0) { + validate11.errors = [ + { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/minLength", + keyword: "minLength", + params: { limit: 0 }, + message: "must NOT have fewer than 0 characters" + } + ]; + return false; + } + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/symbol", + schemaPath: "#/properties/symbol/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid0 = _errs13 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.logoURI !== undefined) { + let data5 = data.logoURI; + const _errs18 = errors; + if (errors === _errs18) { + if (errors === _errs18) { + if (typeof data5 === "string") { + if (!formats2(data5)) { + validate11.errors = [ + { + instancePath: instancePath + "/logoURI", + schemaPath: "#/properties/logoURI/format", + keyword: "format", + params: { format: "uri" }, + message: 'must match format "' + "uri" + '"' + } + ]; + return false; + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/logoURI", + schemaPath: "#/properties/logoURI/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + } + var valid0 = _errs18 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.tags !== undefined) { + let data6 = data.tags; + const _errs20 = errors; + if (errors === _errs20) { + if (Array.isArray(data6)) { + if (data6.length > 10) { + validate11.errors = [ + { + instancePath: instancePath + "/tags", + schemaPath: "#/properties/tags/maxItems", + keyword: "maxItems", + params: { limit: 10 }, + message: "must NOT have more than 10 items" + } + ]; + return false; + } else { + var valid3 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + let data7 = data6[i0]; + const _errs22 = errors; + const _errs23 = errors; + if (errors === _errs23) { + if (typeof data7 === "string") { + if (func2(data7) > 10) { + validate11.errors = [ + { + instancePath: + instancePath + "/tags/" + i0, + schemaPath: + "#/definitions/TagIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 10 }, + message: + "must NOT have more than 10 characters" + } + ]; + return false; + } else { + if (func2(data7) < 1) { + validate11.errors = [ + { + instancePath: + instancePath + "/tags/" + i0, + schemaPath: + "#/definitions/TagIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if (!pattern4.test(data7)) { + validate11.errors = [ + { + instancePath: + instancePath + "/tags/" + i0, + schemaPath: + "#/definitions/TagIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: + 'must match pattern "' + + "^[\\w]+$" + + '"' + } + ]; + return false; + } + } + } + } else { + validate11.errors = [ + { + instancePath: + instancePath + "/tags/" + i0, + schemaPath: + "#/definitions/TagIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid3 = _errs22 === errors; + if (!valid3) { + break; + } + } + } + } else { + validate11.errors = [ + { + instancePath: instancePath + "/tags", + schemaPath: "#/properties/tags/type", + keyword: "type", + params: { type: "array" }, + message: "must be array" + } + ]; + return false; + } + } + var valid0 = _errs20 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.extensions !== undefined) { + const _errs25 = errors; + if ( + !validate12(data.extensions, { + instancePath: instancePath + "/extensions", + parentData: data, + parentDataProperty: "extensions", + rootData + }) + ) { + vErrors = + vErrors === null + ? validate12.errors + : vErrors.concat(validate12.errors); + errors = vErrors.length; + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } + } else { + validate11.errors = [ + { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + validate11.errors = vErrors; + return errors === 0; +} +function validate10( + data, + { instancePath = "", parentData, parentDataProperty, rootData = data } = {} +) { + /*# sourceURL="https://uniswap.org/tokenlist.schema.json" */ let vErrors = + null; + let errors = 0; + if (errors === 0) { + if (data && typeof data == "object" && !Array.isArray(data)) { + let missing0; + if (data.tokens === undefined && (missing0 = "tokens")) { + validate10.errors = [ + { + instancePath, + schemaPath: "#/required", + keyword: "required", + params: { missingProperty: missing0 }, + message: "must have required property '" + missing0 + "'" + } + ]; + return false; + } else { + const _errs1 = errors; + for (const key0 in data) { + if ( + !( + key0 === "name" || + key0 === "timestamp" || + key0 === "version" || + key0 === "tokens" || + key0 === "tokenMap" || + key0 === "keywords" || + key0 === "tags" || + key0 === "logoURI" + ) + ) { + validate10.errors = [ + { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { additionalProperty: key0 }, + message: "must NOT have additional properties" + } + ]; + return false; + break; + } + } + if (_errs1 === errors) { + if (data.name !== undefined) { + let data0 = data.name; + const _errs2 = errors; + if (errors === _errs2) { + if (typeof data0 === "string") { + if (func2(data0) > 30) { + validate10.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/maxLength", + keyword: "maxLength", + params: { limit: 30 }, + message: "must NOT have more than 30 characters" + } + ]; + return false; + } else { + if (func2(data0) < 1) { + validate10.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if (!pattern0.test(data0)) { + validate10.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/pattern", + keyword: "pattern", + params: { pattern: "^[\\w ]+$" }, + message: 'must match pattern "' + "^[\\w ]+$" + '"' + } + ]; + return false; + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/name", + schemaPath: "#/properties/name/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid0 = _errs2 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.timestamp !== undefined) { + let data1 = data.timestamp; + const _errs4 = errors; + if (errors === _errs4) { + if (errors === _errs4) { + if (typeof data1 === "string") { + if (!formats0.validate(data1)) { + validate10.errors = [ + { + instancePath: instancePath + "/timestamp", + schemaPath: "#/properties/timestamp/format", + keyword: "format", + params: { format: "date-time" }, + message: 'must match format "' + "date-time" + '"' + } + ]; + return false; + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/timestamp", + schemaPath: "#/properties/timestamp/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + } + var valid0 = _errs4 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.version !== undefined) { + let data2 = data.version; + const _errs6 = errors; + const _errs7 = errors; + if (errors === _errs7) { + if ( + data2 && + typeof data2 == "object" && + !Array.isArray(data2) + ) { + let missing1; + if ( + (data2.major === undefined && (missing1 = "major")) || + (data2.minor === undefined && (missing1 = "minor")) || + (data2.patch === undefined && (missing1 = "patch")) + ) { + validate10.errors = [ + { + instancePath: instancePath + "/version", + schemaPath: "#/definitions/Version/required", + keyword: "required", + params: { missingProperty: missing1 }, + message: + "must have required property '" + missing1 + "'" + } + ]; + return false; + } else { + const _errs9 = errors; + for (const key1 in data2) { + if ( + !( + key1 === "major" || + key1 === "minor" || + key1 === "patch" + ) + ) { + validate10.errors = [ + { + instancePath: instancePath + "/version", + schemaPath: + "#/definitions/Version/additionalProperties", + keyword: "additionalProperties", + params: { additionalProperty: key1 }, + message: "must NOT have additional properties" + } + ]; + return false; + break; + } + } + if (_errs9 === errors) { + if (data2.major !== undefined) { + let data3 = data2.major; + const _errs10 = errors; + if ( + !( + typeof data3 == "number" && + !(data3 % 1) && + !isNaN(data3) && + isFinite(data3) + ) + ) { + validate10.errors = [ + { + instancePath: instancePath + "/version/major", + schemaPath: + "#/definitions/Version/properties/major/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs10) { + if (typeof data3 == "number" && isFinite(data3)) { + if (data3 < 0 || isNaN(data3)) { + validate10.errors = [ + { + instancePath: + instancePath + "/version/major", + schemaPath: + "#/definitions/Version/properties/major/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 0 }, + message: "must be >= 0" + } + ]; + return false; + } + } + } + var valid2 = _errs10 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.minor !== undefined) { + let data4 = data2.minor; + const _errs12 = errors; + if ( + !( + typeof data4 == "number" && + !(data4 % 1) && + !isNaN(data4) && + isFinite(data4) + ) + ) { + validate10.errors = [ + { + instancePath: instancePath + "/version/minor", + schemaPath: + "#/definitions/Version/properties/minor/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs12) { + if (typeof data4 == "number" && isFinite(data4)) { + if (data4 < 0 || isNaN(data4)) { + validate10.errors = [ + { + instancePath: + instancePath + "/version/minor", + schemaPath: + "#/definitions/Version/properties/minor/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 0 }, + message: "must be >= 0" + } + ]; + return false; + } + } + } + var valid2 = _errs12 === errors; + } else { + var valid2 = true; + } + if (valid2) { + if (data2.patch !== undefined) { + let data5 = data2.patch; + const _errs14 = errors; + if ( + !( + typeof data5 == "number" && + !(data5 % 1) && + !isNaN(data5) && + isFinite(data5) + ) + ) { + validate10.errors = [ + { + instancePath: + instancePath + "/version/patch", + schemaPath: + "#/definitions/Version/properties/patch/type", + keyword: "type", + params: { type: "integer" }, + message: "must be integer" + } + ]; + return false; + } + if (errors === _errs14) { + if ( + typeof data5 == "number" && + isFinite(data5) + ) { + if (data5 < 0 || isNaN(data5)) { + validate10.errors = [ + { + instancePath: + instancePath + "/version/patch", + schemaPath: + "#/definitions/Version/properties/patch/minimum", + keyword: "minimum", + params: { comparison: ">=", limit: 0 }, + message: "must be >= 0" + } + ]; + return false; + } + } + } + var valid2 = _errs14 === errors; + } else { + var valid2 = true; + } + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/version", + schemaPath: "#/definitions/Version/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + var valid0 = _errs6 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.tokens !== undefined) { + let data6 = data.tokens; + const _errs16 = errors; + if (errors === _errs16) { + if (Array.isArray(data6)) { + if (data6.length > 10000) { + validate10.errors = [ + { + instancePath: instancePath + "/tokens", + schemaPath: "#/properties/tokens/maxItems", + keyword: "maxItems", + params: { limit: 10000 }, + message: "must NOT have more than 10000 items" + } + ]; + return false; + } else { + if (data6.length < 1) { + validate10.errors = [ + { + instancePath: instancePath + "/tokens", + schemaPath: "#/properties/tokens/minItems", + keyword: "minItems", + params: { limit: 1 }, + message: "must NOT have fewer than 1 items" + } + ]; + return false; + } else { + var valid3 = true; + const len0 = data6.length; + for (let i0 = 0; i0 < len0; i0++) { + const _errs18 = errors; + if ( + !validate11(data6[i0], { + instancePath: instancePath + "/tokens/" + i0, + parentData: data6, + parentDataProperty: i0, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate11.errors + : vErrors.concat(validate11.errors); + errors = vErrors.length; + } + var valid3 = _errs18 === errors; + if (!valid3) { + break; + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/tokens", + schemaPath: "#/properties/tokens/type", + keyword: "type", + params: { type: "array" }, + message: "must be array" + } + ]; + return false; + } + } + var valid0 = _errs16 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.tokenMap !== undefined) { + let data8 = data.tokenMap; + const _errs19 = errors; + if (errors === _errs19) { + if ( + data8 && + typeof data8 == "object" && + !Array.isArray(data8) + ) { + if (Object.keys(data8).length > 10000) { + validate10.errors = [ + { + instancePath: instancePath + "/tokenMap", + schemaPath: "#/properties/tokenMap/maxProperties", + keyword: "maxProperties", + params: { limit: 10000 }, + message: + "must NOT have more than 10000 properties" + } + ]; + return false; + } else { + if (Object.keys(data8).length < 1) { + validate10.errors = [ + { + instancePath: instancePath + "/tokenMap", + schemaPath: + "#/properties/tokenMap/minProperties", + keyword: "minProperties", + params: { limit: 1 }, + message: "must NOT have fewer than 1 properties" + } + ]; + return false; + } else { + for (const key2 in data8) { + const _errs21 = errors; + if (typeof key2 !== "string") { + const err0 = { + instancePath: instancePath + "/tokenMap", + schemaPath: + "#/properties/tokenMap/propertyNames/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key2 + }; + if (vErrors === null) { + vErrors = [err0]; + } else { + vErrors.push(err0); + } + errors++; + } + var valid4 = _errs21 === errors; + if (!valid4) { + const err1 = { + instancePath: instancePath + "/tokenMap", + schemaPath: + "#/properties/tokenMap/propertyNames", + keyword: "propertyNames", + params: { propertyName: key2 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err1]; + } else { + vErrors.push(err1); + } + errors++; + validate10.errors = vErrors; + return false; + break; + } + } + if (valid4) { + for (const key3 in data8) { + const _errs24 = errors; + if ( + !validate11(data8[key3], { + instancePath: + instancePath + + "/tokenMap/" + + key3 + .replace(/~/g, "~0") + .replace(/\//g, "~1"), + parentData: data8, + parentDataProperty: key3, + rootData + }) + ) { + vErrors = + vErrors === null + ? validate11.errors + : vErrors.concat(validate11.errors); + errors = vErrors.length; + } + var valid5 = _errs24 === errors; + if (!valid5) { + break; + } + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/tokenMap", + schemaPath: "#/properties/tokenMap/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + var valid0 = _errs19 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.keywords !== undefined) { + let data10 = data.keywords; + const _errs25 = errors; + if (errors === _errs25) { + if (Array.isArray(data10)) { + if (data10.length > 20) { + validate10.errors = [ + { + instancePath: instancePath + "/keywords", + schemaPath: "#/properties/keywords/maxItems", + keyword: "maxItems", + params: { limit: 20 }, + message: "must NOT have more than 20 items" + } + ]; + return false; + } else { + var valid6 = true; + const len1 = data10.length; + for (let i1 = 0; i1 < len1; i1++) { + let data11 = data10[i1]; + const _errs27 = errors; + if (errors === _errs27) { + if (typeof data11 === "string") { + if (func2(data11) > 20) { + validate10.errors = [ + { + instancePath: + instancePath + "/keywords/" + i1, + schemaPath: + "#/properties/keywords/items/maxLength", + keyword: "maxLength", + params: { limit: 20 }, + message: + "must NOT have more than 20 characters" + } + ]; + return false; + } else { + if (func2(data11) < 1) { + validate10.errors = [ + { + instancePath: + instancePath + "/keywords/" + i1, + schemaPath: + "#/properties/keywords/items/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if (!pattern0.test(data11)) { + validate10.errors = [ + { + instancePath: + instancePath + "/keywords/" + i1, + schemaPath: + "#/properties/keywords/items/pattern", + keyword: "pattern", + params: { pattern: "^[\\w ]+$" }, + message: + 'must match pattern "' + + "^[\\w ]+$" + + '"' + } + ]; + return false; + } + } + } + } else { + validate10.errors = [ + { + instancePath: + instancePath + "/keywords/" + i1, + schemaPath: + "#/properties/keywords/items/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid6 = _errs27 === errors; + if (!valid6) { + break; + } + } + if (valid6) { + let i2 = data10.length; + let j0; + if (i2 > 1) { + const indices0 = {}; + for (; i2--; ) { + let item0 = data10[i2]; + if (typeof item0 !== "string") { + continue; + } + if (typeof indices0[item0] == "number") { + j0 = indices0[item0]; + validate10.errors = [ + { + instancePath: + instancePath + "/keywords", + schemaPath: + "#/properties/keywords/uniqueItems", + keyword: "uniqueItems", + params: { i: i2, j: j0 }, + message: + "must NOT have duplicate items (items ## " + + j0 + + " and " + + i2 + + " are identical)" + } + ]; + return false; + break; + } + indices0[item0] = i2; + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/keywords", + schemaPath: "#/properties/keywords/type", + keyword: "type", + params: { type: "array" }, + message: "must be array" + } + ]; + return false; + } + } + var valid0 = _errs25 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.tags !== undefined) { + let data12 = data.tags; + const _errs29 = errors; + if (errors === _errs29) { + if ( + data12 && + typeof data12 == "object" && + !Array.isArray(data12) + ) { + if (Object.keys(data12).length > 20) { + validate10.errors = [ + { + instancePath: instancePath + "/tags", + schemaPath: "#/properties/tags/maxProperties", + keyword: "maxProperties", + params: { limit: 20 }, + message: + "must NOT have more than 20 properties" + } + ]; + return false; + } else { + for (const key4 in data12) { + const _errs31 = errors; + const _errs32 = errors; + if (errors === _errs32) { + if (typeof key4 === "string") { + if (func2(key4) > 10) { + const err2 = { + instancePath: instancePath + "/tags", + schemaPath: + "#/definitions/TagIdentifier/maxLength", + keyword: "maxLength", + params: { limit: 10 }, + message: + "must NOT have more than 10 characters", + propertyName: key4 + }; + if (vErrors === null) { + vErrors = [err2]; + } else { + vErrors.push(err2); + } + errors++; + } else { + if (func2(key4) < 1) { + const err3 = { + instancePath: instancePath + "/tags", + schemaPath: + "#/definitions/TagIdentifier/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters", + propertyName: key4 + }; + if (vErrors === null) { + vErrors = [err3]; + } else { + vErrors.push(err3); + } + errors++; + } else { + if (!pattern4.test(key4)) { + const err4 = { + instancePath: + instancePath + "/tags", + schemaPath: + "#/definitions/TagIdentifier/pattern", + keyword: "pattern", + params: { pattern: "^[\\w]+$" }, + message: + 'must match pattern "' + + "^[\\w]+$" + + '"', + propertyName: key4 + }; + if (vErrors === null) { + vErrors = [err4]; + } else { + vErrors.push(err4); + } + errors++; + } + } + } + } else { + const err5 = { + instancePath: instancePath + "/tags", + schemaPath: + "#/definitions/TagIdentifier/type", + keyword: "type", + params: { type: "string" }, + message: "must be string", + propertyName: key4 + }; + if (vErrors === null) { + vErrors = [err5]; + } else { + vErrors.push(err5); + } + errors++; + } + } + var valid8 = _errs31 === errors; + if (!valid8) { + const err6 = { + instancePath: instancePath + "/tags", + schemaPath: + "#/properties/tags/propertyNames", + keyword: "propertyNames", + params: { propertyName: key4 }, + message: "property name must be valid" + }; + if (vErrors === null) { + vErrors = [err6]; + } else { + vErrors.push(err6); + } + errors++; + validate10.errors = vErrors; + return false; + break; + } + } + if (valid8) { + for (const key5 in data12) { + let data13 = data12[key5]; + const _errs35 = errors; + const _errs36 = errors; + if (errors === _errs36) { + if ( + data13 && + typeof data13 == "object" && + !Array.isArray(data13) + ) { + let missing2; + if ( + (data13.name === undefined && + (missing2 = "name")) || + (data13.description === undefined && + (missing2 = "description")) + ) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace(/\//g, "~1"), + schemaPath: + "#/definitions/TagDefinition/required", + keyword: "required", + params: { + missingProperty: missing2 + }, + message: + "must have required property '" + + missing2 + + "'" + } + ]; + return false; + } else { + const _errs38 = errors; + for (const key6 in data13) { + if ( + !( + key6 === "name" || + key6 === "description" + ) + ) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace(/\//g, "~1"), + schemaPath: + "#/definitions/TagDefinition/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key6 + }, + message: + "must NOT have additional properties" + } + ]; + return false; + break; + } + } + if (_errs38 === errors) { + if (data13.name !== undefined) { + let data14 = data13.name; + const _errs39 = errors; + if (errors === _errs39) { + if (typeof data14 === "string") { + if (func2(data14) > 20) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace( + /\//g, + "~1" + ) + + "/name", + schemaPath: + "#/definitions/TagDefinition/properties/name/maxLength", + keyword: "maxLength", + params: { limit: 20 }, + message: + "must NOT have more than 20 characters" + } + ]; + return false; + } else { + if (func2(data14) < 1) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace( + /\//g, + "~1" + ) + + "/name", + schemaPath: + "#/definitions/TagDefinition/properties/name/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if ( + !pattern10.test(data14) + ) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace( + /~/g, + "~0" + ) + .replace( + /\//g, + "~1" + ) + + "/name", + schemaPath: + "#/definitions/TagDefinition/properties/name/pattern", + keyword: "pattern", + params: { + pattern: "^[ \\w]+$" + }, + message: + 'must match pattern "' + + "^[ \\w]+$" + + '"' + } + ]; + return false; + } + } + } + } else { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace(/\//g, "~1") + + "/name", + schemaPath: + "#/definitions/TagDefinition/properties/name/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + var valid12 = _errs39 === errors; + } else { + var valid12 = true; + } + if (valid12) { + if ( + data13.description !== undefined + ) { + let data15 = data13.description; + const _errs41 = errors; + if (errors === _errs41) { + if ( + typeof data15 === "string" + ) { + if (func2(data15) > 200) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace( + /\//g, + "~1" + ) + + "/description", + schemaPath: + "#/definitions/TagDefinition/properties/description/maxLength", + keyword: "maxLength", + params: { limit: 200 }, + message: + "must NOT have more than 200 characters" + } + ]; + return false; + } else { + if (func2(data15) < 1) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace( + /~/g, + "~0" + ) + .replace( + /\//g, + "~1" + ) + + "/description", + schemaPath: + "#/definitions/TagDefinition/properties/description/minLength", + keyword: "minLength", + params: { limit: 1 }, + message: + "must NOT have fewer than 1 characters" + } + ]; + return false; + } else { + if ( + !pattern11.test(data15) + ) { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace( + /~/g, + "~0" + ) + .replace( + /\//g, + "~1" + ) + + "/description", + schemaPath: + "#/definitions/TagDefinition/properties/description/pattern", + keyword: "pattern", + params: { + pattern: + "^[ \\w\\.,:]+$" + }, + message: + 'must match pattern "' + + "^[ \\w\\.,:]+$" + + '"' + } + ]; + return false; + } + } + } + } else { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace( + /\//g, + "~1" + ) + + "/description", + schemaPath: + "#/definitions/TagDefinition/properties/description/type", + keyword: "type", + params: { + type: "string" + }, + message: "must be string" + } + ]; + return false; + } + } + var valid12 = _errs41 === errors; + } else { + var valid12 = true; + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: + instancePath + + "/tags/" + + key5 + .replace(/~/g, "~0") + .replace(/\//g, "~1"), + schemaPath: + "#/definitions/TagDefinition/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + var valid10 = _errs35 === errors; + if (!valid10) { + break; + } + } + } + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/tags", + schemaPath: "#/properties/tags/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + var valid0 = _errs29 === errors; + } else { + var valid0 = true; + } + if (valid0) { + if (data.logoURI !== undefined) { + let data16 = data.logoURI; + const _errs43 = errors; + if (errors === _errs43) { + if (errors === _errs43) { + if (typeof data16 === "string") { + if (!formats2(data16)) { + validate10.errors = [ + { + instancePath: instancePath + "/logoURI", + schemaPath: "#/properties/logoURI/format", + keyword: "format", + params: { format: "uri" }, + message: + 'must match format "' + "uri" + '"' + } + ]; + return false; + } + } else { + validate10.errors = [ + { + instancePath: instancePath + "/logoURI", + schemaPath: "#/properties/logoURI/type", + keyword: "type", + params: { type: "string" }, + message: "must be string" + } + ]; + return false; + } + } + } + var valid0 = _errs43 === errors; + } else { + var valid0 = true; + } + } + } + } + } + } + } + } + } + } + } else { + validate10.errors = [ + { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { type: "object" }, + message: "must be object" + } + ]; + return false; + } + } + validate10.errors = vErrors; + return errors === 0; +} diff --git a/packages/react-kit/src/lib/uniswap/contenthashToUri.ts b/packages/react-kit/src/lib/uniswap/contenthashToUri.ts index 03628ea01..76eb4e533 100644 --- a/packages/react-kit/src/lib/uniswap/contenthashToUri.ts +++ b/packages/react-kit/src/lib/uniswap/contenthashToUri.ts @@ -17,7 +17,7 @@ const UTF_8_DECODER = new TextDecoder("utf-8"); /** * Returns the URI representation of the content hash for supported codecs - * @param contenthash to decode + * @param contenthash - to decode */ export default function contenthashToUri(contenthash: string): string { const data = hexToUint8Array(contenthash); diff --git a/packages/react-kit/src/lib/uniswap/formatNumbers.ts b/packages/react-kit/src/lib/uniswap/formatNumbers.ts index 235eafffd..4fe03e4b9 100644 --- a/packages/react-kit/src/lib/uniswap/formatNumbers.ts +++ b/packages/react-kit/src/lib/uniswap/formatNumbers.ts @@ -385,8 +385,8 @@ export const priceToPreciseFloat = ( * For transaction review numbers, such as token quantities, NFT price (token-denominated), * network fees, transaction history items. Adheres to guidelines defined here: * https://www.notion.so/uniswaplabs/Number-standards-fbb9f533f10e4e22820722c2f66d23c0 - * @param num numerical value denominated in any token - * @param maxDigits the maximum number of digits that should be shown for the quantity + * @param num - numerical value denominated in any token + * @param maxDigits - the maximum number of digits that should be shown for the quantity */ export const formatTransactionAmount = ( num: number | undefined | null, diff --git a/packages/react-kit/src/lib/uniswap/resolveENSContentHash.ts b/packages/react-kit/src/lib/uniswap/resolveENSContentHash.ts index 326c4cb21..414029503 100644 --- a/packages/react-kit/src/lib/uniswap/resolveENSContentHash.ts +++ b/packages/react-kit/src/lib/uniswap/resolveENSContentHash.ts @@ -59,8 +59,8 @@ function resolverContract( /** * Fetches and decodes the result of an ENS contenthash lookup on mainnet to a URI - * @param ensName to resolve - * @param provider provider to use to fetch the data + * @param ensName - to resolve + * @param provider - provider to use to fetch the data */ export default async function resolveENSContentHash( ensName: string, diff --git a/packages/react-kit/src/lib/uniswap/validateTokenList.ts b/packages/react-kit/src/lib/uniswap/validateTokenList.ts index 0b16dbae3..573d47716 100644 --- a/packages/react-kit/src/lib/uniswap/validateTokenList.ts +++ b/packages/react-kit/src/lib/uniswap/validateTokenList.ts @@ -59,7 +59,7 @@ async function validate( /** * Validates a token list. - * @param json the TokenList to validate + * @param json - the TokenList to validate */ export async function validateTokenList(json: TokenList): Promise { try { diff --git a/packages/react-kit/src/lib/url/uriToHttp.ts b/packages/react-kit/src/lib/url/uriToHttp.ts index d0ea6da8d..beae368e1 100644 --- a/packages/react-kit/src/lib/url/uriToHttp.ts +++ b/packages/react-kit/src/lib/url/uriToHttp.ts @@ -1,6 +1,6 @@ /** * Given a URI that may be ipfs, ipns, http, https, ar, or data protocol, return the fetch-able http(s) URLs for the same content - * @param uri to convert to fetch-able http url + * @param uri - to convert to fetch-able http url */ export default function uriToHttp(uri: string): string[] { const protocol = uri.split(":")[0].toLowerCase(); diff --git a/packages/react-kit/src/stories/helpers/connect-wallet.ts b/packages/react-kit/src/stories/helpers/connect-wallet.ts index 8895c127d..0771c37a9 100644 --- a/packages/react-kit/src/stories/helpers/connect-wallet.ts +++ b/packages/react-kit/src/stories/helpers/connect-wallet.ts @@ -12,6 +12,7 @@ export const connectWallet = async (chainId?: string) => { try { const currentChainId = window.ethereum ? Number( + // eslint-disable-next-line @typescript-eslint/no-explicit-any await (window.ethereum as any)?.request({ method: "eth_chainId" }) ) : undefined;