From af296e42bd655ff6ba7a8ee45331812b5198845a Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Thu, 22 Feb 2024 14:32:35 +0000 Subject: [PATCH] feat: deactivate use of meta-transaction when the connected wallet is a contract --- package-lock.json | 458 +++++++++++++++++++---- package.json | 2 +- src/components/widgets/redeem/Redeem.tsx | 2 +- 3 files changed, 391 insertions(+), 71 deletions(-) diff --git a/package-lock.json b/package-lock.json index babb8f3..4320b62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "widgets", "version": "0.1.0", "dependencies": { - "@bosonprotocol/react-kit": "^0.26.1", + "@bosonprotocol/react-kit": "^0.27.0-alpha.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", @@ -2152,11 +2152,11 @@ } }, "node_modules/@bosonprotocol/common": { - "version": "1.25.2", - "resolved": "https://registry.npmjs.org/@bosonprotocol/common/-/common-1.25.2.tgz", - "integrity": "sha512-a4OUJivCdd/u7JLJviv6vKeXaoL0iNyLNTPAUqH/rRguFz9U0PFm9vDwvvSs2GJWffUG7yTiIVmMgkhnVwVlrg==", + "version": "1.26.0-alpha.0", + "resolved": "https://registry.npmjs.org/@bosonprotocol/common/-/common-1.26.0-alpha.0.tgz", + "integrity": "sha512-8a46jiK9FvY2gNOXp5CxyRIeHIxyRj+EengJ9KlGbF1m9BBW+HIKJ6w9pLFfs7W5EZ+2Zh5KqQGys+EsBrR8mA==", "dependencies": { - "@bosonprotocol/metadata": "^1.14.0", + "@bosonprotocol/metadata": "^1.15.0-alpha.7", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -2166,11 +2166,11 @@ } }, "node_modules/@bosonprotocol/core-sdk": { - "version": "1.36.1", - "resolved": "https://registry.npmjs.org/@bosonprotocol/core-sdk/-/core-sdk-1.36.1.tgz", - "integrity": "sha512-hwuPjdhVqcXB4x9LxVeE3/5wF4bevHXoa2j4Smw92bIwB+CBrh1YIBg9lgrAOThjxbzHx+w0xSQTST1Mc1rcpw==", + "version": "1.37.0-alpha.6", + "resolved": "https://registry.npmjs.org/@bosonprotocol/core-sdk/-/core-sdk-1.37.0-alpha.6.tgz", + "integrity": "sha512-s36FTmUE3BxV4SIP8MVVq96/TWhOA9w2BsVELWO8M+9rYQY9bbMQ1Bwhj6iiq/GKT852REX5wNSy8kJKXhuw/w==", "dependencies": { - "@bosonprotocol/common": "^1.25.2", + "@bosonprotocol/common": "^1.26.0-alpha.0", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -2199,52 +2199,56 @@ } }, "node_modules/@bosonprotocol/ethers-sdk": { - "version": "1.12.13", - "resolved": "https://registry.npmjs.org/@bosonprotocol/ethers-sdk/-/ethers-sdk-1.12.13.tgz", - "integrity": "sha512-i/dPxf/jYnax3ax9Us9f3fS+qxVSjIlncgLVwhVk1lZwOpAT4mEhKTc9AgHNbXSowJPWrBvEgC8V3W1Qfw1Q8Q==", + "version": "1.13.0-alpha.0", + "resolved": "https://registry.npmjs.org/@bosonprotocol/ethers-sdk/-/ethers-sdk-1.13.0-alpha.0.tgz", + "integrity": "sha512-RcKCtpIhLJzhukeA/QVgc71uxMtYp+IIJRGlq4JkEHV5OP79kq05eFGjKAMMg/BUiP0eW5CuW0pCh7+PulAIRA==", "dependencies": { - "@bosonprotocol/common": "^1.25.2" + "@bosonprotocol/common": "^1.26.0-alpha.0" }, "peerDependencies": { "ethers": "^5.5.0" } }, "node_modules/@bosonprotocol/ipfs-storage": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@bosonprotocol/ipfs-storage/-/ipfs-storage-1.11.0.tgz", - "integrity": "sha512-ryiXBfg80eJ+sLwuoWIwYtYZrmrhGcHWmKiEs6alp/Fmr6/vy5OnBweRO4bEnrt0NMN+SCxxswJzFXhkS+a9fA==", + "version": "1.11.1-alpha.7", + "resolved": "https://registry.npmjs.org/@bosonprotocol/ipfs-storage/-/ipfs-storage-1.11.1-alpha.7.tgz", + "integrity": "sha512-gZ6uJkR9KvXIenlhW3/dwCu4am9kPV+8hyh78OlviRGYKUKH5ZrnlisMw2yTYUrIB9mIgTWOIx8SVQEu1KR4Nw==", "dependencies": { - "@bosonprotocol/metadata": "^1.14.0", + "@bosonprotocol/metadata": "^1.15.0-alpha.7", "ipfs-http-client": "^56.0.1", "multiformats": "^9.6.4", "uint8arrays": "^3.0.0" } }, "node_modules/@bosonprotocol/metadata": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@bosonprotocol/metadata/-/metadata-1.14.0.tgz", - "integrity": "sha512-8WhDl3QRaI24QVmQLmPRgcQTbPpwYJNJ4lC33OfOYd/Kd3aC6+Dr0cnoLksPCCWTJJ4YMoxi0WPRcKW/ZJ5Ypw==", + "version": "1.15.0-alpha.7", + "resolved": "https://registry.npmjs.org/@bosonprotocol/metadata/-/metadata-1.15.0-alpha.7.tgz", + "integrity": "sha512-AlZZTp5TnRXJ9nDoDZcehkTW1XiSIc2dBsNxzCRfvrii9pfZ982FPOv4hWSwN/mpApIieuh3tEom1vYeJT6g5Q==", "dependencies": { "schema-to-yup": "^1.11.11" } }, "node_modules/@bosonprotocol/react-kit": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@bosonprotocol/react-kit/-/react-kit-0.26.1.tgz", - "integrity": "sha512-lcsQPmZRt7nsiUoAu49lbYVSjXYhr+daEuP7H0eEHBCKW75pB2RI+IJC01+6J5d1yCA9dKFbOp5eSZTaHUOdGA==", + "version": "0.27.0-alpha.0", + "resolved": "https://registry.npmjs.org/@bosonprotocol/react-kit/-/react-kit-0.27.0-alpha.0.tgz", + "integrity": "sha512-Ky5eByJE3brqaqBCJihhNGzBIJYMcQDBjul4hbHzunwtOHIm31qf+L+Xh524mJagLcJzOU/9S6t0VxTOmpOZpw==", "dependencies": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.36.1", - "@bosonprotocol/ethers-sdk": "^1.12.13", - "@bosonprotocol/ipfs-storage": "^1.11.0", + "@bosonprotocol/core-sdk": "^1.37.0-alpha.6", + "@bosonprotocol/ethers-sdk": "^1.13.0-alpha.0", + "@bosonprotocol/ipfs-storage": "^1.11.1-alpha.7", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", "@rainbow-me/rainbowkit": "^1.3.4", "@sentry/browser": "7.43.0", "@tippyjs/react": "4.2.6", + "@uniswap/redux-multicall": "^1.1.8", "@uniswap/sdk-core": "^4.0.7", + "@uniswap/token-lists": "^1.0.0-beta.33", + "ajv": "^8.12.0", "chart.js": "^4.4.1", + "cids": "^1.1.9", "dayjs": "1.11.7", "eth-revert-reason": "^1.0.3", "formik": "2.2.9", @@ -2252,6 +2256,9 @@ "lodash.merge": "4.6.2", "lodash.uniqby": "4.7.0", "magic-sdk": "^20.1.1", + "multicodec": "^3.2.1", + "multiformats": "^13.1.0", + "multihashes": "^4.0.3", "phosphor-react": "1.4.1", "polished": "^4.2.2", "react-chartjs-2": "^5.2.0", @@ -2264,6 +2271,7 @@ "react-select": "5.7.0", "react-slick": "^0.29.0", "react-table": "7.8.0", + "redux-persist": "^6.0.0", "rehype-raw": "6.1.1", "remark-gfm": "3.0.1", "slick-carousel": "^1.8.1", @@ -2434,6 +2442,73 @@ } } }, + "node_modules/@bosonprotocol/react-kit/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@bosonprotocol/react-kit/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/@bosonprotocol/react-kit/node_modules/multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "@multiformats/base-x": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/@bosonprotocol/react-kit/node_modules/multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "deprecated": "This module has been superseded by the multiformats module", + "dependencies": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "node_modules/@bosonprotocol/react-kit/node_modules/multiformats": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz", + "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ==" + }, + "node_modules/@bosonprotocol/react-kit/node_modules/multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "dependencies": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "engines": { + "node": ">=12.0.0", + "npm": ">=6.0.0" + } + }, + "node_modules/@bosonprotocol/react-kit/node_modules/multihashes/node_modules/varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + }, "node_modules/@bosonprotocol/react-kit/node_modules/react-router": { "version": "6.9.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.9.0.tgz", @@ -5217,8 +5292,7 @@ "node_modules/@multiformats/base-x": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", - "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==", - "dev": true + "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==" }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", @@ -6518,6 +6592,30 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "node_modules/@reduxjs/toolkit": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.9.7.tgz", + "integrity": "sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ==", + "peer": true, + "dependencies": { + "immer": "^9.0.21", + "redux": "^4.2.1", + "redux-thunk": "^2.4.2", + "reselect": "^4.1.8" + }, + "peerDependencies": { + "react": "^16.9.0 || ^17.0.0 || ^18", + "react-redux": "^7.2.1 || ^8.0.2" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-redux": { + "optional": true + } + } + }, "node_modules/@remix-run/router": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.7.2.tgz", @@ -7752,7 +7850,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", - "dev": true, "dependencies": { "@types/react": "*", "hoist-non-react-statics": "^3.3.0" @@ -8073,6 +8170,12 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.7.tgz", "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==" }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==", + "peer": true + }, "node_modules/@types/ws": { "version": "7.4.7", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", @@ -8292,6 +8395,22 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@uniswap/redux-multicall": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@uniswap/redux-multicall/-/redux-multicall-1.1.8.tgz", + "integrity": "sha512-LttOBVJuoRNC6N4MHsb5dF2GszLsj1ddPKKccEw1XOX17bGrFdm2A6GwKgES+v+Hj3lluDbQL6atcQtymP21iw==", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@ethersproject/abi": "5", + "@ethersproject/bignumber": "5", + "@ethersproject/contracts": "5", + "@reduxjs/toolkit": "1", + "react": ">=17", + "react-redux": ">=7" + } + }, "node_modules/@uniswap/sdk-core": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-4.0.7.tgz", @@ -8308,6 +8427,14 @@ "node": ">=10" } }, + "node_modules/@uniswap/token-lists": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/@uniswap/token-lists/-/token-lists-1.0.0-beta.33.tgz", + "integrity": "sha512-JQkXcpRI3jFG8y3/CGC4TS8NkDgcxXaOQuYW8Qdvd6DcDiIyg2vVYCG9igFEzF0G6UvxgHkBKC7cWCgzZNYvQg==", + "engines": { + "node": ">=10" + } + }, "node_modules/@vanilla-extract/css": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/@vanilla-extract/css/-/css-1.14.0.tgz", @@ -10793,7 +10920,6 @@ "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", "deprecated": "This module has been superseded by the multiformats module", - "dev": true, "dependencies": { "multibase": "^4.0.1", "multicodec": "^3.0.1", @@ -10810,7 +10936,6 @@ "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", "deprecated": "This module has been superseded by the multiformats module", - "dev": true, "dependencies": { "@multiformats/base-x": "^4.0.1" }, @@ -10824,7 +10949,6 @@ "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", "deprecated": "This module has been superseded by the multiformats module", - "dev": true, "dependencies": { "uint8arrays": "^3.0.0", "varint": "^6.0.0" @@ -10834,7 +10958,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, "dependencies": { "multibase": "^4.0.1", "uint8arrays": "^3.0.0", @@ -10848,8 +10971,7 @@ "node_modules/cids/node_modules/multihashes/node_modules/varint": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" }, "node_modules/cipher-base": { "version": "1.0.4", @@ -24831,6 +24953,45 @@ } } }, + "node_modules/react-redux": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.1.3.tgz", + "integrity": "sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + }, + "peerDependencies": { + "@types/react": "^16.8 || ^17.0 || ^18.0", + "@types/react-dom": "^16.8 || ^17.0 || ^18.0", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0", + "react-native": ">=0.59", + "redux": "^4 || ^5.0.0-beta.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, "node_modules/react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", @@ -25187,6 +25348,32 @@ "node": ">=4" } }, + "node_modules/redux": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.9.2" + } + }, + "node_modules/redux-persist": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/redux-persist/-/redux-persist-6.0.0.tgz", + "integrity": "sha512-71LLMbUq2r02ng2We9S215LtPu3fY0KgaGE0k8WRgl6RkqxtGfl7HUozz1Dftwsb0D/5mZ8dwAaPbtnzfvbEwQ==", + "peerDependencies": { + "redux": ">4.0.0" + } + }, + "node_modules/redux-thunk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.2.tgz", + "integrity": "sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q==", + "peer": true, + "peerDependencies": { + "redux": "^4" + } + }, "node_modules/reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -25512,6 +25699,12 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, + "node_modules/reselect": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", + "peer": true + }, "node_modules/reset": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/reset/-/reset-0.1.0.tgz", @@ -31759,11 +31952,11 @@ } }, "@bosonprotocol/common": { - "version": "1.25.2", - "resolved": "https://registry.npmjs.org/@bosonprotocol/common/-/common-1.25.2.tgz", - "integrity": "sha512-a4OUJivCdd/u7JLJviv6vKeXaoL0iNyLNTPAUqH/rRguFz9U0PFm9vDwvvSs2GJWffUG7yTiIVmMgkhnVwVlrg==", + "version": "1.26.0-alpha.0", + "resolved": "https://registry.npmjs.org/@bosonprotocol/common/-/common-1.26.0-alpha.0.tgz", + "integrity": "sha512-8a46jiK9FvY2gNOXp5CxyRIeHIxyRj+EengJ9KlGbF1m9BBW+HIKJ6w9pLFfs7W5EZ+2Zh5KqQGys+EsBrR8mA==", "requires": { - "@bosonprotocol/metadata": "^1.14.0", + "@bosonprotocol/metadata": "^1.15.0-alpha.7", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -31773,11 +31966,11 @@ } }, "@bosonprotocol/core-sdk": { - "version": "1.36.1", - "resolved": "https://registry.npmjs.org/@bosonprotocol/core-sdk/-/core-sdk-1.36.1.tgz", - "integrity": "sha512-hwuPjdhVqcXB4x9LxVeE3/5wF4bevHXoa2j4Smw92bIwB+CBrh1YIBg9lgrAOThjxbzHx+w0xSQTST1Mc1rcpw==", + "version": "1.37.0-alpha.6", + "resolved": "https://registry.npmjs.org/@bosonprotocol/core-sdk/-/core-sdk-1.37.0-alpha.6.tgz", + "integrity": "sha512-s36FTmUE3BxV4SIP8MVVq96/TWhOA9w2BsVELWO8M+9rYQY9bbMQ1Bwhj6iiq/GKT852REX5wNSy8kJKXhuw/w==", "requires": { - "@bosonprotocol/common": "^1.25.2", + "@bosonprotocol/common": "^1.26.0-alpha.0", "@ethersproject/abi": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -31805,49 +31998,53 @@ } }, "@bosonprotocol/ethers-sdk": { - "version": "1.12.13", - "resolved": "https://registry.npmjs.org/@bosonprotocol/ethers-sdk/-/ethers-sdk-1.12.13.tgz", - "integrity": "sha512-i/dPxf/jYnax3ax9Us9f3fS+qxVSjIlncgLVwhVk1lZwOpAT4mEhKTc9AgHNbXSowJPWrBvEgC8V3W1Qfw1Q8Q==", + "version": "1.13.0-alpha.0", + "resolved": "https://registry.npmjs.org/@bosonprotocol/ethers-sdk/-/ethers-sdk-1.13.0-alpha.0.tgz", + "integrity": "sha512-RcKCtpIhLJzhukeA/QVgc71uxMtYp+IIJRGlq4JkEHV5OP79kq05eFGjKAMMg/BUiP0eW5CuW0pCh7+PulAIRA==", "requires": { - "@bosonprotocol/common": "^1.25.2" + "@bosonprotocol/common": "^1.26.0-alpha.0" } }, "@bosonprotocol/ipfs-storage": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@bosonprotocol/ipfs-storage/-/ipfs-storage-1.11.0.tgz", - "integrity": "sha512-ryiXBfg80eJ+sLwuoWIwYtYZrmrhGcHWmKiEs6alp/Fmr6/vy5OnBweRO4bEnrt0NMN+SCxxswJzFXhkS+a9fA==", + "version": "1.11.1-alpha.7", + "resolved": "https://registry.npmjs.org/@bosonprotocol/ipfs-storage/-/ipfs-storage-1.11.1-alpha.7.tgz", + "integrity": "sha512-gZ6uJkR9KvXIenlhW3/dwCu4am9kPV+8hyh78OlviRGYKUKH5ZrnlisMw2yTYUrIB9mIgTWOIx8SVQEu1KR4Nw==", "requires": { - "@bosonprotocol/metadata": "^1.14.0", + "@bosonprotocol/metadata": "^1.15.0-alpha.7", "ipfs-http-client": "^56.0.1", "multiformats": "^9.6.4", "uint8arrays": "^3.0.0" } }, "@bosonprotocol/metadata": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@bosonprotocol/metadata/-/metadata-1.14.0.tgz", - "integrity": "sha512-8WhDl3QRaI24QVmQLmPRgcQTbPpwYJNJ4lC33OfOYd/Kd3aC6+Dr0cnoLksPCCWTJJ4YMoxi0WPRcKW/ZJ5Ypw==", + "version": "1.15.0-alpha.7", + "resolved": "https://registry.npmjs.org/@bosonprotocol/metadata/-/metadata-1.15.0-alpha.7.tgz", + "integrity": "sha512-AlZZTp5TnRXJ9nDoDZcehkTW1XiSIc2dBsNxzCRfvrii9pfZ982FPOv4hWSwN/mpApIieuh3tEom1vYeJT6g5Q==", "requires": { "schema-to-yup": "^1.11.11" } }, "@bosonprotocol/react-kit": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@bosonprotocol/react-kit/-/react-kit-0.26.1.tgz", - "integrity": "sha512-lcsQPmZRt7nsiUoAu49lbYVSjXYhr+daEuP7H0eEHBCKW75pB2RI+IJC01+6J5d1yCA9dKFbOp5eSZTaHUOdGA==", + "version": "0.27.0-alpha.0", + "resolved": "https://registry.npmjs.org/@bosonprotocol/react-kit/-/react-kit-0.27.0-alpha.0.tgz", + "integrity": "sha512-Ky5eByJE3brqaqBCJihhNGzBIJYMcQDBjul4hbHzunwtOHIm31qf+L+Xh524mJagLcJzOU/9S6t0VxTOmpOZpw==", "requires": { "@bosonprotocol/chat-sdk": "^1.3.1-alpha.9", - "@bosonprotocol/core-sdk": "^1.36.1", - "@bosonprotocol/ethers-sdk": "^1.12.13", - "@bosonprotocol/ipfs-storage": "^1.11.0", + "@bosonprotocol/core-sdk": "^1.37.0-alpha.6", + "@bosonprotocol/ethers-sdk": "^1.13.0-alpha.0", + "@bosonprotocol/ipfs-storage": "^1.11.1-alpha.7", "@davatar/react": "1.11.1", "@ethersproject/units": "5.6.0", "@glidejs/glide": "3.6.0", "@rainbow-me/rainbowkit": "^1.3.4", "@sentry/browser": "7.43.0", "@tippyjs/react": "4.2.6", + "@uniswap/redux-multicall": "^1.1.8", "@uniswap/sdk-core": "^4.0.7", + "@uniswap/token-lists": "^1.0.0-beta.33", + "ajv": "^8.12.0", "chart.js": "^4.4.1", + "cids": "^1.1.9", "dayjs": "1.11.7", "eth-revert-reason": "^1.0.3", "formik": "2.2.9", @@ -31855,6 +32052,9 @@ "lodash.merge": "4.6.2", "lodash.uniqby": "4.7.0", "magic-sdk": "^20.1.1", + "multicodec": "^3.2.1", + "multiformats": "^13.1.0", + "multihashes": "^4.0.3", "phosphor-react": "1.4.1", "polished": "^4.2.2", "react-chartjs-2": "^5.2.0", @@ -31867,6 +32067,7 @@ "react-select": "5.7.0", "react-slick": "^0.29.0", "react-table": "7.8.0", + "redux-persist": "^6.0.0", "rehype-raw": "6.1.1", "remark-gfm": "3.0.1", "slick-carousel": "^1.8.1", @@ -31953,6 +32154,61 @@ "integrity": "sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==", "requires": {} }, + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "multibase": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", + "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "requires": { + "@multiformats/base-x": "^4.0.1" + } + }, + "multicodec": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", + "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "requires": { + "uint8arrays": "^3.0.0", + "varint": "^6.0.0" + } + }, + "multiformats": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz", + "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ==" + }, + "multihashes": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", + "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "requires": { + "multibase": "^4.0.1", + "uint8arrays": "^3.0.0", + "varint": "^5.0.2" + }, + "dependencies": { + "varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" + } + } + }, "react-router": { "version": "6.9.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.9.0.tgz", @@ -33946,8 +34202,7 @@ "@multiformats/base-x": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", - "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==", - "dev": true + "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==" }, "@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", @@ -34848,6 +35103,18 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "@reduxjs/toolkit": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.9.7.tgz", + "integrity": "sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ==", + "peer": true, + "requires": { + "immer": "^9.0.21", + "redux": "^4.2.1", + "redux-thunk": "^2.4.2", + "reselect": "^4.1.8" + } + }, "@remix-run/router": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.7.2.tgz", @@ -35737,7 +36004,6 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==", - "dev": true, "requires": { "@types/react": "*", "hoist-non-react-statics": "^3.3.0" @@ -36057,6 +36323,12 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.7.tgz", "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==" }, + "@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==", + "peer": true + }, "@types/ws": { "version": "7.4.7", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", @@ -36177,6 +36449,12 @@ "eslint-visitor-keys": "^3.3.0" } }, + "@uniswap/redux-multicall": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@uniswap/redux-multicall/-/redux-multicall-1.1.8.tgz", + "integrity": "sha512-LttOBVJuoRNC6N4MHsb5dF2GszLsj1ddPKKccEw1XOX17bGrFdm2A6GwKgES+v+Hj3lluDbQL6atcQtymP21iw==", + "requires": {} + }, "@uniswap/sdk-core": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-4.0.7.tgz", @@ -36190,6 +36468,11 @@ "toformat": "^2.0.0" } }, + "@uniswap/token-lists": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/@uniswap/token-lists/-/token-lists-1.0.0-beta.33.tgz", + "integrity": "sha512-JQkXcpRI3jFG8y3/CGC4TS8NkDgcxXaOQuYW8Qdvd6DcDiIyg2vVYCG9igFEzF0G6UvxgHkBKC7cWCgzZNYvQg==" + }, "@vanilla-extract/css": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/@vanilla-extract/css/-/css-1.14.0.tgz", @@ -38257,7 +38540,6 @@ "version": "1.1.9", "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, "requires": { "multibase": "^4.0.1", "multicodec": "^3.0.1", @@ -38269,7 +38551,6 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, "requires": { "@multiformats/base-x": "^4.0.1" } @@ -38278,7 +38559,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, "requires": { "uint8arrays": "^3.0.0", "varint": "^6.0.0" @@ -38288,7 +38568,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, "requires": { "multibase": "^4.0.1", "uint8arrays": "^3.0.0", @@ -38298,8 +38577,7 @@ "varint": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==" } } } @@ -48686,6 +48964,20 @@ "match-sorter": "^6.0.2" } }, + "react-redux": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.1.3.tgz", + "integrity": "sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw==", + "peer": true, + "requires": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + } + }, "react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", @@ -48928,6 +49220,28 @@ "redis-errors": "^1.0.0" } }, + "redux": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "peer": true, + "requires": { + "@babel/runtime": "^7.9.2" + } + }, + "redux-persist": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/redux-persist/-/redux-persist-6.0.0.tgz", + "integrity": "sha512-71LLMbUq2r02ng2We9S215LtPu3fY0KgaGE0k8WRgl6RkqxtGfl7HUozz1Dftwsb0D/5mZ8dwAaPbtnzfvbEwQ==", + "requires": {} + }, + "redux-thunk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.2.tgz", + "integrity": "sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q==", + "peer": true, + "requires": {} + }, "reflect-metadata": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", @@ -49183,6 +49497,12 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, + "reselect": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", + "peer": true + }, "reset": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/reset/-/reset-0.1.0.tgz", diff --git a/package.json b/package.json index 94cc7c7..94f549e 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "@bosonprotocol/react-kit": "^0.26.1", + "@bosonprotocol/react-kit": "^0.27.0-alpha.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/src/components/widgets/redeem/Redeem.tsx b/src/components/widgets/redeem/Redeem.tsx index d40c954..aca0c44 100644 --- a/src/components/widgets/redeem/Redeem.tsx +++ b/src/components/widgets/redeem/Redeem.tsx @@ -4,7 +4,7 @@ import { RedemptionWidgetAction, subgraph } from "@bosonprotocol/react-kit"; -import { DeliveryInfoCallbackResponse } from "@bosonprotocol/react-kit/dist/cjs/hooks/callbacks/useRedemptionCallbacks"; +import { DeliveryInfoCallbackResponse } from "@bosonprotocol/react-kit/dist/cjs/hooks/callbacks/types"; import { useSearchParams } from "react-router-dom"; import { CONFIG, getMetaTxConfig } from "../../../config";