From 07f5531a16e7e998bf7c23e318ab0afd1eeae2df Mon Sep 17 00:00:00 2001 From: 0xmegalodon Date: Fri, 2 Feb 2024 16:01:23 +0700 Subject: [PATCH 01/11] add luckey money --- src/modules/PublicSale/dailyReward/index.tsx | 5 +++-- .../hourlyRewardButton/styles.module.scss | 2 +- src/modules/PublicSale/raffleButton/index.tsx | 14 ++----------- .../raffleButton/styles.module.scss | 20 ++++++++----------- 4 files changed, 14 insertions(+), 27 deletions(-) diff --git a/src/modules/PublicSale/dailyReward/index.tsx b/src/modules/PublicSale/dailyReward/index.tsx index 4b98bc49e..1a50ab7c9 100644 --- a/src/modules/PublicSale/dailyReward/index.tsx +++ b/src/modules/PublicSale/dailyReward/index.tsx @@ -30,8 +30,8 @@ const DailyReward = () => { - - Daily Reward + + Weekend Rewards { .toString()} hideIcon={true} onRefreshEnd={() => setIsEnd(true)} + isHideSecond={true} /> diff --git a/src/modules/PublicSale/hourlyRewardButton/styles.module.scss b/src/modules/PublicSale/hourlyRewardButton/styles.module.scss index 56c41e1df..93b796086 100644 --- a/src/modules/PublicSale/hourlyRewardButton/styles.module.scss +++ b/src/modules/PublicSale/hourlyRewardButton/styles.module.scss @@ -7,7 +7,7 @@ $time:10s; // including 1 flip transition: all 0.3s; position: relative; //cursor: pointer; - width: 165px; + width: 178px; //height: 99px; //padding: 6px; diff --git a/src/modules/PublicSale/raffleButton/index.tsx b/src/modules/PublicSale/raffleButton/index.tsx index 6256d8ffc..9a18e6833 100644 --- a/src/modules/PublicSale/raffleButton/index.tsx +++ b/src/modules/PublicSale/raffleButton/index.tsx @@ -145,7 +145,7 @@ const RaffleButton = ({ className }: any) => { fontWeight={500} textTransform={"uppercase"} > - Day {currentDay?.diffDay + 1} Raffle + WEEKEND REWARDS {programeInfo?.sub_title} @@ -229,18 +229,8 @@ const RaffleButton = ({ className }: any) => { }} cursor="pointer" w={"100%"} + justifyContent={"center"} > - - - - - - - - - - - Tweet to enter diff --git a/src/modules/PublicSale/raffleButton/styles.module.scss b/src/modules/PublicSale/raffleButton/styles.module.scss index 16cafd844..00b889b9a 100644 --- a/src/modules/PublicSale/raffleButton/styles.module.scss +++ b/src/modules/PublicSale/raffleButton/styles.module.scss @@ -29,12 +29,8 @@ display: flex; flex-direction: row; align-items: center; - //justify-content: center; - //left: 0; - //right: 0; - //margin-left: auto; - //margin-right: auto; - width: fit-content; + justify-content: center; + width: 100%; margin-bottom: 8px; } @@ -61,14 +57,14 @@ background-repeat: no-repeat; padding: 4px; align-items: flex-start; - width: 80px; - height: 80px; + width: 165px; + height: 165px; > img { - min-width: 72px; - min-height: 72px; - max-width: 72px; - max-height: 72px; + min-width: 157px; + min-height: 157px; + max-width: 157px; + max-height: 157px; } } } From 6fd38235a400275925dea6ce82be50aba7a81090 Mon Sep 17 00:00:00 2001 From: camewell <130561684+camewell071@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:10:40 +0700 Subject: [PATCH 02/11] chore: update code --- .../PublicSale/activities/AcitivitiesVer2/index.tsx | 10 +++++----- src/services/public-sale.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx index 26cc7acb7..9689e84bd 100644 --- a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx +++ b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx @@ -201,11 +201,11 @@ const ActivitiesVer2 = React.memo(() => { const gameReport = numberReport.gameReport if (gameReport && gameReport.total_game && gameReport.total_txs) { component1 = ReportRow({ - key: "Game plays", + key: "Games played", value: gameReport.total_game.toString(), }); component2 = ReportRow({ - key: "Tx", + key: "Transactions", value: gameReport.total_txs.toString(), }) } @@ -215,7 +215,7 @@ const ActivitiesVer2 = React.memo(() => { const nakaVolume = numberReport.nakaVolume if (nakaVolume && nakaVolume.usd_volume) { component1 = ReportRow({ - key: "Vols", + key: "Volume", value: nakaVolume.usd_volume.toString(), maxDigit: 2, prefix: "$" @@ -241,11 +241,11 @@ const ActivitiesVer2 = React.memo(() => { const alphaRun = numberReport.alphaRun if (alphaRun && alphaRun.total_distance && alphaRun.total_reward) { component1 = ReportRow({ - key: "Km", + key: "Km ran", value: alphaRun.total_distance.toString() }); component2 = ReportRow({ - key: "Fund raised", + key: "charity raised", value: new BigNumber(alphaRun.total_reward.toString()).div(1e8).times(btcPrice).toString(), maxDigit: 2, prefix: "$" diff --git a/src/services/public-sale.ts b/src/services/public-sale.ts index 725de710a..976288969 100644 --- a/src/services/public-sale.ts +++ b/src/services/public-sale.ts @@ -272,7 +272,7 @@ export const getActivitiesReport = async (): Promise = const [modular, alphaRun, nakaVolume, gameReport] = ( await Promise.allSettled([ apiReport.get("https://generative.xyz/generative/api/modular-workshop/statistic"), - apiReport.get("https://stag-perp-api.fprotocol.io/api/run-together/statistics"), + apiReport.get("https://perp-api.fprotocol.io/api/run-together/statistics"), apiReport.get("https://api.bvm.network/api/future/report"), apiReport.get("https://game-state.bitcoinarcade.xyz/api/network-stats") ]) From 8fd5f663e7be1677409205d73d398592e306a1c3 Mon Sep 17 00:00:00 2001 From: camewell <130561684+camewell071@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:14:53 +0700 Subject: [PATCH 03/11] chore: update code --- .../activities/AcitivitiesVer2/index.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx index 9689e84bd..338eb0980 100644 --- a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx +++ b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx @@ -201,11 +201,11 @@ const ActivitiesVer2 = React.memo(() => { const gameReport = numberReport.gameReport if (gameReport && gameReport.total_game && gameReport.total_txs) { component1 = ReportRow({ - key: "Games played", + key: "games played", value: gameReport.total_game.toString(), }); component2 = ReportRow({ - key: "Transactions", + key: "transactions", value: gameReport.total_txs.toString(), }) } @@ -215,7 +215,7 @@ const ActivitiesVer2 = React.memo(() => { const nakaVolume = numberReport.nakaVolume if (nakaVolume && nakaVolume.usd_volume) { component1 = ReportRow({ - key: "Volume", + key: "volume", value: nakaVolume.usd_volume.toString(), maxDigit: 2, prefix: "$" @@ -227,11 +227,11 @@ const ActivitiesVer2 = React.memo(() => { const modular = numberReport.modular if (modular && modular.total_owner && modular.total_model) { component1 = ReportRow({ - key: "Builders", + key: "builders", value: modular.total_owner.toString() }); component2 = ReportRow({ - key: "Builds", + key: "builds", value: modular.total_model.toString() }); } @@ -241,7 +241,7 @@ const ActivitiesVer2 = React.memo(() => { const alphaRun = numberReport.alphaRun if (alphaRun && alphaRun.total_distance && alphaRun.total_reward) { component1 = ReportRow({ - key: "Km ran", + key: "km ran", value: alphaRun.total_distance.toString() }); component2 = ReportRow({ @@ -303,16 +303,16 @@ const ActivitiesVer2 = React.memo(() => { return ( - - + + BITCOIN L2 HOPPING WEEKEND - - Explore Bitcoin like never before. Hop from one Bitcoin L2 to another to play on-chain games, trade BRC-20 futures, run for charity, learn about modular architecture, and more! + + EXPLORE BITCOIN LIKE NEVER BEFORE. - - Time: from now to 3:30 am UTC Monday, Feb 5 + + Hop from one Bitcoin L2 to another to play on-chain games, trade BRC-20 futures, run for charity, learn about modular architecture, and more! Events end on Monday, Feb 5, at 3:30 am UTC. From 72e99a7c7e42d7ad335faae28637b4cb3d06dc90 Mon Sep 17 00:00:00 2001 From: camewell <130561684+camewell071@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:19:18 +0700 Subject: [PATCH 04/11] chore: update code --- .../PublicSale/activities/AcitivitiesVer2/index.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx index 338eb0980..0c1bf08af 100644 --- a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx +++ b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx @@ -128,7 +128,7 @@ const ActivitiesVer2 = React.memo(() => { desc: `
    ${NormalRow({ key: "Activities:", value: "Play 8 different fully on-chain games to earn rewards." })} - ${NormalRow({ key: "Rewards:", value: "Each game: $100 (1st place), $50 (2nd place), $30 (3rd place), $10 (4th), $10 (5th)." })} + ${NormalRow({ key: "Prizes:", value: "Each game: $100 (1st), $50 (2nd), $30 (3rd), $10 (4th), $10 (5th)." })} ${LinkRow({ key: "Bitcoin L2:", value: "Bitcoin Arcade", link: GAME_LINK.ARCA })}
`, @@ -141,7 +141,7 @@ const ActivitiesVer2 = React.memo(() => { desc: `
    ${NormalRow({ key: "Activities:", value: "Trade BRC-20 perpetual futures on-chain." })} - ${NormalRow({ key: "Rewards:", value: "$50 every 4 hours & 100k Naka points every hours." })} + ${NormalRow({ key: "Prizes:", value: "$50 every 4 hours & 100k Naka points every hours." })} ${LinkRow({ key: "Bitcoin L2:", value: "Naka", link: GAME_LINK.NAKA })}
`, @@ -154,7 +154,7 @@ const ActivitiesVer2 = React.memo(() => { desc: `
    ${NormalRow({ key: "Activities:", value: "Learn about modular blockchain architecture via an exciting Lego game." })} - ${NormalRow({ key: "Rewards:", value: "Bitcoin Punk 686 (1st place), Rare Modular (2nd place), Common Modular (3rd place)." })} + ${NormalRow({ key: "Prizes:", value: "Bitcoin Punk 686 (1st), Rare Modular (2nd), Modular (3rd)." })} ${LinkRow({ key: "Bitcoin L2:", value: "Modular", link: GAME_LINK.MODULAR })}
`, @@ -167,7 +167,7 @@ const ActivitiesVer2 = React.memo(() => { desc: `
    ${NormalRow({ key: "Activities:", value: "Participate in a charity run." })} - ${NormalRow({ key: "Rewards:", value: "For every km you run, you’ll raise $1 for charity and earn 10,000 Alpha points." })} + ${NormalRow({ key: "Prizes:", value: "Raise $1 for charity & earn 10K Alpha points for each km you run." })} ${LinkRow({ key: "Bitcoin L2:", value: "Alpha", link: GAME_LINK.ALPHA })}
`, @@ -180,8 +180,8 @@ const ActivitiesVer2 = React.memo(() => { subTitle: " (Available on Monday)", desc: `
    - ${NormalRow({ key: "Rewards:", value: undefined, mask: true })} - ${NormalRow({ key: "Activities:", value: "Play fully on-chain games" })} + ${NormalRow({ key: "Prizes:", value: undefined, mask: true })} + ${NormalRow({ key: "Activities:", value: "Train your fully on-chain AI." })} ${LinkRow({ key: "Bitcoin L2:", value: "Eternal AI", link: GAME_LINK.AI })}
`, From b00e08ac26c6592c3c98c261da4738b9dc069faa Mon Sep 17 00:00:00 2001 From: camewell <130561684+camewell071@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:22:54 +0700 Subject: [PATCH 05/11] chore: update code --- .../activities/AcitivitiesVer2/index.tsx | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx index 0c1bf08af..a3f6ffc48 100644 --- a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx +++ b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx @@ -204,22 +204,36 @@ const ActivitiesVer2 = React.memo(() => { key: "games played", value: gameReport.total_game.toString(), }); - component2 = ReportRow({ - key: "transactions", - value: gameReport.total_txs.toString(), - }) + component2 = ( + { + window.open("https://explorer.testnet.bitcoinarcade.xyz/", "_blank") + }}> + {ReportRow({ + key: "transactions", + value: gameReport.total_txs.toString(), + })} + + ) } break; } case ActivityType.Naka: { const nakaVolume = numberReport.nakaVolume if (nakaVolume && nakaVolume.usd_volume) { - component1 = ReportRow({ - key: "volume", - value: nakaVolume.usd_volume.toString(), - maxDigit: 2, - prefix: "$" - }); + component1 = ( + { + window.open("https://explorer.nakachain.xyz/address/0x43eF235efF5d8Aa29D34bCB7AE42dCFA6A86477e", "_blank") + }}> + { + ReportRow({ + key: "volume", + value: nakaVolume.usd_volume.toString(), + maxDigit: 2, + prefix: "$" + }) + } + + ); } break; } From 924c31d5890eff6f9d2a5ad405bf33fc112e189e Mon Sep 17 00:00:00 2001 From: 0xmegalodon Date: Fri, 2 Feb 2024 16:25:02 +0700 Subject: [PATCH 06/11] add luckey money --- src/modules/PublicSale/dailyReward/index.tsx | 2 +- src/modules/PublicSale/raffleButton/index.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/PublicSale/dailyReward/index.tsx b/src/modules/PublicSale/dailyReward/index.tsx index 1a50ab7c9..7eebbb219 100644 --- a/src/modules/PublicSale/dailyReward/index.tsx +++ b/src/modules/PublicSale/dailyReward/index.tsx @@ -31,7 +31,7 @@ const DailyReward = () => { - Weekend Rewards + RAFFLE { ? window.open(programeInfo?.link, '_blank') : undefined } + alignItems={"center"} > { fontWeight={500} textTransform={"uppercase"} > - WEEKEND REWARDS + PERCEPTRON #121 - {programeInfo?.sub_title} + by Fingerprints DAO x Generative From 7bd3dea5b11bcac74f843de212b244855540c72f Mon Sep 17 00:00:00 2001 From: camewell <130561684+camewell071@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:27:56 +0700 Subject: [PATCH 07/11] chore: update code --- .../activities/AcitivitiesVer2/index.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx index a3f6ffc48..e5bb1959f 100644 --- a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx +++ b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx @@ -25,6 +25,8 @@ enum ActivityType { AI } +const MODULAR_TW_LINK = "https://twitter.com/BVMnetwork/status/1752952381007171646"; + export interface GameItemProps { title: string; subTitle?: string; @@ -32,7 +34,8 @@ export interface GameItemProps { ctas?: ICTA[]; banner?: string, link?: string, - type: ActivityType + type: ActivityType, + bannerLink?: string } const GAME_LINK = { @@ -161,6 +164,7 @@ const ActivitiesVer2 = React.memo(() => { banner: 'banner-03.png', link: GAME_LINK.MODULAR, type: ActivityType.Modular, + bannerLink: MODULAR_TW_LINK }, { title: 'SocialFi on Bitcoin', @@ -269,9 +273,13 @@ const ActivitiesVer2 = React.memo(() => { } } if (!component1 && !component2) return <>; + const isModular = type === ActivityType.Modular; return ( - + { + if(!isModular) return; + window.open(MODULAR_TW_LINK, "_blank") + }}> {!!component1 && ( component1 )} @@ -283,7 +291,7 @@ const ActivitiesVer2 = React.memo(() => { )} ) - }, []); + }, [numberReport]); const renderItem = (item: GameItemProps) => { return ( @@ -300,9 +308,9 @@ const ActivitiesVer2 = React.memo(() => {
{!!item.banner && ( - !!item.link ? + (!!item.link || !!item.bannerLink) ? ( - + banner ) : From 808d71521f31903715fa8d9e9b6395496ba96e61 Mon Sep 17 00:00:00 2001 From: camewell <130561684+camewell071@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:31:59 +0700 Subject: [PATCH 08/11] chore: update ui mobile --- .../activities/AcitivitiesVer2/styles.module.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/PublicSale/activities/AcitivitiesVer2/styles.module.scss b/src/modules/PublicSale/activities/AcitivitiesVer2/styles.module.scss index eed14caff..74734a910 100644 --- a/src/modules/PublicSale/activities/AcitivitiesVer2/styles.module.scss +++ b/src/modules/PublicSale/activities/AcitivitiesVer2/styles.module.scss @@ -35,6 +35,12 @@ justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); + @include is-mobile { + flex-direction: column; + justify-content: flex-start; + align-items: flex-start; + gap: 8px; + } } &_content { padding: 12px 12px 12px 34px; From 7eea99e1bd52fd3b0a2623aa70aa464d0f46fb45 Mon Sep 17 00:00:00 2001 From: camewell <130561684+camewell071@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:36:37 +0700 Subject: [PATCH 09/11] chore: update code --- src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx index e5bb1959f..9f8f22304 100644 --- a/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx +++ b/src/modules/PublicSale/activities/AcitivitiesVer2/index.tsx @@ -328,7 +328,7 @@ const ActivitiesVer2 = React.memo(() => { - BITCOIN L2 HOPPING WEEKEND + BITCOIN L2 HOPPING WEEKEND. EXPLORE BITCOIN LIKE NEVER BEFORE. From 3d8e70fa8453670b597ff2f1e4b6914919318dda Mon Sep 17 00:00:00 2001 From: 0xmegalodon Date: Fri, 2 Feb 2024 16:36:55 +0700 Subject: [PATCH 10/11] add luckey money --- .../PublicSale/leaderBoardVisual/AvatarItem/index.tsx | 4 ++-- src/utils/format.ts | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/modules/PublicSale/leaderBoardVisual/AvatarItem/index.tsx b/src/modules/PublicSale/leaderBoardVisual/AvatarItem/index.tsx index 4883e38b9..1a89e6bee 100644 --- a/src/modules/PublicSale/leaderBoardVisual/AvatarItem/index.tsx +++ b/src/modules/PublicSale/leaderBoardVisual/AvatarItem/index.tsx @@ -3,7 +3,7 @@ import { getUrlAvatarTwitter } from '@/utils/twitter'; import React, { forwardRef, ReactElement, useEffect, useMemo, useRef, useState } from 'react'; import Image from 'next/image'; import { ILeaderBoardPoint } from '@/interfaces/leader-board-point'; -import { formatCurrency } from '@/utils/format'; +import { formatCurrency, formatName2 } from '@/utils/format'; import { DotLottiePlayer } from '@dotlottie/react-player'; import { gsap } from 'gsap'; import { useAppSelector } from '@/stores/hooks'; @@ -122,7 +122,7 @@ const AvatarItem = forwardRef((props: IProps, ref: any) => {

{ - !isYou &&

{data?.twitter_name}

+ !isYou &&

{formatName2(data?.twitter_name)}

} { isYou &&

You

diff --git a/src/utils/format.ts b/src/utils/format.ts index 9024dde5a..979dee6de 100644 --- a/src/utils/format.ts +++ b/src/utils/format.ts @@ -87,6 +87,17 @@ export const formatName = (name: string, length = 12): string => { } }; +export const formatName2 = (name: string, length = 12): string => { + if (!name) return ''; + if (ethers.utils.isAddress(name)) { + return name.substring(0, 6); + } else if (name.startsWith('bc1p')) { + return name.substring(0, 8); + } else { + return name?.length > length ? name.substring(0, length) + '...' : name; + } +}; + export const formatCurrencyV2 = (params: { amount: string | number; decimals?: number; From 13c622d00fcc51170499fbde4fedf517fe5c0ee1 Mon Sep 17 00:00:00 2001 From: Peter Date: Fri, 2 Feb 2024 17:00:28 +0700 Subject: [PATCH 11/11] feat: update share twitter --- .../PublicSale/luckyMoney/LuckMoneyModal.tsx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/modules/PublicSale/luckyMoney/LuckMoneyModal.tsx b/src/modules/PublicSale/luckyMoney/LuckMoneyModal.tsx index 62edbfb0d..85e19f197 100644 --- a/src/modules/PublicSale/luckyMoney/LuckMoneyModal.tsx +++ b/src/modules/PublicSale/luckyMoney/LuckMoneyModal.tsx @@ -114,19 +114,11 @@ export default function LuckyMoneyModal({ envelopSrc }: Props) { const saleSummary = await getPublicSaleSummary(); - const content = `Welcome to the future of Bitcoin!\n\n$BVM is the 1st modular blockchain meta-protocol that allows launching Bitcoin L2 in a few clicks\n\nJoin the ${formatCurrency( - saleSummary.total_user || '0', - 0, - 0, - 'BTC', - false, - )} early contributors who've committed $${formatCurrency( - saleSummary.total_usdt_value_not_boost || '0', - 0, - 0, - 'BTC', - true, - )} to building Bitcoin's future with @BVMnetwork\n\n`; + const content = `Just got ${ + reward?.bvm_amount || 0 + } $BVM from the Red Packet giveaway at BVM public sale 🧧\n\n@BVMnetwork is the first modular blockchain metaprotocol that will power thousands of Bitcoin L2s!\n\nJoin me and the ${ + saleSummary.total_user || '0' + } early contributors to build the Bitcoin's future with $BVM\n\n`; setTimeout(() => { return window.open(