From e876b1937a15c28afffd4383327a5d268536e49c Mon Sep 17 00:00:00 2001 From: schmanu Date: Tue, 30 Apr 2024 16:31:14 +0200 Subject: [PATCH] fix: add query param to settings link --- src/components/tx-flow/flows/SignMessage/SignMessage.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/tx-flow/flows/SignMessage/SignMessage.tsx b/src/components/tx-flow/flows/SignMessage/SignMessage.tsx index b8a673a4f8..0149fbb2df 100644 --- a/src/components/tx-flow/flows/SignMessage/SignMessage.tsx +++ b/src/components/tx-flow/flows/SignMessage/SignMessage.tsx @@ -53,6 +53,7 @@ import { useAppSelector } from '@/store' import { selectBlindSigning } from '@/store/settingsSlice' import NextLink from 'next/link' import { AppRoutes } from '@/config/routes' +import { useRouter } from 'next/router' const createSkeletonMessage = (confirmationsRequired: number): SafeMessage => { return { @@ -155,6 +156,9 @@ const BlindSigningWarning = ({ isBlindSigningEnabled: boolean isBlindSigningPayload: boolean }) => { + const router = useRouter() + const query = router.query.safe ? { safe: router.query.safe } : undefined + if (!isBlindSigningPayload) { return null } @@ -162,7 +166,7 @@ const BlindSigningWarning = ({ return ( This request involves{' '} - + blind signing , which can lead to unpredictable outcomes. @@ -172,7 +176,7 @@ const BlindSigningWarning = ({ ) : ( <> If you wish to proceed, you must first{' '} - + enable blind signing .