Skip to content

Commit

Permalink
feat(wallet): warn user when dapp requests to sign and dry run failed (
Browse files Browse the repository at this point in the history
  • Loading branch information
evavirseda authored Feb 25, 2025
1 parent ef97c96 commit 405edb2
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import { Transaction } from '@iota/iota-sdk/transactions';
import { useMemo, useState } from 'react';
import { ConfirmationModal } from '../../../shared/ConfirmationModal';
import { TransactionDetails } from './transaction-details';
import { Warning } from '@iota/apps-ui-icons';
import { InfoBox, InfoBoxType, InfoBoxStyle } from '@iota/apps-ui-kit';

export interface TransactionRequestProps {
txRequest: TransactionApprovalRequest;
Expand Down Expand Up @@ -104,6 +106,15 @@ export function TransactionRequest({ txRequest }: TransactionRequestProps) {
summary={summary}
renderExplorerLink={ExplorerLinkHelper}
/>
{(!summary || isDryRunError) && (
<InfoBox
title="Review the transaction"
supportingText="Unexpected issue during the dry run. The transaction may not execute properly."
icon={<Warning />}
type={InfoBoxType.Default}
style={InfoBoxStyle.Elevated}
/>
)}
<GasFees
sender={addressForTransaction}
gasSummary={summary?.gas}
Expand Down

0 comments on commit 405edb2

Please sign in to comment.