mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-13 11:56:26 +00:00
feat: disable continue button for not connected
This commit is contained in:
parent
eff6fc4a75
commit
ce5d8dfe1b
@ -24,6 +24,7 @@ const ContinueButton = ({
|
|||||||
const { isCopyPastedPhrase, isRightPhrase, words, validWords } = useSelector(
|
const { isCopyPastedPhrase, isRightPhrase, words, validWords } = useSelector(
|
||||||
(state: RootState) => state.keyGeneration,
|
(state: RootState) => state.keyGeneration,
|
||||||
)
|
)
|
||||||
|
const { isWalletConnected } = useSelector((state: RootState) => state.deposit)
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -31,9 +32,12 @@ const ContinueButton = ({
|
|||||||
}, [words])
|
}, [words])
|
||||||
|
|
||||||
const isDisabled = () => {
|
const isDisabled = () => {
|
||||||
|
const isDepositWalletConnected = isWalletConnected === false && activeStep === 5
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(isConfirmPhraseStage && !isRightPhrase) ||
|
(isConfirmPhraseStage && !isRightPhrase) ||
|
||||||
(isConfirmPhraseStage && validWords.some(w => w === false))
|
(isConfirmPhraseStage && validWords.some(w => w === false)) ||
|
||||||
|
isDepositWalletConnected
|
||||||
) {
|
) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user