Skip to content

Commit 060eaab

Browse files
authored
fix: reject / approve form null state (#5585)
1 parent 06567c4 commit 060eaab

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/renderer/features/multisig-operations/components/ActionSteps/Confirmation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type Props = {
3131
signAccount?: AnyAccount | null;
3232
chain: Chain;
3333
api: ApiPromise;
34-
fee: BN;
34+
fee: BN | null;
3535
multisigDeposit: BN;
3636
valid: boolean;
3737
isFeeLoading: boolean;
@@ -85,7 +85,7 @@ export const Confirmation = ({
8585
<div className="mb-6 flex flex-col items-center gap-y-3">
8686
<Icon className="text-icon-default" name={getIconName(transaction)} size={60} />
8787

88-
{transaction && <Slot id={confirmTransactionInfoSlot} props={{ operation }} />}
88+
<Slot id={confirmTransactionInfoSlot} props={{ operation }} />
8989
</div>
9090
{initiator && signAccount && (
9191
<Details api={api} operation={operation} account={initiator} chain={chain} signatory={signAccount} />

src/renderer/features/multisig-operations/components/ApproveForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const ApproveForm = ({ unsignedAccounts, chain, nativeAsset, onSubmit, op
6060
<div className="mb-6 flex flex-col items-center gap-y-3">
6161
<Icon className="text-icon-default" name={getIconName(operation.transaction)} size={60} />
6262

63-
{operation.transaction && <Slot id={confirmTransactionInfoSlot} props={{ operation }} />}
63+
<Slot id={confirmTransactionInfoSlot} props={{ operation }} />
6464
</div>
6565

6666
<Field text={t('operation.selectAccountLabel')}>

src/renderer/features/multisig-operations/components/modals/ApproveTx.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export const ApproveTxModal = memo(({ operation, account, api, chain, children }
163163
onSubmit={onFormSubmit}
164164
/>
165165
)}
166-
{activeStep === Step.CONFIRMATION && fee && (
166+
{activeStep === Step.CONFIRMATION && (
167167
<Confirmation
168168
operation={operation}
169169
api={api}

src/renderer/features/multisig-operations/components/modals/RejectTx.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { TransactionType } from '@/shared/core';
1313
import { useI18n } from '@/shared/i18n';
1414
import { useToggle } from '@/shared/lib/hooks';
15-
import { getAssetByTypeExtras, getNativeAsset, nonNullable } from '@/shared/lib/utils';
15+
import { getAssetByTypeExtras, getNativeAsset } from '@/shared/lib/utils';
1616
import { Button } from '@/shared/ui';
1717
import { Modal } from '@/shared/ui-kit';
1818
import { type MultisigOperation } from '@/domains/network';
@@ -152,7 +152,7 @@ export const RejectTxModal = memo(({ api, operation, account, chain, children }:
152152
<OperationTitle title={t(transactionTitle || '', { asset: asset?.symbol })} chainId={operation.chainId} />
153153
</Modal.Title>
154154
<Modal.Content>
155-
{activeStep === Step.CONFIRMATION && nonNullable(fee) && (
155+
{activeStep === Step.CONFIRMATION && (
156156
<Confirmation
157157
operation={operation}
158158
api={api}

0 commit comments

Comments
 (0)