From 952e006ddc6e2a215f954f73d6650ebe96b6d57f Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Mon, 21 Oct 2024 03:43:47 +0800 Subject: [PATCH] feat: update RadioCards to use monthlyBoostCost for dynamic pricing --- apps/renderer/src/modules/boost/modal.tsx | 8 ++++++-- apps/renderer/src/modules/boost/radio-cards.tsx | 14 ++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/apps/renderer/src/modules/boost/modal.tsx b/apps/renderer/src/modules/boost/modal.tsx index 13143ef86f..b6a104f70b 100644 --- a/apps/renderer/src/modules/boost/modal.tsx +++ b/apps/renderer/src/modules/boost/modal.tsx @@ -19,7 +19,7 @@ export const BoostModalContent = ({ feedId }: { feedId: string }) => { const dPowerBigInt = BigInt(myWalletData?.dailyPowerToken ?? 0) const cPowerBigInt = BigInt(myWalletData?.cashablePowerToken ?? 0) const balanceBigInt = cPowerBigInt + dPowerBigInt - const [amount, setAmount] = useState(80) + const [amount, setAmount] = useState(0) const amountBigInt = from(amount, 18)[0] const wrongNumberRange = amountBigInt > balanceBigInt || amountBigInt <= BigInt(0) @@ -71,7 +71,11 @@ export const BoostModalContent = ({ feedId }: { feedId: string }) => { - +