Skip to content

Commit

Permalink
Fix IB comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yashovardhan committed Dec 11, 2024
1 parent 532d15d commit 8a2acfb
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import "./index.css";

import ReactDOM from "react-dom/client";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider } from "@web3auth/modal-react-hooks";
import web3AuthContextConfig from "./web3authContext";
// IMP END - Setup Web3Auth Provider

import App from "./App";

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
// IMP START - Setup Web3Auth Provider
<Web3AuthProvider config={web3AuthContextConfig}>
<App />
</Web3AuthProvider>
// IMP END - Setup Web3Auth Provider
);
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const chainConfig = {
};
// IMP END - Chain Config

// IMP START - SDK Initialization
// IMP START - Instantiate SDK
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: {
chainConfig,
Expand All @@ -37,17 +37,19 @@ const web3AuthOptions: Web3AuthOptions = {
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
privateKeyProvider,
};
// IMP END - SDK Initialization
// IMP END - Instantiate SDK

// IMP START - Configuring External Wallets
const adapters = getDefaultExternalAdapters({ options: web3AuthOptions });
// IMP END - Configuring External Wallets

// IMP START - Instantiate SDK
const web3AuthContextConfig = {
web3AuthOptions,
// IMP START - Configuring External Wallets
adapters: [...adapters],
// IMP END - Configuring External Wallets
};
// IMP END - Instantiate SDK

export default web3AuthContextConfig;
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<script setup lang="ts">
import Home from "./Home.vue";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider } from "@web3auth/modal-vue-composables"
import web3AuthContextConfig from "./web3authContext";
// IMP END - Setup Web3Auth Provider
</script>

<template>
<div class="min-h-screen flex flex-col">
<!-- IMP START - Setup Web3Auth Provider -->
<Web3AuthProvider :config="web3AuthContextConfig">
<Home />
</Web3AuthProvider>
<!-- IMP END - Setup Web3Auth Provider -->
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const chainConfig = {
};
// IMP END - Chain Config

// IMP START - SDK Initialization
// IMP START - Instantiate SDK
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: {
chainConfig,
Expand All @@ -37,17 +37,19 @@ const web3AuthOptions: Web3AuthOptions = {
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
privateKeyProvider,
};
// IMP END - SDK Initialization
// IMP END - Instantiate SDK

// IMP START - Configuring External Wallets
const adapters = getDefaultExternalAdapters({ options: web3AuthOptions });
// IMP END - Configuring External Wallets

// IMP START - Instantiate SDK
const web3AuthContextConfig = {
web3AuthOptions,
// IMP START - Configuring External Wallets
adapters: [...adapters],
// IMP END - Configuring External Wallets
};
// IMP END - Instantiate SDK

export default web3AuthContextConfig;
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import "./index.css";

import ReactDOM from "react-dom/client";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider } from "@web3auth/no-modal-react-hooks";
import web3AuthContextConfig from "./web3authContext";
// IMP END - Setup Web3Auth Provider

import App from "./App";

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
// IMP START - Setup Web3Auth Provider
<Web3AuthProvider config={web3AuthContextConfig}>
<App />
</Web3AuthProvider>
// IMP END - Setup Web3Auth Provider
);
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const chainConfig = {
};
// IMP END - Chain Config

// IMP START - SDK Initialization
// IMP START - Instantiate SDK
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: {
chainConfig,
Expand All @@ -39,18 +39,19 @@ const web3AuthOptions: Web3AuthNoModalOptions = {
};

const authAdapter = new AuthAdapter();
// IMP END - SDK Initialization
// IMP END - Instantiate SDK

// IMP START - Configuring External Wallets
const adapters = getDefaultExternalAdapters({ options: web3AuthOptions });
// IMP END - Configuring External Wallets


// IMP START - Instantiate SDK
const web3AuthContextConfig = {
web3AuthOptions,
// IMP START - Configuring External Wallets
adapters: [authAdapter, ...adapters],
// IMP END - Configuring External Wallets
};
// IMP END - Instantiate SDK

export default web3AuthContextConfig;
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<script setup lang="ts">
import Home from "./Home.vue";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider } from "@web3auth/no-modal-vue-composables"
import web3AuthContextConfig from "./web3authContext";
// IMP END - Setup Web3Auth Provider
</script>

<template>
<div class="min-h-screen flex flex-col">
<!-- IMP START - Setup Web3Auth Provider -->
<Web3AuthProvider :config="web3AuthContextConfig">
<Home msg="Welcome to Your Vue.js + TypeScript App" />
</Web3AuthProvider>
<!-- IMP END - Setup Web3Auth Provider -->
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const chainConfig = {
};
// IMP END - Chain Config

// IMP START - SDK Initialization
// IMP START - Instantiate SDK
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: {
chainConfig,
Expand All @@ -39,18 +39,19 @@ const web3AuthOptions: Web3AuthNoModalOptions = {
};

const authAdapter = new AuthAdapter();
// IMP END - SDK Initialization
// IMP END - Instantiate SDK

// IMP START - Configuring External Wallets
const adapters = getDefaultExternalAdapters({ options: web3AuthOptions });
// IMP END - Configuring External Wallets


// IMP START - Instantiate SDK
const web3AuthContextConfig = {
web3AuthOptions,
// IMP START - Configuring External Wallets
adapters: [authAdapter, ...adapters],
// IMP END - Configuring External Wallets
};
// IMP END - Instantiate SDK

export default web3AuthContextConfig;

0 comments on commit 8a2acfb

Please sign in to comment.