File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
apps/browser-extension-wallet/src/views/browser-view/features/settings/components/Collateral/send
shared-wallets/add-shared-wallet/generate-key-flow/EnterPassword
ui/components/WalletSetup Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,14 @@ export const CollateralFooterSend = ({
44
44
const submitTx = async ( ) => withSignTxConfirmation ( submitCollateralTx , secretsUtil . password . value ) ;
45
45
46
46
const handleClick = async ( ) => {
47
- onClaim ( ) ;
48
-
49
47
if ( ! hasEnoughAda ) {
50
48
return onClose ( ) ;
51
49
}
52
50
try {
53
51
if ( popupView && ! isInMemory )
54
52
return await backgroundServices ?. handleOpenBrowser ( { section : BrowserViewSections . COLLATERAL_SETTINGS } ) ;
55
53
await submitTx ( ) ;
54
+ onClaim ( ) ;
56
55
toast . notify ( { text : t ( 'browserView.settings.wallet.collateral.toast.add' ) } ) ;
57
56
if ( isInMemory ) onClose ( ) ;
58
57
} catch {
Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ export const EnterPassword: VFC<EnterPasswordProps> = ({
44
44
const icon = mapOfWalletTypeIconProperties [ kind ] ;
45
45
46
46
const next = ( ) => {
47
+ if ( ! password . value ) {
48
+ console . error ( 'Password is undefined' ) ;
49
+ return ;
50
+ }
51
+
47
52
onGenerateKeys ( password . value ) ;
48
53
clearSecrets ( ) ;
49
54
} ;
Original file line number Diff line number Diff line change @@ -60,10 +60,9 @@ export const WalletSetupPasswordStep = ({
60
60
const passwordConfirmationErrorMessage =
61
61
passHasBeenValidated && password !== passwordConfirmation ? translations . noMatchPassword : '' ;
62
62
const isNextEnabled = Boolean (
63
- passHasBeenValidated &&
64
- ! passwordConfirmationErrorMessage &&
65
- score >= minimumPassLevelRequired &&
66
- password . value . length > 0
63
+ passHasBeenValidated && ! passwordConfirmationErrorMessage && score >= minimumPassLevelRequired && password ?. value
64
+ ? password . value . length > 0
65
+ : false
67
66
) ;
68
67
69
68
const complexityBarList : BarStates = useMemo ( ( ) => getComplexityBarStateList ( score ) , [ score ] ) ;
@@ -79,7 +78,7 @@ export const WalletSetupPasswordStep = ({
79
78
description = { translations . description }
80
79
onBack = { onBack }
81
80
onNext = { ( ) => {
82
- onNext ( { password : password . value } ) ;
81
+ password . value ? onNext ( { password : password . value } ) : console . error ( 'Password is undefined' ) ;
83
82
} }
84
83
isNextEnabled = { isNextEnabled }
85
84
currentTimelineStep = { WalletTimelineSteps . WALLET_SETUP }
You can’t perform that action at this time.
0 commit comments