Skip to content

Commit d153ace

Browse files
authored
Merge branch 'dev' into chore(contracts)/sol-version-update
2 parents 91ea385 + 5f0d234 commit d153ace

39 files changed

+1327
-646
lines changed

contracts/config/policies.v1.mainnet.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{
2525
"name": "Token Listing",
2626
"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.",
27-
"summary": "[Ethfinex Court Policy](https://ipfs.kleros.io/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)",
27+
"summary": "[Ethfinex Court Policy](https://cdn.kleros.link/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)",
2828
"court": 3,
2929
"uri": "/ipfs/QmeyojE13mcQtWqQQddYypafDRChVND8z6dcHLbaarmbbx"
3030
},
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "Token Listing",
33
"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.",
4-
"summary": "[Ethfinex Court Policy](https://ipfs.kleros.io/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)"
4+
"summary": "[Ethfinex Court Policy](https://cdn.kleros.link/ipfs/QmVzwEBpGsbFY3UgyjA3SxgGXx3r5gFGynNpaoXkp6jenu/Ethfinex%20Court%20Policy.pdf)"
55
}

contracts/scripts/disputeCreatorBot.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default async function main() {
3636
"000000000000000000000000000000000000000000000000000000000000000B" + // minJurors 11
3737
"0000000000000000000000000000000000000000000000000000000000000002"; // disputeKitId 2
3838
const templates = [
39-
`{"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"}`,
39+
`{"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"}`,
4040
`{"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"}`,
4141
`{"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"}`,
4242
`{"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"}`,

contracts/scripts/downloadPolicies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function download() #policies
66
{
77
for p in $(cat ${policies}.json | jq -r .[].uri)
88
do
9-
wget -P $SCRIPT_DIR/../config/$policies https://ipfs.kleros.io${p}
9+
wget -P $SCRIPT_DIR/../config/$policies https://cdn.kleros.link${p}
1010
done
1111
}
1212

contracts/scripts/getPoliciesV1.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async function main() {
3434
const uri = await fetchPolicyUri(court);
3535
if (!uri) break;
3636

37-
const policy = await fetchPolicy("https://ipfs.kleros.io" + uri);
37+
const policy = await fetchPolicy("https://cdn.kleros.link" + uri);
3838
policy.court = court;
3939
policy.uri = uri;
4040
policies.push(policy);

kleros-sdk/config/v1-metaevidence/tokens1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
]
1818
},
1919
"fileURI": "/ipfs/QmTL1SCKpRcr7NRbVpXW6z9QoQXRHJT5cQr6PEge5qoLwU/t2cr-primary-document.pdf",
20-
"evidenceDisplayInterfaceURL": "https://ipfs.kleros.io/ipfs/QmYs17mAJTaQwYeXNTb6n4idoQXmRcAjREeUdjJShNSeKh/index.html"
20+
"evidenceDisplayInterfaceURL": "https://cdn.kleros.link/ipfs/QmYs17mAJTaQwYeXNTb6n4idoQXmRcAjREeUdjJShNSeKh/index.html"
2121
}

kleros-sdk/config/v1-metaevidence/tokens2.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
]
1818
},
1919
"fileURI": "/ipfs/QmTL1SCKpRcr7NRbVpXW6z9QoQXRHJT5cQr6PEge5qoLwU/t2cr-primary-document.pdf",
20-
"evidenceDisplayInterfaceURL": "https://ipfs.kleros.io/ipfs/QmYs17mAJTaQwYeXNTb6n4idoQXmRcAjREeUdjJShNSeKh/index.html"
20+
"evidenceDisplayInterfaceURL": "https://cdn.kleros.link/ipfs/QmYs17mAJTaQwYeXNTb6n4idoQXmRcAjREeUdjJShNSeKh/index.html"
2121
}

kleros-sdk/config/v2-disputetemplate/moderate/DisputeDetails.moderate.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "./DisputeDetails.reality.schema.json",
33
"title": "A reality.eth question",
44
"description": "A reality.eth question has been raised to arbitration.",
5-
"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)***)?",
5+
"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)***)?",
66
"answers": [
77
{
88
"id": "0x01",

kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeDetails.reality1.jsonc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "./DisputeDetails.reality.schema.json",
33
"title": "A reality.eth question",
44
"description": "A reality.eth question has been raised to arbitration.",
5-
"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)***)?",
5+
"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)***)?",
66
"answers": [
77
{
88
"id": "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",

kleros-sdk/config/v2-disputetemplate/reality/example1/DisputeTemplateInputs.reality1.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [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)***)?
1+
# [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)***)?
22
single-select
33
,{"id":"0x00","title":"Invalid/Refuse to Arbitrate","reserved":true},{"id":"0x01","title":"Yes","reserved":false},{"id":"0x02","title":"No","reserved":false}
44
0xe78996a233895be74a66f451f1019ca9734205cc

kleros-sdk/config/v2-disputetemplate/reality/example3/DisputeMappings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"type": "json",
44
"source": {
5-
"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)***)?",
5+
"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)***)?",
66
"type": "single-select",
77
"answers": [
88
{

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@
7272
"alias": {
7373
"process": "process/browser.js",
7474
"buffer": "buffer",
75-
"ethers": "./web/src/utils/ethersShim.ts"
75+
"@lifi/sdk": "@tractors/lifi-sdk-parcel"
7676
}
7777
}

web/.parcelrc

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
{
22
"extends": "@parcel/config-default",
33
"transformers": {
4-
"*.svg": ["...", "@parcel/transformer-svg-react"],
5-
"tsx:*.svg": ["@parcel/transformer-svg-react"],
6-
"tsx:*": ["..."]
4+
"web/src/**/*.svg": [
5+
"...",
6+
"@parcel/transformer-svg-react"
7+
],
8+
"tsx:*.svg": [
9+
"@parcel/transformer-svg-react"
10+
],
11+
"tsx:*": [
12+
"..."
13+
]
714
}
815
}

web/netlify/functions/authUser.ts

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import middy from "@middy/core";
22
import jsonBodyParser from "@middy/http-json-body-parser";
3-
import { ETH_SIGNATURE_REGEX } from "consts/index";
4-
import { DEFAULT_CHAIN } from "consts/chains";
5-
import { SiweMessage } from "siwe";
6-
import * as jwt from "jose";
73
import { createClient } from "@supabase/supabase-js";
8-
import { netlifyUri } from "src/generatedNetlifyInfo.json";
4+
import * as jwt from "jose";
5+
import { SiweMessage } from "siwe";
6+
7+
import { DEFAULT_CHAIN } from "consts/chains";
8+
import { ETH_SIGNATURE_REGEX } from "consts/index";
9+
10+
import { netlifyUri, netlifyDeployUri, netlifyDeployPrimeUri } from "src/generatedNetlifyInfo.json";
911
import { Database } from "src/types/supabase-notification";
1012

1113
const authUser = async (event) => {
@@ -35,8 +37,16 @@ const authUser = async (event) => {
3537

3638
const siweMessage = new SiweMessage(message);
3739

38-
if (netlifyUri && netlifyUri !== siweMessage.uri) {
39-
console.debug(`Invalid URI: expected ${netlifyUri} but got ${siweMessage.uri}`);
40+
if (
41+
!(
42+
(netlifyUri && netlifyUri === siweMessage.uri) ||
43+
(netlifyDeployUri && netlifyDeployUri === siweMessage.uri) ||
44+
(netlifyDeployPrimeUri && netlifyDeployPrimeUri === siweMessage.uri)
45+
)
46+
) {
47+
console.debug(
48+
`Invalid URI: expected one of [${netlifyUri} ${netlifyDeployUri} ${netlifyDeployPrimeUri}] but got ${siweMessage.uri}`
49+
);
4050
throw new Error(`Invalid URI`);
4151
}
4252

@@ -45,11 +55,6 @@ const authUser = async (event) => {
4555
throw new Error(`Invalid chain ID`);
4656
}
4757

48-
if (!siweMessage.expirationTime || Date.parse(siweMessage.expirationTime) < Date.now()) {
49-
console.debug(`Message expired: ${siweMessage.expirationTime} < ${new Date().toISOString()}`);
50-
throw new Error("Message expired");
51-
}
52-
5358
const lowerCaseAddress = siweMessage.address.toLowerCase();
5459
if (lowerCaseAddress !== address.toLowerCase()) {
5560
throw new Error("Address mismatch in provided address and message");

web/netlify/functions/fetch-settings.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import middy from "@middy/core";
12
import { createClient } from "@supabase/supabase-js";
3+
24
import { Database } from "../../src/types/supabase-notification";
3-
import middy from "@middy/core";
45
import { authMiddleware } from "../middleware/authMiddleware";
56

67
const fetchSettings = async (event) => {

web/netlify/functions/getNonce.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { createClient } from "@supabase/supabase-js";
2-
import { Database } from "../../src/types/supabase-notification";
31
import middy from "@middy/core";
2+
import { createClient } from "@supabase/supabase-js";
43
import { generateNonce } from "siwe";
4+
55
import { ETH_ADDRESS_REGEX } from "src/consts";
66

7+
import { Database } from "../../src/types/supabase-notification";
8+
79
const getNonce = async (event) => {
810
try {
911
const { queryStringParameters } = event;

web/netlify/functions/update-settings.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { createClient } from "@supabase/supabase-js";
2-
import { Database } from "../../src/types/supabase-notification";
3-
import { EMAIL_REGEX, TELEGRAM_REGEX, ETH_ADDRESS_REGEX } from "../../src/consts/index";
41
import middy from "@middy/core";
52
import jsonBodyParser from "@middy/http-json-body-parser";
3+
import { createClient } from "@supabase/supabase-js";
4+
5+
import { EMAIL_REGEX, TELEGRAM_REGEX, ETH_ADDRESS_REGEX } from "../../src/consts/index";
6+
import { Database } from "../../src/types/supabase-notification";
67
import { authMiddleware } from "../middleware/authMiddleware";
78

89
type NotificationSettings = {

web/netlify/functions/uploadToIPFS.ts

+4-9
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const parseMultipart = ({ headers, body, isBase64Encoded }) =>
5050
bb.end();
5151
});
5252

53-
const pinToFilebase = async (data: FormData, dapp: string, operation: string): Promise<Array<string>> => {
53+
const pinToFilebase = async (data: FormData, operation: string): Promise<Array<string>> => {
5454
const cids = new Array<string>();
5555
for (const [_, dataElement] of Object.entries(data)) {
5656
if (dataElement.isFile) {
@@ -68,19 +68,14 @@ const pinToFilebase = async (data: FormData, dapp: string, operation: string): P
6868
export const handler: Handler = async (event) => {
6969
const { queryStringParameters } = event;
7070

71-
if (
72-
!queryStringParameters ||
73-
!queryStringParameters.dapp ||
74-
!queryStringParameters.key ||
75-
!queryStringParameters.operation
76-
) {
71+
if (!queryStringParameters || !queryStringParameters.key || !queryStringParameters.operation) {
7772
return {
7873
statusCode: 400,
7974
body: JSON.stringify({ message: "Invalid query parameters" }),
8075
};
8176
}
8277

83-
const { dapp, key, operation } = queryStringParameters;
78+
const { key, operation } = queryStringParameters;
8479

8580
if (key !== FILEBASE_API_WRAPPER) {
8681
return {
@@ -91,7 +86,7 @@ export const handler: Handler = async (event) => {
9186

9287
try {
9388
const parsed = await parseMultipart(event);
94-
const cids = await pinToFilebase(parsed, dapp, operation);
89+
const cids = await pinToFilebase(parsed, operation);
9590

9691
return {
9792
statusCode: 200,

web/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,14 @@
8181
"@filebase/client": "^0.0.5",
8282
"@kleros/kleros-sdk": "workspace:^",
8383
"@kleros/ui-components-library": "^2.10.0",
84+
"@lifi/widget": "^2.10.1",
8485
"@middy/core": "^5.3.2",
8586
"@middy/http-json-body-parser": "^5.3.2",
8687
"@sentry/react": "^7.93.0",
8788
"@sentry/tracing": "^7.93.0",
8889
"@supabase/supabase-js": "^2.39.3",
8990
"@tanstack/react-query": "^4.28.0",
91+
"@tractors/lifi-sdk-parcel": "^2.5.3",
9092
"@types/react-modal": "^3.16.3",
9193
"@web3modal/ethereum": "^2.7.1",
9294
"@web3modal/react": "^2.7.1",
@@ -115,7 +117,7 @@
115117
"react-scripts": "^5.0.1",
116118
"react-toastify": "^9.1.3",
117119
"react-use": "^17.4.3",
118-
"siwe": "^2.1.4",
120+
"siwe": "^2.3.1",
119121
"styled-components": "^5.3.11",
120122
"vanilla-jsoneditor": "^0.21.4",
121123
"viem": "^1.21.4",

web/scripts/generateBuildInfo.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

5-
jq -n --arg uri "$DEPLOY_PRIME_URL" '{ netlifyUri: $uri }' > src/generatedNetlifyInfo.json
5+
jq -n --arg primeUri "$DEPLOY_PRIME_URL" --arg uri "$URL" --arg deployUri "$DEPLOY_URL" '{ netlifyDeployPrimeUri: $primeUri, netlifyUri: $uri, netlifyDeployUri: $deployUri }' > src/generatedNetlifyInfo.json
66
node $SCRIPT_DIR/gitInfo.js

0 commit comments

Comments
 (0)