From 2bb54ad9e36d2914a7be26a073d9003ad35a2254 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Fri, 26 Apr 2024 19:19:51 +0700 Subject: [PATCH 01/22] chore(web): update-ui-components-lib-and-dropdown-cascader-value --- web/package.json | 2 +- web/src/pages/Resolver/Parameters/Court.tsx | 1 + yarn.lock | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/web/package.json b/web/package.json index ede67cde3..2a4f9032c 100644 --- a/web/package.json +++ b/web/package.json @@ -80,7 +80,7 @@ "dependencies": { "@filebase/client": "^0.0.5", "@kleros/kleros-sdk": "workspace:^", - "@kleros/ui-components-library": "^2.8.1", + "@kleros/ui-components-library": "^2.10.0", "@middy/core": "^5.3.2", "@middy/http-json-body-parser": "^5.3.2", "@sentry/react": "^7.93.0", diff --git a/web/src/pages/Resolver/Parameters/Court.tsx b/web/src/pages/Resolver/Parameters/Court.tsx index 078f92558..c7b7c16c6 100644 --- a/web/src/pages/Resolver/Parameters/Court.tsx +++ b/web/src/pages/Resolver/Parameters/Court.tsx @@ -60,6 +60,7 @@ const Court: React.FC = () => { items={items} onSelect={(path: string | number) => typeof path === "string" && handleWrite(path.split("/").pop()!)} placeholder="Select Court" + value={`/courts/${disputeData.courtId}`} /> ) : ( diff --git a/yarn.lock b/yarn.lock index bd4e0b482..65dbe2758 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5898,7 +5898,7 @@ __metadata: "@kleros/kleros-v2-eslint-config": "workspace:^" "@kleros/kleros-v2-prettier-config": "workspace:^" "@kleros/kleros-v2-tsconfig": "workspace:^" - "@kleros/ui-components-library": "npm:^2.8.1" + "@kleros/ui-components-library": "npm:^2.10.0" "@middy/core": "npm:^5.3.2" "@middy/http-json-body-parser": "npm:^5.3.2" "@netlify/functions": "npm:^1.6.0" @@ -5962,9 +5962,9 @@ __metadata: languageName: unknown linkType: soft -"@kleros/ui-components-library@npm:^2.8.1": - version: 2.8.1 - resolution: "@kleros/ui-components-library@npm:2.8.1" +"@kleros/ui-components-library@npm:^2.10.0": + version: 2.10.0 + resolution: "@kleros/ui-components-library@npm:2.10.0" dependencies: "@datepicker-react/hooks": "npm:^2.8.4" "@swc/helpers": "npm:^0.3.2" @@ -5981,7 +5981,7 @@ __metadata: react-dom: ^18.0.0 react-is: ^18.0.0 styled-components: ^5.3.3 - checksum: 78c05b2217a4d04d554a81cee6fbcdb6c6d2a1ccb92a42118d75b477e076b0c21682916e65a8495c8d70e0763ab7a9062080d4c2f29fb49fc55536879b65f446 + checksum: 5a66d497644f192cbdf4abb0a344dbc48c786946c461894225370d038bb8f69a80d3f93684b51ce3db616d6d5f0064ccd1f1000c5db1d3d5312f38090b6565aa languageName: node linkType: hard From 067fc1d0c5cf36d0d423f086becf408dbc1b3fae Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Mon, 8 Apr 2024 18:11:45 +0700 Subject: [PATCH 02/22] feat(web): initial-widget-iteration --- .vscode/settings.json | 2 +- package.json | 3 +- web/.parcelrc | 13 +- web/package.json | 1 + web/src/pages/GetPnk/Header.tsx | 57 - web/src/pages/GetPnk/Settings/index.tsx | 78 -- web/src/pages/GetPnk/StyledDropdown.tsx | 34 - web/src/pages/GetPnk/Swap/Cards/FromCard.tsx | 77 -- .../pages/GetPnk/Swap/Cards/SwapDetails.tsx | 100 -- web/src/pages/GetPnk/Swap/Cards/ToCard.tsx | 56 - web/src/pages/GetPnk/Swap/ChainSelect.tsx | 38 - web/src/pages/GetPnk/Swap/NumberInput.tsx | 18 - web/src/pages/GetPnk/Swap/TokenSelect.tsx | 37 - web/src/pages/GetPnk/Swap/index.tsx | 54 - web/src/pages/GetPnk/Widget.tsx | 52 + web/src/pages/GetPnk/index.tsx | 19 +- web/src/utils/ethersShim.ts | 5 - yarn.lock | 1166 ++++++++++++++++- 18 files changed, 1222 insertions(+), 588 deletions(-) delete mode 100644 web/src/pages/GetPnk/Header.tsx delete mode 100644 web/src/pages/GetPnk/Settings/index.tsx delete mode 100644 web/src/pages/GetPnk/StyledDropdown.tsx delete mode 100644 web/src/pages/GetPnk/Swap/Cards/FromCard.tsx delete mode 100644 web/src/pages/GetPnk/Swap/Cards/SwapDetails.tsx delete mode 100644 web/src/pages/GetPnk/Swap/Cards/ToCard.tsx delete mode 100644 web/src/pages/GetPnk/Swap/ChainSelect.tsx delete mode 100644 web/src/pages/GetPnk/Swap/NumberInput.tsx delete mode 100644 web/src/pages/GetPnk/Swap/TokenSelect.tsx delete mode 100644 web/src/pages/GetPnk/Swap/index.tsx create mode 100644 web/src/pages/GetPnk/Widget.tsx delete mode 100644 web/src/utils/ethersShim.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 34a94eef5..95ab72c41 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,6 +14,6 @@ "projectKey": "kleros_kleros-v2" }, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" } } diff --git a/package.json b/package.json index ea11f444e..070afc820 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,6 @@ }, "alias": { "process": "process/browser.js", - "buffer": "buffer", - "ethers": "./web/src/utils/ethersShim.ts" + "buffer": "buffer" } } diff --git a/web/.parcelrc b/web/.parcelrc index 8b6b0a40c..36add0441 100644 --- a/web/.parcelrc +++ b/web/.parcelrc @@ -1,8 +1,15 @@ { "extends": "@parcel/config-default", "transformers": { - "*.svg": ["...", "@parcel/transformer-svg-react"], - "tsx:*.svg": ["@parcel/transformer-svg-react"], - "tsx:*": ["..."] + "web/src/**/*.svg": [ + "...", + "@parcel/transformer-svg-react" + ], + "tsx:*.svg": [ + "@parcel/transformer-svg-react" + ], + "tsx:*": [ + "..." + ] } } diff --git a/web/package.json b/web/package.json index 2a4f9032c..f2360288f 100644 --- a/web/package.json +++ b/web/package.json @@ -81,6 +81,7 @@ "@filebase/client": "^0.0.5", "@kleros/kleros-sdk": "workspace:^", "@kleros/ui-components-library": "^2.10.0", + "@lifi/widget": "^2.10.1", "@middy/core": "^5.3.2", "@middy/http-json-body-parser": "^5.3.2", "@sentry/react": "^7.93.0", diff --git a/web/src/pages/GetPnk/Header.tsx b/web/src/pages/GetPnk/Header.tsx deleted file mode 100644 index e3a18e3e7..000000000 --- a/web/src/pages/GetPnk/Header.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import React from "react"; -import styled from "styled-components"; - -import CloseIcon from "svgs/icons/close.svg"; -import SettingsIcon from "svgs/menu-icons/settings.svg"; - -const Container = styled.div` - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 35px; -`; - -const Title = styled.h3` - margin: 0; -`; - -const SVGContainer = styled.div` - display: flex; - justify-content: center; - align-items: center; - width: 16px; - height: 16px; - cursor: pointer; - svg { - fill: ${({ theme }) => theme.primaryBlue}; - } -`; - -interface IHeader { - isSettings: boolean; - toggleSettings: () => void; -} - -const Header: React.FC = ({ isSettings, toggleSettings }) => { - return ( - - {isSettings ? ( - <> - Settings - - - - - ) : ( - <> - Swap - - - - - )} - - ); -}; - -export default Header; diff --git a/web/src/pages/GetPnk/Settings/index.tsx b/web/src/pages/GetPnk/Settings/index.tsx deleted file mode 100644 index 85989a8eb..000000000 --- a/web/src/pages/GetPnk/Settings/index.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import React from "react"; -import styled from "styled-components"; - -import GasIcon from "tsx:svgs/icons/gas.svg"; - -import { Button } from "@kleros/ui-components-library"; - -const Container = styled.div` - display: flex; - flex-direction: column; - gap: 24px; -`; - -const InnerContainer = styled.div` - display: flex; - flex-direction: column; - gap: 16px; -`; - -const Header = styled.div` - display: flex; - align-items: center; - gap: 8px; -`; - -const StyledLabel = styled.label` - color: ${({ theme }) => theme.primaryText}; -`; - -const GridContainer = styled.div` - --gap: 16px; - display: grid; - grid-template-columns: repeat(auto-fill, minmax(min(100%, max(100px, (100% - 54px - var(--gap) * 2)/3)), 1fr)); - align-items: center; - gap: var(--gap); -`; - -const StyledButton = styled(Button)<{ selected?: boolean }>` - width: 100%; - height: 80px; - border-color: ${({ theme, selected }) => (selected ? theme.primaryBlue : theme.stroke)}; - background-color: ${({ theme, selected }) => (selected ? theme.lightBlue : theme.whiteBackground)}; - - .button-text { - color: ${({ theme, selected }) => (selected ? theme.primaryBlue : theme.secondaryText)}; - } -`; - -const Settings: React.FC = () => { - const slippageOptions = [0.5, 1, 3]; - const gasOptions = ["Slow", "Normal", "Fast"]; - return ( - - -
- Slippage -
- - {slippageOptions.map((val, i) => ( - - ))} - -
- -
- Gas - -
- - {gasOptions.map((val, i) => ( - - ))} - -
-
- ); -}; -export default Settings; diff --git a/web/src/pages/GetPnk/StyledDropdown.tsx b/web/src/pages/GetPnk/StyledDropdown.tsx deleted file mode 100644 index 1284a1449..000000000 --- a/web/src/pages/GetPnk/StyledDropdown.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import styled from "styled-components"; - -import { DropdownSelect } from "@kleros/ui-components-library"; - -const StyledDropdown = styled(DropdownSelect)` - button { - border: none; - background-color: transparent; - padding: 0; - gap: 8px; - width: auto; - > div { - padding: 0px; - background-color: transparent; - border: none; - } - > svg { - width: 8px; - height: 8px; - fill: ${({ theme }) => theme.primaryText}; - } - } - > div { - margin-top: 4px; - } - .item-icon { - max-height: 24px; - max-width: 24px; - width: 24px; - height: 24px; - margin-right: 8px; - } -`; -export default StyledDropdown; diff --git a/web/src/pages/GetPnk/Swap/Cards/FromCard.tsx b/web/src/pages/GetPnk/Swap/Cards/FromCard.tsx deleted file mode 100644 index 3eaaaed7b..000000000 --- a/web/src/pages/GetPnk/Swap/Cards/FromCard.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import React, { useState } from "react"; -import styled from "styled-components"; - -import DownArrow from "tsx:svgs/icons/down-arrow.svg"; - -import { Button, Card } from "@kleros/ui-components-library"; - -import { responsiveSize } from "styles/responsiveSize"; - -import ChainSelect from "../ChainSelect"; -import NumberField from "../NumberInput"; -import TokenSelect from "../TokenSelect"; - -const Container = styled(Card)` - width: 100%; - display: flex; - height: fit-content; - flex-direction: column; - gap: 19px; - padding: 16px 16px 32px; - background-color: ${({ theme }) => theme.lightBlue}; - border-color: ${({ theme }) => theme.primaryBlue}; - position: relative; -`; -const InnerContainer = styled.div` - display: flex; - justify-content: space-between; - align-items: center; -`; -const ChainContainer = styled.div` - display: flex; - justify-content: center; - align-items: center; - gap: ${responsiveSize(8, 16)}; -`; -const StyledButton = styled(Button)` - border: none; - background-color: transparent; - padding: 0; -`; - -const SVGContainer = styled.div` - display: flex; - justify-content: center; - position: absolute; - left: 0; - right: 0; - bottom: -28px; - z-index: 9; -`; -const StyledLabel = styled.label``; - -const FromCard: React.FC = () => { - const [fromChain, setFromChain] = useState(421614); - const [fromToken, setFromToken] = useState("PNK"); - - return ( - - - - From - - - - - - - - - - - - - ); -}; - -export default FromCard; diff --git a/web/src/pages/GetPnk/Swap/Cards/SwapDetails.tsx b/web/src/pages/GetPnk/Swap/Cards/SwapDetails.tsx deleted file mode 100644 index 0f98d4d50..000000000 --- a/web/src/pages/GetPnk/Swap/Cards/SwapDetails.tsx +++ /dev/null @@ -1,100 +0,0 @@ -import React from "react"; -import styled from "styled-components"; - -import ArrowIcon from "tsx:svgs/icons/arrow.svg"; -import ClockIcon from "tsx:svgs/icons/clock.svg"; -import GasIcon from "tsx:svgs/icons/gas.svg"; -import SpinnerIcon from "tsx:svgs/icons/spinner.svg"; - -import { Card } from "@kleros/ui-components-library"; - -import { responsiveSize } from "styles/responsiveSize"; - -const Container = styled(Card)` - width: 100%; - height: fit-content; - display: flex; - flex-direction: column; - gap: 8px; - padding: 16px 16px 23px; - position: relative; -`; - -const InnerContainer = styled.div` - display: flex; - justify-content: space-between; - align-items: center; -`; - -const SVGContainer = styled.div` - display: flex; - animation: rotate 2s infinite; - @keyframes rotate { - 100% { - transform: rotate(360deg); - } - } -`; - -const StyledSpan = styled.span` - display: flex; - align-items: center; - gap: 8px; - font-size: 14px; - color: ${({ theme }) => theme.primaryText}; -`; - -const Icon = styled.svg` - width: 8px; - height: 8px; - path { - fill: ${({ theme }) => theme.primaryText}; - } -`; - -const GasAndTimeContainer = styled.div` - display: flex; - align-items: center; - gap: ${responsiveSize(12, 24)}; -`; - -const MiddleContainer = styled.div` - display: flex; - align-items: center; - gap: 8px; -`; - -const StyledLabel = styled.label``; - -const SwapDetails: React.FC = () => { - return ( - - - - Bridge from Ethereum to Arbitrum - {" "} - - - - - - - 1000 ETH - 999 PNK  ~ $18.11 - - - - - - Gas Fees: ~ $1.09 (estimated) - - - - ~ 2 min - - - - ); -}; - -export default SwapDetails; diff --git a/web/src/pages/GetPnk/Swap/Cards/ToCard.tsx b/web/src/pages/GetPnk/Swap/Cards/ToCard.tsx deleted file mode 100644 index 04e895914..000000000 --- a/web/src/pages/GetPnk/Swap/Cards/ToCard.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import React, { useState } from "react"; -import styled from "styled-components"; - -import { Card } from "@kleros/ui-components-library"; - -import { responsiveSize } from "styles/responsiveSize"; - -import ChainSelect from "../ChainSelect"; -import TokenSelect from "../TokenSelect"; - -const Container = styled(Card)` - width: 100%; - height: fit-content; - display: flex; - flex-direction: column; - gap: 19px; - padding: 16px 16px 32px; - position: relative; -`; -const InnerContainer = styled.div` - display: flex; - justify-content: space-between; - align-items: center; -`; -const ChainContainer = styled.div` - display: flex; - justify-content: center; - align-items: center; - gap: ${responsiveSize(8, 16)}; -`; -const StyledText = styled.h1` - margin: 0px; -`; -const StyledLabel = styled.label``; - -const ToCard: React.FC = () => { - const [toChain, setToChain] = useState(421614); - const [toToken, setToToken] = useState("PNK"); - - return ( - - - - To - - - - - - 0.0 - - - ); -}; - -export default ToCard; diff --git a/web/src/pages/GetPnk/Swap/ChainSelect.tsx b/web/src/pages/GetPnk/Swap/ChainSelect.tsx deleted file mode 100644 index d181f5f6f..000000000 --- a/web/src/pages/GetPnk/Swap/ChainSelect.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from "react"; - -import ArbitrumIcon from "tsx:svgs/tokens/arbitrum.svg"; -import EthIcon from "tsx:svgs/tokens/eth.svg"; -import GnosisIcon from "tsx:svgs/tokens/gnosis.svg"; -import PolygonIcon from "tsx:svgs/tokens/polygon.svg"; -import { arbitrum, arbitrumSepolia, gnosis, gnosisChiado, mainnet, polygon, polygonMumbai, sepolia } from "viem/chains"; - -import StyledDropdown from "../StyledDropdown"; - -const supportedChains = true - ? [ - { value: sepolia.id, text: mainnet.name, Icon: EthIcon }, - { value: arbitrumSepolia.id, text: "Arbitrum", Icon: ArbitrumIcon }, - { value: gnosisChiado.id, text: gnosis.name, Icon: GnosisIcon }, - { value: polygonMumbai.id, text: polygon.name, Icon: PolygonIcon }, - ] - : [ - { value: mainnet.id, text: mainnet.name, Icon: EthIcon }, - { value: arbitrum.id, text: "Arbitrum", Icon: ArbitrumIcon }, - { value: gnosis.id, text: gnosis.name, Icon: GnosisIcon }, - { value: polygon.id, text: polygon.name, Icon: PolygonIcon }, - ]; - -interface IChainSelect { - chainId: number; - setChainId: React.Dispatch>; -} -const ChainSelect: React.FC = ({ chainId, setChainId }) => ( - setChainId(Number(val))} - items={supportedChains} - /> -); - -export default ChainSelect; diff --git a/web/src/pages/GetPnk/Swap/NumberInput.tsx b/web/src/pages/GetPnk/Swap/NumberInput.tsx deleted file mode 100644 index 26583bf77..000000000 --- a/web/src/pages/GetPnk/Swap/NumberInput.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import styled from "styled-components"; - -import { NumberInputField } from "components/NumberInputField"; - -const NumberField = styled(NumberInputField)` - input, - input:focus { - border: none; - background-color: transparent; - box-shadow: none; - padding: 0px; - color: ${({ theme }) => theme.primaryBlue}; - text-align: right; - font-size: 24px; - } -`; - -export default NumberField; diff --git a/web/src/pages/GetPnk/Swap/TokenSelect.tsx b/web/src/pages/GetPnk/Swap/TokenSelect.tsx deleted file mode 100644 index d093100ff..000000000 --- a/web/src/pages/GetPnk/Swap/TokenSelect.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from "react"; - -import DaiIcon from "tsx:svgs/tokens/dai.svg"; -import EthIcon from "tsx:svgs/tokens/eth.svg"; -import PnkIcon from "tsx:svgs/tokens/pnk.svg"; -import UsdcIcon from "tsx:svgs/tokens/usdc.svg"; - -import StyledDropdown from "../StyledDropdown"; - -// get these from the aggregator sdk we will use ? -const supportedTokens = [ - { value: "PNK", text: "PNK", Icon: PnkIcon }, - { value: "ETH", text: "ETH", Icon: EthIcon }, - { value: "DAI", text: "DAI", Icon: DaiIcon }, - { value: "USDC", text: "USDC", Icon: UsdcIcon }, -]; - -// get this from aggregator sdk -export type Token = { - token: string; - chainId: number; - logoUri: string; -}; -interface ITokenSelect { - token: string; - setToken: React.Dispatch>; -} -const TokenSelect: React.FC = ({ token, setToken }) => ( - setToken(val.toString())} - items={supportedTokens} - /> -); - -export default TokenSelect; diff --git a/web/src/pages/GetPnk/Swap/index.tsx b/web/src/pages/GetPnk/Swap/index.tsx deleted file mode 100644 index dc6d3b209..000000000 --- a/web/src/pages/GetPnk/Swap/index.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import React, { useState } from "react"; -import styled from "styled-components"; - -import { Button } from "@kleros/ui-components-library"; - -import { isProductionDeployment } from "consts/index"; - -import { EnsureChain } from "components/EnsureChain"; -import Popup, { PopupType } from "components/Popup"; - -import FromCard from "./Cards/FromCard"; -import SwapDetails from "./Cards/SwapDetails"; -import ToCard from "./Cards/ToCard"; - -const Container = styled.div` - display: flex; - flex-direction: column; - height: fit-content; - gap: 16px; -`; - -const StyledEnsureChain = styled(EnsureChain)` - width: 100%; -`; - -const StyledButton = styled(Button)` - width: 100%; -`; -const Swap: React.FC = () => { - const [isPopupOpen, setIsPopupOpen] = useState(false); - return ( - - - - - <> - - setIsPopupOpen(true)} disabled={!isProductionDeployment()} /> - - - {isPopupOpen && ( - - )} - - ); -}; - -export default Swap; diff --git a/web/src/pages/GetPnk/Widget.tsx b/web/src/pages/GetPnk/Widget.tsx new file mode 100644 index 000000000..3c09d9a41 --- /dev/null +++ b/web/src/pages/GetPnk/Widget.tsx @@ -0,0 +1,52 @@ +import React from "react"; +import { LiFiWidget, WidgetConfig } from "@lifi/widget"; +import { useTheme } from "styled-components"; + +export const Widget = () => { + const theme = useTheme(); + + const widgetConfig: WidgetConfig = { + fromChain: 1, + toChain: 42161, + fromToken: "0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d", + toToken: "0x330bD769382cFc6d50175903434CCC8D206DCAE5", + containerStyle: { + border: `1px solid ${theme.stroke}`, + borderRadius: "3px", + background: theme.whiteBackground, + }, + hiddenUI: ["appearance"], + theme: { + palette: { + primary: { + main: theme.primaryBlue, + }, + secondary: { + main: theme.primaryBlue, + }, + background: { + paper: theme.whiteBackground, // bg color for cards + default: theme.whiteBackground, // bg color container + }, + grey: { + 300: theme.stroke, // border light theme + 800: theme.stroke, // border dark theme + }, + text: { + primary: theme.primaryText, + secondary: theme.secondaryText, + }, + }, + shape: { + borderRadius: 3, + borderRadiusSecondary: 3, + }, + typography: { + // fontFamily: "Comic Sans MS", + }, + }, + integrator: "Kleros Court", + }; + + return ; +}; diff --git a/web/src/pages/GetPnk/index.tsx b/web/src/pages/GetPnk/index.tsx index 904a20d3f..e2d82ecd2 100644 --- a/web/src/pages/GetPnk/index.tsx +++ b/web/src/pages/GetPnk/index.tsx @@ -1,10 +1,6 @@ import React from "react"; import styled from "styled-components"; -import { useToggle } from "react-use"; - -import { Card } from "@kleros/ui-components-library"; - import { isProductionDeployment } from "consts/index"; import { responsiveSize } from "styles/responsiveSize"; @@ -12,9 +8,7 @@ import { responsiveSize } from "styles/responsiveSize"; import ClaimPnkButton from "components/ClaimPnkButton"; import HeroImage from "components/HeroImage"; -import Header from "./Header"; -import Settings from "./Settings"; -import Swap from "./Swap"; +import { Widget } from "./Widget"; const Container = styled.div` width: 100%; @@ -28,23 +22,14 @@ const Container = styled.div` justify-content: center; gap: 24px; `; -const StyledCard = styled(Card)` - width: ${responsiveSize(300, 500)}; - height: fit-content; - padding: 27px; -`; const GetPnk: React.FC = () => { - const [settingsOpen, toggleSettings] = useToggle(false); return ( <> {!isProductionDeployment() && } - -
- {settingsOpen ? : } - + ); diff --git a/web/src/utils/ethersShim.ts b/web/src/utils/ethersShim.ts deleted file mode 100644 index 85919af29..000000000 --- a/web/src/utils/ethersShim.ts +++ /dev/null @@ -1,5 +0,0 @@ -const ethers = require("ethers"); -// explicity exporting ethers from here removes the error for siwe library. -module.exports = { - ...ethers, -}; diff --git a/yarn.lock b/yarn.lock index 65dbe2758..ddb38dca3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1486,6 +1486,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-imports@npm:^7.16.7": + version: 7.24.3 + resolution: "@babel/helper-module-imports@npm:7.24.3" + dependencies: + "@babel/types": "npm:^7.24.0" + checksum: 42fe124130b78eeb4bb6af8c094aa749712be0f4606f46716ce74bc18a5ea91c918c547c8bb2307a2e4b33f163e4ad2cb6a7b45f80448e624eae45b597ea3499 + languageName: node + linkType: hard + "@babel/helper-module-transforms@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-module-transforms@npm:7.22.5" @@ -2918,6 +2927,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7": + version: 7.24.4 + resolution: "@babel/runtime@npm:7.24.4" + dependencies: + regenerator-runtime: "npm:^0.14.0" + checksum: 8ec8ce2c145bc7e31dd39ab66df124f357f65c11489aefacb30f431bae913b9aaa66aa5efe5321ea2bf8878af3fcee338c87e7599519a952e3a6f83aa1b03308 + languageName: node + linkType: hard + "@babel/template@npm:^7.18.10, @babel/template@npm:^7.20.7, @babel/template@npm:^7.22.5, @babel/template@npm:^7.3.3": version: 7.22.5 resolution: "@babel/template@npm:7.22.5" @@ -2980,6 +2998,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.24.0": + version: 7.24.0 + resolution: "@babel/types@npm:7.24.0" + dependencies: + "@babel/helper-string-parser": "npm:^7.23.4" + "@babel/helper-validator-identifier": "npm:^7.22.20" + to-fast-properties: "npm:^2.0.0" + checksum: a0b4875ce2e132f9daff0d5b27c7f4c4fcc97f2b084bdc5834e92c9d32592778489029e65d99d00c406da612d87b72d7a236c0afccaa1435c028d0c94c9b6da4 + languageName: node + linkType: hard + "@balena/dockerignore@npm:^1.0.2": version: 1.0.2 resolution: "@balena/dockerignore@npm:1.0.2" @@ -3174,6 +3203,23 @@ __metadata: languageName: node linkType: hard +"@coinbase/wallet-sdk@npm:^3.9.1": + version: 3.9.3 + resolution: "@coinbase/wallet-sdk@npm:3.9.3" + dependencies: + bn.js: "npm:^5.2.1" + buffer: "npm:^6.0.3" + clsx: "npm:^1.2.1" + eth-block-tracker: "npm:^7.1.0" + eth-json-rpc-filters: "npm:^6.0.0" + eventemitter3: "npm:^5.0.1" + keccak: "npm:^3.0.3" + preact: "npm:^10.16.0" + sha.js: "npm:^2.4.11" + checksum: 3bc3f0edad8ea46cb7a127993373093d95b6fef03d2a6a40bae7983a1d9a20a114faa8e7bf1230efd380ffb67b42dae405c6617cd6fad6d278bf9b9e021a0280 + languageName: node + linkType: hard + "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -3560,6 +3606,27 @@ __metadata: languageName: node linkType: hard +"@cyberlab/cyber-account@npm:^2.2.5": + version: 2.3.1 + resolution: "@cyberlab/cyber-account@npm:2.3.1" + dependencies: + viem: "npm:^1.17.2" + checksum: 2cf9189afc32da8bf40f6bc7fdadc96150b189b90a6c19d1c80d956581d9b9748e6c40db299e4d6e9eebb6e1a1b42fc2e30cbc62c58323abde3f73484910b684 + languageName: node + linkType: hard + +"@cyberlab/cyber-app-sdk@npm:2.4.4": + version: 2.4.4 + resolution: "@cyberlab/cyber-app-sdk@npm:2.4.4" + dependencies: + "@wagmi/connectors": "npm:^3.1.5" + ts-node: "npm:^10.9.1" + viem: "npm:^1.19.11" + wagmi: "npm:^1.4.7" + checksum: 7de625c2f9f279cf1dcc5d6ce3ce102e7ec16c6f06caec37109fc04cfd7c8650dfd59e45417df2e603414eb31d09f538e938c1370816a05c00440267a647eec2 + languageName: node + linkType: hard + "@dappnode/dappnodesdk@npm:^0.3.11": version: 0.3.11 resolution: "@dappnode/dappnodesdk@npm:0.3.11" @@ -3678,6 +3745,45 @@ __metadata: languageName: node linkType: hard +"@emotion/babel-plugin@npm:^11.11.0": + version: 11.11.0 + resolution: "@emotion/babel-plugin@npm:11.11.0" + dependencies: + "@babel/helper-module-imports": "npm:^7.16.7" + "@babel/runtime": "npm:^7.18.3" + "@emotion/hash": "npm:^0.9.1" + "@emotion/memoize": "npm:^0.8.1" + "@emotion/serialize": "npm:^1.1.2" + babel-plugin-macros: "npm:^3.1.0" + convert-source-map: "npm:^1.5.0" + escape-string-regexp: "npm:^4.0.0" + find-root: "npm:^1.1.0" + source-map: "npm:^0.5.7" + stylis: "npm:4.2.0" + checksum: 8de017666838fc06b1a961d7a49b4e6dc0c83dbb064ea33512bae056594f0811a87e3242ef90fa2aa49fc080fab1cc7af536e7aee9398eaca7a1fc020d2dd527 + languageName: node + linkType: hard + +"@emotion/cache@npm:^11.11.0": + version: 11.11.0 + resolution: "@emotion/cache@npm:11.11.0" + dependencies: + "@emotion/memoize": "npm:^0.8.1" + "@emotion/sheet": "npm:^1.2.2" + "@emotion/utils": "npm:^1.2.1" + "@emotion/weak-memoize": "npm:^0.3.1" + stylis: "npm:4.2.0" + checksum: ef29756247dafb87168b4ffb76ee60feb06b8a1016323ecb1d3ba8aed3f4300ca10049bedbfe83aa11e0d81e616c328002a9d50020ebb3af6e4f5337a785c1fe + languageName: node + linkType: hard + +"@emotion/hash@npm:^0.9.1": + version: 0.9.1 + resolution: "@emotion/hash@npm:0.9.1" + checksum: 716e17e48bf9047bf9383982c071de49f2615310fb4e986738931776f5a823bc1f29c84501abe0d3df91a3803c80122d24e28b57351bca9e01356ebb33d89876 + languageName: node + linkType: hard + "@emotion/is-prop-valid@npm:^1.1.0": version: 1.2.1 resolution: "@emotion/is-prop-valid@npm:1.2.1" @@ -3687,6 +3793,15 @@ __metadata: languageName: node linkType: hard +"@emotion/is-prop-valid@npm:^1.2.2": + version: 1.2.2 + resolution: "@emotion/is-prop-valid@npm:1.2.2" + dependencies: + "@emotion/memoize": "npm:^0.8.1" + checksum: 0fa3960abfbe845d40cc230ab8c9408e1f33d3c03b321980359911c7212133cdcb0344d249e9dab23342b304567eece7a10ec44b986f7230e0640ba00049dceb + languageName: node + linkType: hard + "@emotion/memoize@npm:^0.8.1": version: 0.8.1 resolution: "@emotion/memoize@npm:0.8.1" @@ -3694,6 +3809,67 @@ __metadata: languageName: node linkType: hard +"@emotion/react@npm:^11.11.1": + version: 11.11.4 + resolution: "@emotion/react@npm:11.11.4" + dependencies: + "@babel/runtime": "npm:^7.18.3" + "@emotion/babel-plugin": "npm:^11.11.0" + "@emotion/cache": "npm:^11.11.0" + "@emotion/serialize": "npm:^1.1.3" + "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" + "@emotion/utils": "npm:^1.2.1" + "@emotion/weak-memoize": "npm:^0.3.1" + hoist-non-react-statics: "npm:^3.3.1" + peerDependencies: + react: ">=16.8.0" + peerDependenciesMeta: + "@types/react": + optional: true + checksum: e7da3a1ddc1d72a4179010bdfd17423c13b1a77bf83a8b18271e919fd382d08c62dc2313ed5347acfd1ef85bb1bae8932597647a986e8a1ea1462552716cd495 + languageName: node + linkType: hard + +"@emotion/serialize@npm:^1.1.2, @emotion/serialize@npm:^1.1.3, @emotion/serialize@npm:^1.1.4": + version: 1.1.4 + resolution: "@emotion/serialize@npm:1.1.4" + dependencies: + "@emotion/hash": "npm:^0.9.1" + "@emotion/memoize": "npm:^0.8.1" + "@emotion/unitless": "npm:^0.8.1" + "@emotion/utils": "npm:^1.2.1" + csstype: "npm:^3.0.2" + checksum: 11fc4f960226778e9a5f86310b739703986d13b2de3e89a16d788126ce312b2c8c174a2947c9bfc80cb124b331c36feeac44193f81150616d94b1ba19a92d70a + languageName: node + linkType: hard + +"@emotion/sheet@npm:^1.2.2": + version: 1.2.2 + resolution: "@emotion/sheet@npm:1.2.2" + checksum: cc46b20ef7273dc28de889927ae1498f854be2890905745fcc3154fbbacaa54df1e28c3d89ff3339c2022782c78933f51955bb950d105d5a219576db1eadfb7a + languageName: node + linkType: hard + +"@emotion/styled@npm:^11.11.0": + version: 11.11.5 + resolution: "@emotion/styled@npm:11.11.5" + dependencies: + "@babel/runtime": "npm:^7.18.3" + "@emotion/babel-plugin": "npm:^11.11.0" + "@emotion/is-prop-valid": "npm:^1.2.2" + "@emotion/serialize": "npm:^1.1.4" + "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" + "@emotion/utils": "npm:^1.2.1" + peerDependencies: + "@emotion/react": ^11.0.0-rc.0 + react: ">=16.8.0" + peerDependenciesMeta: + "@types/react": + optional: true + checksum: a936787ef80d73066840391522d88280424de0abb56bec83d17e14bdc5a515e77e343dd171f7caae1405462e3f71815b5480dcc4e1eff5e8ff4a020f5c39341e + languageName: node + linkType: hard + "@emotion/stylis@npm:^0.8.4": version: 0.8.5 resolution: "@emotion/stylis@npm:0.8.5" @@ -3708,6 +3884,36 @@ __metadata: languageName: node linkType: hard +"@emotion/unitless@npm:^0.8.1": + version: 0.8.1 + resolution: "@emotion/unitless@npm:0.8.1" + checksum: 918f73c46ac0b7161e3c341cc07d651ce87e31ab1695e74b12adb7da6bb98dfbff8c69cf68a4e40d9eb3d820ca055dc1267aeb3007927ce88f98b885bf729b63 + languageName: node + linkType: hard + +"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1": + version: 1.0.1 + resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1" + peerDependencies: + react: ">=16.8.0" + checksum: 7d7ead9ba3f615510f550aea67815281ec5a5487de55aafc250f820317afc1fd419bd9e9e27602a0206ec5c152f13dc6130bccad312c1036706c584c65d66ef7 + languageName: node + linkType: hard + +"@emotion/utils@npm:^1.2.1": + version: 1.2.1 + resolution: "@emotion/utils@npm:1.2.1" + checksum: 472fa529c64a13edff80aa11698092e8841c1ffb5001c739d84eb9d0fdd6d8e1cd1848669310578ccfa6383b8601132eca54f8749fca40af85d21fdfc9b776c4 + languageName: node + linkType: hard + +"@emotion/weak-memoize@npm:^0.3.1": + version: 0.3.1 + resolution: "@emotion/weak-memoize@npm:0.3.1" + checksum: b2be47caa24a8122622ea18cd2d650dbb4f8ad37b636dc41ed420c2e082f7f1e564ecdea68122b546df7f305b159bf5ab9ffee872abd0f052e687428459af594 + languageName: node + linkType: hard + "@esbuild/aix-ppc64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/aix-ppc64@npm:0.19.12" @@ -4096,6 +4302,48 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/common@npm:^3.2.0": + version: 3.2.0 + resolution: "@ethereumjs/common@npm:3.2.0" + dependencies: + "@ethereumjs/util": "npm:^8.1.0" + crc-32: "npm:^1.2.0" + checksum: b3f612406b6bcefaf9117ceb42eff58d311e2b50205e3d55b4c793d803de517efbc84075e058dc0e2ec27a2bff11dfc279dda1fa2b249ed6ab3973be045898f4 + languageName: node + linkType: hard + +"@ethereumjs/rlp@npm:^4.0.1": + version: 4.0.1 + resolution: "@ethereumjs/rlp@npm:4.0.1" + bin: + rlp: bin/rlp + checksum: bfdffd634ce72f3b17e3d085d071f2fe7ce9680aebdf10713d74b30afd80ef882d17f19ff7175fcb049431a56e800bd3558d3b028bd0d82341927edb303ab450 + languageName: node + linkType: hard + +"@ethereumjs/tx@npm:^4.1.2, @ethereumjs/tx@npm:^4.2.0": + version: 4.2.0 + resolution: "@ethereumjs/tx@npm:4.2.0" + dependencies: + "@ethereumjs/common": "npm:^3.2.0" + "@ethereumjs/rlp": "npm:^4.0.1" + "@ethereumjs/util": "npm:^8.1.0" + ethereum-cryptography: "npm:^2.0.0" + checksum: cbd2ffc3ef76ca5416d58f2f694858d9fcac946e6a107fef44cf3f308a7c9fcc996a6847868609354d72d5b356faee68408e9d5601c4c4f7dad8e18cb2c24a95 + languageName: node + linkType: hard + +"@ethereumjs/util@npm:^8.1.0": + version: 8.1.0 + resolution: "@ethereumjs/util@npm:8.1.0" + dependencies: + "@ethereumjs/rlp": "npm:^4.0.1" + ethereum-cryptography: "npm:^2.0.0" + micro-ftch: "npm:^0.3.1" + checksum: cc35338932e49b15e54ca6e548b32a1f48eed7d7e1d34ee743e4d3600dd616668bd50f70139e86c5c35f55aac35fba3b6cc4e6f679cf650aeba66bf93016200c + languageName: node + linkType: hard + "@ethersproject/abi@npm:5.0.7": version: 5.0.7 resolution: "@ethersproject/abi@npm:5.0.7" @@ -4237,6 +4485,17 @@ __metadata: languageName: node linkType: hard +"@ethersproject/experimental@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/experimental@npm:5.7.0" + dependencies: + "@ethersproject/web": "npm:^5.7.0" + ethers: "npm:^5.7.0" + scrypt-js: "npm:3.0.1" + checksum: 82fe7581c89bde7dc2e9d6ddae65be3340f32cc37ced607ec026c13ae420a3c7215dba1227c3083d32630e3fbfb7144562a83b3da66505bb26d4254b0d66c22a + languageName: node + linkType: hard + "@ethersproject/hash@npm:5.7.0, @ethersproject/hash@npm:^5.0.4, @ethersproject/hash@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/hash@npm:5.7.0" @@ -4552,6 +4811,44 @@ __metadata: languageName: node linkType: hard +"@floating-ui/core@npm:^1.0.0": + version: 1.6.0 + resolution: "@floating-ui/core@npm:1.6.0" + dependencies: + "@floating-ui/utils": "npm:^0.2.1" + checksum: d6a47cacde193cd8ccb4c268b91ccc4ca254dffaec6242b07fd9bcde526044cc976d27933a7917f9a671de0a0e27f8d358f46400677dbd0c8199de293e9746e1 + languageName: node + linkType: hard + +"@floating-ui/dom@npm:^1.6.1": + version: 1.6.3 + resolution: "@floating-ui/dom@npm:1.6.3" + dependencies: + "@floating-ui/core": "npm:^1.0.0" + "@floating-ui/utils": "npm:^0.2.0" + checksum: 83e97076c7a5f55c3506f574bc53f03d38bed6eb8181920c8733076889371e287e9ae6f28c520a076967759b9b6ff425362832a5cdf16a999069530dbb9cce53 + languageName: node + linkType: hard + +"@floating-ui/react-dom@npm:^2.0.8": + version: 2.0.8 + resolution: "@floating-ui/react-dom@npm:2.0.8" + dependencies: + "@floating-ui/dom": "npm:^1.6.1" + peerDependencies: + react: ">=16.8.0" + react-dom: ">=16.8.0" + checksum: e57b2a498aecf8de0ec28adf434257fca7893bd9bd7e78b63ac98c63b29b9fc086fc175630154352f3610f5c4a0d329823837f4f6c235cc0459fde6417065590 + languageName: node + linkType: hard + +"@floating-ui/utils@npm:^0.2.0, @floating-ui/utils@npm:^0.2.1": + version: 0.2.1 + resolution: "@floating-ui/utils@npm:0.2.1" + checksum: 33c9ab346e7b05c5a1e6a95bc902aafcfc2c9d513a147e2491468843bd5607531b06d0b9aa56aa491cbf22a6c2495c18ccfc4c0344baec54a689a7bb8e4898d6 + languageName: node + linkType: hard + "@fortawesome/fontawesome-common-types@npm:6.5.1": version: 6.5.1 resolution: "@fortawesome/fontawesome-common-types@npm:6.5.1" @@ -5899,6 +6196,7 @@ __metadata: "@kleros/kleros-v2-prettier-config": "workspace:^" "@kleros/kleros-v2-tsconfig": "workspace:^" "@kleros/ui-components-library": "npm:^2.10.0" + "@lifi/widget": "npm:^2.10.1" "@middy/core": "npm:^5.3.2" "@middy/http-json-body-parser": "npm:^5.3.2" "@netlify/functions": "npm:^1.6.0" @@ -6164,6 +6462,92 @@ __metadata: languageName: node linkType: hard +"@lifi/sdk@npm:^2.5.0": + version: 2.5.1 + resolution: "@lifi/sdk@npm:2.5.1" + dependencies: + "@ethersproject/abi": "npm:^5.7.0" + "@ethersproject/contracts": "npm:^5.7.0" + "@lifi/types": "npm:^9.3.0" + bignumber.js: "npm:^9.1.2" + eth-rpc-errors: "npm:^4.0.3" + ethers: "npm:^5.7.2" + checksum: 383dc775664780dae7236b74ab5ac1429ac79f22bdf2cdf2b1cef3040c144b7d45b8d8fdc7e2a75b56459dfa6ffdc2e0b42fa4b63a04189c5c7d8e87e6235675 + languageName: node + linkType: hard + +"@lifi/types@npm:^9.3.0": + version: 9.3.3 + resolution: "@lifi/types@npm:9.3.3" + dependencies: + ethers: "npm:^5.7.2" + checksum: 7f8ebcf71151889ae7d6d43e541cc910282957bcade6bc137cd2103668aa74936c7152547028ab0c9aa511ca0c8531d5f83199e08f6c66449cbe9ac51308ebcb + languageName: node + linkType: hard + +"@lifi/wallet-management@npm:^2.6.0": + version: 2.6.0 + resolution: "@lifi/wallet-management@npm:2.6.0" + dependencies: + "@coinbase/wallet-sdk": "npm:^3.9.1" + "@cyberlab/cyber-account": "npm:^2.2.5" + "@cyberlab/cyber-app-sdk": "npm:2.4.4" + "@ethersproject/abstract-signer": "npm:^5.7.0" + "@ethersproject/experimental": "npm:^5.7.0" + "@ethersproject/providers": "npm:^5.7.2" + "@lifi/sdk": "npm:^2.5.0" + "@safe-global/safe-apps-provider": "npm:^0.18.1" + "@safe-global/safe-apps-sdk": "npm:^8.1.0" + "@walletconnect/ethereum-provider": "npm:^2.10.6" + "@walletconnect/modal": "npm:^2.6.2" + events: "npm:^3.3.0" + react: "npm:^18.2.0" + checksum: 54ca9729e76ddb6f67f93d41669e0b2787d7707677c5f0e048ad62b1ca98da8068fa30fc03679908aed91779f01b51adce468852a871a11429313405cfbdbbc9 + languageName: node + linkType: hard + +"@lifi/widget@npm:^2.10.1": + version: 2.10.1 + resolution: "@lifi/widget@npm:2.10.1" + dependencies: + "@emotion/react": "npm:^11.11.1" + "@emotion/styled": "npm:^11.11.0" + "@ethersproject/abstract-signer": "npm:^5.7.0" + "@ethersproject/address": "npm:^5.7.0" + "@ethersproject/experimental": "npm:^5.7.0" + "@ethersproject/providers": "npm:^5.7.2" + "@lifi/sdk": "npm:^2.5.0" + "@lifi/wallet-management": "npm:^2.6.0" + "@mui/icons-material": "npm:^5.14.14" + "@mui/lab": "npm:^5.0.0-alpha.149" + "@mui/material": "npm:^5.14.14" + "@tanstack/react-query": "npm:^4.36.1" + "@tanstack/react-virtual": "npm:^3.0.0-beta.68" + big.js: "npm:^6.2.1" + i18next: "npm:^23.6.0" + i18next-browser-languagedetector: "npm:^7.1.0" + microdiff: "npm:^1.3.2" + mitt: "npm:^3.0.1" + react: "npm:^18.2.0" + react-dom: "npm:^18.2.0" + react-hook-form: "npm:^7.47.0" + react-i18next: "npm:^13.3.1" + react-intersection-observer: "npm:^9.5.2" + react-router-dom: "npm:^6.17.0" + react-timer-hook: "npm:^3.0.7" + uuid: "npm:^9.0.1" + zustand: "npm:^4.4.4" + peerDependencies: + "@types/react": ^18.0.0 + react: ^18.0.0 + react-dom: ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: d4cfd4fc6f17bc1ce501fd7540600f98aea12788b87a1d17df990075bb07d5e172e39d1df44f94f63a063d4bc54f8cb926e96cd1f8d98ef4cb008db4c7466bba + languageName: node + linkType: hard + "@lit-labs/ssr-dom-shim@npm:^1.0.0, @lit-labs/ssr-dom-shim@npm:^1.1.0": version: 1.1.1 resolution: "@lit-labs/ssr-dom-shim@npm:1.1.1" @@ -6280,6 +6664,17 @@ __metadata: languageName: node linkType: hard +"@metamask/eth-json-rpc-provider@npm:^1.0.0": + version: 1.0.1 + resolution: "@metamask/eth-json-rpc-provider@npm:1.0.1" + dependencies: + "@metamask/json-rpc-engine": "npm:^7.0.0" + "@metamask/safe-event-emitter": "npm:^3.0.0" + "@metamask/utils": "npm:^5.0.1" + checksum: 4ed1a96afc32eb46f585ff54e16cb2aee2e7027dcf6a142d875b9c6248f15c9a00dd1df43035f2e64efbf01a96954040699d9d97e3b483c958f5b1d6c0fa6f50 + languageName: node + linkType: hard + "@metamask/eth-sig-util@npm:^4.0.0": version: 4.0.1 resolution: "@metamask/eth-sig-util@npm:4.0.1" @@ -6293,6 +6688,27 @@ __metadata: languageName: node linkType: hard +"@metamask/json-rpc-engine@npm:^7.0.0": + version: 7.3.3 + resolution: "@metamask/json-rpc-engine@npm:7.3.3" + dependencies: + "@metamask/rpc-errors": "npm:^6.2.1" + "@metamask/safe-event-emitter": "npm:^3.0.0" + "@metamask/utils": "npm:^8.3.0" + checksum: 116664c974c522d280335d9a02cba731e4f08562c2980415f7535513cd308c7e612e52618086996e5ac2b67db7f1e6ac1bd8201aba7825163db17a25f2874cc9 + languageName: node + linkType: hard + +"@metamask/rpc-errors@npm:^6.2.1": + version: 6.2.1 + resolution: "@metamask/rpc-errors@npm:6.2.1" + dependencies: + "@metamask/utils": "npm:^8.3.0" + fast-safe-stringify: "npm:^2.0.6" + checksum: 789f0a2090339c1aa43d45ee496f4f115e141bc55b98e4ce27498497568f9e85fb5527ecf1f113b156d88fc4f1e63a572ced74bdc1ba16826bf648391b223f7b + languageName: node + linkType: hard + "@metamask/safe-event-emitter@npm:2.0.0, @metamask/safe-event-emitter@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/safe-event-emitter@npm:2.0.0" @@ -6300,6 +6716,13 @@ __metadata: languageName: node linkType: hard +"@metamask/safe-event-emitter@npm:^3.0.0": + version: 3.1.1 + resolution: "@metamask/safe-event-emitter@npm:3.1.1" + checksum: e24db4d7c20764bfc5b025065f92518c805f0ffb1da4820078b8cff7dcae964c0f354cf053fcb7ac659de015d5ffdf21aae5e8d44e191ee8faa9066855f22653 + languageName: node + linkType: hard + "@metamask/utils@npm:^3.0.1": version: 3.6.0 resolution: "@metamask/utils@npm:3.6.0" @@ -6312,6 +6735,36 @@ __metadata: languageName: node linkType: hard +"@metamask/utils@npm:^5.0.1": + version: 5.0.2 + resolution: "@metamask/utils@npm:5.0.2" + dependencies: + "@ethereumjs/tx": "npm:^4.1.2" + "@types/debug": "npm:^4.1.7" + debug: "npm:^4.3.4" + semver: "npm:^7.3.8" + superstruct: "npm:^1.0.3" + checksum: c0d3ee4c3144b557936ab01c1a64950c0f99782bd0cf5596c0fabe8fd224dba48ed3483c0ea954791fe2ee81064a445adb489df50c776bbbeb67b5b96e930115 + languageName: node + linkType: hard + +"@metamask/utils@npm:^8.3.0": + version: 8.4.0 + resolution: "@metamask/utils@npm:8.4.0" + dependencies: + "@ethereumjs/tx": "npm:^4.2.0" + "@noble/hashes": "npm:^1.3.1" + "@scure/base": "npm:^1.1.3" + "@types/debug": "npm:^4.1.7" + debug: "npm:^4.3.4" + pony-cause: "npm:^2.1.10" + semver: "npm:^7.5.4" + superstruct: "npm:^1.0.3" + uuid: "npm:^9.0.1" + checksum: 5ce14d4e1630bf9269ab3b5cf3e05f393776b806c5be10a503128a3bc1d3aee891465d1f3937f537fdecec355a202a99ab70ae74f9bd37d51d3730c98c8f3dfc + languageName: node + linkType: hard + "@middy/core@npm:^5.3.2": version: 5.3.2 resolution: "@middy/core@npm:5.3.2" @@ -6482,6 +6935,209 @@ __metadata: languageName: node linkType: hard +"@mui/base@npm:5.0.0-beta.40": + version: 5.0.0-beta.40 + resolution: "@mui/base@npm:5.0.0-beta.40" + dependencies: + "@babel/runtime": "npm:^7.23.9" + "@floating-ui/react-dom": "npm:^2.0.8" + "@mui/types": "npm:^7.2.14" + "@mui/utils": "npm:^5.15.14" + "@popperjs/core": "npm:^2.11.8" + clsx: "npm:^2.1.0" + prop-types: "npm:^15.8.1" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: ebee3d9e1136710dcb2af5828acc6bd8d54f6b124785d011585c2665a48dc66e35ccb344d5ebc7fd8bfd776cccb8ea434911f151a62bee193677ee9dc67fc7fc + languageName: node + linkType: hard + +"@mui/core-downloads-tracker@npm:^5.15.15": + version: 5.15.15 + resolution: "@mui/core-downloads-tracker@npm:5.15.15" + checksum: 3e99a04e03f66d5fa5f0c23cdce0f9fa2331ba08c99a75dc2347ccaa1c6ed520153e04aaeb0d613c9dca099a3e6242558a6284c33d93f95cc65e3243b17860bc + languageName: node + linkType: hard + +"@mui/icons-material@npm:^5.14.14": + version: 5.15.15 + resolution: "@mui/icons-material@npm:5.15.15" + dependencies: + "@babel/runtime": "npm:^7.23.9" + peerDependencies: + "@mui/material": ^5.0.0 + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: e8810d7ffbba914baf21509e5d664f5f23bdba5d2a7ec7c485a3c7ddbbcb417e555c31feff2a3fa9c7d7fa0d22d4380f32488559ab3b170d891641dbc2161b22 + languageName: node + linkType: hard + +"@mui/lab@npm:^5.0.0-alpha.149": + version: 5.0.0-alpha.170 + resolution: "@mui/lab@npm:5.0.0-alpha.170" + dependencies: + "@babel/runtime": "npm:^7.23.9" + "@mui/base": "npm:5.0.0-beta.40" + "@mui/system": "npm:^5.15.15" + "@mui/types": "npm:^7.2.14" + "@mui/utils": "npm:^5.15.14" + clsx: "npm:^2.1.0" + prop-types: "npm:^15.8.1" + peerDependencies: + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@mui/material": ">=5.15.0" + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@types/react": + optional: true + checksum: be723d3824a8c56681c2fa71f3bfda5cad9404ed527ab82258ae85219fbb28e8080b90870954c064491699c15409fc2aa4e008e29011cadae1cb978179166f2d + languageName: node + linkType: hard + +"@mui/material@npm:^5.14.14": + version: 5.15.15 + resolution: "@mui/material@npm:5.15.15" + dependencies: + "@babel/runtime": "npm:^7.23.9" + "@mui/base": "npm:5.0.0-beta.40" + "@mui/core-downloads-tracker": "npm:^5.15.15" + "@mui/system": "npm:^5.15.15" + "@mui/types": "npm:^7.2.14" + "@mui/utils": "npm:^5.15.14" + "@types/react-transition-group": "npm:^4.4.10" + clsx: "npm:^2.1.0" + csstype: "npm:^3.1.3" + prop-types: "npm:^15.8.1" + react-is: "npm:^18.2.0" + react-transition-group: "npm:^4.4.5" + peerDependencies: + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@types/react": + optional: true + checksum: e2803d078243ee5489bf693f7e9d421061dfda79b6ce74762f3a81e3c519cf69c18af179e4267fc9d0ce799898e6b3d7eac029e7dcfbea12dab5e867d641984b + languageName: node + linkType: hard + +"@mui/private-theming@npm:^5.15.14": + version: 5.15.14 + resolution: "@mui/private-theming@npm:5.15.14" + dependencies: + "@babel/runtime": "npm:^7.23.9" + "@mui/utils": "npm:^5.15.14" + prop-types: "npm:^15.8.1" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 6a14311ed53ee4adccfe0ba93275b43773d22fdd10c0d4ba680b9368fc0616a5e0f38f29d2080bcd7e4ed79123047e5f245c403d3fd822e960a97762be65218d + languageName: node + linkType: hard + +"@mui/styled-engine@npm:^5.15.14": + version: 5.15.14 + resolution: "@mui/styled-engine@npm:5.15.14" + dependencies: + "@babel/runtime": "npm:^7.23.9" + "@emotion/cache": "npm:^11.11.0" + csstype: "npm:^3.1.3" + prop-types: "npm:^15.8.1" + peerDependencies: + "@emotion/react": ^11.4.1 + "@emotion/styled": ^11.3.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + checksum: 2a5e03bb20502aef94cfb908898c50abb769192deb32d7f4237039683ce5266104cdc4055a7f0a8342aa62447d52b7439a4f2d0dda0fa6709c227c3621468cab + languageName: node + linkType: hard + +"@mui/system@npm:^5.15.15": + version: 5.15.15 + resolution: "@mui/system@npm:5.15.15" + dependencies: + "@babel/runtime": "npm:^7.23.9" + "@mui/private-theming": "npm:^5.15.14" + "@mui/styled-engine": "npm:^5.15.14" + "@mui/types": "npm:^7.2.14" + "@mui/utils": "npm:^5.15.14" + clsx: "npm:^2.1.0" + csstype: "npm:^3.1.3" + prop-types: "npm:^15.8.1" + peerDependencies: + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@types/react": + optional: true + checksum: 90a84ad0bc1b401b6e53b13fe9cfe8a34668e84885d391abf5ab80b3cd0f37370be25cb40af253cdd468746386282fed24964315933fcb28d2d6e62de0db7bf1 + languageName: node + linkType: hard + +"@mui/types@npm:^7.2.14": + version: 7.2.14 + resolution: "@mui/types@npm:7.2.14" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: b10cca8f63ea522be4f7c185acd1f4d031947e53824cbf9dc5649c165bcfa8a2749e83fd0bd1809b8e2698f58638ab2b4ce03550095989189d14434ea5c6c0b6 + languageName: node + linkType: hard + +"@mui/utils@npm:^5.15.14": + version: 5.15.14 + resolution: "@mui/utils@npm:5.15.14" + dependencies: + "@babel/runtime": "npm:^7.23.9" + "@types/prop-types": "npm:^15.7.11" + prop-types: "npm:^15.8.1" + react-is: "npm:^18.2.0" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: b3cbe2d0aa7ec65969752dababc39fc6e0b8bb1a9cf8b9bac42ca40e3dd3eaa59b79765bd259019318acc7421d64b9f421bc67e776a581d7c9da6a1c0c50bfbc + languageName: node + linkType: hard + "@multiformats/mafmt@npm:^11.0.3": version: 11.1.2 resolution: "@multiformats/mafmt@npm:11.1.2" @@ -6652,7 +7308,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:^1.1.2": +"@noble/hashes@npm:^1.1.2, @noble/hashes@npm:^1.3.1": version: 1.4.0 resolution: "@noble/hashes@npm:1.4.0" checksum: e156e65794c473794c52fa9d06baf1eb20903d0d96719530f523cc4450f6c721a957c544796e6efd0197b2296e7cd70efeb312f861465e17940a3e3c7e0febc6 @@ -8317,6 +8973,13 @@ __metadata: languageName: node linkType: hard +"@popperjs/core@npm:^2.11.8": + version: 2.11.8 + resolution: "@popperjs/core@npm:2.11.8" + checksum: ddd16090cde777aaf102940f05d0274602079a95ad9805bd20bc55dcc7c3a2ba1b99dd5c73e5cc2753c3d31250ca52a67d58059459d7d27debb983a9f552936c + languageName: node + linkType: hard + "@prettier/sync@npm:^0.3.0": version: 0.3.0 resolution: "@prettier/sync@npm:0.3.0" @@ -8431,6 +9094,13 @@ __metadata: languageName: node linkType: hard +"@remix-run/router@npm:1.15.3": + version: 1.15.3 + resolution: "@remix-run/router@npm:1.15.3" + checksum: 43d402b4ad3dff6dee5c1bc0822aeeb4d885d11c74c45fca7f2f4d7e57853fddbbb813c372919bb3fcc63f95fbcffdd1d4ac1c406857ea07b9d09a09d0562c8e + languageName: node + linkType: hard + "@repeaterjs/repeater@npm:3.0.4, @repeaterjs/repeater@npm:^3.0.4": version: 3.0.4 resolution: "@repeaterjs/repeater@npm:3.0.4" @@ -8655,6 +9325,13 @@ __metadata: languageName: node linkType: hard +"@scure/base@npm:^1.1.3": + version: 1.1.6 + resolution: "@scure/base@npm:1.1.6" + checksum: 814fd1cce24f1e152751fabca2853d26aaa96ff8a9349c43d9aebc3b3d8ca88dd902966e1c289590a37f35d4c4436c6aedb1b386924b2909072045af4c3e9fe4 + languageName: node + linkType: hard + "@scure/base@npm:~1.1.0": version: 1.1.1 resolution: "@scure/base@npm:1.1.1" @@ -9772,6 +10449,13 @@ __metadata: languageName: node linkType: hard +"@tanstack/query-core@npm:4.36.1": + version: 4.36.1 + resolution: "@tanstack/query-core@npm:4.36.1" + checksum: 7c648872cd491bcab2aa4c18e0b7ca130c072f05c277a5876977fa3bfa87634bbfde46e9d249236587d78c39866889a02e4e202b478dc6074ff96093732ae56d + languageName: node + linkType: hard + "@tanstack/query-persist-client-core@npm:4.29.15": version: 4.29.15 resolution: "@tanstack/query-persist-client-core@npm:4.29.15" @@ -9820,6 +10504,44 @@ __metadata: languageName: node linkType: hard +"@tanstack/react-query@npm:^4.36.1": + version: 4.36.1 + resolution: "@tanstack/react-query@npm:4.36.1" + dependencies: + "@tanstack/query-core": "npm:4.36.1" + use-sync-external-store: "npm:^1.2.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-native: "*" + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + checksum: 764b860c3ac8d254fc6b07e01054a0f58058644d59626c724b213293fbf1e31c198cbb26e4c32c0d16dcaec0353c0ae19147d9c667675b31f8cea1d64f1ff4ac + languageName: node + linkType: hard + +"@tanstack/react-virtual@npm:^3.0.0-beta.68": + version: 3.2.0 + resolution: "@tanstack/react-virtual@npm:3.2.0" + dependencies: + "@tanstack/virtual-core": "npm:3.2.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 09bf6db0f3dbfa2245c7d78ed425bb7c0e169cbe5024cc6bfc53005505a472b36a0b5506d6fa4b8a47c07296c5982b1ac49acd4f32c48547aef7556f9ed2ed1d + languageName: node + linkType: hard + +"@tanstack/virtual-core@npm:3.2.0": + version: 3.2.0 + resolution: "@tanstack/virtual-core@npm:3.2.0" + checksum: cf3ef6a2f3fa8ec4b155926da32508df45dadf268b365f206a171d011d6c728ddc9a7ea074575145266ccbdf445352ee9c9278bc1f55c3f96ad69ade7964b936 + languageName: node + linkType: hard + "@tootallnate/once@npm:1": version: 1.1.2 resolution: "@tootallnate/once@npm:1.1.2" @@ -10472,6 +11194,13 @@ __metadata: languageName: node linkType: hard +"@types/prop-types@npm:^15.7.11": + version: 15.7.12 + resolution: "@types/prop-types@npm:15.7.12" + checksum: ac16cc3d0a84431ffa5cfdf89579ad1e2269549f32ce0c769321fdd078f84db4fbe1b461ed5a1a496caf09e637c0e367d600c541435716a55b1d9713f5035dfe + languageName: node + linkType: hard + "@types/q@npm:^1.5.1": version: 1.5.5 resolution: "@types/q@npm:1.5.5" @@ -10511,6 +11240,15 @@ __metadata: languageName: node linkType: hard +"@types/react-transition-group@npm:^4.4.10": + version: 4.4.10 + resolution: "@types/react-transition-group@npm:4.4.10" + dependencies: + "@types/react": "npm:*" + checksum: b429f3bd54d9aea6c0395943ce2dda6b76fb458e902365bd91fd99bf72064fb5d59e2b74e78d10f2871908501d350da63e230d81bda2b616c967cab8dc51bd16 + languageName: node + linkType: hard + "@types/react@npm:*": version: 18.2.13 resolution: "@types/react@npm:18.2.13" @@ -11144,7 +11882,7 @@ __metadata: languageName: node linkType: hard -"@wagmi/connectors@npm:3.1.11": +"@wagmi/connectors@npm:3.1.11, @wagmi/connectors@npm:^3.1.5": version: 3.1.11 resolution: "@wagmi/connectors@npm:3.1.11" dependencies: @@ -11210,6 +11948,31 @@ __metadata: languageName: node linkType: hard +"@walletconnect/core@npm:2.12.1": + version: 2.12.1 + resolution: "@walletconnect/core@npm:2.12.1" + dependencies: + "@walletconnect/heartbeat": "npm:1.2.1" + "@walletconnect/jsonrpc-provider": "npm:1.0.13" + "@walletconnect/jsonrpc-types": "npm:1.0.3" + "@walletconnect/jsonrpc-utils": "npm:1.0.8" + "@walletconnect/jsonrpc-ws-connection": "npm:1.0.14" + "@walletconnect/keyvaluestorage": "npm:^1.1.1" + "@walletconnect/logger": "npm:^2.1.0" + "@walletconnect/relay-api": "npm:^1.0.9" + "@walletconnect/relay-auth": "npm:^1.0.4" + "@walletconnect/safe-json": "npm:^1.0.2" + "@walletconnect/time": "npm:^1.0.2" + "@walletconnect/types": "npm:2.12.1" + "@walletconnect/utils": "npm:2.12.1" + events: "npm:^3.3.0" + isomorphic-unfetch: "npm:3.1.0" + lodash.isequal: "npm:4.5.0" + uint8arrays: "npm:^3.1.0" + checksum: b960d39d163be28f094eecd270658f8f992cb6fee8be48748f8268177c025a3e7815625500ac1c10ba9583325d4f806de1eb3870d9970ce41b163b5caa23ae25 + languageName: node + linkType: hard + "@walletconnect/crypto@npm:^1.0.3": version: 1.0.3 resolution: "@walletconnect/crypto@npm:1.0.3" @@ -11262,6 +12025,24 @@ __metadata: languageName: node linkType: hard +"@walletconnect/ethereum-provider@npm:^2.10.6": + version: 2.12.1 + resolution: "@walletconnect/ethereum-provider@npm:2.12.1" + dependencies: + "@walletconnect/jsonrpc-http-connection": "npm:^1.0.7" + "@walletconnect/jsonrpc-provider": "npm:^1.0.13" + "@walletconnect/jsonrpc-types": "npm:^1.0.3" + "@walletconnect/jsonrpc-utils": "npm:^1.0.8" + "@walletconnect/modal": "npm:^2.6.2" + "@walletconnect/sign-client": "npm:2.12.1" + "@walletconnect/types": "npm:2.12.1" + "@walletconnect/universal-provider": "npm:2.12.1" + "@walletconnect/utils": "npm:2.12.1" + events: "npm:^3.3.0" + checksum: 9e48a865b06ac1a02695998af2c48f12d6f03ce08b56ebaefd768689db6435e31cea649739c9989d22da141a0aa39651e075dad29aec4f0e9983ec492f60840e + languageName: node + linkType: hard + "@walletconnect/events@npm:^1.0.1": version: 1.0.1 resolution: "@walletconnect/events@npm:1.0.1" @@ -11435,6 +12216,16 @@ __metadata: languageName: node linkType: hard +"@walletconnect/logger@npm:^2.1.0": + version: 2.1.0 + resolution: "@walletconnect/logger@npm:2.1.0" + dependencies: + "@walletconnect/safe-json": "npm:^1.0.2" + pino: "npm:7.11.0" + checksum: 26ebd689b35359b7510479085fc6f210015f223c04ed7804b8974d41379d5cff72b9bce0876e1cdccfae7eb1a12af7ba0f30a5e80621c84ad3fe95f89f51532f + languageName: node + linkType: hard + "@walletconnect/modal-core@npm:2.6.2": version: 2.6.2 resolution: "@walletconnect/modal-core@npm:2.6.2" @@ -11528,6 +12319,23 @@ __metadata: languageName: node linkType: hard +"@walletconnect/sign-client@npm:2.12.1": + version: 2.12.1 + resolution: "@walletconnect/sign-client@npm:2.12.1" + dependencies: + "@walletconnect/core": "npm:2.12.1" + "@walletconnect/events": "npm:^1.0.1" + "@walletconnect/heartbeat": "npm:1.2.1" + "@walletconnect/jsonrpc-utils": "npm:1.0.8" + "@walletconnect/logger": "npm:^2.0.1" + "@walletconnect/time": "npm:^1.0.2" + "@walletconnect/types": "npm:2.12.1" + "@walletconnect/utils": "npm:2.12.1" + events: "npm:^3.3.0" + checksum: 3665cffb50e5e81fa901ea0c469c817b0f005c6fb820617f8068cb9137cd2cc0480d726ce1b8b5631186b02ce92bdae942f510503a312032491aaeddd27d0d48 + languageName: node + linkType: hard + "@walletconnect/time@npm:^1.0.2": version: 1.0.2 resolution: "@walletconnect/time@npm:1.0.2" @@ -11551,6 +12359,20 @@ __metadata: languageName: node linkType: hard +"@walletconnect/types@npm:2.12.1": + version: 2.12.1 + resolution: "@walletconnect/types@npm:2.12.1" + dependencies: + "@walletconnect/events": "npm:^1.0.1" + "@walletconnect/heartbeat": "npm:1.2.1" + "@walletconnect/jsonrpc-types": "npm:1.0.3" + "@walletconnect/keyvaluestorage": "npm:^1.1.1" + "@walletconnect/logger": "npm:^2.0.1" + events: "npm:^3.3.0" + checksum: 81225c3131b5b117543cd5e3f7284df74a17f32dd0129d114f93c38b214660c4eb192e80d2ca2b3518051a09aef8c2e3e799a035c7abd175f59dad6692c4161c + languageName: node + linkType: hard + "@walletconnect/universal-provider@npm:2.11.0": version: 2.11.0 resolution: "@walletconnect/universal-provider@npm:2.11.0" @@ -11568,6 +12390,23 @@ __metadata: languageName: node linkType: hard +"@walletconnect/universal-provider@npm:2.12.1": + version: 2.12.1 + resolution: "@walletconnect/universal-provider@npm:2.12.1" + dependencies: + "@walletconnect/jsonrpc-http-connection": "npm:^1.0.7" + "@walletconnect/jsonrpc-provider": "npm:1.0.13" + "@walletconnect/jsonrpc-types": "npm:^1.0.2" + "@walletconnect/jsonrpc-utils": "npm:^1.0.7" + "@walletconnect/logger": "npm:^2.0.1" + "@walletconnect/sign-client": "npm:2.12.1" + "@walletconnect/types": "npm:2.12.1" + "@walletconnect/utils": "npm:2.12.1" + events: "npm:^3.3.0" + checksum: 8d72b07b8e77ae977df35a111edd2a5d3ea140c9187bcbdfd46a3aa858bf638d7417a68c49b94d2f6712057bb3b4b17f8138d8e2756cfc2cc189437ca060c7a0 + languageName: node + linkType: hard + "@walletconnect/utils@npm:2.11.0": version: 2.11.0 resolution: "@walletconnect/utils@npm:2.11.0" @@ -11590,6 +12429,28 @@ __metadata: languageName: node linkType: hard +"@walletconnect/utils@npm:2.12.1": + version: 2.12.1 + resolution: "@walletconnect/utils@npm:2.12.1" + dependencies: + "@stablelib/chacha20poly1305": "npm:1.0.1" + "@stablelib/hkdf": "npm:1.0.1" + "@stablelib/random": "npm:^1.0.2" + "@stablelib/sha256": "npm:1.0.1" + "@stablelib/x25519": "npm:^1.0.3" + "@walletconnect/relay-api": "npm:^1.0.9" + "@walletconnect/safe-json": "npm:^1.0.2" + "@walletconnect/time": "npm:^1.0.2" + "@walletconnect/types": "npm:2.12.1" + "@walletconnect/window-getters": "npm:^1.0.1" + "@walletconnect/window-metadata": "npm:^1.0.1" + detect-browser: "npm:5.3.0" + query-string: "npm:7.1.3" + uint8arrays: "npm:^3.1.0" + checksum: 7688c4353650820d905def13e4ba77f380d1b96f499f591dff865fbff696b23e4037e9e49f092cf943ebea34b8cc16563e2fd650085d53c061c71cd029153e63 + languageName: node + linkType: hard + "@walletconnect/window-getters@npm:^1.0.1": version: 1.0.1 resolution: "@walletconnect/window-getters@npm:1.0.1" @@ -13470,6 +14331,13 @@ __metadata: languageName: node linkType: hard +"big.js@npm:^6.2.1": + version: 6.2.1 + resolution: "big.js@npm:6.2.1" + checksum: 1d4b621451de712cab20464a26f22b2eee5e7daf0ee88c49dfbfa76061ec37cff2257751e8c3fc183c231bcffac2f006e33af930d8f49b03c758890080b76ada + languageName: node + linkType: hard + "bigint-buffer@npm:^1.1.5": version: 1.1.5 resolution: "bigint-buffer@npm:1.1.5" @@ -13494,6 +14362,13 @@ __metadata: languageName: node linkType: hard +"bignumber.js@npm:^9.1.2": + version: 9.1.2 + resolution: "bignumber.js@npm:9.1.2" + checksum: d89b8800a987225d2c00dcbf8a69dc08e92aa0880157c851c287b307d31ceb2fc2acb0c62c3e3a3d42b6c5fcae9b004035f13eb4386e56d529d7edac18d5c9d8 + languageName: node + linkType: hard + "bin-links@npm:^4.0.3": version: 4.0.3 resolution: "bin-links@npm:4.0.3" @@ -14824,13 +15699,20 @@ __metadata: languageName: node linkType: hard -"clsx@npm:^1.1.0, clsx@npm:^1.1.1": +"clsx@npm:^1.1.0, clsx@npm:^1.1.1, clsx@npm:^1.2.1": version: 1.2.1 resolution: "clsx@npm:1.2.1" checksum: 5ded6f61f15f1fa0350e691ccec43a28b12fb8e64c8e94715f2a937bc3722d4c3ed41d6e945c971fc4dcc2a7213a43323beaf2e1c28654af63ba70c9968a8643 languageName: node linkType: hard +"clsx@npm:^2.1.0": + version: 2.1.0 + resolution: "clsx@npm:2.1.0" + checksum: 2e0ce7c3b6803d74fc8147c408f88e79245583202ac14abd9691e2aebb9f312de44270b79154320d10bb7804a9197869635d1291741084826cff20820f31542b + languageName: node + linkType: hard + "cluster-key-slot@npm:^1.1.0": version: 1.1.2 resolution: "cluster-key-slot@npm:1.1.2" @@ -15445,7 +16327,7 @@ __metadata: languageName: node linkType: hard -"convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": +"convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.5.0, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": version: 1.9.0 resolution: "convert-source-map@npm:1.9.0" checksum: dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 @@ -16048,7 +16930,7 @@ __metadata: languageName: node linkType: hard -"csstype@npm:^3.1.2": +"csstype@npm:^3.1.2, csstype@npm:^3.1.3": version: 3.1.3 resolution: "csstype@npm:3.1.3" checksum: f593cce41ff5ade23f44e77521e3a1bcc2c64107041e1bf6c3c32adc5187d0d60983292fda326154d20b01079e24931aa5b08e4467cc488b60bb1e7f6d478ade @@ -16778,6 +17660,16 @@ __metadata: languageName: node linkType: hard +"dom-helpers@npm:^5.0.1": + version: 5.2.1 + resolution: "dom-helpers@npm:5.2.1" + dependencies: + "@babel/runtime": "npm:^7.8.7" + csstype: "npm:^3.0.2" + checksum: bed2341adf8864bf932b3289c24f35fdd99930af77df46688abf2d753ff291df49a15850c874d686d9be6ec4e1c6835673906e64dbd8b2839d227f117a11fd41 + languageName: node + linkType: hard + "dom-serializer@npm:0": version: 0.2.2 resolution: "dom-serializer@npm:0.2.2" @@ -18253,6 +19145,19 @@ __metadata: languageName: node linkType: hard +"eth-block-tracker@npm:^7.1.0": + version: 7.1.0 + resolution: "eth-block-tracker@npm:7.1.0" + dependencies: + "@metamask/eth-json-rpc-provider": "npm:^1.0.0" + "@metamask/safe-event-emitter": "npm:^3.0.0" + "@metamask/utils": "npm:^5.0.1" + json-rpc-random-id: "npm:^1.0.1" + pify: "npm:^3.0.0" + checksum: b001ecb126e949a9ff19950596d5180b2f1bc5504e3dec0c01b3417e8ad190f4a53dfc61be901b72ab6dd558d1d711b73eca560bc8a605d0348eef9f501defab + languageName: node + linkType: hard + "eth-gas-reporter@npm:^0.2.25": version: 0.2.25 resolution: "eth-gas-reporter@npm:0.2.25" @@ -18294,6 +19199,19 @@ __metadata: languageName: node linkType: hard +"eth-json-rpc-filters@npm:^6.0.0": + version: 6.0.1 + resolution: "eth-json-rpc-filters@npm:6.0.1" + dependencies: + "@metamask/safe-event-emitter": "npm:^3.0.0" + async-mutex: "npm:^0.2.6" + eth-query: "npm:^2.1.2" + json-rpc-engine: "npm:^6.1.0" + pify: "npm:^5.0.0" + checksum: d1fa8bb21da07c2f5d37c1e6053d499b272b4f49542077efc6b05eebe49affa9df7221c8c2439c4e33caa3f4ccb35240a6105abc83b83375dae03c0de53113a7 + languageName: node + linkType: hard + "eth-query@npm:^2.1.2": version: 2.1.2 resolution: "eth-query@npm:2.1.2" @@ -18313,7 +19231,7 @@ __metadata: languageName: node linkType: hard -"eth-rpc-errors@npm:^4.0.2": +"eth-rpc-errors@npm:^4.0.2, eth-rpc-errors@npm:^4.0.3": version: 4.0.3 resolution: "eth-rpc-errors@npm:4.0.3" dependencies: @@ -18447,7 +19365,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.5.3, ethers@npm:^5.6.1, ethers@npm:^5.6.8, ethers@npm:^5.7.1, ethers@npm:^5.7.2": +"ethers@npm:^5.5.3, ethers@npm:^5.6.1, ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -19104,6 +20022,13 @@ __metadata: languageName: node linkType: hard +"find-root@npm:^1.1.0": + version: 1.1.0 + resolution: "find-root@npm:1.1.0" + checksum: caa799c976a14925ba7f31ca1a226fe73d3aa270f4f1b623fcfeb1c6e263111db4beb807d8acd31bd4d48d44c343b93688a9288dfbccca27463c36a0301b0bb9 + languageName: node + linkType: hard + "find-up@npm:3.0.0, find-up@npm:^3.0.0": version: 3.0.0 resolution: "find-up@npm:3.0.0" @@ -20792,7 +21717,7 @@ __metadata: languageName: node linkType: hard -"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.2": +"hoist-non-react-statics@npm:^3.0.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.1, hoist-non-react-statics@npm:^3.3.2": version: 3.3.2 resolution: "hoist-non-react-statics@npm:3.3.2" dependencies: @@ -20894,6 +21819,15 @@ __metadata: languageName: node linkType: hard +"html-parse-stringify@npm:^3.0.1": + version: 3.0.1 + resolution: "html-parse-stringify@npm:3.0.1" + dependencies: + void-elements: "npm:3.1.0" + checksum: 8743b76cc50e46d1956c1ad879d18eb9613b0d2d81e24686d633f9f69bb26b84676f64a926973de793cca479997017a63219278476d617b6c42d68246d7c07fe + languageName: node + linkType: hard + "html-to-text@npm:^8.2.1": version: 8.2.1 resolution: "html-to-text@npm:8.2.1" @@ -21222,6 +22156,24 @@ __metadata: languageName: node linkType: hard +"i18next-browser-languagedetector@npm:^7.1.0": + version: 7.2.1 + resolution: "i18next-browser-languagedetector@npm:7.2.1" + dependencies: + "@babel/runtime": "npm:^7.23.2" + checksum: 20c93cbd23d62703e12268ec24679a91743cb6d652a6e83e6a102b2ecb8f79542821046a7f8f567a93fabfdc5cd9353dc7f3050c9c48948fe2ae0640d859a0dd + languageName: node + linkType: hard + +"i18next@npm:^23.6.0": + version: 23.10.1 + resolution: "i18next@npm:23.10.1" + dependencies: + "@babel/runtime": "npm:^7.23.2" + checksum: e4cfb143bdb6fd343f68749a40cf562aa47f11c7af0243c0533868ae097912c3ddd6c384eb4116d1fced024a91279424abd8c2d1f694bbf304c42ebe3968ecca + languageName: node + linkType: hard + "iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.24": version: 0.4.24 resolution: "iconv-lite@npm:0.4.24" @@ -24065,6 +25017,18 @@ __metadata: languageName: node linkType: hard +"keccak@npm:^3.0.3": + version: 3.0.4 + resolution: "keccak@npm:3.0.4" + dependencies: + node-addon-api: "npm:^2.0.0" + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.2.0" + readable-stream: "npm:^3.6.0" + checksum: 45478bb0a57e44d0108646499b8360914b0fbc8b0e088f1076659cb34faaa9eb829c40f6dd9dadb3460bb86cc33153c41fed37fe5ce09465a60e71e78c23fa55 + languageName: node + linkType: hard + "keypress@npm:0.1.x": version: 0.1.0 resolution: "keypress@npm:0.1.0" @@ -25482,6 +26446,20 @@ __metadata: languageName: node linkType: hard +"micro-ftch@npm:^0.3.1": + version: 0.3.1 + resolution: "micro-ftch@npm:0.3.1" + checksum: a7ab07d25e28ec4ae492ce4542ea9b06eee85538742b3b1263b247366ee8872f2c5ce9c8651138b2f1d22c8212f691a7b8b5384fe86ead5aff1852e211f1c035 + languageName: node + linkType: hard + +"microdiff@npm:^1.3.2": + version: 1.4.0 + resolution: "microdiff@npm:1.4.0" + checksum: 4cae2ec4d0540b65656837a7c47a17d6428a1be2909d268a579921183c9c21a86e0dfa0c8ade8c60f9127887783a17d54ce7be16d5556708a0e58312bca8803d + languageName: node + linkType: hard + "micromark-core-commonmark@npm:^1.0.1": version: 1.1.0 resolution: "micromark-core-commonmark@npm:1.1.0" @@ -26004,6 +26982,13 @@ __metadata: languageName: node linkType: hard +"mitt@npm:^3.0.1": + version: 3.0.1 + resolution: "mitt@npm:3.0.1" + checksum: 287c70d8e73ffc25624261a4989c783768aed95ecb60900f051d180cf83e311e3e59865bfd6e9d029cdb149dc20ba2f128a805e9429c5c4ce33b1416c65bbd14 + languageName: node + linkType: hard + "mkdirp-classic@npm:^0.5.2": version: 0.5.3 resolution: "mkdirp-classic@npm:0.5.3" @@ -28074,6 +29059,13 @@ __metadata: languageName: node linkType: hard +"pony-cause@npm:^2.1.10": + version: 2.1.10 + resolution: "pony-cause@npm:2.1.10" + checksum: 906563565030996d0c40ba79a584e2f298391931acc59c98510f9fd583d72cd9e9c58b0fb5a25bbae19daf16840f94cb9c1ee72c7ed5ef249ecba147cee40495 + languageName: node + linkType: hard + "postcss-attribute-case-insensitive@npm:^5.0.2": version: 5.0.2 resolution: "postcss-attribute-case-insensitive@npm:5.0.2" @@ -28970,6 +29962,13 @@ __metadata: languageName: node linkType: hard +"preact@npm:^10.16.0": + version: 10.20.1 + resolution: "preact@npm:10.20.1" + checksum: 894ac14b3ec6f8ca308b53fb14e12e57678248fd1faa24ae857f5e37d9c11b34833e6dd1ba8210a34de4d6d523462923b1f9c93d35ce433874affd056f2d0998 + languageName: node + linkType: hard + "prelude-ls@npm:^1.2.1": version: 1.2.1 resolution: "prelude-ls@npm:1.2.1" @@ -29148,7 +30147,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:^15.0.0, prop-types@npm:^15.6.1, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": +"prop-types@npm:^15.0.0, prop-types@npm:^15.6.1, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -29712,6 +30711,33 @@ __metadata: languageName: node linkType: hard +"react-hook-form@npm:^7.47.0": + version: 7.51.2 + resolution: "react-hook-form@npm:7.51.2" + peerDependencies: + react: ^16.8.0 || ^17 || ^18 + checksum: 30a6d7dec2d8bcdfd9ad92508d0a19e0fb6b344034a5dfb74ff419b54ef29f70e381bbf11bf57ddb808d37748f86581f1679fecac33860944b1baf3217a10f7a + languageName: node + linkType: hard + +"react-i18next@npm:^13.3.1": + version: 13.5.0 + resolution: "react-i18next@npm:13.5.0" + dependencies: + "@babel/runtime": "npm:^7.22.5" + html-parse-stringify: "npm:^3.0.1" + peerDependencies: + i18next: ">= 23.2.3" + react: ">= 16.8.0" + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true + checksum: 903b486d112cd0aa40bdc3afaefd0c32b91c0a1e3e3561367c8d91ddc0fbad9945f1d630c3ddcd4764795fc00e0887252e2d337256a825caf3a86de038f6b2db + languageName: node + linkType: hard + "react-identicons@npm:^1.2.5": version: 1.2.5 resolution: "react-identicons@npm:1.2.5" @@ -29722,6 +30748,19 @@ __metadata: languageName: node linkType: hard +"react-intersection-observer@npm:^9.5.2": + version: 9.8.1 + resolution: "react-intersection-observer@npm:9.8.1" + peerDependencies: + react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react-dom: + optional: true + checksum: eaff5c0ccee267f565e6f0333f11f0842bd5be6eacd6994ccfdcb8a53a9412b25d63fa50ca59868bb82b1562c12579052f5657779f94ddb03e969516acacc6cf + languageName: node + linkType: hard + "react-is@npm:^16.12.0, react-is@npm:^16.13.1, react-is@npm:^16.7.0": version: 16.13.1 resolution: "react-is@npm:16.13.1" @@ -29823,6 +30862,19 @@ __metadata: languageName: node linkType: hard +"react-router-dom@npm:^6.17.0": + version: 6.22.3 + resolution: "react-router-dom@npm:6.22.3" + dependencies: + "@remix-run/router": "npm:1.15.3" + react-router: "npm:6.22.3" + peerDependencies: + react: ">=16.8" + react-dom: ">=16.8" + checksum: 868a530c3167e1903f170818c0162760b8fbe9b10a7a7a79e5998990df341cd7127ba7819af4a9105af72c13453c7c4d76b2b07a70b56fff012fa0508b51940e + languageName: node + linkType: hard + "react-router-dom@npm:^6.21.2": version: 6.21.2 resolution: "react-router-dom@npm:6.21.2" @@ -29847,6 +30899,17 @@ __metadata: languageName: node linkType: hard +"react-router@npm:6.22.3": + version: 6.22.3 + resolution: "react-router@npm:6.22.3" + dependencies: + "@remix-run/router": "npm:1.15.3" + peerDependencies: + react: ">=16.8" + checksum: df3948afd6500faf4b82a72375b9177536d878d54cad18e20a175efcbfdd0d94852aac59660d786946636ed325284d94a8f46652d898df304d6a29c9a3932afd + languageName: node + linkType: hard + "react-scripts@npm:^5.0.1": version: 5.0.1 resolution: "react-scripts@npm:5.0.1" @@ -29914,6 +30977,15 @@ __metadata: languageName: node linkType: hard +"react-timer-hook@npm:^3.0.7": + version: 3.0.7 + resolution: "react-timer-hook@npm:3.0.7" + peerDependencies: + react: ">=16.8.0" + checksum: 36807a32245ca7d840805bc5e727951584cb40304331374b27e7b49ba77e820262ecaac90f6d0f1931991f7c9d3b6050cb89384a446812a4463ce890b1547332 + languageName: node + linkType: hard + "react-toastify@npm:^9.1.3": version: 9.1.3 resolution: "react-toastify@npm:9.1.3" @@ -29926,6 +30998,21 @@ __metadata: languageName: node linkType: hard +"react-transition-group@npm:^4.4.5": + version: 4.4.5 + resolution: "react-transition-group@npm:4.4.5" + dependencies: + "@babel/runtime": "npm:^7.5.5" + dom-helpers: "npm:^5.0.1" + loose-envify: "npm:^1.4.0" + prop-types: "npm:^15.6.2" + peerDependencies: + react: ">=16.6.0" + react-dom: ">=16.6.0" + checksum: ca32d3fd2168c976c5d90a317f25d5f5cd723608b415fb3b9006f9d793c8965c619562d0884503a3e44e4b06efbca4fdd1520f30e58ca3e00a0890e637d55419 + languageName: node + linkType: hard + "react-universal-interface@npm:^0.6.2": version: 0.6.2 resolution: "react-universal-interface@npm:0.6.2" @@ -30230,6 +31317,13 @@ __metadata: languageName: node linkType: hard +"regenerator-runtime@npm:^0.14.0": + version: 0.14.1 + resolution: "regenerator-runtime@npm:0.14.1" + checksum: 5db3161abb311eef8c45bcf6565f4f378f785900ed3945acf740a9888c792f75b98ecb77f0775f3bf95502ff423529d23e94f41d80c8256e8fa05ed4b07cf471 + languageName: node + linkType: hard + "regenerator-transform@npm:^0.15.1": version: 0.15.1 resolution: "regenerator-transform@npm:0.15.1" @@ -32022,6 +33116,13 @@ __metadata: languageName: node linkType: hard +"source-map@npm:^0.5.7": + version: 0.5.7 + resolution: "source-map@npm:0.5.7" + checksum: 9b4ac749ec5b5831cad1f8cc4c19c4298ebc7474b24a0acf293e2f040f03f8eeccb3d01f12aa0f90cf46d555c887e03912b83a042c627f419bda5152d89c5269 + languageName: node + linkType: hard + "source-map@npm:^0.7.3": version: 0.7.4 resolution: "source-map@npm:0.7.4" @@ -32833,6 +33934,13 @@ __metadata: languageName: node linkType: hard +"stylis@npm:4.2.0": + version: 4.2.0 + resolution: "stylis@npm:4.2.0" + checksum: 58359185275ef1f39c339ae94e598168aa6bb789f6cf0d52e726c1e7087a94e9c17f0385a28d34483dec1ffc2c75670ec714dc5603d99c3124ec83bc2b0a0f42 + languageName: node + linkType: hard + "stylis@npm:^4.3.0": version: 4.3.1 resolution: "stylis@npm:4.3.1" @@ -34689,6 +35797,15 @@ __metadata: languageName: node linkType: hard +"uuid@npm:^9.0.1": + version: 9.0.1 + resolution: "uuid@npm:9.0.1" + bin: + uuid: dist/bin/uuid + checksum: 9d0b6adb72b736e36f2b1b53da0d559125ba3e39d913b6072f6f033e0c87835b414f0836b45bcfaf2bdf698f92297fea1c3cc19b0b258bc182c9c43cc0fab9f2 + languageName: node + linkType: hard + "uvu@npm:^0.5.0": version: 0.5.6 resolution: "uvu@npm:0.5.6" @@ -34886,7 +36003,7 @@ __metadata: languageName: node linkType: hard -"viem@npm:^1.21.4": +"viem@npm:^1.17.2, viem@npm:^1.19.11, viem@npm:^1.21.4": version: 1.21.4 resolution: "viem@npm:1.21.4" dependencies: @@ -35013,6 +36130,13 @@ __metadata: languageName: node linkType: hard +"void-elements@npm:3.1.0": + version: 3.1.0 + resolution: "void-elements@npm:3.1.0" + checksum: 0390f818107fa8fce55bb0a5c3f661056001c1d5a2a48c28d582d4d847347c2ab5b7f8272314cac58acf62345126b6b09bea623a185935f6b1c3bbce0dfd7f7f + languageName: node + linkType: hard + "vue-hot-reload-api@npm:^2.3.0": version: 2.3.4 resolution: "vue-hot-reload-api@npm:2.3.4" @@ -35136,7 +36260,7 @@ __metadata: languageName: node linkType: hard -"wagmi@npm:^1.4.13": +"wagmi@npm:^1.4.13, wagmi@npm:^1.4.7": version: 1.4.13 resolution: "wagmi@npm:1.4.13" dependencies: @@ -36471,3 +37595,23 @@ __metadata: checksum: 95a5335716414c8bef3a48165226ef099ca232931ab6cd1497515ee4241e8d5a8100edf5c3cc7d7131b72a07eb0484501405aa2c3222b4b93ba690cfa2b5593d languageName: node linkType: hard + +"zustand@npm:^4.4.4": + version: 4.5.2 + resolution: "zustand@npm:4.5.2" + dependencies: + use-sync-external-store: "npm:1.2.0" + peerDependencies: + "@types/react": ">=16.8" + immer: ">=9.0.6" + react: ">=16.8" + peerDependenciesMeta: + "@types/react": + optional: true + immer: + optional: true + react: + optional: true + checksum: 9e9e92ce7378c5de1d7682f4f10340a1c07a81b673ad0a125b59883a6ade3f2bf39eac6ccc5b05630f9df6ed925291f681592db59ccd3815685c2e83f67c8525 + languageName: node + linkType: hard From ac990a14db2b9a9424780350361f329cbdf77ade Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Tue, 9 Apr 2024 13:26:39 +0700 Subject: [PATCH 03/22] feat(web): config-widget --- web/src/pages/GetPnk/Widget.tsx | 88 +++++++++++++++++---------------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/web/src/pages/GetPnk/Widget.tsx b/web/src/pages/GetPnk/Widget.tsx index 3c09d9a41..7f734be5c 100644 --- a/web/src/pages/GetPnk/Widget.tsx +++ b/web/src/pages/GetPnk/Widget.tsx @@ -1,52 +1,54 @@ -import React from "react"; +import React, { useMemo } from "react"; import { LiFiWidget, WidgetConfig } from "@lifi/widget"; -import { useTheme } from "styled-components"; +import { Theme, useTheme } from "styled-components"; -export const Widget = () => { - const theme = useTheme(); - - const widgetConfig: WidgetConfig = { - fromChain: 1, - toChain: 42161, - fromToken: "0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d", - toToken: "0x330bD769382cFc6d50175903434CCC8D206DCAE5", - containerStyle: { - border: `1px solid ${theme.stroke}`, - borderRadius: "3px", - background: theme.whiteBackground, - }, - hiddenUI: ["appearance"], - theme: { - palette: { - primary: { - main: theme.primaryBlue, - }, - secondary: { - main: theme.primaryBlue, - }, - background: { - paper: theme.whiteBackground, // bg color for cards - default: theme.whiteBackground, // bg color container - }, - grey: { - 300: theme.stroke, // border light theme - 800: theme.stroke, // border dark theme - }, - text: { - primary: theme.primaryText, - secondary: theme.secondaryText, - }, +const getWidgetConfig = (theme: Theme): WidgetConfig => ({ + fromChain: 1, + toChain: 42161, + fromToken: "0x93ED3FBe21207Ec2E8f2d3c3de6e058Cb73Bc04d", + toToken: "0x330bD769382cFc6d50175903434CCC8D206DCAE5", + containerStyle: { + border: `1px solid ${theme.stroke}`, + borderRadius: "3px", + background: theme.whiteBackground, + }, + hiddenUI: ["appearance", "language"], + theme: { + palette: { + primary: { + main: theme.primaryBlue, + }, + secondary: { + main: theme.primaryBlue, + }, + background: { + paper: theme.whiteBackground, // bg color for cards + default: theme.whiteBackground, // bg color container }, - shape: { - borderRadius: 3, - borderRadiusSecondary: 3, + grey: { + 300: theme.stroke, // border light theme + 800: theme.stroke, // border dark theme }, - typography: { - // fontFamily: "Comic Sans MS", + text: { + primary: theme.primaryText, + secondary: theme.secondaryText, }, }, - integrator: "Kleros Court", - }; + shape: { + borderRadius: 3, + borderRadiusSecondary: 3, + }, + typography: { + // fontFamily: "Comic Sans MS", + }, + }, + integrator: "Kleros", +}); + +export const Widget = () => { + const theme = useTheme(); + + const widgetConfig = useMemo(() => getWidgetConfig(theme), [theme]); return ; }; From 6802914e80e47ef60b5f30639a706ff320b4ebe7 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Tue, 9 Apr 2024 13:32:35 +0700 Subject: [PATCH 04/22] feat(web): lint-widget-file --- web/src/pages/GetPnk/Widget.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/pages/GetPnk/Widget.tsx b/web/src/pages/GetPnk/Widget.tsx index 7f734be5c..b2a029180 100644 --- a/web/src/pages/GetPnk/Widget.tsx +++ b/web/src/pages/GetPnk/Widget.tsx @@ -1,7 +1,8 @@ import React, { useMemo } from "react"; -import { LiFiWidget, WidgetConfig } from "@lifi/widget"; import { Theme, useTheme } from "styled-components"; +import { LiFiWidget, WidgetConfig } from "@lifi/widget"; + const getWidgetConfig = (theme: Theme): WidgetConfig => ({ fromChain: 1, toChain: 42161, From 216a0b0db23c41ee795e5576f890c8b97d5c646f Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Mon, 15 Apr 2024 16:25:02 +0700 Subject: [PATCH 05/22] chore(web): update-siwe-library --- web/netlify/functions/authUser.ts | 10 ++++++---- web/netlify/functions/fetch-settings.ts | 3 ++- web/netlify/functions/getNonce.ts | 6 ++++-- web/netlify/functions/update-settings.ts | 7 ++++--- web/package.json | 2 +- web/src/components/EnsureAuth.tsx | 11 +++++++---- yarn.lock | 20 ++++++++++---------- 7 files changed, 34 insertions(+), 25 deletions(-) diff --git a/web/netlify/functions/authUser.ts b/web/netlify/functions/authUser.ts index ab320ff81..c49a16138 100644 --- a/web/netlify/functions/authUser.ts +++ b/web/netlify/functions/authUser.ts @@ -1,10 +1,12 @@ import middy from "@middy/core"; import jsonBodyParser from "@middy/http-json-body-parser"; -import { ETH_SIGNATURE_REGEX } from "consts/index"; -import { DEFAULT_CHAIN } from "consts/chains"; -import { SiweMessage } from "siwe"; -import * as jwt from "jose"; import { createClient } from "@supabase/supabase-js"; +import * as jwt from "jose"; +import { SiweMessage } from "siwe"; + +import { DEFAULT_CHAIN } from "consts/chains"; +import { ETH_SIGNATURE_REGEX } from "consts/index"; + import { netlifyUri } from "src/generatedNetlifyInfo.json"; import { Database } from "src/types/supabase-notification"; diff --git a/web/netlify/functions/fetch-settings.ts b/web/netlify/functions/fetch-settings.ts index 41fc50fb3..73a4d04ad 100644 --- a/web/netlify/functions/fetch-settings.ts +++ b/web/netlify/functions/fetch-settings.ts @@ -1,6 +1,7 @@ +import middy from "@middy/core"; import { createClient } from "@supabase/supabase-js"; + import { Database } from "../../src/types/supabase-notification"; -import middy from "@middy/core"; import { authMiddleware } from "../middleware/authMiddleware"; const fetchSettings = async (event) => { diff --git a/web/netlify/functions/getNonce.ts b/web/netlify/functions/getNonce.ts index 16fa01ac9..b3020b262 100644 --- a/web/netlify/functions/getNonce.ts +++ b/web/netlify/functions/getNonce.ts @@ -1,9 +1,11 @@ -import { createClient } from "@supabase/supabase-js"; -import { Database } from "../../src/types/supabase-notification"; import middy from "@middy/core"; +import { createClient } from "@supabase/supabase-js"; import { generateNonce } from "siwe"; + import { ETH_ADDRESS_REGEX } from "src/consts"; +import { Database } from "../../src/types/supabase-notification"; + const getNonce = async (event) => { try { const { queryStringParameters } = event; diff --git a/web/netlify/functions/update-settings.ts b/web/netlify/functions/update-settings.ts index e418d3cdd..16d8fdd5a 100644 --- a/web/netlify/functions/update-settings.ts +++ b/web/netlify/functions/update-settings.ts @@ -1,8 +1,9 @@ -import { createClient } from "@supabase/supabase-js"; -import { Database } from "../../src/types/supabase-notification"; -import { EMAIL_REGEX, TELEGRAM_REGEX, ETH_ADDRESS_REGEX } from "../../src/consts/index"; import middy from "@middy/core"; import jsonBodyParser from "@middy/http-json-body-parser"; +import { createClient } from "@supabase/supabase-js"; + +import { EMAIL_REGEX, TELEGRAM_REGEX, ETH_ADDRESS_REGEX } from "../../src/consts/index"; +import { Database } from "../../src/types/supabase-notification"; import { authMiddleware } from "../middleware/authMiddleware"; type NotificationSettings = { diff --git a/web/package.json b/web/package.json index f2360288f..aae342557 100644 --- a/web/package.json +++ b/web/package.json @@ -116,7 +116,7 @@ "react-scripts": "^5.0.1", "react-toastify": "^9.1.3", "react-use": "^17.4.3", - "siwe": "^2.1.4", + "siwe": "^2.3.1", "styled-components": "^5.3.11", "vanilla-jsoneditor": "^0.21.4", "viem": "^1.21.4", diff --git a/web/src/components/EnsureAuth.tsx b/web/src/components/EnsureAuth.tsx index 89a42e74c..d7db10d79 100644 --- a/web/src/components/EnsureAuth.tsx +++ b/web/src/components/EnsureAuth.tsx @@ -1,11 +1,14 @@ -import { Button } from "@kleros/ui-components-library"; import React, { useMemo, useState } from "react"; + +import * as jwt from "jose"; import { SiweMessage } from "siwe"; import { useAccount, useNetwork, useSignMessage } from "wagmi"; -import * as jwt from "jose"; -import { authoriseUser, getNonce } from "utils/authoriseUser"; -import { useSessionStorage } from "hooks/useSessionStorage"; + +import { Button } from "@kleros/ui-components-library"; + import { DEFAULT_CHAIN } from "consts/chains"; +import { useSessionStorage } from "hooks/useSessionStorage"; +import { authoriseUser, getNonce } from "utils/authoriseUser"; interface IEnsureAuth { children: React.ReactElement; diff --git a/yarn.lock b/yarn.lock index ddb38dca3..4c707242c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6250,7 +6250,7 @@ __metadata: react-scripts: "npm:^5.0.1" react-toastify: "npm:^9.1.3" react-use: "npm:^17.4.3" - siwe: "npm:^2.1.4" + siwe: "npm:^2.3.1" styled-components: "npm:^5.3.11" supabase: "npm:^1.133.3" typescript: "npm:^5.3.3" @@ -9749,15 +9749,15 @@ __metadata: languageName: node linkType: hard -"@spruceid/siwe-parser@npm:*": - version: 2.0.2 - resolution: "@spruceid/siwe-parser@npm:2.0.2" +"@spruceid/siwe-parser@npm:^2.1.1": + version: 2.1.1 + resolution: "@spruceid/siwe-parser@npm:2.1.1" dependencies: "@noble/hashes": "npm:^1.1.2" apg-js: "npm:^4.1.1" uri-js: "npm:^4.4.1" valid-url: "npm:^1.0.9" - checksum: a6c4b824465d4cfa351f89ab4e91a1be8643d5551946678dcc5d46373f2da47ab72b750a2fb351780f2cfbeb6c8055853496eb1c5eadc78a93dfd1c21fabcd89 + checksum: b6e374fbc115ee40cb789b28186d75fa0fdf7260750ca96a2edf3c1027510f2a255e42c23705db055ee32ab3ab8a8f0802c0085a9b16775402797f74c7122184 languageName: node linkType: hard @@ -32774,17 +32774,17 @@ __metadata: languageName: node linkType: hard -"siwe@npm:^2.1.4": - version: 2.1.4 - resolution: "siwe@npm:2.1.4" +"siwe@npm:^2.3.1": + version: 2.3.1 + resolution: "siwe@npm:2.3.1" dependencies: - "@spruceid/siwe-parser": "npm:*" + "@spruceid/siwe-parser": "npm:^2.1.1" "@stablelib/random": "npm:^1.0.1" uri-js: "npm:^4.4.1" valid-url: "npm:^1.0.9" peerDependencies: ethers: ^5.6.8 || ^6.0.8 - checksum: 985d8a1c1a5a090d60d0263205c87884410d2f03de6756aeccf19f9915557efd5703488f417f5dc4a64df7270d8a9b22f88b5d37a63344d2c471f3dc860b4290 + checksum: d4aa5af9d8f04ea726bfbfe0eae67dab66e86cb3a7fff62771f57f681a5ddb1398d3fbe2db69abda17f18e27b236fb7631893058afb83d5bff39051c8552120a languageName: node linkType: hard From 839c74a4556fa1284b40388588446a60974e4281 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Thu, 18 Apr 2024 17:52:39 +0700 Subject: [PATCH 06/22] fix(web): patch-lifi-sdk --- package.json | 3 ++- web/package.json | 1 + yarn.lock | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 070afc820..8ef4aecf3 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ }, "alias": { "process": "process/browser.js", - "buffer": "buffer" + "buffer": "buffer", + "@lifi/sdk": "@tractors/lifi-sdk-parcel" } } diff --git a/web/package.json b/web/package.json index aae342557..32505dfbf 100644 --- a/web/package.json +++ b/web/package.json @@ -88,6 +88,7 @@ "@sentry/tracing": "^7.93.0", "@supabase/supabase-js": "^2.39.3", "@tanstack/react-query": "^4.28.0", + "@tractors/lifi-sdk-parcel": "^2.5.2", "@types/react-modal": "^3.16.3", "@web3modal/ethereum": "^2.7.1", "@web3modal/react": "^2.7.1", diff --git a/yarn.lock b/yarn.lock index 4c707242c..713526f88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6206,6 +6206,7 @@ __metadata: "@sentry/tracing": "npm:^7.93.0" "@supabase/supabase-js": "npm:^2.39.3" "@tanstack/react-query": "npm:^4.28.0" + "@tractors/lifi-sdk-parcel": "npm:^2.5.2" "@types/amqplib": "npm:^0.10.4" "@types/busboy": "npm:^1.5.3" "@types/react": "npm:18.2.0" @@ -10556,6 +10557,20 @@ __metadata: languageName: node linkType: hard +"@tractors/lifi-sdk-parcel@npm:^2.5.2": + version: 2.5.2 + resolution: "@tractors/lifi-sdk-parcel@npm:2.5.2" + dependencies: + "@ethersproject/abi": "npm:^5.7.0" + "@ethersproject/contracts": "npm:^5.7.0" + "@lifi/types": "npm:^9.3.0" + bignumber.js: "npm:^9.1.2" + eth-rpc-errors: "npm:^4.0.3" + ethers: "npm:^5.7.2" + checksum: 90c00d6e4d4e4d290e8bfca0ef0b346d53afd7f453e54f74bd16eab25d9fe513e1b77cd0099a11cf7b5e93a23062b89c0e8678029ca79a9b7bb669f687ade10a + languageName: node + linkType: hard + "@trysound/sax@npm:0.2.0": version: 0.2.0 resolution: "@trysound/sax@npm:0.2.0" From da995af8beafc94b619c0ba1bc3e00a630c53880 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Thu, 18 Apr 2024 18:14:40 +0700 Subject: [PATCH 07/22] fix(web): lifi-patch-test --- web/package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/package.json b/web/package.json index 32505dfbf..6bd3c05ef 100644 --- a/web/package.json +++ b/web/package.json @@ -88,7 +88,7 @@ "@sentry/tracing": "^7.93.0", "@supabase/supabase-js": "^2.39.3", "@tanstack/react-query": "^4.28.0", - "@tractors/lifi-sdk-parcel": "^2.5.2", + "@tractors/lifi-sdk-parcel": "^2.5.3", "@types/react-modal": "^3.16.3", "@web3modal/ethereum": "^2.7.1", "@web3modal/react": "^2.7.1", diff --git a/yarn.lock b/yarn.lock index 713526f88..14c6c37ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6206,7 +6206,7 @@ __metadata: "@sentry/tracing": "npm:^7.93.0" "@supabase/supabase-js": "npm:^2.39.3" "@tanstack/react-query": "npm:^4.28.0" - "@tractors/lifi-sdk-parcel": "npm:^2.5.2" + "@tractors/lifi-sdk-parcel": "npm:^2.5.3" "@types/amqplib": "npm:^0.10.4" "@types/busboy": "npm:^1.5.3" "@types/react": "npm:18.2.0" @@ -10557,9 +10557,9 @@ __metadata: languageName: node linkType: hard -"@tractors/lifi-sdk-parcel@npm:^2.5.2": - version: 2.5.2 - resolution: "@tractors/lifi-sdk-parcel@npm:2.5.2" +"@tractors/lifi-sdk-parcel@npm:^2.5.3": + version: 2.5.3 + resolution: "@tractors/lifi-sdk-parcel@npm:2.5.3" dependencies: "@ethersproject/abi": "npm:^5.7.0" "@ethersproject/contracts": "npm:^5.7.0" @@ -10567,7 +10567,7 @@ __metadata: bignumber.js: "npm:^9.1.2" eth-rpc-errors: "npm:^4.0.3" ethers: "npm:^5.7.2" - checksum: 90c00d6e4d4e4d290e8bfca0ef0b346d53afd7f453e54f74bd16eab25d9fe513e1b77cd0099a11cf7b5e93a23062b89c0e8678029ca79a9b7bb669f687ade10a + checksum: 1d4bca1c2909f819761267e9f1668db147149c067abe0930113b3381b34442e99440c70dc59f5ffddd69c25cd89e305d9441ebfb5845535f198474dc54374fe6 languageName: node linkType: hard From 59635566b0e057ccefe897b9760c7135ae30a695 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Thu, 18 Apr 2024 19:14:14 +0700 Subject: [PATCH 08/22] refactor(web): update-widget-width --- web/src/pages/GetPnk/Widget.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/pages/GetPnk/Widget.tsx b/web/src/pages/GetPnk/Widget.tsx index b2a029180..2beba2864 100644 --- a/web/src/pages/GetPnk/Widget.tsx +++ b/web/src/pages/GetPnk/Widget.tsx @@ -3,6 +3,8 @@ import { Theme, useTheme } from "styled-components"; import { LiFiWidget, WidgetConfig } from "@lifi/widget"; +import { responsiveSize } from "styles/responsiveSize"; + const getWidgetConfig = (theme: Theme): WidgetConfig => ({ fromChain: 1, toChain: 42161, @@ -12,6 +14,8 @@ const getWidgetConfig = (theme: Theme): WidgetConfig => ({ border: `1px solid ${theme.stroke}`, borderRadius: "3px", background: theme.whiteBackground, + width: responsiveSize(350, 500), + maxWidth: "600px", }, hiddenUI: ["appearance", "language"], theme: { From 59be7692a10e0e02bfc5fb3f7f3c9aa76f86ee3d Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Fri, 26 Apr 2024 18:02:44 +0700 Subject: [PATCH 09/22] refactor(web): update-widget-size --- web/src/pages/GetPnk/Widget.tsx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/web/src/pages/GetPnk/Widget.tsx b/web/src/pages/GetPnk/Widget.tsx index 2beba2864..ee97b3857 100644 --- a/web/src/pages/GetPnk/Widget.tsx +++ b/web/src/pages/GetPnk/Widget.tsx @@ -1,10 +1,19 @@ import React, { useMemo } from "react"; -import { Theme, useTheme } from "styled-components"; +import styled, { Theme, useTheme } from "styled-components"; import { LiFiWidget, WidgetConfig } from "@lifi/widget"; import { responsiveSize } from "styles/responsiveSize"; +const WidgetContainer = styled.div` + width: 100%; + > div { + height: auto; + > div > div { + max-height: none; + } + } +`; const getWidgetConfig = (theme: Theme): WidgetConfig => ({ fromChain: 1, toChain: 42161, @@ -16,6 +25,9 @@ const getWidgetConfig = (theme: Theme): WidgetConfig => ({ background: theme.whiteBackground, width: responsiveSize(350, 500), maxWidth: "600px", + height: "fit-content", + maxHeight: "none", + minWidth: "300px", }, hiddenUI: ["appearance", "language"], theme: { @@ -55,5 +67,9 @@ export const Widget = () => { const widgetConfig = useMemo(() => getWidgetConfig(theme), [theme]); - return ; + return ( + + + + ); }; From 26bbbcba8c0b27e8817be82a3cbede65b9c307e5 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Wed, 1 May 2024 15:18:24 +0530 Subject: [PATCH 10/22] fix(web): siwe-uri-check --- web/netlify/functions/authUser.ts | 11 ++++------- web/scripts/generateBuildInfo.sh | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/web/netlify/functions/authUser.ts b/web/netlify/functions/authUser.ts index c49a16138..a672f322e 100644 --- a/web/netlify/functions/authUser.ts +++ b/web/netlify/functions/authUser.ts @@ -7,7 +7,7 @@ import { SiweMessage } from "siwe"; import { DEFAULT_CHAIN } from "consts/chains"; import { ETH_SIGNATURE_REGEX } from "consts/index"; -import { netlifyUri } from "src/generatedNetlifyInfo.json"; +import { netlifyUri, netlifyDeployUri } from "src/generatedNetlifyInfo.json"; import { Database } from "src/types/supabase-notification"; const authUser = async (event) => { @@ -37,7 +37,9 @@ const authUser = async (event) => { const siweMessage = new SiweMessage(message); - if (netlifyUri && netlifyUri !== siweMessage.uri) { + console.log({ netlifyUri, netlifyDeployUri }); + + if (netlifyUri && netlifyUri !== siweMessage.uri && netlifyDeployUri && netlifyDeployUri !== siweMessage.uri) { console.debug(`Invalid URI: expected ${netlifyUri} but got ${siweMessage.uri}`); throw new Error(`Invalid URI`); } @@ -47,11 +49,6 @@ const authUser = async (event) => { throw new Error(`Invalid chain ID`); } - if (!siweMessage.expirationTime || Date.parse(siweMessage.expirationTime) < Date.now()) { - console.debug(`Message expired: ${siweMessage.expirationTime} < ${new Date().toISOString()}`); - throw new Error("Message expired"); - } - const lowerCaseAddress = siweMessage.address.toLowerCase(); if (lowerCaseAddress !== address.toLowerCase()) { throw new Error("Address mismatch in provided address and message"); diff --git a/web/scripts/generateBuildInfo.sh b/web/scripts/generateBuildInfo.sh index 083ea4f9f..43e72fc7f 100755 --- a/web/scripts/generateBuildInfo.sh +++ b/web/scripts/generateBuildInfo.sh @@ -2,5 +2,5 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -jq -n --arg uri "$DEPLOY_PRIME_URL" '{ netlifyUri: $uri }' > src/generatedNetlifyInfo.json +jq -n --arg primeUri "$DEPLOY_PRIME_URL" --arg uri "$URL" '{ netlifyDeployUri: $primeUri, netlifyUri: $uri }' > src/generatedNetlifyInfo.json node $SCRIPT_DIR/gitInfo.js \ No newline at end of file From 5149177c07ca693f99c92c0426f2ebb3731a775f Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Wed, 1 May 2024 15:47:35 +0530 Subject: [PATCH 11/22] refactor(web): lint-functions-code --- web/netlify/functions/authUser.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/netlify/functions/authUser.ts b/web/netlify/functions/authUser.ts index a672f322e..03bfbffb1 100644 --- a/web/netlify/functions/authUser.ts +++ b/web/netlify/functions/authUser.ts @@ -37,8 +37,6 @@ const authUser = async (event) => { const siweMessage = new SiweMessage(message); - console.log({ netlifyUri, netlifyDeployUri }); - if (netlifyUri && netlifyUri !== siweMessage.uri && netlifyDeployUri && netlifyDeployUri !== siweMessage.uri) { console.debug(`Invalid URI: expected ${netlifyUri} but got ${siweMessage.uri}`); throw new Error(`Invalid URI`); From 4ecba5e034d572cc429db4979132c489afc4eb9e Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Wed, 1 May 2024 16:04:02 +0530 Subject: [PATCH 12/22] refactor: add-deploy-uri-check --- web/netlify/functions/authUser.ts | 14 +++++++++++--- web/scripts/generateBuildInfo.sh | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/web/netlify/functions/authUser.ts b/web/netlify/functions/authUser.ts index 03bfbffb1..344948d9a 100644 --- a/web/netlify/functions/authUser.ts +++ b/web/netlify/functions/authUser.ts @@ -7,7 +7,7 @@ import { SiweMessage } from "siwe"; import { DEFAULT_CHAIN } from "consts/chains"; import { ETH_SIGNATURE_REGEX } from "consts/index"; -import { netlifyUri, netlifyDeployUri } from "src/generatedNetlifyInfo.json"; +import { netlifyUri, netlifyDeployUri, netlifyDeployPrimeUri } from "src/generatedNetlifyInfo.json"; import { Database } from "src/types/supabase-notification"; const authUser = async (event) => { @@ -37,8 +37,16 @@ const authUser = async (event) => { const siweMessage = new SiweMessage(message); - if (netlifyUri && netlifyUri !== siweMessage.uri && netlifyDeployUri && netlifyDeployUri !== siweMessage.uri) { - console.debug(`Invalid URI: expected ${netlifyUri} but got ${siweMessage.uri}`); + if ( + !( + (netlifyUri && netlifyUri === siweMessage.uri) || + (netlifyDeployUri && netlifyDeployUri === siweMessage.uri) || + (netlifyDeployPrimeUri && netlifyDeployPrimeUri === siweMessage.uri) + ) + ) { + console.debug( + `Invalid URI: expected one of [${netlifyUri} ${netlifyDeployUri} ${netlifyDeployPrimeUri}] but got ${siweMessage.uri}` + ); throw new Error(`Invalid URI`); } diff --git a/web/scripts/generateBuildInfo.sh b/web/scripts/generateBuildInfo.sh index 43e72fc7f..2d2b7cc3e 100755 --- a/web/scripts/generateBuildInfo.sh +++ b/web/scripts/generateBuildInfo.sh @@ -2,5 +2,5 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -jq -n --arg primeUri "$DEPLOY_PRIME_URL" --arg uri "$URL" '{ netlifyDeployUri: $primeUri, netlifyUri: $uri }' > src/generatedNetlifyInfo.json +jq -n --arg primeUri "$DEPLOY_PRIME_URL" --arg uri "$URL" --arg deployUri "$DEPLOY_URL" '{ netlifyDeployPrimeUri: $primeUri, netlifyUri: $uri, netlifyDeployUri: $deployUri }' > src/generatedNetlifyInfo.json node $SCRIPT_DIR/gitInfo.js \ No newline at end of file From 829b5712df7b82782f8685ff8bd2d6043a24537c Mon Sep 17 00:00:00 2001 From: Shubham Parkhi Date: Thu, 2 May 2024 05:57:06 +0530 Subject: [PATCH 13/22] Web: update Perma Curate to Kleros Scout --- web/src/layout/Header/navbar/DappList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/layout/Header/navbar/DappList.tsx b/web/src/layout/Header/navbar/DappList.tsx index e9ba34fe1..84c3a4267 100644 --- a/web/src/layout/Header/navbar/DappList.tsx +++ b/web/src/layout/Header/navbar/DappList.tsx @@ -120,9 +120,9 @@ const ITEMS = [ url: "https://veascan.io", }, { - text: "Perma Curate", + text: "Kleros Scout", Icon: Curate, - url: "https://perma-curate.eth.limo/", + url: "https://klerosscout.eth.limo", }, { text: "POH V1", From 2df17c2d4c12b4260de9f4d10e7a0acf57686c34 Mon Sep 17 00:00:00 2001 From: Nikhil <32412967+nikhilverma360@users.noreply.github.com> Date: Thu, 2 May 2024 13:47:59 +0530 Subject: [PATCH 14/22] fix: styling
    list --- web/src/styles/global-style.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/styles/global-style.ts b/web/src/styles/global-style.ts index eb93c8d9d..4f5e1eb40 100644 --- a/web/src/styles/global-style.ts +++ b/web/src/styles/global-style.ts @@ -104,7 +104,7 @@ export const GlobalStyle = createGlobalStyle` } - ul { + ul, ol { li { color: ${({ theme }) => theme.primaryText}; } From 9cf05e09bcae59690e4c14bc2d0b55c6e65a9110 Mon Sep 17 00:00:00 2001 From: kemuru <102478601+kemuru@users.noreply.github.com> Date: Thu, 9 May 2024 15:19:32 +0200 Subject: [PATCH 15/22] feat: ipfs migration --- contracts/config/policies.v1.mainnet.json | 2 +- .../config/policies.v1.mainnet/Token-Listing-Court-Policy.json | 2 +- contracts/scripts/disputeCreatorBot.ts | 2 +- contracts/scripts/downloadPolicies.sh | 2 +- contracts/scripts/getPoliciesV1.ts | 2 +- kleros-sdk/config/v1-metaevidence/tokens1.json | 2 +- kleros-sdk/config/v1-metaevidence/tokens2.json | 2 +- .../v2-disputetemplate/moderate/DisputeDetails.moderate.json | 2 +- .../reality/example1/DisputeDetails.reality1.jsonc | 2 +- .../reality/example1/DisputeTemplateInputs.reality1.txt | 2 +- .../v2-disputetemplate/reality/example3/DisputeMappings.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/contracts/config/policies.v1.mainnet.json b/contracts/config/policies.v1.mainnet.json index 6ace07dea..a23d06b2b 100644 --- a/contracts/config/policies.v1.mainnet.json +++ b/contracts/config/policies.v1.mainnet.json @@ -24,7 +24,7 @@ { "name": "Token Listing", "description": "**Court Purpose:**\n\nThis court serves as the final validation for token listing for verified projects listing on the Ethfinex Exchange using Kleros’ Token Curated List Dapp.\nThis is a high level, high stake court requiring deep blockchain knowledge, legal experience and / or a knowledge of exchange listings in general. Jurors are required to stake a large amount of PNK and should only do so if they are confident in the above capabilities.", - "summary": "[Ethfinex Court Policy](https://ipfs.kleros.io/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)", + "summary": "[Ethfinex Court Policy](https://cdn.kleros.link/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)", "court": 3, "uri": "/ipfs/QmeyojE13mcQtWqQQddYypafDRChVND8z6dcHLbaarmbbx" }, diff --git a/contracts/config/policies.v1.mainnet/Token-Listing-Court-Policy.json b/contracts/config/policies.v1.mainnet/Token-Listing-Court-Policy.json index 4856d1870..8204e77bf 100644 --- a/contracts/config/policies.v1.mainnet/Token-Listing-Court-Policy.json +++ b/contracts/config/policies.v1.mainnet/Token-Listing-Court-Policy.json @@ -1,5 +1,5 @@ { "name": "Token Listing", "description": "This court serves as the final validation for token listing for verified projects listing on the Ethfinex Exchange using Kleros’ Token Curated List Dapp.\nThis is a high level, high stake court requiring deep blockchain knowledge, legal experience and / or a knowledge of exchange listings in general. Jurors are required to stake a large amount of PNK and should only do so if they are confident in the above capabilities.", - "summary": "[Ethfinex Court Policy](https://ipfs.kleros.io/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)" + "summary": "[Ethfinex Court Policy](https://cdn.kleros.link/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)" } diff --git a/contracts/scripts/disputeCreatorBot.ts b/contracts/scripts/disputeCreatorBot.ts index 03b6a586c..d8c18fa5e 100644 --- a/contracts/scripts/disputeCreatorBot.ts +++ b/contracts/scripts/disputeCreatorBot.ts @@ -36,7 +36,7 @@ export default async function main() { "000000000000000000000000000000000000000000000000000000000000000B" + // minJurors 11 "0000000000000000000000000000000000000000000000000000000000000002"; // disputeKitId 2 const templates = [ - `{"title":"A reality.eth question","description":"A reality.eth question has been raised to arbitration.","question":"**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://ipfs.kleros.io/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://ipfs.kleros.io/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?","answers":[{"id":"0x01","title":"Yes","reserved":false},{"id":"0x02","title":"No","reserved":false},{"id":"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","title":"Answered Too Soon","reserved":true}],"policyURI":"/ipfs/QmZ5XaV2RVgBADq5qMpbuEwgCuPZdRgCeu8rhGtJWLV6yz","frontendUrl":"https://reality.eth.limo/app/#!/question/0xe78996a233895be74a66f451f1019ca9734205cc-0xe2a3bd38e3ad4e22336ac35b221bbbdd808d716209f84014c7bc3bf62f8e3b39","arbitrableChainID":"100","arbitrableAddress":"0x2e39b8f43d0870ba896f516f78f57cde773cf805","arbitratorChainID":"421614","arbitratorAddress":"0xD08Ab99480d02bf9C092828043f611BcDFEA917b","category":"Oracle","lang":"en_US","specification":"KIP99","version": "1.0"}`, + `{"title":"A reality.eth question","description":"A reality.eth question has been raised to arbitration.","question":"**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://cdn.kleros.link/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://cdn.kleros.link/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?","answers":[{"id":"0x01","title":"Yes","reserved":false},{"id":"0x02","title":"No","reserved":false},{"id":"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","title":"Answered Too Soon","reserved":true}],"policyURI":"/ipfs/QmZ5XaV2RVgBADq5qMpbuEwgCuPZdRgCeu8rhGtJWLV6yz","frontendUrl":"https://reality.eth.limo/app/#!/question/0xe78996a233895be74a66f451f1019ca9734205cc-0xe2a3bd38e3ad4e22336ac35b221bbbdd808d716209f84014c7bc3bf62f8e3b39","arbitrableChainID":"100","arbitrableAddress":"0x2e39b8f43d0870ba896f516f78f57cde773cf805","arbitratorChainID":"421614","arbitratorAddress":"0xD08Ab99480d02bf9C092828043f611BcDFEA917b","category":"Oracle","lang":"en_US","specification":"KIP99","version": "1.0"}`, `{"title":"Add an entry to Ledger Contract Domain Name registry v2","description":"Someone requested to add an entry to Ledger Contract Domain Name registry v2","question":"Does the entry comply with the required criteria?","answers":[{"title":"Yes, Add It","description":"Select this if you think the entry complies with the required criteria and should be added."},{"title":"No, Don't Add It","description":"Select this if you think the entry does not comply with the required criteria and should not be added."}],"policyURI":"/ipfs/QmW3nQcMW2adyqe6TujRTYkyq26PiDqcmmTjdgKiz9ynPV","frontendUrl":"https://curate.kleros.io/tcr/100/0x957a53a994860be4750810131d9c876b2f52d6e1/0xc2c1aa705632f53051f22a9f65967c0944370020a7489aba608bd0d755ca1234","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Curation","specification":"KIP0X","lang":"en_US","version": "1.0"}`, `{"title":"Omen Question: News & Politics","description":"This reality dispute has been created by Omen, we advise you to read [the Omen Rules](https://cdn.kleros.link/ipfs/QmU1oZzsduGwtC7vCUQPw1QcBP6BDNDkg4t6zkowPucVcx) and consult the evidence provided in [the Market Comments](https://omen.eth.limo/#/0x95b2271039b020aba31b933039e042b60b063800).","question":"**Assuming that today is December 20th 2020, will Joe Biden win the 2020 United States presidential election?**","answers":[{"title":"Yes"},{"title":"No"}],"policyURI":"/ipfs/QmU1oZzsduGwtC7vCUQPw1QcBP6BDNDkg4t6zkowPucVcx","frontendUrl":"https://omen.eth.limo/#/0x95b2271039b020aba31b933039e042b60b063800","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Oracle","specification":"KIP0X","lang":"en_US","version": "1.0"}`, `{"title":"Proof of Humanity Registration Request","description":"A request to register the specified entry to a list of provable humans.","question":"Should the request to register be accepted?","answers":[{"title":"Yes","description":"Accept the request to register the entry."},{"title":"No","description":"Deny the request."}],"policyURI":"/ipfs/QmYPf2fdSyr9BiSy6pJFUmB1oTUPwg6dhEuFqL1n4ZosgH","frontendUrl":"https://app.proofofhumanity.id/profile/0x00de4b13153673bcae2616b67bf822500d325fc3?network=mainnet","arbitratorChainID":"421614","arbitratorAddress":"0x791812B0B9f2ba260B2DA432BB02Ee23BC1bB509","category":"Curated List","specification":"KIP0X","lang":"en_US","version": "1.0"}`, diff --git a/contracts/scripts/downloadPolicies.sh b/contracts/scripts/downloadPolicies.sh index e19438e48..babeb14fc 100755 --- a/contracts/scripts/downloadPolicies.sh +++ b/contracts/scripts/downloadPolicies.sh @@ -6,7 +6,7 @@ function download() #policies { for p in $(cat ${policies}.json | jq -r .[].uri) do - wget -P $SCRIPT_DIR/../config/$policies https://ipfs.kleros.io${p} + wget -P $SCRIPT_DIR/../config/$policies https://cdn.kleros.link${p} done } diff --git a/contracts/scripts/getPoliciesV1.ts b/contracts/scripts/getPoliciesV1.ts index 526a07207..c1ee27ddc 100644 --- a/contracts/scripts/getPoliciesV1.ts +++ b/contracts/scripts/getPoliciesV1.ts @@ -34,7 +34,7 @@ async function main() { const uri = await fetchPolicyUri(court); if (!uri) break; - const policy = await fetchPolicy("https://ipfs.kleros.io" + uri); + const policy = await fetchPolicy("https://cdn.kleros.link" + uri); policy.court = court; policy.uri = uri; policies.push(policy); diff --git a/kleros-sdk/config/v1-metaevidence/tokens1.json b/kleros-sdk/config/v1-metaevidence/tokens1.json index 737e2381e..f8b1c1dee 100644 --- a/kleros-sdk/config/v1-metaevidence/tokens1.json +++ b/kleros-sdk/config/v1-metaevidence/tokens1.json @@ -17,5 +17,5 @@ ] }, "fileURI": "/ipfs/QmTL1SCKpRcr7NRbVpXW6z9QoQXRHJT5cQr6PEge5qoLwU/t2cr-primary-document.pdf", - "evidenceDisplayInterfaceURL": "https://ipfs.kleros.io/ipfs/QmYs17mAJTaQwYeXNTb6n4idoQXmRcAjREeUdjJShNSeKh/index.html" + "evidenceDisplayInterfaceURL": "https://cdn.kleros.link/ipfs/QmYs17mAJTaQwYeXNTb6n4idoQXmRcAjREeUdjJShNSeKh/index.html" } diff --git a/kleros-sdk/config/v1-metaevidence/tokens2.json b/kleros-sdk/config/v1-metaevidence/tokens2.json index 63793dedc..9f6ba948c 100644 --- a/kleros-sdk/config/v1-metaevidence/tokens2.json +++ b/kleros-sdk/config/v1-metaevidence/tokens2.json @@ -17,5 +17,5 @@ ] }, "fileURI": "/ipfs/QmTL1SCKpRcr7NRbVpXW6z9QoQXRHJT5cQr6PEge5qoLwU/t2cr-primary-document.pdf", - "evidenceDisplayInterfaceURL": "https://ipfs.kleros.io/ipfs/QmYs17mAJTaQwYeXNTb6n4idoQXmRcAjREeUdjJShNSeKh/index.html" + "evidenceDisplayInterfaceURL": "https://cdn.kleros.link/ipfs/QmYs17mAJTaQwYeXNTb6n4idoQXmRcAjREeUdjJShNSeKh/index.html" } diff --git a/kleros-sdk/config/v2-disputetemplate/moderate/DisputeDetails.moderate.json b/kleros-sdk/config/v2-disputetemplate/moderate/DisputeDetails.moderate.json index efb4edc85..4ce35ca10 100644 --- a/kleros-sdk/config/v2-disputetemplate/moderate/DisputeDetails.moderate.json +++ b/kleros-sdk/config/v2-disputetemplate/moderate/DisputeDetails.moderate.json @@ -2,7 +2,7 @@ "$schema": "./DisputeDetails.reality.schema.json", "title": "A reality.eth question", "description": "A reality.eth question has been raised to arbitration.", - "question": "**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://ipfs.kleros.io/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://ipfs.kleros.io/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?", + "question": "**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://cdn.kleros.link/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://cdn.kleros.link/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?", "answers": [ { "id": "0x01", diff --git a/kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeDetails.reality1.jsonc b/kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeDetails.reality1.jsonc index b1d64060a..37f299ccd 100644 --- a/kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeDetails.reality1.jsonc +++ b/kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeDetails.reality1.jsonc @@ -2,7 +2,7 @@ "$schema": "./DisputeDetails.reality.schema.json", "title": "A reality.eth question", "description": "A reality.eth question has been raised to arbitration.", - "question": "# [Kleros Moderate](https://kleros.io/moderate)\n---\nDid the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://ipfs.kleros.io/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://ipfs.kleros.io/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?", + "question": "# [Kleros Moderate](https://kleros.io/moderate)\n---\nDid the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://cdn.kleros.link/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://cdn.kleros.link/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?", "answers": [ { "id": "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", diff --git a/kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeTemplateInputs.reality1.txt b/kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeTemplateInputs.reality1.txt index eda71b8f2..445c15a30 100644 --- a/kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeTemplateInputs.reality1.txt +++ b/kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeTemplateInputs.reality1.txt @@ -1,4 +1,4 @@ -# [Kleros Moderate](https://kleros.io/moderate)\n---\nDid the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://ipfs.kleros.io/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://ipfs.kleros.io/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)? +# [Kleros Moderate](https://kleros.io/moderate)\n---\nDid the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://cdn.kleros.link/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://cdn.kleros.link/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)? single-select ,{"id":"0x00","title":"Invalid/Refuse to Arbitrate","reserved":true},{"id":"0x01","title":"Yes","reserved":false},{"id":"0x02","title":"No","reserved":false} 0xe78996a233895be74a66f451f1019ca9734205cc diff --git a/kleros-sdk/config/v2-disputetemplate/reality/example3/DisputeMappings.json b/kleros-sdk/config/v2-disputetemplate/reality/example3/DisputeMappings.json index cedf70a21..7139bf07a 100644 --- a/kleros-sdk/config/v2-disputetemplate/reality/example3/DisputeMappings.json +++ b/kleros-sdk/config/v2-disputetemplate/reality/example3/DisputeMappings.json @@ -2,7 +2,7 @@ { "type": "json", "source": { - "value": "**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://ipfs.kleros.io/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://ipfs.kleros.io/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?", + "value": "**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://cdn.kleros.link/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://cdn.kleros.link/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?", "type": "single-select", "answers": [ { From 9e226e7d2b4ef891677c3799003716949ed210fd Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Mon, 13 May 2024 19:09:18 +0100 Subject: [PATCH 16/22] fix: removed unused variable --- web/netlify/functions/uploadToIPFS.ts | 13 ++++--------- web/src/utils/uploadFormDataToIPFS.ts | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/web/netlify/functions/uploadToIPFS.ts b/web/netlify/functions/uploadToIPFS.ts index 1b88c136e..bd101e363 100644 --- a/web/netlify/functions/uploadToIPFS.ts +++ b/web/netlify/functions/uploadToIPFS.ts @@ -50,7 +50,7 @@ const parseMultipart = ({ headers, body, isBase64Encoded }) => bb.end(); }); -const pinToFilebase = async (data: FormData, dapp: string, operation: string): Promise> => { +const pinToFilebase = async (data: FormData, operation: string): Promise> => { const cids = new Array(); for (const [_, dataElement] of Object.entries(data)) { if (dataElement.isFile) { @@ -68,19 +68,14 @@ const pinToFilebase = async (data: FormData, dapp: string, operation: string): P export const handler: Handler = async (event) => { const { queryStringParameters } = event; - if ( - !queryStringParameters || - !queryStringParameters.dapp || - !queryStringParameters.key || - !queryStringParameters.operation - ) { + if (!queryStringParameters || !queryStringParameters.key || !queryStringParameters.operation) { return { statusCode: 400, body: JSON.stringify({ message: "Invalid query parameters" }), }; } - const { dapp, key, operation } = queryStringParameters; + const { key, operation } = queryStringParameters; if (key !== FILEBASE_API_WRAPPER) { return { @@ -91,7 +86,7 @@ export const handler: Handler = async (event) => { try { const parsed = await parseMultipart(event); - const cids = await pinToFilebase(parsed, dapp, operation); + const cids = await pinToFilebase(parsed, operation); return { statusCode: 200, diff --git a/web/src/utils/uploadFormDataToIPFS.ts b/web/src/utils/uploadFormDataToIPFS.ts index 0a2eb73e0..8e8cceea5 100644 --- a/web/src/utils/uploadFormDataToIPFS.ts +++ b/web/src/utils/uploadFormDataToIPFS.ts @@ -2,9 +2,9 @@ import { toast } from "react-toastify"; import { OPTIONS } from "utils/wrapWithToast"; -export function uploadFormDataToIPFS(formData: FormData, operation: string = "evidence"): Promise { +export function uploadFormDataToIPFS(formData: FormData, operation = "evidence"): Promise { return toast.promise( - fetch(`/.netlify/functions/uploadToIPFS?dapp=court&key=kleros-v2&operation=${operation}`, { + fetch(`/.netlify/functions/uploadToIPFS?key=kleros-v2&operation=${operation}`, { method: "POST", body: formData, }).then(async (response) => { From 5f0d2341170812b9a0d6d001994020b36962a91e Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Wed, 15 May 2024 11:34:28 +0100 Subject: [PATCH 17/22] fix: cleanup --- web/src/context/Web3Provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/context/Web3Provider.tsx b/web/src/context/Web3Provider.tsx index 7f75f63a8..55be8ce77 100644 --- a/web/src/context/Web3Provider.tsx +++ b/web/src/context/Web3Provider.tsx @@ -11,7 +11,7 @@ import { jsonRpcProvider } from "wagmi/providers/jsonRpc"; import { useToggleTheme } from "hooks/useToggleThemeContext"; const chains = [arbitrumSepolia, mainnet, gnosisChiado]; -const projectId = process.env.WALLETCONNECT_PROJECT_ID ?? "6efaa26765fa742153baf9281e218217"; +const projectId = process.env.WALLETCONNECT_PROJECT_ID ?? ""; export const alchemyApiKey = process.env.ALCHEMY_API_KEY ?? ""; From 13880f47691351c30d9fa47136a87d50f4ee93f9 Mon Sep 17 00:00:00 2001 From: Shubham Parkhi Date: Sat, 18 May 2024 08:07:55 +0530 Subject: [PATCH 18/22] fix(web): Error message --- .../StakePanel/StakeWithdrawButton.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx index da7352ef1..2ce2d0958 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx @@ -114,13 +114,18 @@ const StakeWithdrawButton: React.FC = ({ } }; - useEffect(() => { - if (isAllowance) { - setErrorMsg(allowanceError?.shortMessage); - } else { - setErrorMsg(setStakeError?.shortMessage); - } - }, [allowanceError, setStakeError, isAllowance, isStaking, setErrorMsg]); +useEffect(() => { + let errorMessage = parsedAmount === 0n + ? "Please enter a valid amount to stake or withdraw." + : "There was an error processing your request. Please try again later."; + + if (isAllowance && allowanceError?.shortMessage) { + setErrorMsg(errorMessage); + } else if (!isAllowance && setStakeError?.shortMessage) { + setErrorMsg(errorMessage); + } +}, [allowanceError, setStakeError, isAllowance, isStaking, parsedAmount, setErrorMsg]); + const buttonProps = { [ActionType.allowance]: { From b03bc4487ccf490142b0e4c590ef5a4cfcb0fb12 Mon Sep 17 00:00:00 2001 From: Shubham Parkhi Date: Tue, 21 May 2024 02:22:00 +0530 Subject: [PATCH 19/22] refactor(web): Error handling logic --- .../CourtDetails/StakePanel/InputDisplay.tsx | 22 ++++++++++++-- .../StakePanel/StakeWithdrawButton.tsx | 30 +++++++------------ 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx index 4f70b3930..479bbb2a4 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx @@ -1,4 +1,4 @@ -import React, { useState, useMemo } from "react"; +import React, { useState, useMemo, useEffect } from "react"; import styled from "styled-components"; import { useParams } from "react-router-dom"; @@ -68,11 +68,11 @@ const InputDisplay: React.FC = ({ setAmount, }) => { const [debouncedAmount, setDebouncedAmount] = useState(""); + const [hasInteracted, setHasInteracted] = useState(false); + const [errorMsg, setErrorMsg] = useState(); useDebounce(() => setDebouncedAmount(amount), 500, [amount]); const parsedAmount = useParsedAmount(uncommify(debouncedAmount) as `${number}`); - const [errorMsg, setErrorMsg] = useState(); - const { id } = useParams(); const { address } = useAccount(); const { data: balance } = usePnkBalanceOf({ @@ -89,6 +89,18 @@ const InputDisplay: React.FC = ({ const parsedStake = formatPNK(jurorBalance?.[2] || 0n, 0, true); const isStaking = useMemo(() => action === ActionType.stake, [action]); + useEffect(() => { + if (!hasInteracted || parsedAmount === 0n) { + setErrorMsg(undefined); + } else if (isStaking && balance && parsedAmount > balance) { + setErrorMsg("Insufficient balance to stake this amount"); + } else if (!isStaking && jurorBalance && parsedAmount > jurorBalance[2]) { + setErrorMsg("Insufficient staked amount to withdraw this amount"); + } else { + setErrorMsg(undefined); + } + }, [hasInteracted, parsedAmount, isStaking, balance, jurorBalance]); + return ( <> @@ -97,6 +109,7 @@ const InputDisplay: React.FC = ({ onClick={() => { const amount = isStaking ? parsedBalance : parsedStake; setAmount(amount); + setHasInteracted(true); }} > {isStaking ? "Stake" : "Withdraw"} all @@ -108,6 +121,7 @@ const InputDisplay: React.FC = ({ value={uncommify(amount)} onChange={(e) => { setAmount(e); + setHasInteracted(true); }} placeholder={isStaking ? "Amount to stake" : "Amount to withdraw"} message={errorMsg ?? undefined} @@ -124,6 +138,8 @@ const InputDisplay: React.FC = ({ setIsSending, setIsPopupOpen, setErrorMsg, + hasInteracted, + setHasInteracted, }} /> diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx index 2ce2d0958..f9249de27 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useEffect } from "react"; +import React, { useMemo } from "react"; import { useParams } from "react-router-dom"; import { useAccount, usePublicClient } from "wagmi"; @@ -35,6 +35,8 @@ interface IActionButton { setAmount: (arg0: string) => void; setIsPopupOpen: (arg0: boolean) => void; setErrorMsg: (arg0: string | undefined) => void; + hasInteracted: boolean; + setHasInteracted: (arg0: boolean) => void; } const StakeWithdrawButton: React.FC = ({ @@ -43,7 +45,7 @@ const StakeWithdrawButton: React.FC = ({ isSending, setIsSending, setIsPopupOpen, - setErrorMsg, + setHasInteracted, }) => { const { id } = useParams(); const { address } = useAccount(); @@ -82,7 +84,7 @@ const StakeWithdrawButton: React.FC = ({ return 0n; }, [jurorBalance, parsedAmount, isAllowance, isStaking]); - const { config: increaseAllowanceConfig, error: allowanceError } = usePreparePnkIncreaseAllowance({ + const { config: increaseAllowanceConfig } = usePreparePnkIncreaseAllowance({ enabled: isAllowance && !isUndefined(klerosCore) && !isUndefined(targetStake) && !isUndefined(allowance), args: [klerosCore?.address, BigInt(targetStake ?? 0) - BigInt(allowance ?? 0)], }); @@ -99,7 +101,7 @@ const StakeWithdrawButton: React.FC = ({ }; const { config: setStakeConfig, error: setStakeError } = usePrepareKlerosCoreSetStake({ - enabled: !isUndefined(targetStake) && !isUndefined(id) && !isAllowance, + enabled: !isUndefined(targetStake) && !isUndefined(id) && !isAllowance && parsedAmount !== 0n, args: [BigInt(id ?? 0), targetStake], }); const { writeAsync: setStake } = useKlerosCoreSetStake(setStakeConfig); @@ -114,19 +116,6 @@ const StakeWithdrawButton: React.FC = ({ } }; -useEffect(() => { - let errorMessage = parsedAmount === 0n - ? "Please enter a valid amount to stake or withdraw." - : "There was an error processing your request. Please try again later."; - - if (isAllowance && allowanceError?.shortMessage) { - setErrorMsg(errorMessage); - } else if (!isAllowance && setStakeError?.shortMessage) { - setErrorMsg(errorMessage); - } -}, [allowanceError, setStakeError, isAllowance, isStaking, parsedAmount, setErrorMsg]); - - const buttonProps = { [ActionType.allowance]: { text: "Allow PNK", @@ -160,10 +149,13 @@ useEffect(() => { (targetStake !== 0n && targetStake < BigInt(courtDetails.court?.minStake)) || (isStaking && !isAllowance && isUndefined(setStakeConfig.request)) } - onClick={onClick} + onClick={() => { + setHasInteracted(true); + onClick(); + }} /> ); }; -export default StakeWithdrawButton; +export default StakeWithdrawButton; \ No newline at end of file From 6c8475c93d80b8bf638be998139981d267e6ec43 Mon Sep 17 00:00:00 2001 From: Shubham Parkhi Date: Tue, 21 May 2024 04:45:13 +0530 Subject: [PATCH 20/22] refactor(web): Error handling logic --- .../Courts/CourtDetails/StakePanel/InputDisplay.tsx | 10 ++-------- .../CourtDetails/StakePanel/StakeWithdrawButton.tsx | 9 +-------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx index 479bbb2a4..e8ac27289 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx @@ -68,7 +68,6 @@ const InputDisplay: React.FC = ({ setAmount, }) => { const [debouncedAmount, setDebouncedAmount] = useState(""); - const [hasInteracted, setHasInteracted] = useState(false); const [errorMsg, setErrorMsg] = useState(); useDebounce(() => setDebouncedAmount(amount), 500, [amount]); const parsedAmount = useParsedAmount(uncommify(debouncedAmount) as `${number}`); @@ -90,7 +89,7 @@ const InputDisplay: React.FC = ({ const isStaking = useMemo(() => action === ActionType.stake, [action]); useEffect(() => { - if (!hasInteracted || parsedAmount === 0n) { + if (parsedAmount === 0n) { setErrorMsg(undefined); } else if (isStaking && balance && parsedAmount > balance) { setErrorMsg("Insufficient balance to stake this amount"); @@ -99,7 +98,7 @@ const InputDisplay: React.FC = ({ } else { setErrorMsg(undefined); } - }, [hasInteracted, parsedAmount, isStaking, balance, jurorBalance]); + }, [parsedAmount, isStaking, balance, jurorBalance]); return ( <> @@ -109,7 +108,6 @@ const InputDisplay: React.FC = ({ onClick={() => { const amount = isStaking ? parsedBalance : parsedStake; setAmount(amount); - setHasInteracted(true); }} > {isStaking ? "Stake" : "Withdraw"} all @@ -121,7 +119,6 @@ const InputDisplay: React.FC = ({ value={uncommify(amount)} onChange={(e) => { setAmount(e); - setHasInteracted(true); }} placeholder={isStaking ? "Amount to stake" : "Amount to withdraw"} message={errorMsg ?? undefined} @@ -137,9 +134,6 @@ const InputDisplay: React.FC = ({ isSending, setIsSending, setIsPopupOpen, - setErrorMsg, - hasInteracted, - setHasInteracted, }} /> diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx index f9249de27..3644d21f2 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx @@ -34,9 +34,6 @@ interface IActionButton { setIsSending: (arg0: boolean) => void; setAmount: (arg0: string) => void; setIsPopupOpen: (arg0: boolean) => void; - setErrorMsg: (arg0: string | undefined) => void; - hasInteracted: boolean; - setHasInteracted: (arg0: boolean) => void; } const StakeWithdrawButton: React.FC = ({ @@ -45,7 +42,6 @@ const StakeWithdrawButton: React.FC = ({ isSending, setIsSending, setIsPopupOpen, - setHasInteracted, }) => { const { id } = useParams(); const { address } = useAccount(); @@ -149,10 +145,7 @@ const StakeWithdrawButton: React.FC = ({ (targetStake !== 0n && targetStake < BigInt(courtDetails.court?.minStake)) || (isStaking && !isAllowance && isUndefined(setStakeConfig.request)) } - onClick={() => { - setHasInteracted(true); - onClick(); - }} + onClick={onClick} /> ); From 955a35dce79dd23945a9dcab68427fad511f6841 Mon Sep 17 00:00:00 2001 From: Shubham Parkhi Date: Fri, 24 May 2024 03:44:40 +0530 Subject: [PATCH 21/22] refactor(web): Error handling logic --- web/src/components/NumberInputField.tsx | 6 ++++-- .../pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web/src/components/NumberInputField.tsx b/web/src/components/NumberInputField.tsx index 64460ea13..32b6a89bc 100644 --- a/web/src/components/NumberInputField.tsx +++ b/web/src/components/NumberInputField.tsx @@ -35,6 +35,7 @@ interface INumberInputField extends Omit, "on onChange?: (value: string) => void; formatter?: (value: string) => string; className?: string; + min?: number; } export const NumberInputField: React.FC = ({ @@ -45,6 +46,7 @@ export const NumberInputField: React.FC = ({ formatter, className, variant = "info", + min, }) => { const [isEditing, setIsEditing] = useState(false); @@ -61,14 +63,14 @@ export const NumberInputField: React.FC = ({ onChange?.(event.target.value); }} onBlur={toggleEditing} - {...{ value, placeholder, message, variant }} + {...{ value, placeholder, message, variant, min }} /> ) : ( )} diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx index e8ac27289..ca6249fc6 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx @@ -89,8 +89,8 @@ const InputDisplay: React.FC = ({ const isStaking = useMemo(() => action === ActionType.stake, [action]); useEffect(() => { - if (parsedAmount === 0n) { - setErrorMsg(undefined); + if (parsedAmount === 0n && balance === 0n && isStaking) { + setErrorMsg("You need a non-zero PNK balance to stake"); } else if (isStaking && balance && parsedAmount > balance) { setErrorMsg("Insufficient balance to stake this amount"); } else if (!isStaking && jurorBalance && parsedAmount > jurorBalance[2]) { @@ -124,6 +124,7 @@ const InputDisplay: React.FC = ({ message={errorMsg ?? undefined} variant={!isUndefined(errorMsg) ? "error" : "info"} formatter={(number: string) => commify(roundNumberDown(Number(number)))} + min="0" /> Date: Fri, 24 May 2024 13:51:47 +0530 Subject: [PATCH 22/22] fix(web): staking-input-behaviour --- web/src/components/NumberInputField.tsx | 15 ++++++++++----- .../CourtDetails/StakePanel/InputDisplay.tsx | 5 ++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/web/src/components/NumberInputField.tsx b/web/src/components/NumberInputField.tsx index 32b6a89bc..393b71a26 100644 --- a/web/src/components/NumberInputField.tsx +++ b/web/src/components/NumberInputField.tsx @@ -35,7 +35,6 @@ interface INumberInputField extends Omit, "on onChange?: (value: string) => void; formatter?: (value: string) => string; className?: string; - min?: number; } export const NumberInputField: React.FC = ({ @@ -46,7 +45,6 @@ export const NumberInputField: React.FC = ({ formatter, className, variant = "info", - min, }) => { const [isEditing, setIsEditing] = useState(false); @@ -58,19 +56,26 @@ export const NumberInputField: React.FC = ({ {isEditing ? ( { + const value = e.currentTarget.value.replace(/[^0-9.]/g, ""); + + e.currentTarget.value = formatter ? formatter(value) : value; + return e; + }} onChange={(event: React.ChangeEvent) => { onChange?.(event.target.value); }} onBlur={toggleEditing} - {...{ value, placeholder, message, variant, min }} + value={formatter ? formatter(value ?? "0") : value} + {...{ placeholder, message, variant }} /> ) : ( )} diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx index ca6249fc6..9e8db9a7b 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx @@ -89,7 +89,7 @@ const InputDisplay: React.FC = ({ const isStaking = useMemo(() => action === ActionType.stake, [action]); useEffect(() => { - if (parsedAmount === 0n && balance === 0n && isStaking) { + if (parsedAmount > 0n && balance === 0n && isStaking) { setErrorMsg("You need a non-zero PNK balance to stake"); } else if (isStaking && balance && parsedAmount > balance) { setErrorMsg("Insufficient balance to stake this amount"); @@ -123,8 +123,7 @@ const InputDisplay: React.FC = ({ placeholder={isStaking ? "Amount to stake" : "Amount to withdraw"} message={errorMsg ?? undefined} variant={!isUndefined(errorMsg) ? "error" : "info"} - formatter={(number: string) => commify(roundNumberDown(Number(number)))} - min="0" + formatter={(number: string) => (number !== "" ? commify(roundNumberDown(Number(number))) : "")} />