diff --git a/src/renderer/entities/multisig/lib/multisigTx/common/utils.ts b/src/renderer/entities/multisig/lib/multisigTx/common/utils.ts index 7b76a361ec..3564ac5adf 100644 --- a/src/renderer/entities/multisig/lib/multisigTx/common/utils.ts +++ b/src/renderer/entities/multisig/lib/multisigTx/common/utils.ts @@ -155,7 +155,6 @@ export const buildMultisigTx = ( multisigTx: Transaction, params: ExtrinsicResultParams, account: MultisigAccount, - description?: string, ): MultisigTxResult => { const transaction: MultisigTransaction = { transaction: tx, @@ -168,7 +167,6 @@ export const buildMultisigTx = ( blockCreated: params.timepoint.height, indexCreated: params.timepoint.index, dateCreated: Date.now(), - description, }; const event: MultisigEvent = { diff --git a/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.tsx b/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.tsx index 6984e6d8a5..55bb2cd19c 100644 --- a/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.tsx +++ b/src/renderer/entities/transaction/ui/TransactionTitle/TransactionTitle.tsx @@ -3,17 +3,16 @@ import { type PropsWithChildren } from 'react'; import { type DecodedTransaction, type Transaction } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; import { cnTw } from '@/shared/lib/utils'; -import { BodyText, FootnoteText, Icon } from '@/shared/ui'; +import { BodyText, Icon } from '@/shared/ui'; import { getIconName } from '@/entities/transaction/lib/transactionIcon'; import { getTransactionTitle } from '../../lib'; type Props = { tx?: Transaction | DecodedTransaction; - description?: string; className?: string; }; -export const TransactionTitle = ({ tx, description, className, children }: PropsWithChildren) => { +export const TransactionTitle = ({ tx, className, children }: PropsWithChildren) => { const { t } = useI18n(); const title = getTransactionTitle(t, tx); @@ -28,7 +27,6 @@ export const TransactionTitle = ({ tx, description, className, children }: Props {t(title)} {children} - {description && {description} } ); diff --git a/src/renderer/features/operations/OperationSubmit/model/submit-model.ts b/src/renderer/features/operations/OperationSubmit/model/submit-model.ts index 5759731ead..3a85682507 100644 --- a/src/renderer/features/operations/OperationSubmit/model/submit-model.ts +++ b/src/renderer/features/operations/OperationSubmit/model/submit-model.ts @@ -109,7 +109,6 @@ type SaveMultisigParams = { multisigAccount: MultisigAccount; params: ExtrinsicResultParams; hooks: Callbacks; - description?: string; }; type SaveMultisigResult = { @@ -117,17 +116,10 @@ type SaveMultisigResult = { events: MultisigEvent[]; }; const saveMultisigTxFx = createEffect( - ({ - transactions, - multisigTxs, - multisigAccount, - params, - hooks, - description, - }: SaveMultisigParams): SaveMultisigResult => { + ({ transactions, multisigTxs, multisigAccount, params, hooks }: SaveMultisigParams): SaveMultisigResult => { const { txs, events } = transactions.reduce<{ txs: MultisigTransaction[]; events: MultisigEvent[] }>( (acc, transaction, index) => { - const multisigData = buildMultisigTx(transaction, multisigTxs[index], params, multisigAccount, description); + const multisigData = buildMultisigTx(transaction, multisigTxs[index], params, multisigAccount); hooks.addEventWithQueue(multisigData.event); hooks.addMultisigTx(multisigData.transaction); @@ -225,7 +217,6 @@ sample({ transactions: submitStore!.coreTxs, multisigTxs: submitStore!.multisigTxs, multisigAccount: submitStore!.account as MultisigAccount, - description: submitStore!.description, }), target: saveMultisigTxFx, }); diff --git a/src/renderer/pages/Operations/components/ActionSteps/Confirmation.tsx b/src/renderer/pages/Operations/components/ActionSteps/Confirmation.tsx index 1f36b39b47..8079d9e9f9 100644 --- a/src/renderer/pages/Operations/components/ActionSteps/Confirmation.tsx +++ b/src/renderer/pages/Operations/components/ActionSteps/Confirmation.tsx @@ -4,7 +4,7 @@ import { useEffect, useState } from 'react'; import { type Account, type MultisigAccount, type MultisigTransaction, type Transaction } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; import { getAssetById } from '@/shared/lib/utils'; -import { DetailRow, FootnoteText, Icon } from '@/shared/ui'; +import { DetailRow, Icon } from '@/shared/ui'; import { getTransactionFromMultisigTx } from '@/entities/multisig'; import { type ExtendedChain } from '@/entities/network'; import { SignButton } from '@/entities/operations'; @@ -53,12 +53,6 @@ export const Confirmation = ({ tx, account, connection, signatory, feeTx, onSign {tx.transaction && } - - {tx.description && ( - - {tx.description} - - )}
diff --git a/src/renderer/pages/Operations/components/ActionSteps/Submit.tsx b/src/renderer/pages/Operations/components/ActionSteps/Submit.tsx index eb779b40ad..8112302dd7 100644 --- a/src/renderer/pages/Operations/components/ActionSteps/Submit.tsx +++ b/src/renderer/pages/Operations/components/ActionSteps/Submit.tsx @@ -27,22 +27,11 @@ type Props = { multisigTx?: MultisigTransaction; txPayload: Uint8Array; signature: HexString; - rejectReason?: string; isReject?: boolean; onClose: () => void; }; -export const Submit = ({ - api, - tx, - multisigTx, - account, - txPayload, - signature, - rejectReason, - isReject, - onClose, -}: Props) => { +export const Submit = ({ api, tx, multisigTx, account, txPayload, signature, isReject, onClose }: Props) => { const { t } = useI18n(); const { addTask } = useMultisigChainContext(); @@ -73,7 +62,6 @@ export const Submit = ({ if (isReject) { updatedTx.status = MultisigTxFinalStatus.CANCELLED; - updatedTx.cancelDescription = rejectReason; } await updateMultisigTx(updatedTx); diff --git a/src/renderer/pages/Operations/components/Details.tsx b/src/renderer/pages/Operations/components/Details.tsx index b58af77fe5..7b598798a9 100644 --- a/src/renderer/pages/Operations/components/Details.tsx +++ b/src/renderer/pages/Operations/components/Details.tsx @@ -34,7 +34,7 @@ import { isXcmTransaction, } from '@/entities/transaction'; import { AddressWithExplorers, ExplorersPopover, WalletCardSm, WalletIcon, walletModel } from '@/entities/wallet'; -import { AddressStyle, DescriptionBlockStyle, InteractionStyle } from '../common/constants'; +import { AddressStyle, InteractionStyle } from '../common/constants'; import { getDelegate, getDelegationTarget, @@ -109,7 +109,6 @@ export const Details = ({ tx, account, extendedChain, signatory }: Props) => { const [isValidatorsOpen, toggleValidators] = useToggle(); - const cancelDescription = tx.cancelDescription; const allValidators = Object.values(validatorsMap); const transaction = getTransactionFromMultisigTx(tx); @@ -158,17 +157,6 @@ export const Details = ({ tx, account, extendedChain, signatory }: Props) => { return (
- {cancelDescription && ( -
- - {t('operation.details.rejectReason')} - - - {cancelDescription} - -
- )} - {proxied && ( <> diff --git a/src/renderer/pages/Operations/components/LogModal.tsx b/src/renderer/pages/Operations/components/LogModal.tsx index f5c5cc3f36..23111cef60 100644 --- a/src/renderer/pages/Operations/components/LogModal.tsx +++ b/src/renderer/pages/Operations/components/LogModal.tsx @@ -72,7 +72,7 @@ const LogModal = ({ isOpen, onClose, tx, account, connection, contacts }: Props) const filteredAccountMap = getFilteredAccountsMap(filteredWalletsMap); const events = getLiveTxEvents(tx.accountId, tx.chainId, tx.callHash, tx.blockCreated, tx.indexCreated); - const { transaction, description, status } = tx; + const { transaction, status } = tx; const approvals = events.filter((e) => e.status === 'SIGNED'); const asset = @@ -111,7 +111,7 @@ const LogModal = ({ isOpen, onClose, tx, account, connection, contacts }: Props) onClose={onClose} >
- + {asset && amount && } diff --git a/src/renderer/pages/Operations/components/Operation.tsx b/src/renderer/pages/Operations/components/Operation.tsx index 2c33bdd9d1..e59212c597 100644 --- a/src/renderer/pages/Operations/components/Operation.tsx +++ b/src/renderer/pages/Operations/components/Operation.tsx @@ -39,7 +39,7 @@ const Operation = ({ tx, account }: Props) => {
- + {asset && amount && (
diff --git a/src/renderer/pages/Operations/components/OperationCardDetails.tsx b/src/renderer/pages/Operations/components/OperationCardDetails.tsx index f4debc1dff..0f9529481e 100644 --- a/src/renderer/pages/Operations/components/OperationCardDetails.tsx +++ b/src/renderer/pages/Operations/components/OperationCardDetails.tsx @@ -33,7 +33,7 @@ import { isXcmTransaction, } from '@/entities/transaction'; import { AddressWithExplorers, ExplorersPopover, WalletCardSm, walletModel } from '@/entities/wallet'; -import { AddressStyle, DescriptionBlockStyle, InteractionStyle } from '../common/constants'; +import { AddressStyle, InteractionStyle } from '../common/constants'; import { getDelegate, getDelegationTarget, @@ -104,7 +104,7 @@ export const OperationCardDetails = ({ tx, account, extendedChain }: Props) => { const [isAdvancedShown, toggleAdvanced] = useToggle(); const [isValidatorsOpen, toggleValidators] = useToggle(); - const { indexCreated, blockCreated, deposit, depositor, callHash, callData, description, cancelDescription } = tx; + const { indexCreated, blockCreated, deposit, depositor, callHash, callData } = tx; const transaction = getTransactionFromMultisigTx(tx); const validatorsMap = useValidatorsMap(api, connection && networkUtils.isLightClientConnection(connection)); @@ -133,27 +133,6 @@ export const OperationCardDetails = ({ tx, account, extendedChain }: Props) => { return (
- {description && ( -
- - {t('operation.details.description')} - - - {description} - -
- )} - {cancelDescription && ( -
- - {t('operation.details.rejectReason')} - - - {cancelDescription} - -
- )} - {account && activeWallet && (
diff --git a/src/renderer/pages/Operations/components/modals/RejectReasonModal.tsx b/src/renderer/pages/Operations/components/modals/RejectReasonModal.tsx deleted file mode 100644 index b42df58e0b..0000000000 --- a/src/renderer/pages/Operations/components/modals/RejectReasonModal.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import { Controller, type SubmitHandler, useForm } from 'react-hook-form'; - -import { useI18n } from '@/shared/i18n'; -import { BaseModal, Button, InputArea, InputHint } from '@/shared/ui'; - -type RejectReasonForm = { - reason: string; -}; - -type Props = { - isOpen: boolean; - onClose: () => void; - onSubmit: (reason: string) => void; -}; - -const RejectReasonModal = ({ isOpen, onClose, onSubmit }: Props) => { - const { t } = useI18n(); - - const { - control, - handleSubmit, - reset, - formState: { isValid }, - } = useForm({ - mode: 'onChange', - defaultValues: { - reason: '', - }, - }); - - const closeHandler = () => { - reset(); - onClose(); - }; - - const submitHandler: SubmitHandler = async ({ reason }) => { - onSubmit(reason); - closeHandler(); - }; - - return ( - -
- ( - <> - - - - {t('operation.rejectReason.errorMessage')} - - - )} - /> - -
- {t('operation.rejectReason.inputHint')} - - -
- -
- ); -}; - -export default RejectReasonModal; diff --git a/src/renderer/pages/Operations/components/modals/RejectTx.tsx b/src/renderer/pages/Operations/components/modals/RejectTx.tsx index c0e198821a..883a8abc89 100644 --- a/src/renderer/pages/Operations/components/modals/RejectTx.tsx +++ b/src/renderer/pages/Operations/components/modals/RejectTx.tsx @@ -32,8 +32,6 @@ import { SigningSwitch } from '@/features/operations'; import { Confirmation } from '../ActionSteps/Confirmation'; import { Submit } from '../ActionSteps/Submit'; -import RejectReasonModal from './RejectReasonModal'; - type Props = { tx: MultisigTransactionDS; account: MultisigAccount; @@ -56,7 +54,6 @@ const RejectTx = ({ tx, account, connection }: Props) => { const apis = useUnit(networkModel.$apis); const [isModalOpen, setIsModalOpen] = useState(false); - const [isRejectReasonModalOpen, toggleRejectReasonModal] = useToggle(); const [isFeeModalOpen, toggleFeeModal] = useToggle(); const [activeStep, setActiveStep] = useState(Step.CONFIRMATION); @@ -64,7 +61,6 @@ const RejectTx = ({ tx, account, connection }: Props) => { const [rejectTx, setRejectTx] = useState(); const [txPayload, setTxPayload] = useState(); - const [rejectReason, setRejectReason] = useState(''); const [signature, setSignature] = useState(); const transactionTitle = getMultisigSignOperationTitle( @@ -172,11 +168,10 @@ const RejectTx = ({ tx, account, connection }: Props) => { return null; } - const handleRejectReason = async (reason: string) => { + const handleConfirm = async () => { const isValid = await validateBalanceForFee(signAccount); if (isValid) { - setRejectReason(reason); setActiveStep(Step.SIGNING); } else { toggleFeeModal(); @@ -209,7 +204,7 @@ const RejectTx = ({ tx, account, connection }: Props) => { connection={connection} feeTx={rejectTx} signatory={signAccount} - onSign={toggleRejectReasonModal} + onSign={handleConfirm} /> )} {activeStep === Step.SIGNING && rejectTx && connection.api && signAccount && ( @@ -230,12 +225,6 @@ const RejectTx = ({ tx, account, connection }: Props) => { /> )} - - { account={signAccount} txPayload={txPayload} signature={signature} - rejectReason={rejectReason} onClose={handleClose} /> )} diff --git a/src/renderer/shared/core/types/transaction.ts b/src/renderer/shared/core/types/transaction.ts index 7a517a5506..24304fbf26 100644 --- a/src/renderer/shared/core/types/transaction.ts +++ b/src/renderer/shared/core/types/transaction.ts @@ -116,8 +116,6 @@ export type MultisigTransaction = { signatories: Signatory[]; deposit?: string; depositor?: AccountId; - description?: string; - cancelDescription?: string; blockCreated: number; indexCreated: number; dateCreated?: number; diff --git a/src/renderer/shared/i18n/locales/en.json b/src/renderer/shared/i18n/locales/en.json index b2c5a0e194..5ab25211f7 100644 --- a/src/renderer/shared/i18n/locales/en.json +++ b/src/renderer/shared/i18n/locales/en.json @@ -380,7 +380,6 @@ "input": { "amountLabel": "Amount", "availableLabel": "Available:", - "descriptionLabel": "Description", "descriptionPlaceholder": "Choose an operation description", "searchLabel": "Search", "searchPlaceholder": "Search", @@ -958,13 +957,6 @@ "proxyFeeErrorTitle": "Not enough tokens to pay the fee", "rejectButton": "Reject", "rejectInProgress": "Submitting Rejection...", - "rejectReason": { - "continueButton": "Continue", - "errorMessage": "Reject reason is required", - "inputHint": "Visible only for you and signers", - "placeholder": "Reason...", - "title": "Enter reject reason" - }, "selectAccount": "Select account", "selectAccountLabel": "Account", "selectSignatory": "Select signatory", diff --git a/src/renderer/widgets/AddProxyModal/ui/AddProxyForm.tsx b/src/renderer/widgets/AddProxyModal/ui/AddProxyForm.tsx index 3d3b5e4d8c..f274970352 100644 --- a/src/renderer/widgets/AddProxyModal/ui/AddProxyForm.tsx +++ b/src/renderer/widgets/AddProxyModal/ui/AddProxyForm.tsx @@ -5,14 +5,13 @@ import { type FormEvent } from 'react'; import { type MultisigAccount } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; import { toAddress, toShortAddress, validateAddress } from '@/shared/lib/utils'; -import { Alert, Button, Combobox, Icon, Identicon, Input, InputHint, Select } from '@/shared/ui'; +import { Alert, Button, Combobox, Icon, Identicon, InputHint, Select } from '@/shared/ui'; import { AssetBalance } from '@/entities/asset'; import { ChainTitle } from '@/entities/chain'; import { SignatorySelector } from '@/entities/operations'; import { ProxyPopover, proxyUtils } from '@/entities/proxy'; import { FeeWithLabel, MultisigDepositWithLabel, ProxyDepositWithLabel } from '@/entities/transaction'; import { AccountAddress, accountUtils } from '@/entities/wallet'; -import { DESCRIPTION_LENGTH } from '@/features/operations/OperationsValidation'; import { formModel } from '../model/form-model'; type Props = { @@ -37,7 +36,6 @@ export const AddProxyForm = ({ onGoBack }: Props) => { -
@@ -258,38 +256,6 @@ const ProxyTypeSelector = () => { ); }; -const DescriptionInput = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$proxyForm); - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {description.errorText({ - maxLength: t('proxy.addProxy.maxLengthDescriptionError', { maxLength: DESCRIPTION_LENGTH }), - })} - -
- ); -}; - const FeeSection = () => { const { fields: { chain, account }, diff --git a/src/renderer/widgets/AddPureProxiedModal/ui/AddPureProxiedForm.tsx b/src/renderer/widgets/AddPureProxiedModal/ui/AddPureProxiedForm.tsx index 956dbfa5d4..568b27121f 100644 --- a/src/renderer/widgets/AddPureProxiedModal/ui/AddPureProxiedForm.tsx +++ b/src/renderer/widgets/AddPureProxiedModal/ui/AddPureProxiedForm.tsx @@ -5,14 +5,13 @@ import { type FormEvent } from 'react'; import { type MultisigAccount } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; import { toAddress, toShortAddress } from '@/shared/lib/utils'; -import { Alert, Button, Input, InputHint, Select } from '@/shared/ui'; +import { Alert, Button, InputHint, Select } from '@/shared/ui'; import { AssetBalance } from '@/entities/asset'; import { ChainTitle } from '@/entities/chain'; import { SignatorySelector } from '@/entities/operations'; import { PureProxyPopover } from '@/entities/proxy'; import { FeeWithLabel, MultisigDepositWithLabel, ProxyDepositWithLabel } from '@/entities/transaction'; import { AccountAddress, accountUtils } from '@/entities/wallet'; -import { DESCRIPTION_LENGTH } from '@/features/operations/OperationsValidation'; import { formModel } from '../model/form-model'; type Props = { @@ -35,7 +34,6 @@ export const AddPureProxiedForm = ({ onGoBack }: Props) => { -
@@ -161,38 +159,6 @@ const Signatories = () => { ); }; -const DescriptionInput = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$proxyForm); - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {description.errorText({ - maxLength: t('proxy.addProxy.maxLengthDescriptionError', { maxLength: DESCRIPTION_LENGTH }), - })} - -
- ); -}; - const FeeSection = () => { const { fields: { chain, account }, diff --git a/src/renderer/widgets/DelegateModal/ui/DelegateForm.tsx b/src/renderer/widgets/DelegateModal/ui/DelegateForm.tsx index 85ee90977c..c7ee823e0a 100644 --- a/src/renderer/widgets/DelegateModal/ui/DelegateForm.tsx +++ b/src/renderer/widgets/DelegateModal/ui/DelegateForm.tsx @@ -12,7 +12,6 @@ import { DetailRow, FootnoteText, Icon, - Input, InputHint, SmallTitleText, Tooltip, @@ -64,7 +63,6 @@ export const DelegateForm = ({ isOpen, onClose, onGoBack }: Props) => { -
@@ -185,37 +183,6 @@ const Amount = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$delegateForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n(); diff --git a/src/renderer/widgets/EditDelegationModal/ui/DelegateForm.tsx b/src/renderer/widgets/EditDelegationModal/ui/DelegateForm.tsx index f175ab5912..915131305c 100644 --- a/src/renderer/widgets/EditDelegationModal/ui/DelegateForm.tsx +++ b/src/renderer/widgets/EditDelegationModal/ui/DelegateForm.tsx @@ -12,7 +12,6 @@ import { DetailRow, FootnoteText, Icon, - Input, InputHint, SmallTitleText, Tooltip, @@ -66,7 +65,6 @@ export const DelegateForm = ({ isOpen, onClose, onGoBack }: Props) => { -
@@ -187,37 +185,6 @@ const Amount = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$delegateForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n(); diff --git a/src/renderer/widgets/RemoveProxyModal/ui/RemoveProxyForm.tsx b/src/renderer/widgets/RemoveProxyModal/ui/RemoveProxyForm.tsx index 1e878c719f..5e495a365b 100644 --- a/src/renderer/widgets/RemoveProxyModal/ui/RemoveProxyForm.tsx +++ b/src/renderer/widgets/RemoveProxyModal/ui/RemoveProxyForm.tsx @@ -4,7 +4,7 @@ import { type FormEvent } from 'react'; import { type MultisigAccount } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; -import { Alert, Button, Input, InputHint } from '@/shared/ui'; +import { Alert, Button } from '@/shared/ui'; import { SignatorySelector } from '@/entities/operations'; import { FeeWithLabel, MultisigDepositWithLabel } from '@/entities/transaction'; import { formModel } from '../model/form-model'; @@ -25,7 +25,6 @@ export const RemoveProxyForm = ({ onGoBack }: Props) => {
-
@@ -64,39 +63,6 @@ const Signatories = () => { ); }; -const DescriptionInput = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$proxyForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {description.errorText({ - maxLength: t('proxy.addProxy.maxLengthDescriptionError', { maxLength: 120 }), - })} - -
- ); -}; - const FeeSection = () => { const api = useUnit(formModel.$api); const fakeTx = useUnit(formModel.$fakeTx); diff --git a/src/renderer/widgets/RemovePureProxyModal/ui/RemovePureProxyForm.tsx b/src/renderer/widgets/RemovePureProxyModal/ui/RemovePureProxyForm.tsx index bc6b90ec12..86d88afa50 100644 --- a/src/renderer/widgets/RemovePureProxyModal/ui/RemovePureProxyForm.tsx +++ b/src/renderer/widgets/RemovePureProxyModal/ui/RemovePureProxyForm.tsx @@ -4,10 +4,9 @@ import { type FormEvent } from 'react'; import { type MultisigAccount } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; -import { Alert, Button, Input, InputHint } from '@/shared/ui'; +import { Alert, Button } from '@/shared/ui'; import { SignatorySelector } from '@/entities/operations'; import { FeeWithLabel, MultisigDepositWithLabel } from '@/entities/transaction'; -import { DESCRIPTION_LENGTH } from '@/features/operations/OperationsValidation'; import { formModel } from '../model/form-model'; import { removePureProxyModel } from '../model/remove-pure-proxy-model'; @@ -26,7 +25,6 @@ export const RemovePureProxyForm = ({ onGoBack }: Props) => {
-
@@ -65,38 +63,6 @@ const Signatories = () => { ); }; -const DescriptionInput = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$proxyForm); - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {description.errorText({ - maxLength: t('proxy.addProxy.maxLengthDescriptionError', { maxLength: DESCRIPTION_LENGTH }), - })} - -
- ); -}; - const FeeSection = () => { const api = useUnit(formModel.$api); const fakeTx = useUnit(formModel.$fakeTx); diff --git a/src/renderer/widgets/Staking/BondExtra/ui/BondForm.tsx b/src/renderer/widgets/Staking/BondExtra/ui/BondForm.tsx index bc6b9decb8..4ac4751759 100644 --- a/src/renderer/widgets/Staking/BondExtra/ui/BondForm.tsx +++ b/src/renderer/widgets/Staking/BondExtra/ui/BondForm.tsx @@ -4,17 +4,7 @@ import { type FormEvent } from 'react'; import { useI18n } from '@/shared/i18n'; import { formatBalance, toAddress, toShortAddress } from '@/shared/lib/utils'; -import { - AmountInput, - Button, - DetailRow, - FootnoteText, - Icon, - Input, - InputHint, - MultiSelect, - Tooltip, -} from '@/shared/ui'; +import { AmountInput, Button, DetailRow, FootnoteText, Icon, InputHint, MultiSelect, Tooltip } from '@/shared/ui'; import { AssetBalance } from '@/entities/asset'; import { SignatorySelector } from '@/entities/operations'; import { AssetFiatBalance, priceProviderModel } from '@/entities/price'; @@ -41,7 +31,6 @@ export const BondForm = ({ onGoBack }: Props) => { -
@@ -193,37 +182,6 @@ const Amount = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$bondForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n(); diff --git a/src/renderer/widgets/Staking/BondNominate/ui/BondForm.tsx b/src/renderer/widgets/Staking/BondNominate/ui/BondForm.tsx index e6b6727052..82f2f6ac4d 100644 --- a/src/renderer/widgets/Staking/BondNominate/ui/BondForm.tsx +++ b/src/renderer/widgets/Staking/BondNominate/ui/BondForm.tsx @@ -13,7 +13,6 @@ import { FootnoteText, Icon, Identicon, - Input, InputHint, MultiSelect, RadioGroup, @@ -47,7 +46,6 @@ export const BondForm = ({ onGoBack }: Props) => { -
@@ -295,37 +293,6 @@ const Destination = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$bondForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n(); diff --git a/src/renderer/widgets/Staking/Nominate/ui/NominateForm.tsx b/src/renderer/widgets/Staking/Nominate/ui/NominateForm.tsx index f6c824c0f2..39bb5c7ed3 100644 --- a/src/renderer/widgets/Staking/Nominate/ui/NominateForm.tsx +++ b/src/renderer/widgets/Staking/Nominate/ui/NominateForm.tsx @@ -4,7 +4,7 @@ import { type FormEvent } from 'react'; import { useI18n } from '@/shared/i18n'; import { formatBalance, toAddress, toShortAddress } from '@/shared/lib/utils'; -import { Button, DetailRow, FootnoteText, Icon, Input, InputHint, MultiSelect, Tooltip } from '@/shared/ui'; +import { Button, DetailRow, FootnoteText, Icon, InputHint, MultiSelect, Tooltip } from '@/shared/ui'; import { AssetBalance } from '@/entities/asset'; import { SignatorySelector } from '@/entities/operations'; import { AssetFiatBalance, priceProviderModel } from '@/entities/price'; @@ -30,7 +30,6 @@ export const NominateForm = ({ onGoBack }: Props) => { -
@@ -150,37 +149,6 @@ const Signatories = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$nominateForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n(); diff --git a/src/renderer/widgets/Staking/Payee/ui/PayeeForm.tsx b/src/renderer/widgets/Staking/Payee/ui/PayeeForm.tsx index 508e96a03c..c9dbdb2298 100644 --- a/src/renderer/widgets/Staking/Payee/ui/PayeeForm.tsx +++ b/src/renderer/widgets/Staking/Payee/ui/PayeeForm.tsx @@ -12,7 +12,6 @@ import { FootnoteText, Icon, Identicon, - Input, InputHint, MultiSelect, RadioGroup, @@ -45,7 +44,6 @@ export const PayeeForm = ({ onGoBack }: Props) => { -
@@ -261,37 +259,6 @@ const Destination = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$payeeForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n(); diff --git a/src/renderer/widgets/Staking/Restake/ui/RestakeForm.tsx b/src/renderer/widgets/Staking/Restake/ui/RestakeForm.tsx index 7282f92060..df369f2143 100644 --- a/src/renderer/widgets/Staking/Restake/ui/RestakeForm.tsx +++ b/src/renderer/widgets/Staking/Restake/ui/RestakeForm.tsx @@ -5,7 +5,7 @@ import { type FormEvent } from 'react'; import { type MultisigAccount } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; import { formatBalance, toAddress, toShortAddress } from '@/shared/lib/utils'; -import { AmountInput, Button, Input, InputHint, MultiSelect, Shimmering } from '@/shared/ui'; +import { AmountInput, Button, InputHint, MultiSelect, Shimmering } from '@/shared/ui'; import { AssetBalance } from '@/entities/asset'; import { SignatorySelector } from '@/entities/operations'; import { FeeWithLabel, MultisigDepositWithLabel } from '@/entities/transaction'; @@ -31,7 +31,6 @@ export const ReturnToStakeForm = ({ onGoBack }: Props) => { -
@@ -184,37 +183,6 @@ const Amount = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$restakeForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n(); diff --git a/src/renderer/widgets/Staking/Unstake/ui/UnstakeForm.tsx b/src/renderer/widgets/Staking/Unstake/ui/UnstakeForm.tsx index bd09a10d71..cbadc924c5 100644 --- a/src/renderer/widgets/Staking/Unstake/ui/UnstakeForm.tsx +++ b/src/renderer/widgets/Staking/Unstake/ui/UnstakeForm.tsx @@ -5,7 +5,7 @@ import { type FormEvent } from 'react'; import { type MultisigAccount } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; import { formatBalance, toAddress, toShortAddress } from '@/shared/lib/utils'; -import { AmountInput, Button, Input, InputHint, MultiSelect, Shimmering } from '@/shared/ui'; +import { AmountInput, Button, InputHint, MultiSelect, Shimmering } from '@/shared/ui'; import { AssetBalance } from '@/entities/asset'; import { SignatorySelector } from '@/entities/operations'; import { FeeWithLabel, MultisigDepositWithLabel } from '@/entities/transaction'; @@ -31,7 +31,6 @@ export const UnstakeForm = ({ onGoBack }: Props) => { -
@@ -184,37 +183,6 @@ const Amount = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$unstakeForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n(); diff --git a/src/renderer/widgets/Staking/Withdraw/ui/WithdrawForm.tsx b/src/renderer/widgets/Staking/Withdraw/ui/WithdrawForm.tsx index 1341ab1e1a..ee0f2a5ca4 100644 --- a/src/renderer/widgets/Staking/Withdraw/ui/WithdrawForm.tsx +++ b/src/renderer/widgets/Staking/Withdraw/ui/WithdrawForm.tsx @@ -5,7 +5,7 @@ import { type FormEvent } from 'react'; import { type MultisigAccount } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; import { formatBalance, toAddress, toShortAddress } from '@/shared/lib/utils'; -import { AmountInput, Button, Input, InputHint, MultiSelect, Shimmering } from '@/shared/ui'; +import { AmountInput, Button, InputHint, MultiSelect, Shimmering } from '@/shared/ui'; import { AssetBalance } from '@/entities/asset'; import { SignatorySelector } from '@/entities/operations'; import { FeeWithLabel, MultisigDepositWithLabel } from '@/entities/transaction'; @@ -31,7 +31,6 @@ export const WithdrawForm = ({ onGoBack }: Props) => { -
@@ -184,37 +183,6 @@ const Amount = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$withdrawForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n(); diff --git a/src/renderer/widgets/Transfer/ui/TransferForm.tsx b/src/renderer/widgets/Transfer/ui/TransferForm.tsx index 77554cdb50..eda77f4396 100644 --- a/src/renderer/widgets/Transfer/ui/TransferForm.tsx +++ b/src/renderer/widgets/Transfer/ui/TransferForm.tsx @@ -34,7 +34,6 @@ export const TransferForm = ({ onGoBack }: Props) => { -
@@ -270,37 +269,6 @@ const Amount = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(formModel.$transferForm); - - const isMultisig = useUnit(formModel.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { fields: { account }, diff --git a/src/renderer/widgets/UnlockModal/ui/UnlockForm.tsx b/src/renderer/widgets/UnlockModal/ui/UnlockForm.tsx index 1fad59549d..2af8f06908 100644 --- a/src/renderer/widgets/UnlockModal/ui/UnlockForm.tsx +++ b/src/renderer/widgets/UnlockModal/ui/UnlockForm.tsx @@ -5,7 +5,7 @@ import { type FormEvent } from 'react'; import { type MultisigAccount } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; import { formatBalance, toAddress } from '@/shared/lib/utils'; -import { AmountInput, Button, Input, InputHint, MultiSelect } from '@/shared/ui'; +import { AmountInput, Button, InputHint, MultiSelect } from '@/shared/ui'; import { Address } from '@/shared/ui-entities'; import { AssetBalance } from '@/entities/asset'; import { SignatorySelector } from '@/entities/operations'; @@ -33,7 +33,6 @@ export const UnlockForm = ({ onGoBack }: Props) => { -
@@ -176,37 +175,6 @@ const Amount = () => { ); }; -const Description = () => { - const { t } = useI18n(); - - const { - fields: { description }, - } = useForm(unlockFormAggregate.$unlockForm); - - const isMultisig = useUnit(unlockFormAggregate.$isMultisig); - - if (!isMultisig) { - return null; - } - - return ( -
- - - {t(description.errorText())} - -
- ); -}; - const FeeSection = () => { const { t } = useI18n();