From 3b80c0caea2e46f5f1fe25542ee1aeb75e29c92c Mon Sep 17 00:00:00 2001 From: chenyan Date: Fri, 14 Jul 2023 17:59:08 +0800 Subject: [PATCH] feat: enums SendType --- packages/neuron-ui/src/components/SUDTSend/hooks.ts | 10 +--------- packages/neuron-ui/src/components/SUDTSend/index.tsx | 11 ++--------- .../sendFromMultisigDialog.module.scss | 1 + packages/neuron-ui/src/utils/enums.ts | 9 +++++++++ 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/packages/neuron-ui/src/components/SUDTSend/hooks.ts b/packages/neuron-ui/src/components/SUDTSend/hooks.ts index f54d35f947..14c84f6cc9 100644 --- a/packages/neuron-ui/src/components/SUDTSend/hooks.ts +++ b/packages/neuron-ui/src/components/SUDTSend/hooks.ts @@ -5,15 +5,7 @@ import { DEFAULT_SUDT_FIELDS } from 'utils/const' import { generateChequeTransaction, generateSUDTTransaction, getHoldSUDTCellCapacity } from 'services/remote' import { AppActions, useDispatch } from 'states' import { ControllerResponse } from 'services/remote/remoteApiWrapper' - -export enum SendType { - secp256Cheque = 'cheque', - secp256NewCell = 'secp256NewCell', - acpExistCell = 'acpExistCell', - acpNewCell = 'acpNewCell', - unknowNewCell = 'unknowNewCell', - sendCKB = 'sendCKB', -} +import { SendType } from 'utils/enums' export enum AddressLockType { secp256 = 'secp256', diff --git a/packages/neuron-ui/src/components/SUDTSend/index.tsx b/packages/neuron-ui/src/components/SUDTSend/index.tsx index 786ce1f22a..bd2869da8d 100644 --- a/packages/neuron-ui/src/components/SUDTSend/index.tsx +++ b/packages/neuron-ui/src/components/SUDTSend/index.tsx @@ -31,17 +31,10 @@ import { validateAmountRange, CONSTANTS, } from 'utils' +import { SendType } from 'utils/enums' import { AmountNotEnoughException, isErrorWithI18n } from 'exceptions' import { getDisplayName, getDisplaySymbol } from 'components/UANDisplay' -import { - AddressLockType, - SendType, - getGenerator, - useAddressLockType, - useOnSubmit, - useOptions, - useSendType, -} from './hooks' +import { AddressLockType, getGenerator, useAddressLockType, useOnSubmit, useOptions, useSendType } from './hooks' import styles from './sUDTSend.module.scss' const { INIT_SEND_PRICE, DEFAULT_SUDT_FIELDS, HIDE_BALANCE } = CONSTANTS diff --git a/packages/neuron-ui/src/components/SendFromMultisigDialog/sendFromMultisigDialog.module.scss b/packages/neuron-ui/src/components/SendFromMultisigDialog/sendFromMultisigDialog.module.scss index 3e2306c2f9..06f99f3ddc 100644 --- a/packages/neuron-ui/src/components/SendFromMultisigDialog/sendFromMultisigDialog.module.scss +++ b/packages/neuron-ui/src/components/SendFromMultisigDialog/sendFromMultisigDialog.module.scss @@ -104,6 +104,7 @@ .sendItem { & > div { + width: 228px; input { width: 125px !important; height: 56px !important; diff --git a/packages/neuron-ui/src/utils/enums.ts b/packages/neuron-ui/src/utils/enums.ts index ae795d1f1e..91406db039 100644 --- a/packages/neuron-ui/src/utils/enums.ts +++ b/packages/neuron-ui/src/utils/enums.ts @@ -215,3 +215,12 @@ export enum AccountType { CKB, SUDT, } + +export enum SendType { + secp256Cheque = 'cheque', + secp256NewCell = 'secp256NewCell', + acpExistCell = 'acpExistCell', + acpNewCell = 'acpNewCell', + unknowNewCell = 'unknowNewCell', + sendCKB = 'sendCKB', +}