From e3312442eb183cd8cd68483c7f7d5c7c57d1f33f Mon Sep 17 00:00:00 2001 From: Yashovardhan Agrawal Date: Thu, 21 Sep 2023 15:31:34 +0800 Subject: [PATCH] Update web3auth networks --- tkey-mpc-web/tkey-mpc-react-bitcoin-example/src/tkey.ts | 3 ++- tkey-mpc-web/tkey-mpc-react-firebase-example/src/tkey.ts | 3 ++- tkey-mpc-web/tkey-mpc-react-popup-example/src/tkey.ts | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tkey-mpc-web/tkey-mpc-react-bitcoin-example/src/tkey.ts b/tkey-mpc-web/tkey-mpc-react-bitcoin-example/src/tkey.ts index d646252..29a7e28 100644 --- a/tkey-mpc-web/tkey-mpc-react-bitcoin-example/src/tkey.ts +++ b/tkey-mpc-web/tkey-mpc-react-bitcoin-example/src/tkey.ts @@ -2,12 +2,13 @@ import ThresholdKey from "@tkey-mpc/core"; import { TorusServiceProvider } from "@tkey-mpc/service-provider-torus"; import { TorusStorageLayer } from "@tkey-mpc/storage-layer-torus"; import { ShareSerializationModule } from "@tkey-mpc/share-serialization"; +import { TORUS_SAPPHIRE_NETWORK } from "@toruslabs/constants"; // Configuration of Service Provider const torusSp = new TorusServiceProvider({ useTSS: true, customAuthArgs: { - network: "sapphire_devnet", + network: TORUS_SAPPHIRE_NETWORK.SAPPHIRE_MAINNET, web3AuthClientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // anything will work on localhost, but get one valid clientID before hosting, from https://dashboard.web3auth.io baseUrl: `${window.location.origin}/serviceworker`, enableLogging: true, diff --git a/tkey-mpc-web/tkey-mpc-react-firebase-example/src/tkey.ts b/tkey-mpc-web/tkey-mpc-react-firebase-example/src/tkey.ts index 7ea6e6a..0eecdda 100644 --- a/tkey-mpc-web/tkey-mpc-react-firebase-example/src/tkey.ts +++ b/tkey-mpc-web/tkey-mpc-react-firebase-example/src/tkey.ts @@ -3,6 +3,7 @@ import { TorusServiceProvider } from "@tkey-mpc/service-provider-torus"; import { TorusStorageLayer } from "@tkey-mpc/storage-layer-torus"; import { ShareSerializationModule } from "@tkey-mpc/share-serialization"; import { CustomChainConfig } from "@web3auth/base"; +import { TORUS_SAPPHIRE_NETWORK } from "@toruslabs/constants"; // Configuration of Service Provider const web3AuthClientId = @@ -20,7 +21,7 @@ export const chainConfig: Omit = { const serviceProvider = new TorusServiceProvider({ useTSS: true, customAuthArgs: { - network: "sapphire_devnet", + network: TORUS_SAPPHIRE_NETWORK.SAPPHIRE_MAINNET, web3AuthClientId, // anything will work on localhost, but get one valid clientID before hosting, from https://dashboard.web3auth.io baseUrl: `${window.location.origin}`, enableLogging: true, diff --git a/tkey-mpc-web/tkey-mpc-react-popup-example/src/tkey.ts b/tkey-mpc-web/tkey-mpc-react-popup-example/src/tkey.ts index d646252..0b53c77 100644 --- a/tkey-mpc-web/tkey-mpc-react-popup-example/src/tkey.ts +++ b/tkey-mpc-web/tkey-mpc-react-popup-example/src/tkey.ts @@ -2,12 +2,14 @@ import ThresholdKey from "@tkey-mpc/core"; import { TorusServiceProvider } from "@tkey-mpc/service-provider-torus"; import { TorusStorageLayer } from "@tkey-mpc/storage-layer-torus"; import { ShareSerializationModule } from "@tkey-mpc/share-serialization"; +import { TORUS_SAPPHIRE_NETWORK } from "@toruslabs/constants"; + // Configuration of Service Provider const torusSp = new TorusServiceProvider({ useTSS: true, customAuthArgs: { - network: "sapphire_devnet", + network: TORUS_SAPPHIRE_NETWORK.SAPPHIRE_MAINNET, web3AuthClientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // anything will work on localhost, but get one valid clientID before hosting, from https://dashboard.web3auth.io baseUrl: `${window.location.origin}/serviceworker`, enableLogging: true,