From 2acf320573e0a9a22b42bcb7b8b7d117cc89c4d6 Mon Sep 17 00:00:00 2001 From: M-RB3 Date: Fri, 26 Apr 2024 12:23:03 +0400 Subject: [PATCH] remove sybil check from donation --- apps/potlock/widget/ModalDonation/Banners.jsx | 68 +++++++++++++++++++ apps/potlock/widget/ModalDonation/Form.jsx | 27 ++++---- apps/potlock/widget/ModalDonation/FormPot.jsx | 15 +++- apps/potlock/widget/Pots/Detail.jsx | 28 ++++---- apps/potlock/widget/Pots/FlaggedAccounts.jsx | 1 + apps/potlock/widget/Pots/Header.jsx | 4 +- apps/potlock/widget/Pots/Projects.jsx | 8 +-- apps/potlock/widget/Project/ModalSuccess.jsx | 17 +++++ apps/potlock/widget/constants.jsx | 1 + 9 files changed, 132 insertions(+), 37 deletions(-) diff --git a/apps/potlock/widget/ModalDonation/Banners.jsx b/apps/potlock/widget/ModalDonation/Banners.jsx index cc344afd..2fdb3cb4 100644 --- a/apps/potlock/widget/ModalDonation/Banners.jsx +++ b/apps/potlock/widget/ModalDonation/Banners.jsx @@ -55,6 +55,48 @@ const NadabotBanner = styled.div` } } `; + +const VerifyInfoWrapper = styled.div` + display: flex; + align-items: center; + gap: 14px; + padding: 1rem; + border-radius: 6px; + border: 1px solid #ecc113; + background: #fbf9c6; + box-shadow: 0px 2px 1px 1px rgba(255, 255, 255, 0.8) inset, + 0px -2px 4px 0px rgba(15, 15, 15, 0.15) inset; + font-size: 14px; + color: #3f2209; + margin-top: 1.5rem; + .icon { + width: 17px; + display: flex; + height: fit-content; + svg { + width: 100%; + } + } + .text { + flex: 1; + line-height: 150%; + } + a { + font-weight: 500; + color: #dd3345; + :hover { + text-decoration: none; + } + } + @media only screen and (max-width: 480px) { + flex-wrap: wrap; + a { + width: 100%; + text-align: center; + } + } +`; + const NADA_BOT_ICON = "bafkreicojpp23dmf7hakbt67eah4ba52dx3reekdccaupoggzzlhdkroyi"; const Alert = ({ error }) => ( @@ -83,7 +125,33 @@ const Nadabot = () => ( ); +const VerifyInfo = () => ( + +
+ + + +
+
+ Your contribution won't be matched unless verified as human before the matching round ends. +
+ + Verify you’re human + +
+); + return { Alert, Nadabot, + VerifyInfo, }; diff --git a/apps/potlock/widget/ModalDonation/Form.jsx b/apps/potlock/widget/ModalDonation/Form.jsx index b9f4e79b..97846ef7 100644 --- a/apps/potlock/widget/ModalDonation/Form.jsx +++ b/apps/potlock/widget/ModalDonation/Form.jsx @@ -9,8 +9,8 @@ const { AmountInput } = VM.require(`potlock.near/widget/ModalDonation.AmountInpu const { Checks } = VM.require(`potlock.near/widget/ModalDonation.Checks`) || { Checks: () => {}, }; -const { Nadabot, Alert } = VM.require(`potlock.near/widget/ModalDonation.Banners`) || { - Nadabot: () => {}, +const { VerifyInfo, Alert } = VM.require(`potlock.near/widget/ModalDonation.Banners`) || { + VerifyInfo: () => {}, Alert: () => {}, }; @@ -204,16 +204,14 @@ const FormDirect = (props) => { > Amount - {!needsToVerify && ( - - )} + {ftBalance && ( @@ -226,13 +224,14 @@ const FormDirect = (props) => { )} {amountError && } - {needsToVerify && } + {needsToVerify && } +