Skip to content

Commit

Permalink
[PAY-1742] Remove useMetaMask on invalid account (#3920)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson committed Aug 22, 2023
1 parent 6e303b1 commit 1091934
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
4 changes: 4 additions & 0 deletions packages/web/src/common/store/account/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ export function* fetchAccountAsync({ isSignUp = false }) {
reason: 'ACCOUNT_NOT_FOUND'
})
)
if (!isNativeMobile) {
const localStorage = yield getContext('localStorage')
yield call([localStorage, 'removeItem'], 'useMetaMask')
}
return
}
if (account.is_deactivated) {
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/components/banner/Web3ErrorBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const messages = {
}

const META_MASK_SETUP_URL =
'https://medium.com/@audius/configuring-metamask-for-use-with-audius-91e24bf6840'
'https://help.audius.co/help/configuring-metamask-for-use-with-audius-2d446'

/**
* Displays an error banner if the user is trying to use Metamask but it's configured incorrectly
Expand Down
1 change: 0 additions & 1 deletion packages/web/src/hooks/useTabs/useTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,6 @@ const BodyContainer = memo(
dimensionsAreDirty,
didSetDimensions
}: BodyContainerProps) => {
console.log('hmm', elements, activeIndex)
// Get a ref to the element to use for calculating height
const {
containerWidth,
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/pages/sign-on/SignOnProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const messages = {
}

const META_MASK_SETUP_URL =
'https://support.audius.co/help/Configuring-MetaMask-For-Use-With-Audius'
'https://help.audius.co/help/configuring-metamask-for-use-with-audius-2d446'

type OwnProps = {
children: ComponentType<MobileSignOnProps> | ComponentType<DesktopSignOnProps>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ const animatedStyle = {
}
}

/**
* TODO: When the user selects the metamask option, set the localStorage key 'useMetaMask' to true
* Reference the setup function in Audius backend. A new instance of Audiusbackend will have to be created
*/
const SignOnPage = ({
title,
description,
Expand Down

0 comments on commit 1091934

Please sign in to comment.