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 = ({
4444 const submitTx = async ( ) => withSignTxConfirmation ( submitCollateralTx , secretsUtil . password . value ) ;
4545
4646 const handleClick = async ( ) => {
47- onClaim ( ) ;
48-
4947 if ( ! hasEnoughAda ) {
5048 return onClose ( ) ;
5149 }
5250 try {
5351 if ( popupView && ! isInMemory )
5452 return await backgroundServices ?. handleOpenBrowser ( { section : BrowserViewSections . COLLATERAL_SETTINGS } ) ;
5553 await submitTx ( ) ;
54+ onClaim ( ) ;
5655 toast . notify ( { text : t ( 'browserView.settings.wallet.collateral.toast.add' ) } ) ;
5756 if ( isInMemory ) onClose ( ) ;
5857 } catch {
Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ export const EnterPassword: VFC<EnterPasswordProps> = ({
4444 const icon = mapOfWalletTypeIconProperties [ kind ] ;
4545
4646 const next = ( ) => {
47+ if ( ! password . value ) {
48+ console . error ( 'Password is undefined' ) ;
49+ return ;
50+ }
51+
4752 onGenerateKeys ( password . value ) ;
4853 clearSecrets ( ) ;
4954 } ;
Original file line number Diff line number Diff line change @@ -60,10 +60,9 @@ export const WalletSetupPasswordStep = ({
6060 const passwordConfirmationErrorMessage =
6161 passHasBeenValidated && password !== passwordConfirmation ? translations . noMatchPassword : '' ;
6262 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
6766 ) ;
6867
6968 const complexityBarList : BarStates = useMemo ( ( ) => getComplexityBarStateList ( score ) , [ score ] ) ;
@@ -79,7 +78,7 @@ export const WalletSetupPasswordStep = ({
7978 description = { translations . description }
8079 onBack = { onBack }
8180 onNext = { ( ) => {
82- onNext ( { password : password . value } ) ;
81+ password . value ? onNext ( { password : password . value } ) : console . error ( 'Password is undefined' ) ;
8382 } }
8483 isNextEnabled = { isNextEnabled }
8584 currentTimelineStep = { WalletTimelineSteps . WALLET_SETUP }
You can’t perform that action at this time.
0 commit comments