From 9db981fe289cbb9084b8163c845f9bcccb75a1b5 Mon Sep 17 00:00:00 2001 From: "Szymon.Zieba" Date: Wed, 2 Oct 2024 05:31:58 +0200 Subject: [PATCH 1/3] BLOCKCHAIN-511 FE onboarding improvements --- src/components/GuidedSetup/WalletListComponent/index.js | 4 ---- src/components/GuidedSetup/index.js | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/GuidedSetup/WalletListComponent/index.js b/src/components/GuidedSetup/WalletListComponent/index.js index 71e89b2b..4886344e 100644 --- a/src/components/GuidedSetup/WalletListComponent/index.js +++ b/src/components/GuidedSetup/WalletListComponent/index.js @@ -6,7 +6,6 @@ import Button from '../../Button/Button'; import styles from '../styles.module.scss'; import { propsWalletListUserID } from '../propsTypes/propTypes'; import { blockchainSelectors, userSelectors } from '../../../redux/selectors'; -import { blockchainActions } from '../../../redux/actions'; function WalletListComponent() { const dispatch = useDispatch(); @@ -34,9 +33,6 @@ function WalletListComponent() { > Connect -
diff --git a/src/components/GuidedSetup/index.js b/src/components/GuidedSetup/index.js index d63b0010..d0599679 100644 --- a/src/components/GuidedSetup/index.js +++ b/src/components/GuidedSetup/index.js @@ -101,7 +101,7 @@ function GuidedSetup({ children }) { ); } - if (!userWalletAddress && !walletAddress) { + if ((!userWalletAddress && !walletAddress) || userWalletAddress < 2) { return ( From 16d8cdaa5734573820492eaa82044fae7db56d69 Mon Sep 17 00:00:00 2001 From: "Szymon.Zieba" Date: Wed, 2 Oct 2024 16:55:10 +0200 Subject: [PATCH 2/3] change unsupported browser to storage in session storage --- src/components/CheckExtenstionWalletProvider/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/CheckExtenstionWalletProvider/index.js b/src/components/CheckExtenstionWalletProvider/index.js index ad730f69..0d18197d 100644 --- a/src/components/CheckExtenstionWalletProvider/index.js +++ b/src/components/CheckExtenstionWalletProvider/index.js @@ -27,11 +27,11 @@ export function CheckExtensionWalletProvider({ children }) { const walletAddress = useSelector(blockchainSelectors.userWalletAddressSelector); const wallets = useSelector(blockchainSelectors.allWalletsSelector); const [acceptedBrowser, setAcceptedBrowser] = useState( - localStorage.getItem('unsupportedBrowserAcceptedByUser'), + sessionStorage.getItem('unsupportedBrowserAcceptedByUser'), ); const isUnsupportedBrowser = useIsUnsupportedBrowser(); const onUnsupportedBrowserAccept = () => { - localStorage.setItem('unsupportedBrowserAcceptedByUser', true); + sessionStorage.setItem('unsupportedBrowserAcceptedByUser', true); setAcceptedBrowser(true); }; From d230b1e02216f02a66aee6a59a5bd6f3e159bc10 Mon Sep 17 00:00:00 2001 From: "Szymon.Zieba" Date: Wed, 9 Oct 2024 06:16:18 +0200 Subject: [PATCH 3/3] set wallet in state, after change missing wallet - missing wallet before claim lld/ update identity --- .../GuidedSetup/WalletListComponent/index.js | 6 +++- src/components/GuidedSetup/index.js | 29 ++++++++++--------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/components/GuidedSetup/WalletListComponent/index.js b/src/components/GuidedSetup/WalletListComponent/index.js index 4886344e..60d85021 100644 --- a/src/components/GuidedSetup/WalletListComponent/index.js +++ b/src/components/GuidedSetup/WalletListComponent/index.js @@ -6,6 +6,7 @@ import Button from '../../Button/Button'; import styles from '../styles.module.scss'; import { propsWalletListUserID } from '../propsTypes/propTypes'; import { blockchainSelectors, userSelectors } from '../../../redux/selectors'; +import { blockchainActions } from '../../../redux/actions'; function WalletListComponent() { const dispatch = useDispatch(); @@ -29,7 +30,10 @@ function WalletListComponent() { diff --git a/src/components/GuidedSetup/index.js b/src/components/GuidedSetup/index.js index d0599679..5ae6f349 100644 --- a/src/components/GuidedSetup/index.js +++ b/src/components/GuidedSetup/index.js @@ -80,39 +80,40 @@ function GuidedSetup({ children }) { ); } - if (!notResidentAcceptedByUser && !isResident && userHasIdentity !== 'true') { + if ((!userWalletAddress && !walletAddress) || userWalletAddress < 2) { return ( - + ); } - if ( - (isUserEligibleForComplimentaryLLD - || isIdentityEmpty - || isSkippedOnBoardingGetLLD === 'secondStep') - && isSkippedOnBoardingGetLLD !== 'true' - && userHasIdentity !== 'true' - ) { + + if (!wallets.map((w) => w.address).includes(userWalletAddress)) { return ( - + ); } - if ((!userWalletAddress && !walletAddress) || userWalletAddress < 2) { + if (!notResidentAcceptedByUser && !isResident && userHasIdentity !== 'true') { return ( - + ); } - if (!wallets.map((w) => w.address).includes(userWalletAddress)) { + if ( + (isUserEligibleForComplimentaryLLD + || isIdentityEmpty + || isSkippedOnBoardingGetLLD === 'secondStep') + && isSkippedOnBoardingGetLLD !== 'true' + && userHasIdentity !== 'true' + ) { return ( - + ); }