From 1446cc8e37fb5c742b003f1554a04c648ea2c785 Mon Sep 17 00:00:00 2001 From: Neutrino Labs Date: Thu, 11 Mar 2021 19:36:02 -0800 Subject: [PATCH 1/3] Add daiAmount >= 10 to setIsDisabled check to prevent incurring gas fees without DAI --- ui/src/pages/projects/new.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/pages/projects/new.js b/ui/src/pages/projects/new.js index 090e59dc..32a08660 100644 --- a/ui/src/pages/projects/new.js +++ b/ui/src/pages/projects/new.js @@ -209,7 +209,11 @@ const NewProject = () => { !( value.length > 0 && project.description !== '' && - project.name !== '' + project.name !== '' && + ( + daiAmount && + parseFloat(daiAmount) >= 10 + ) ), ) } @@ -266,7 +270,7 @@ const NewProject = () => { fontWeight: 'heading', }} > - You need at least 10 DAI in order to add a project. Please add more + * You need at least 10 DAI in order to add a project. Please add more DAI to your Wallet. )} From 314a5d24e3b3965b1c609deb50f17d3ff1166064 Mon Sep 17 00:00:00 2001 From: Neutrino Labs Date: Thu, 11 Mar 2021 19:41:47 -0800 Subject: [PATCH 2/3] Add daiAmount >= 10 to setIsDisabled check to prevent incurring gas fees without DAI --- ui/src/pages/projects/new.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/pages/projects/new.js b/ui/src/pages/projects/new.js index 32a08660..5743855c 100644 --- a/ui/src/pages/projects/new.js +++ b/ui/src/pages/projects/new.js @@ -201,7 +201,11 @@ const NewProject = () => { !( value.length > 0 && project.categories && - project.categories.length > 0 + project.categories.length > 0 && + ( + daiAmount && + parseFloat(daiAmount) >= 10 + ) ), ) } else { From bf766a7afec2b8a361dccf338d61b1ee2710db09 Mon Sep 17 00:00:00 2001 From: Neutrino Labs Date: Thu, 11 Mar 2021 19:42:24 -0800 Subject: [PATCH 3/3] Add resolutions for missing pull-ws --- package.json | 3 +++ ui/package.json | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5b6db451..562bf54d 100644 --- a/package.json +++ b/package.json @@ -32,5 +32,8 @@ }, "devDependencies": { "lerna": "3.20.2" + }, + "resolutions": { + "pull-ws": "3.3.2" } } diff --git a/ui/package.json b/ui/package.json index bce7404e..7183d424 100644 --- a/ui/package.json +++ b/ui/package.json @@ -37,18 +37,19 @@ "gatsby": "^2.18.4", "gatsby-plugin-emotion": "^4.1.22", "gatsby-plugin-eslint": "^2.0.8", + "gatsby-plugin-force-trailing-slashes": "^1.0.4", + "gatsby-plugin-google-fonts": "1.0.1", "gatsby-plugin-ipfs": "2.0.2", "gatsby-plugin-layout": "1.1.22", "gatsby-plugin-manifest": "2.3.3", - "gatsby-plugin-google-fonts": "1.0.1", "gatsby-plugin-react-helmet": "^3.1.16", "gatsby-plugin-react-svg": "^2.1.2", - "gatsby-plugin-force-trailing-slashes": "^1.0.4", "gatsby-plugin-theme-ui": "0.3.0", "gatsby-source-filesystem": "^2.1.40", "gatsby-source-graphql": "2.1.28", "graphql": "^14.5.8", "moment": "2.24.0", + "node": "^15.10.0", "numeral": "^2.0.6", "qrcode.react": "^1.0.0", "query-string": "6.11.0", @@ -73,5 +74,8 @@ }, "bugs": { "url": "https://github.com/graphprotocol/everest/ui" + }, + "resolutions": { + "pull-ws": "3.3.2" } }