refactor(offline): update strings, create offline navigate to sign/verify w/o auto download
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 39s

This commit is contained in:
enes 2025-01-20 21:24:18 +01:00
parent 99d562a3ed
commit a4310675c1
2 changed files with 7 additions and 8 deletions

View File

@ -69,7 +69,7 @@ const FileList = ({
color={'var(--mui-palette-primary-main)'}
icon={faLock}
/>
  EXPORT (encrypted)
  ENCRYPTED
</MenuItem>
)}
{typeof handleExport === 'function' && (
@ -83,7 +83,7 @@ const FileList = ({
color={'var(--mui-palette-primary-main)'}
icon={faTriangleExclamation}
/>
&nbsp; EXPORT (unencrypted)
&nbsp; UNENCRYPTED
</MenuItem>
)}
</Menu>

View File

@ -8,7 +8,6 @@ import {
Tooltip
} from '@mui/material'
import type { Identifier, XYCoord } from 'dnd-core'
import saveAs from 'file-saver'
import JSZip from 'jszip'
import { useCallback, useEffect, useRef, useState } from 'react'
import { DndProvider, useDrag, useDrop } from 'react-dnd'
@ -928,7 +927,6 @@ export const CreatePage = () => {
})
const isFirstSigner = signers[0].pubkey === usersPubkey
if (isFirstSigner) {
navigate(appPrivateRoutes.sign, { state: { meta } })
} else {
@ -1001,15 +999,16 @@ export const CreatePage = () => {
return
}
saveAs(finalZipFile, `request-${unixNow()}.sigit.zip`)
// If user is the next signer, we can navigate directly to sign page
if (signers[0].pubkey === usersPubkey) {
const isFirstSigner = signers[0].pubkey === usersPubkey
if (isFirstSigner) {
navigate(appPrivateRoutes.sign, {
state: { arrayBuffer }
})
} else {
navigate(appPrivateRoutes.homePage)
navigate(appPublicRoutes.verify, {
state: { uploadedZip: arrayBuffer }
})
}
} catch (error) {
if (error instanceof Error) {