diff --git a/apps/extension/src/ui/domains/Sign/Qr/QrSubstrate.tsx b/apps/extension/src/ui/domains/Sign/Qr/QrSubstrate.tsx
index a7ab79424..107998412 100644
--- a/apps/extension/src/ui/domains/Sign/Qr/QrSubstrate.tsx
+++ b/apps/extension/src/ui/domains/Sign/Qr/QrSubstrate.tsx
@@ -1,18 +1,17 @@
-import { isJsonPayload } from "@extension/core"
-import { SignerPayloadJSON, SignerPayloadRaw } from "@extension/core"
-import { AccountJsonQr } from "@extension/core"
-import { POLKADOT_VAULT_DOCS_URL } from "@extension/shared"
import { HexString } from "@polkadot/util/types"
import { Chain } from "@talismn/chaindata-provider"
import { ChevronLeftIcon, InfoIcon, LoaderIcon, PolkadotVaultIcon } from "@talismn/icons"
import { classNames } from "@talismn/util"
-import { ChainLogo } from "@ui/domains/Asset/ChainLogo"
-import { ScanQr } from "@ui/domains/Sign/Qr/ScanQr"
-import { useChainByGenesisHash } from "@ui/hooks/useChainByGenesisHash"
import { ReactElement, useState } from "react"
import { Trans, useTranslation } from "react-i18next"
import { Button, Drawer, Tooltip, TooltipContent, TooltipTrigger } from "talisman-ui"
+import { AccountJsonQr, isJsonPayload, SignerPayloadJSON, SignerPayloadRaw } from "@extension/core"
+import { POLKADOT_VAULT_DOCS_URL } from "@extension/shared"
+import { ChainLogo } from "@ui/domains/Asset/ChainLogo"
+import { ScanQr } from "@ui/domains/Sign/Qr/ScanQr"
+import { useChainByGenesisHash } from "@ui/hooks/useChainByGenesisHash"
+
import { ExtrinsicQrCode } from "./ExtrinsicQrCode"
import { MetadataQrCode } from "./MetadataQrCode"
import { NetworkSpecsQrCode } from "./NetworkSpecsQrCode"
@@ -48,7 +47,7 @@ interface Props {
className?: string
genesisHash?: HexString
onSignature?: (result: { signature: `0x${string}` }) => void
- onReject: () => void
+ onReject?: () => void
payload: SignerPayloadJSON | SignerPayloadRaw
containerId: string
skipInit?: boolean
@@ -84,9 +83,11 @@ export const QrSubstrate = ({
return (
-
+ {!!onReject && (
+
+ )}
@@ -111,8 +112,8 @@ export const QrSubstrate = ({
setScanState((scanState) => {
// if back is clicked and we're on the first page, reject the signing attempt
// (which is INIT when skipInit is false, or SEND when it's true)
- if (scanState.page === "INIT") onReject()
- if (skipInit && scanState.page === "SEND") onReject()
+ if (scanState.page === "INIT") onReject?.()
+ if (skipInit && scanState.page === "SEND") onReject?.()
// if we're on the SEND page, go back to the INIT page
if (!skipInit && scanState.page === "SEND") return { page: "INIT" }
@@ -207,7 +208,12 @@ export const QrSubstrate = ({
>
{scanState.page === "SEND" && (
<>
-