diff --git a/src/components/connect/ConnectIntentHandler.tsx b/src/components/connect/ConnectIntentHandler.tsx index aa33b087..fb48de95 100644 --- a/src/components/connect/ConnectIntentHandler.tsx +++ b/src/components/connect/ConnectIntentHandler.tsx @@ -109,6 +109,7 @@ export function ConnectIntentHandler() { coinId={params.coinId as string} memo={params.memo as string | undefined} onResolve={() => resolveIntent({ success: true })} + onReject={(message) => rejectIntent(ERROR_CODES.TRANSFER_FAILED, message)} onCancel={handleClose} /> ); @@ -123,6 +124,7 @@ export function ConnectIntentHandler() { coinId={params.coinId as string} message={params.message as string | undefined} onResolve={(requestId) => resolveIntent({ success: true, requestId })} + onReject={(message) => rejectIntent(ERROR_CODES.INTERNAL_ERROR, message)} onCancel={handleClose} /> ); diff --git a/src/components/connect/IntentConfirmModal.tsx b/src/components/connect/IntentConfirmModal.tsx index bdca96d3..36e38933 100644 --- a/src/components/connect/IntentConfirmModal.tsx +++ b/src/components/connect/IntentConfirmModal.tsx @@ -9,8 +9,6 @@ interface IntentConfirmModalProps { icon: LucideIcon; /** Body content (the amount/recipient card). */ children: ReactNode; - /** Inline error shown above the action buttons. */ - error?: string | null; /** Disables the confirm button (e.g. insufficient balance). */ confirmDisabled?: boolean; /** True while the underlying action is running. */ @@ -32,12 +30,15 @@ interface IntentConfirmModalProps { * amount input here. This matches how every major wallet treats a * dApp-requested transfer (MetaMask, Phantom, WalletConnect): the amount * travels in base units and the wallet only formats it for display. + * + * On failure the consumer rejects the intent (so the dApp is informed) and the + * wallet's global query handler toasts the error — so this shell renders no + * inline error. */ export function IntentConfirmModal({ title, icon, children, - error, confirmDisabled, busy, confirmLabel, @@ -52,8 +53,6 @@ export function IntentConfirmModal({
{children} - {error &&
{error}
} -