Skip to content

Commit

Permalink
Merge pull request #228 from aesirxio/develop
Browse files Browse the repository at this point in the history
Deploy to master
  • Loading branch information
NguyenBao10 authored May 10, 2024
2 parents 0a87ef3 + a705590 commit 422f285
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Hooks/useConsentStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const useConsentStatus = (endpoint?: string, layout?: string, props?: WalletConn
try {
let l = level;
if (isDesktop) {
if (rpc) {
if (rpc && account) {
// Concordium
if (l < 3) {
setLevel(null);
Expand All @@ -186,7 +186,7 @@ const useConsentStatus = (endpoint?: string, layout?: string, props?: WalletConn
setLevel(1);
}
}
} else if (connector && isDesktop) {
} else if (connector) {
// Metamask
if (layout !== 'simple-consent-mode' && layout !== 'simple-web-2') {
if (l < 3) {
Expand All @@ -205,13 +205,13 @@ const useConsentStatus = (endpoint?: string, layout?: string, props?: WalletConn
setLevel(1);
}
} else {
setLevel(level ?? layout === 'advance-consent-mode' ? 2 : 1);
setLevel(layout === 'advance-consent-mode' ? 2 : 1);
}
} else {
setLevel(1);
}
} catch (error) {
setLevel(level ?? layout === 'advance-consent-mode' ? 2 : 1);
setLevel(layout === 'advance-consent-mode' ? 2 : 1);
console.error(error);
}
})();
Expand Down

0 comments on commit 422f285

Please sign in to comment.