Skip to content

Commit

Permalink
Create patch file for @web3-onboard/taho
Browse files Browse the repository at this point in the history
When Taho isn't the default wallet and MetaMask is installed we are unable to connect to the dapp. Let's force a connection to the Taho wallet and make sure the user receives the correct message when Taho isn't installed.
  • Loading branch information
Karolina Kosiorowska committed Oct 18, 2023
1 parent aad85e9 commit 8ad36a7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions patches/@web3-onboard+taho+2.0.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/node_modules/@web3-onboard/taho/dist/index.js b/node_modules/@web3-onboard/taho/dist/index.js
index e2e3b4b..3706a5c 100644
--- a/node_modules/@web3-onboard/taho/dist/index.js
+++ b/node_modules/@web3-onboard/taho/dist/index.js
@@ -13,8 +13,11 @@ function tahoWallet() {
},
getIcon: async () => (await import('./icon.js')).default,
getInterface: async () => {
- const provider = await detectEthereumProvider({ mustBeTallyHo: true });
- if (!provider) {
+ // When Taho isn't the default wallet and MetaMask is installed we are unable to connect to the dapp.
+ // Let's force a connection to the Taho wallet and
+ // make sure the user receives the correct message when Taho isn't installed.
+ const provider = await detectEthereumProvider();
+ if (!provider || window.tally === undefined) {
const onboarding = new TallyHoOnboarding();
onboarding.startOnboarding();
throw new Error('Please install Taho to use this wallet');

0 comments on commit 8ad36a7

Please sign in to comment.