Skip to content

Commit

Permalink
Update deps + fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Jul 25, 2024
1 parent 1712f73 commit 335abd2
Show file tree
Hide file tree
Showing 12 changed files with 1,898 additions and 938 deletions.
142 changes: 70 additions & 72 deletions demo/vue-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions demo/vue-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@web3auth/base": "file:../../packages/base",
"@web3auth/base-evm-adapter": "file:../../packages/adapters/base-evm-adapter",
"@web3auth/base-solana-adapter": "file:../../packages/adapters/base-solana-adapter",
"@web3auth/default-evm-adapter": "^8.10.2",
"@web3auth/default-solana-adapter": "^8.8.0",
"@web3auth/default-evm-adapter": "file:../../packages/adapters/default-evm-adapter",
"@web3auth/default-solana-adapter": "file:../../packages/adapters/default-solana-adapter",
"@web3auth/ethereum-provider": "file:../../packages/providers/ethereum-provider",
"@web3auth/metamask-adapter": "file:../../packages/adapters/metamask-adapter",
"@web3auth/modal": "file:../../packages/modal",
Expand All @@ -31,10 +31,7 @@
"@web3auth/solflare-adapter": "file:../../packages/adapters/solflare-adapter",
"@web3auth/torus-evm-adapter": "file:../../packages/adapters/torus-evm-adapter",
"@web3auth/torus-solana-adapter": "file:../../packages/adapters/torus-solana-adapter",
"@web3auth/torus-wallet-connector-plugin": "file:../../packages/plugins/torus-wallet-connector-plugin",
"@web3auth/wallet-connect-v1-adapter": "file:../../packages/adapters/wallet-connect-v1-adapter",
"@web3auth/wallet-connect-v2-adapter": "file:../../packages/adapters/wallet-connect-v2-adapter",
"@web3auth/wallet-services-connector-plugin": "file:../../packages/plugins/wallet-services-connector-plugin",
"@web3auth/wallet-services-plugin": "^8.10.2",
"lodash": "^4.17.21",
"lodash.merge": "^4.6.2",
Expand Down
34 changes: 3 additions & 31 deletions demo/vue-app/src/chains/ethereum.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<script lang="ts">
import { OPENLOGIN_NETWORK_TYPE } from "@toruslabs/openlogin-utils";
import { ADAPTER_STATUS, CHAIN_NAMESPACES, CONNECTED_EVENT_DATA, log, LoginMethodConfig, WALLET_ADAPTERS } from "@web3auth/base";
import { ADAPTER_STATUS, CHAIN_NAMESPACES, CONNECTED_EVENT_DATA, CustomChainConfig, log, LoginMethodConfig } from "@web3auth/base";
import { getDefaultExternalAdapters } from "@web3auth/default-evm-adapter";
import { EthereumPrivateKeyProvider } from "@web3auth/ethereum-provider";
import { Web3Auth, Web3AuthOptions } from "@web3auth/modal";
Expand All @@ -42,8 +42,7 @@ import Loader from "../components/loader.vue";
import config from "../config";
import EthRpc from "../rpc/ethRpc.vue";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const ethereumChainConfig: any = {
const ethereumChainConfig: CustomChainConfig = {
chainNamespace: CHAIN_NAMESPACES.EIP155,
rpcTarget: "https://rpc.ankr.com/eth",
blockExplorerUrl: "https://etherscan.io",
Expand Down Expand Up @@ -157,34 +156,7 @@ export default defineComponent({
this.subscribeAuthEvents(this.web3auth);
await this.web3auth.initModal({
modalConfig: {
[WALLET_ADAPTERS.METAMASK]: {
showOnDesktop: true,
showOnModal: true,
showOnMobile: true,
label: "Metamask",
},
[WALLET_ADAPTERS.WALLET_CONNECT_V2]: {
showOnDesktop: true,
showOnModal: true,
showOnMobile: true,
label: "Wallet Connect",
},
[WALLET_ADAPTERS.TORUS_EVM]: {
showOnDesktop: true,
showOnModal: true,
showOnMobile: true,
label: "Torus",
},
[WALLET_ADAPTERS.OPENLOGIN]: {
showOnDesktop: true,
showOnModal: true,
showOnMobile: true,
label: "OpenLogin",
},
},
});
await this.web3auth.initModal();
} catch (error) {
log.info("error", error);
this.uiConsole("error", error);
Expand Down
Loading

0 comments on commit 335abd2

Please sign in to comment.