diff --git a/src/mask/plugins/red-packet/components/RedPacketERC20Form.tsx b/src/mask/plugins/red-packet/components/RedPacketERC20Form.tsx index 83b1be4e20..43beae1e76 100644 --- a/src/mask/plugins/red-packet/components/RedPacketERC20Form.tsx +++ b/src/mask/plugins/red-packet/components/RedPacketERC20Form.tsx @@ -171,7 +171,7 @@ export function RedPacketERC20Form(props: RedPacketFormProps) { // amount const [rawAmount, setRawAmount] = useState( !origin - ? '1' + ? '' : origin.isRandom ? formatBalance(origin.total, origin.token?.decimals ?? 0) : formatBalance(new BigNumber(origin.total ?? '0').div(origin.shares ?? 1), origin.token?.decimals ?? 0), diff --git a/src/maskbook b/src/maskbook index 3b1b99d6f0..af43779cf2 160000 --- a/src/maskbook +++ b/src/maskbook @@ -1 +1 @@ -Subproject commit 3b1b99d6f06d6025c4a9a6967c414958c833db62 +Subproject commit af43779cf20863fafc3442fd49580d3c51c690a9 diff --git a/src/modals/LensClubSelectModal/ClubSelectPanel.tsx b/src/modals/ChannelSelectModal/ChannelSelectPanel.tsx similarity index 100% rename from src/modals/LensClubSelectModal/ClubSelectPanel.tsx rename to src/modals/ChannelSelectModal/ChannelSelectPanel.tsx diff --git a/src/modals/LensClubSelectModal/index.tsx b/src/modals/ChannelSelectModal/index.tsx similarity index 94% rename from src/modals/LensClubSelectModal/index.tsx rename to src/modals/ChannelSelectModal/index.tsx index d060f7bda8..405b694094 100644 --- a/src/modals/LensClubSelectModal/index.tsx +++ b/src/modals/ChannelSelectModal/index.tsx @@ -6,7 +6,7 @@ import LeftArrowIcon from '@/assets/left-arrow.svg'; import { Modal } from '@/components/Modal.js'; import { useSingletonModal } from '@/hooks/useSingletonModal.js'; import type { SingletonModalRefCreator } from '@/libs/SingletonModal.js'; -import { ChannelSelectPanel, type ChannelSelectPanelProps } from '@/modals/LensClubSelectModal/ClubSelectPanel.js'; +import { ChannelSelectPanel, type ChannelSelectPanelProps } from '@/modals/ChannelSelectModal/ChannelSelectPanel.js'; import type { Channel } from '@/providers/types/SocialMedia.js'; export interface ChannelSelectModalOpenProps { @@ -16,9 +16,9 @@ export interface ChannelSelectModalOpenProps { export type ChannelSelectModalCloseProps = Channel | null; -export const LensClubSelectModal = forwardRef< +export const ChannelSelectModal = forwardRef< SingletonModalRefCreator ->(function LensClubSelectModal(_, ref) { +>(function ChannelSelectModal(_, ref) { const [props, setProps] = useState(); const [open, dispatch] = useSingletonModal(ref, { diff --git a/src/modals/controls.ts b/src/modals/controls.ts index 2784a9ae34..aa21b4c3d1 100644 --- a/src/modals/controls.ts +++ b/src/modals/controls.ts @@ -1,5 +1,6 @@ import { SingletonModal } from '@/libs/SingletonModal.js'; import type { AddWalletModalCloseProps, AddWalletModalProps } from '@/modals/AddWalletModal.js'; +import type { ChannelSelectModalCloseProps, ChannelSelectModalOpenProps } from '@/modals/ChannelSelectModal/index.jsx'; import type { CollectArticleModalOpenProps } from '@/modals/CollectArticleModal.js'; import type { CollectPostModalOpenProps } from '@/modals/CollectPostModal.js'; import type { ComposeModalCloseProps, ComposeModalOpenProps } from '@/modals/ComposeModal.js'; @@ -9,7 +10,6 @@ import type { ConfirmModalCloseResult, ConfirmModalOpenProps } from '@/modals/Co import type { DisconnectFireflyAccountModalProps } from '@/modals/DisconnectFireflyAccountModal.js'; import type { DraggablePopoverProps } from '@/modals/DraggablePopover.js'; import type { EditProfileModalOpenProps } from '@/modals/EditProfileModal.js'; -import type { ChannelSelectModalCloseProps, ChannelSelectModalOpenProps } from '@/modals/LensClubSelectModal/index.jsx'; import type { LoginModalOpenProps } from '@/modals/LoginModal/index.js'; import type { LogoutModalProps } from '@/modals/LogoutModal.js'; import type { diff --git a/src/modals/index.tsx b/src/modals/index.tsx index e8593632c6..e905c213ce 100644 --- a/src/modals/index.tsx +++ b/src/modals/index.tsx @@ -5,6 +5,7 @@ import { memo } from 'react'; import { SolanaAccountModal } from '@/components/SolanaAccountModal.js'; import { AccountModal } from '@/modals/AccountModal.js'; import { AddWalletModal } from '@/modals/AddWalletModal.js'; +import { ChannelSelectModal } from '@/modals/ChannelSelectModal/index.js'; import { CollectArticleModal } from '@/modals/CollectArticleModal.js'; import { CollectPostModal } from '@/modals/CollectPostModal.js'; import { ComposeModal } from '@/modals/ComposeModal.js'; @@ -18,7 +19,6 @@ import { DisconnectFireflyAccountModal } from '@/modals/DisconnectFireflyAccount import { DraggablePopover } from '@/modals/DraggablePopover.js'; import { EditProfileModal } from '@/modals/EditProfileModal.js'; import { EnableSignlessModal } from '@/modals/EnableSignlessModal.js'; -import { LensClubSelectModal } from '@/modals/LensClubSelectModal/index.js'; import { LoginModal } from '@/modals/LoginModal/index.js'; import { LogoutModal } from '@/modals/LogoutModal.js'; import { NonFungibleCollectionSelectModal } from '@/modals/NonFungbileCollectionSelectModal/index.js'; @@ -58,7 +58,7 @@ export const Modals = memo(function Modals() { - + ); });