-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪄 [QA] Update stage environments (#814)
This is a pull request that upon merging will update stage environments with recent `main` changes. The environments that will be updated: * Stage live: https://stage-live--taho-development.netlify.app/ * Stage fork: https://stage-fork--taho-development.netlify.app/ Read more: [Deployment to Production Flow](https://github.com/tahowallet/dapp/blob/main/docs/testing-env.md)
- Loading branch information
Showing
7 changed files
with
747 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,60 @@ | ||
import tahoWalletModule from "@web3-onboard/taho" | ||
import trezorModule from "@web3-onboard/trezor" | ||
import walletConnectModule from "@web3-onboard/walletconnect" | ||
import metamaskSDK from "@web3-onboard/metamask" | ||
import { init } from "@web3-onboard/react" | ||
import { ARBITRUM_SEPOLIA } from "shared/constants" | ||
import favicon from "shared/assets/favicon.svg" | ||
|
||
const SUBSACAPE_NAME = "Subscape" | ||
const SUBSACAPE_URL = "https://app.taho.xyz" | ||
const SUBSACAPE_ICON = favicon | ||
const chains = [ARBITRUM_SEPOLIA] | ||
|
||
const appMetadata = { | ||
name: SUBSACAPE_NAME, | ||
description: "Subscape dapp", | ||
icon: SUBSACAPE_ICON, | ||
} | ||
|
||
const walletsSetup = { | ||
taho: tahoWalletModule(), | ||
trezor: trezorModule({ | ||
// TODO: use proper email and url | ||
email: "[email protected]", | ||
appUrl: "https://taho.xyz", | ||
appUrl: SUBSACAPE_URL, | ||
}), | ||
walletConnect: walletConnectModule({ | ||
projectId: process.env.WALLET_CONNECT_ID ?? "", | ||
requiredChains: [parseInt(ARBITRUM_SEPOLIA.id, 16)], | ||
}), | ||
metamask: metamaskSDK({ | ||
options: { | ||
extensionOnly: false, | ||
dappMetadata: { | ||
name: SUBSACAPE_NAME, | ||
url: SUBSACAPE_URL, | ||
}, | ||
}, | ||
}), | ||
} | ||
|
||
const wallets = [walletsSetup.taho] | ||
|
||
const chains = [ARBITRUM_SEPOLIA] | ||
// TODO: decide what metadata should look like | ||
const appMetadata = { | ||
name: "Taho Dapp", | ||
description: "Taho Dapp", | ||
icon: "https://raw.githubusercontent.com/tahowallet/taho.xyz/29a091abf919b5cfcf511fd10c41d73490ce4f23/src/shared/favicon.svg", | ||
} | ||
const hasTaho = "taho" in window | ||
const wallets = hasTaho | ||
? [walletsSetup.taho] | ||
: [walletsSetup.taho, walletsSetup.metamask] | ||
|
||
const web3Onboard = init({ | ||
wallets, | ||
chains, | ||
appMetadata, | ||
connect: { | ||
autoConnectLastWallet: true, | ||
// TODO: web3onboard remembers last wallet that was used. If it was MM but MM becomes | ||
// unavailable then web3onboard will try to auto connect to MM and will fail. | ||
// So to avoid problem with attempting auto connection to the wallet | ||
// that is not available on the wallet lists let's just disable autoConnect | ||
// feature for Metamask for now. | ||
autoConnectLastWallet: hasTaho, | ||
iDontHaveAWalletLink: | ||
"https://chrome.google.com/webstore/detail/taho/eajafomhmkipbjmfmhebemolkcicgfmd", | ||
removeWhereIsMyWalletWarning: true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.