Skip to content

Commit

Permalink
chore: improve recovery entry
Browse files Browse the repository at this point in the history
  • Loading branch information
septs committed Oct 31, 2024
1 parent cca1ac2 commit 13b2290
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/src/components/RecoveryEntry.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Backend, ConsoleBackend } from '@estkme-group/notccid'
import { FC, useCallback, useMemo, useState } from 'react'
import { Button, Col, Container, Form, Row, Stack } from 'react-bootstrap'
import { useManagedNotCCID } from 'src/ManagedNotCCID'
import { MutexBackend } from 'src/MutexBackend'
import { useManagedNotCCID } from '../ManagedNotCCID'
import { MutexBackend } from '../MutexBackend'
import { Connect } from './Connect'

export const Entry: FC = () => {
Expand All @@ -17,6 +17,8 @@ export const Entry: FC = () => {
const managed = useManagedNotCCID(wrappedBackend)
const handleRecoveryMode = useCallback(async () => {
if (!managed) return
await managed.claim()
await managed.powerOnCard()
await managed.enterRecoveryMode()
}, [managed])
return (
Expand Down

0 comments on commit 13b2290

Please sign in to comment.