diff --git a/web/app.fluidity.money/app/routes/$network/dashboard.tsx b/web/app.fluidity.money/app/routes/$network/dashboard.tsx index 2ba41fbe1..e5b7d1da1 100644 --- a/web/app.fluidity.money/app/routes/$network/dashboard.tsx +++ b/web/app.fluidity.money/app/routes/$network/dashboard.tsx @@ -415,16 +415,17 @@ export default function Dashboard() { const [hoverModal, setHoverModal] = useState(false); const [showModal, setShowModal] = useState(false); - const [stakingStatsModalVisibility, setStakingStatsModalVisibility] = useState(false); + const [stakingStatsModalVisibility, setStakingStatsModalVisibility] = + useState(false); // every change to this number asks flystakingmodal to look up the new balance const [shouldUpdateFlyBalance, setShouldUpdateFlyBalance] = useState(0); const otherModalOpen = openMobModal || - walletModalVisibility || - connectedWalletModalVisibility || - chainModalVisibility + walletModalVisibility || + connectedWalletModalVisibility || + chainModalVisibility ? true : false; @@ -500,8 +501,9 @@ export default function Dashboard() { {/* Fluidify Money button, in a portal with z-index above tooltip if another modal isn't open */} navigate("../fluidify")} @@ -572,8 +574,13 @@ export default function Dashboard() { })}
  • - setStakingStatsModalVisibility(true)}> - STAKING + setStakingStatsModalVisibility(true)} + > + + STAKING +
  • @@ -759,7 +766,9 @@ export default function Dashboard() { {/* FLY Staking Stats Modal */} { setStakingStatsModalVisibility(false) }} + close={() => { + setStakingStatsModalVisibility(false); + }} showConnectWalletModal={() => setWalletModalVisibility(true)} visible={stakingStatsModalVisibility} shouldUpdateFlyBalance={shouldUpdateFlyBalance} @@ -767,12 +776,13 @@ export default function Dashboard() { setShouldUpdateFlyBalance((v) => v + 1) + shouldUpdateBalance: () => setShouldUpdateFlyBalance((v) => v + 1), }} > setWalletModalVisibility((v) => !v), + toggleConnectWalletModal: () => + setWalletModalVisibility((v) => !v), }} > @@ -911,8 +921,13 @@ export default function Dashboard() { nonNavigationEntries={[
  • ,
  • @@ -927,7 +942,7 @@ export default function Dashboard() { GET FLY -
  • + , ]} activeIndex={activeIndex} chains={chainNameMap} diff --git a/web/app.fluidity.money/app/routes/$network/dashboard/airdrop/common.tsx b/web/app.fluidity.money/app/routes/$network/dashboard/airdrop/common.tsx index 1045bad07..aab91338c 100644 --- a/web/app.fluidity.money/app/routes/$network/dashboard/airdrop/common.tsx +++ b/web/app.fluidity.money/app/routes/$network/dashboard/airdrop/common.tsx @@ -120,19 +120,19 @@ const BottleDistribution = ({ style={ numberPosition === "absolute" ? { - position: "absolute", - bottom: "100px", - zIndex: "5", - ...(showBottleNumbers - ? highlightBottle - ? { - fontSize: "2.5em", - } - : {} - : highlightBottle + position: "absolute", + bottom: "100px", + zIndex: "5", + ...(showBottleNumbers + ? highlightBottle + ? { + fontSize: "2.5em", + } + : {} + : highlightBottle ? { fontSize: "2.5em" } : { display: "none" }), - } + } : { fontSize: "1em" } } > @@ -670,8 +670,8 @@ export const stakingLiquidityMultiplierEq = ( Math.min( 1, (396 / 11315 - (396 * totalStakedDays) / 4129975) * stakedDays + - (396 * totalStakedDays) / 133225 - - 31 / 365 + (396 * totalStakedDays) / 133225 - + 31 / 365 ) ); @@ -724,12 +724,12 @@ const StakeNowModal = ({ const ratio = !tokenRatios ? 0 : calculateRatioFromProportion( - (baseToken.symbol === "USDC" - ? tokenRatios.fusdcUsdcRatio.toNumber() - - tokenRatios.fusdcUsdcSpread.toNumber() / 2 - : tokenRatios.fusdcWethRatio.toNumber() - - tokenRatios.fusdcWethSpread.toNumber() / 2) / 1e12 - ); + (baseToken.symbol === "USDC" + ? tokenRatios.fusdcUsdcRatio.toNumber() - + tokenRatios.fusdcUsdcSpread.toNumber() / 2 + : tokenRatios.fusdcWethRatio.toNumber() - + tokenRatios.fusdcWethSpread.toNumber() / 2) / 1e12 + ); // usdMultiplier x tokenAmount = USD const fluidUsdMultiplier = usdcPrice; @@ -792,31 +792,31 @@ const StakeNowModal = ({ setOtherInput: (token: StakingAugmentedToken) => void, conversionRatio: number ): React.ChangeEventHandler => - (e) => { - const numericChars = e.target.value.replace(/[^0-9.]+/, ""); + (e) => { + const numericChars = e.target.value.replace(/[^0-9.]+/, ""); - const [whole, dec] = numericChars.split("."); + const [whole, dec] = numericChars.split("."); - const tokenAmtStr = - dec !== undefined - ? [whole, dec.slice(0 - token.decimals)].join(".") - : whole ?? "0"; + const tokenAmtStr = + dec !== undefined + ? [whole, dec.slice(0 - token.decimals)].join(".") + : whole ?? "0"; - setInput({ - ...token, - amount: tokenAmtStr, - }); + setInput({ + ...token, + amount: tokenAmtStr, + }); - if (!ratio) return; - if (!(whole || dec)) return; + if (!ratio) return; + if (!(whole || dec)) return; - const otherTokenAmt = parseFloat(tokenAmtStr) * conversionRatio; + const otherTokenAmt = parseFloat(tokenAmtStr) * conversionRatio; - setOtherInput({ - ...otherToken, - amount: otherTokenAmt.toFixed(otherToken.decimals).replace(/\.0+$/, ""), - }); - }; + setOtherInput({ + ...otherToken, + amount: otherTokenAmt.toFixed(otherToken.decimals).replace(/\.0+$/, ""), + }); + }; const fluidTokenAmount = useMemo( () => parseSwapInputToTokenAmount(fluidToken.amount, fluidToken), @@ -1040,8 +1040,9 @@ const StakeNowModal = ({ )}
    {/* Staking Amount */}
    @@ -1333,7 +1334,7 @@ const StakeNowModal = ({ baseToken.decimals, baseUsdMultiplier ) || 0)) * - stakingLiquidityMultiplierEq(0, stakingDuration), + stakingLiquidityMultiplierEq(0, stakingDuration), 1 )} @@ -1384,7 +1385,7 @@ const StakeNowModal = ({ baseToken.decimals, baseUsdMultiplier ) || 0)) * - stakingLiquidityMultiplierEq(MAX_EPOCH_DAYS, stakingDuration), + stakingLiquidityMultiplierEq(MAX_EPOCH_DAYS, stakingDuration), 1 )} @@ -1469,7 +1470,11 @@ const tutorialContent: { desc: ( <> - You can increase your chances of receiving Loot Bottles by doing the following: Staking $FLY on the Fluidity Webapp • LPing on the incentivised Trader Joe & Camelot LPs • Contributing volume (specially through $FLY) • Use our supported DEXs to receive a 12x multiplier for transacting + You can increase your chances of receiving Loot Bottles by doing the + following: Staking $FLY on the Fluidity Webapp • LPing on the + incentivised Trader Joe & Camelot LPs • Contributing volume (specially + through $FLY) • Use our supported DEXs to receive a 12x multiplier for + transacting
    @@ -1684,15 +1690,18 @@ const RecapModal = ({ }, }: IRecapModal) => { const providerLinks: { provider: Provider; link: string }[] = [ - { provider: "Uniswap", link: "https://app.uniswap.org/swap?outputCurrency=0x000F1720A263f96532D1ac2bb9CDC12b72C6f386&chain=arbitrum" }, + { + provider: "Uniswap", + link: "https://app.uniswap.org/swap?outputCurrency=0x000F1720A263f96532D1ac2bb9CDC12b72C6f386&chain=arbitrum", + }, { provider: "Trader Joe", - link: "https://traderjoexyz.com/arbitrum/trade?outputCurrency=0x000F1720A263f96532D1ac2bb9CDC12b72C6f386" + link: "https://traderjoexyz.com/arbitrum/trade?outputCurrency=0x000F1720A263f96532D1ac2bb9CDC12b72C6f386", }, { provider: "Camelot", link: "https://app.camelot.exchange/" }, { provider: "Ramses", - link: "https://app.ramses.exchange/liquidity/v2/0x000F1720A263f96532D1ac2bb9CDC12b72C6f386" + link: "https://app.ramses.exchange/liquidity/v2/0x000F1720A263f96532D1ac2bb9CDC12b72C6f386", }, { provider: "Jumper", link: "https://jumper.exchange/" }, ]; @@ -1760,15 +1769,16 @@ const RecapModal = ({ const { address } = useContext(FluidityFacadeContext); - const { - toggleVisibility: flyStakingModalToggleVisibility - } = useContext(FlyStakingContext); + const { toggleVisibility: flyStakingModalToggleVisibility } = + useContext(FlyStakingContext); const videoHeight = isMobile ? 500 : 700; const videoWidth = isMobile ? 500 : 1500; const [walletModalVisibility, setWalletModalVisibility] = useState(false); - const [flyClaimModalState, setFlyClaimModalState] = useState<'none' | 'claim' | 'stake'>('none'); + const [flyClaimModalState, setFlyClaimModalState] = useState< + "none" | "claim" | "stake" + >("none"); const [flyAmountOwed, setFLYAmountOwed] = useState(0); @@ -1850,17 +1860,20 @@ const RecapModal = ({ ); }; - const handleClaimYourFly = (type: 'claim' |'stake') => { - setFlyClaimModalState(type) + const handleClaimYourFly = (type: "claim" | "stake") => { + setFlyClaimModalState(type); // Get the user's address.by }; - const [termsAndConditionsModalVis, setTermsAndConditionsModalVis] = useState(false); + const [termsAndConditionsModalVis, setTermsAndConditionsModalVis] = + useState(false); // needed for the terms and conditions const closeWithEsc = useCallback( (event: { key: string }) => { - event.key === "Escape" && setTermsAndConditionsModalVis && setTermsAndConditionsModalVis(false); + event.key === "Escape" && + setTermsAndConditionsModalVis && + setTermsAndConditionsModalVis(false); }, [termsAndConditionsModalVis, setTermsAndConditionsModalVis] ); @@ -1891,30 +1904,39 @@ const RecapModal = ({ return () => clearTimeout(timerId); }, []); - const ClaimButtonsSpread = () => + const ClaimButtonsSpread = () => (
    - handleClaimYourFly('claim')}> + handleClaimYourFly("claim")} + > Claim your FLY - handleClaimYourFly('stake')}> + handleClaimYourFly("stake")} + > Stake your $FLY airdrop -
    ; +
    + ); // whether the popup staking modal was completed in a staking state - const [completedClaimStakeModal, setCompletedClaimStakeModal] = useState(false); + const [completedClaimStakeModal, setCompletedClaimStakeModal] = + useState(false); // called when someone completes the staking modal with a claim complete state. const handleClaimStakingModalComplete = () => { setCompletedClaimStakeModal(true); }; - const StakingStatsButton = () => + const StakingStatsButton = () => (
    - flyStakingModalToggleVisibility?.(true) }> + flyStakingModalToggleVisibility?.(true)}> Staking stats -
    ; +
    + ); const ButtonsSpread = () => completedClaimStakeModal ? : ; @@ -1924,16 +1946,23 @@ const RecapModal = ({
    - Congratulations! You are eligible to claim 25% of your tokens at TGE! + Congratulations! You are eligible to claim 25% of your tokens at + TGE! - $FLY {flyAmountOwed == 996699 ? "" : numberToCommaSeparated(flyAmountOwed)} + + $FLY{" "} + {flyAmountOwed == 996699 + ? "" + : numberToCommaSeparated(flyAmountOwed)} +
    @@ -2011,10 +2041,7 @@ const RecapModal = ({ return ( <> - +
    @@ -2026,66 +2053,76 @@ const RecapModal = ({

    - 1. Description - - We may offer you the opportunity to receive some digital assets at no cost (**Airdrop**), subject to the terms described in this section. The Airdrop is delivered by us to you, but may be manufactured, offered and supported by the network creator or developer, if any, and not by us. + 1. Description We may offer you the opportunity to receive some + digital assets at no cost (**Airdrop**), subject to the terms + described in this section. The Airdrop is delivered by us to you, + but may be manufactured, offered and supported by the network + creator or developer, if any, and not by us.

    - 1. Terms of Airdrop Program - - 2.1 No Purchase Necessary - - There is no purchase necessary to receive the Airdrop. However, you must have - wallets recognised and accepted by us. Although we do not charge a fee for participation in the Airdrop Program, we reserve the right to do so in the future and shall provide prior notice to you in such case. + 1. Terms of Airdrop Program 2.1 No Purchase Necessary There is no + purchase necessary to receive the Airdrop. However, you must have + wallets recognised and accepted by us. Although we do not charge a + fee for participation in the Airdrop Program, we reserve the right + to do so in the future and shall provide prior notice to you in + such case.

    - 2.2 Timing - - Each Airdrop may be subject to any additional terms and conditions and where applicable such terms and conditions shall be displayed and marked with an asterisk (*) or other similar notation. + 2.2 Timing Each Airdrop may be subject to any additional terms and + conditions and where applicable such terms and conditions shall be + displayed and marked with an asterisk (*) or other similar + notation.

    - 2.3 Limited Supply - - An offer to receive the digital assets in an Airdrop is only available to you while supplies last. Once the amount of digital asset offered by us in an Airdrop is exhausted, any party who - has either been placed on a waitlist, or has completed certain additional steps, but not yet received notice of award of the asset in such Airdrop, shall no longer be eligible to receive the said digital assets in that Airdrop. We reserve the right, in our sole discretion, to modify or - suspend any Airdrop requirements at any time without notice, including the amount previously - advertised as available. + 2.3 Limited Supply An offer to receive the digital assets in an + Airdrop is only available to you while supplies last. Once the + amount of digital asset offered by us in an Airdrop is exhausted, + any party who has either been placed on a waitlist, or has + completed certain additional steps, but not yet received notice of + award of the asset in such Airdrop, shall no longer be eligible to + receive the said digital assets in that Airdrop. We reserve the + right, in our sole discretion, to modify or suspend any Airdrop + requirements at any time without notice, including the amount + previously advertised as available.

    - 2.4 Eligibility - - You may not be eligible to receive the digital assets or a select class and type of digital assets from an Airdrop in your jurisdiction. - - To the best of our understanding, below is a list of countries that does not recognise digital assets; - - *Afghanistan, Algeria, Egypt, Bangladesh, Bolivia, Burundi, Cameroon, Chad, China, Republic of Congo, Ethiopia, Gabon, Iraq, Lesotho, Libya, Macedonia, Morocco, Myanmar, Nepal, Qatar, Sierra Leone, Tunisia ** - - Kindly be advised that this list is for reference only and you are advised to seek independent legal advise as to your eligibility to receive the assets through Airdrop. - - **source - Library of Congress, Atlantic Council, Techopedia, Finder, Triple-A, Chainalysis* + 2.4 Eligibility You may not be eligible to receive the digital + assets or a select class and type of digital assets from an + Airdrop in your jurisdiction. To the best of our understanding, + below is a list of countries that does not recognise digital + assets; *Afghanistan, Algeria, Egypt, Bangladesh, Bolivia, + Burundi, Cameroon, Chad, China, Republic of Congo, Ethiopia, + Gabon, Iraq, Lesotho, Libya, Macedonia, Morocco, Myanmar, Nepal, + Qatar, Sierra Leone, Tunisia ** Kindly be advised that this list + is for reference only and you are advised to seek independent + legal advise as to your eligibility to receive the assets through + Airdrop. **source - Library of Congress, Atlantic Council, + Techopedia, Finder, Triple-A, Chainalysis*

    - 2.5 Notice of Award - - In the event you are selected to receive the digital asset in an Airdrop, we shall notify you of the pending delivery of such asset. Eligibility may be limited as to time. - We are not liable to you for failure to receive any notice associated with the Airdrop Program. + 2.5 Notice of Award In the event you are selected to receive the + digital asset in an Airdrop, we shall notify you of the pending + delivery of such asset. Eligibility may be limited as to time. We + are not liable to you for failure to receive any notice associated + with the Airdrop Program.

    - 3 Risk Disclosures Relating to Airdrop Program - - You are solely responsible for researching and understanding the Fluid Assets token and it’s related utility and/or network subject to the Airdrop. + 3 Risk Disclosures Relating to Airdrop Program You are solely + responsible for researching and understanding the Fluid Assets + token and it’s related utility and/or network subject to the + Airdrop.

    - + setWalletModalVisibility(true)} flyAmount={flyAmountOwed} - visible={flyClaimModalState !== 'none'} - mode={flyClaimModalState === 'none' ? 'claim' : flyClaimModalState} + visible={flyClaimModalState !== "none"} + mode={flyClaimModalState === "none" ? "claim" : flyClaimModalState} accumulatedPoints={day1Points} - close={() => setFlyClaimModalState('none')} + close={() => setFlyClaimModalState("none")} onStakingComplete={handleClaimStakingModalComplete} onClaimComplete={handleClaimStakingModalComplete} /> @@ -2166,8 +2203,9 @@ const RecapModal = ({ {/* Animation */} {currentVideo === 0 ? (