Skip to content

Commit

Permalink
feat(dcellar-web-ui): add pay by Owner Account to gas fee
Browse files Browse the repository at this point in the history
  • Loading branch information
devinxl committed Aug 29, 2023
1 parent 665c796 commit 0e05b62
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 385 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { signTypedDataV4 } from '@/utils/signDataV4';
import { useAppDispatch, useAppSelector } from '@/store';
import { selectBnbPrice, setupTmpAvailableBalance } from '@/store/slices/global';
import { selectBalance } from '@/store/slices/balance';
import { renderFee } from '@/modules/object/components/CancelObject';

interface modalProps {
title?: string;
Expand All @@ -47,31 +48,6 @@ interface modalProps {
setStatusModalErrorText: React.Dispatch<React.SetStateAction<string>>;
}

const renderFee = (
key: string,
bnbValue: string,
exchangeRate: number | string,
keyIcon?: React.ReactNode,
) => {
return (
<Flex w="100%" alignItems={'center'} justifyContent={'space-between'}>
<Flex alignItems="center" mb="4px">
<Text fontSize={'14px'} lineHeight={'28px'} fontWeight={400} color={'readable.tertiary'}>
{key}
</Text>
{keyIcon && (
<Box ml="6px" mt={'-5px'}>
{keyIcon}
</Box>
)}
</Flex>
<Text fontSize={'14px'} lineHeight={'28px'} fontWeight={400} color={'readable.tertiary'}>
{renderFeeValue(bnbValue, exchangeRate)}
</Text>
</Flex>
);
};

export const ConfirmCancelModal = (props: modalProps) => {
const dispatch = useAppDispatch();
const bnbPrice = useAppSelector(selectBnbPrice);
Expand Down
296 changes: 0 additions & 296 deletions apps/dcellar-web-ui/src/modules/file/components/ConfirmDeleteModal.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import {
BUTTON_GOT_IT,
FILE_DELETE_GIF,
FILE_FAILED_URL,
GAS_FEE_DOC,
GROUP_DELETE,
UNKNOWN_ERROR,
WALLET_CONFIRM,
} from '@/modules/file/constant';
import { useUnmount } from 'ahooks';
import { Flex, ModalCloseButton, ModalFooter, ModalHeader, Text, toast } from '@totejs/uikit';
import { Flex, Link, ModalCloseButton, ModalFooter, ModalHeader, Text, toast } from '@totejs/uikit';
import { DCModal } from '@/components/common/DCModal';
import {
renderBalanceNumber,
Expand Down Expand Up @@ -146,7 +147,11 @@ export const DeleteGroup = memo<DeleteGroupProps>(function DeleteGroup() {
fontWeight={400}
color={'readable.tertiary'}
>
Gas Fee
Gas Fee (
<Link href={GAS_FEE_DOC} textDecoration={'underline'} color="readable.disabled">
Pay by Owner Account
</Link>
)
</Text>
</Flex>
<Text fontSize={'14px'} lineHeight={'28px'} fontWeight={400} color={'readable.tertiary'}>
Expand Down
Loading

0 comments on commit 0e05b62

Please sign in to comment.