File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
packages/nami/src/ui/app/pages/dapp-connector Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import { Wallet } from '@lace/cardano';
25
25
import MiddleEllipsis from 'react-middle-ellipsis' ;
26
26
import { firstValueFrom } from 'rxjs' ;
27
27
28
+ import { ERROR } from '../../../../config/config' ;
28
29
import { Events } from '../../../../features/analytics/events' ;
29
30
import { useCaptureEvent } from '../../../../features/analytics/hooks' ;
30
31
import { useCommonOutsideHandles } from '../../../../features/common-outside-handles-provider' ;
@@ -546,7 +547,14 @@ export const SignTx = ({
546
547
try {
547
548
await request ?. sign ( password ?? '' ) ;
548
549
} catch ( error ) {
550
+ if (
551
+ error instanceof Wallet . KeyManagement . errors . AuthenticationError
552
+ ) {
553
+ setIsLoading ( l => ( { ...l , error : ERROR . wrongPassword } ) ) ;
554
+ throw ERROR . wrongPassword ;
555
+ }
549
556
setIsLoading ( l => ( { ...l , error : `Failed to sign. ${ error } ` } ) ) ;
557
+ throw `Failed to sign. ${ error } ` ;
550
558
}
551
559
} }
552
560
onConfirm = { async status => {
You can’t perform that action at this time.
0 commit comments