Skip to content

Commit

Permalink
refactor: Update wallet storage key to 'walletProvider'
Browse files Browse the repository at this point in the history
The code changes update the key used to store the wallet type in local storage from 'wallet' to 'walletProvider'. This change ensures consistency and clarity in the codebase by using a more descriptive key name.

Note: Please remove any meta information such as issue references, tags, or author names before using the commit message.
  • Loading branch information
daniel-vahn committed May 8, 2024
1 parent c31fffa commit 37369ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ function App() {
console.error('Provider ID not found.');
return;
}
const wallet = window.localStorage.getItem('wallet') || 'trust';
const wallet = window.localStorage.getItem('walletProvider');
if (!wallet) {
console.error('Wallet not found.');
return;
}

if (wallet == 'metamask') {
if (wallet === 'metamask') {
WebApp.openLink('https://metamask.app.link/');
}
if (wallet == 'trust') {
if (wallet === 'trust') {
WebApp.openLink('https://link.trustwallet.com/');
}
axios
Expand Down
2 changes: 1 addition & 1 deletion src/components/connectOverlay/ConnectOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const ConnectOverlay: React.FC<Props> = ({

window.localStorage.removeItem('walletconnect');
window.localStorage.removeItem('WALLETCONNECT_DEEPLINK_CHOICE');
window.localStorage.setItem('wallet', wallet);
window.localStorage.setItem('walletProvider', wallet);

const response = await axios.post(BRIDGE_URL + '/init-provider', {
wallet: wallet,
Expand Down

0 comments on commit 37369ef

Please sign in to comment.