Skip to content

Commit

Permalink
Backwards compativility fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hide-on-bush-x committed May 8, 2023
1 parent e2d5fa2 commit 841ccd5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/masa-interface/masa-interface.tsx
Expand Up @@ -58,7 +58,7 @@ export const MasaInterface = ({
} = useMasa();

const page = useMemo(() => {
if (verbose) {
if (true) {

Check failure on line 61 in src/components/masa-interface/masa-interface.tsx

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node

Unexpected constant condition
console.log('INTERFACE', {
hasWalletAddress,
verbose,
Expand All @@ -76,11 +76,13 @@ export const MasaInterface = ({
});
}
if (forcedPage) return forcedPage;
if (forceNetwork && currentNetwork?.networkName !== forceNetwork) {

if (forceNetwork && hasWalletAddress && currentNetwork?.networkName !== forceNetwork) {
return 'switchNetwork';
}

if (!isLoggedIn && isConnected) return 'authenticate';
if (useRainbowKit && !isLoggedIn && isConnected) return 'authenticate';
if (!useRainbowKit && !isLoggedIn && hasWalletAddress) return 'authenticate';

if (
isLoggedIn &&
Expand Down Expand Up @@ -138,6 +140,8 @@ export const MasaInterface = ({
return ['createIdentity', 'successIdentityCreate'].includes(String(page));
}, [page]);


console.log("PAGE" , page)
return (
<>
<ModalComponent
Expand Down

0 comments on commit 841ccd5

Please sign in to comment.