@@ -306,8 +306,8 @@ following functions:
306306### Example Usage
307307
308308``` typescript title="web3AuthProviderProps.ts"
309- import { Web3AuthContextConfig } from " @web3auth/no- modal-react-hooks" ;
310- import { Web3AuthNoModalOptions } from " @web3auth/no- modal" ;
309+ import { Web3AuthContextConfig } from " @web3auth/modal-react-hooks" ;
310+ import { Web3AuthOptions } from " @web3auth/modal" ;
311311import { EthereumPrivateKeyProvider } from " @web3auth/ethereum-provider" ;
312312import { CHAIN_NAMESPACES , WEB3AUTH_NETWORK } from " @web3auth/base" ;
313313import { OpenloginAdapter } from " @web3auth/openlogin-adapter" ;
@@ -330,66 +330,14 @@ const privateKeyProvider = new EthereumPrivateKeyProvider({
330330 },
331331});
332332
333- const web3AuthOptions: Web3AuthNoModalOptions = {
333+ const web3AuthOptions: Web3AuthOptions = {
334334 clientId:
335335 " BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ" ,
336336 web3AuthNetwork: WEB3AUTH_NETWORK .SAPPHIRE_MAINNET ,
337- enableLogging: true ,
338- chainConfig ,
339- storageKey: " local" ,
340- sessionTime: 86400 , // 1 day
341337 privateKeyProvider: privateKeyProvider ,
342- uiConfig: {
343- uxMode: " redirect" ,
344- appName: " W3A Heroes" ,
345- appUrl: " https://web3auth.io/" ,
346- theme: {
347- primary: " #7ed6df" ,
348- },
349- logoLight: " https://web3auth.io/images/web3authlog.png" ,
350- logoDark: " https://web3auth.io/images/web3authlogodark.png" ,
351- defaultLanguage: " en" , // en, de, ja, ko, zh, es, fr, pt, nl, tr
352- mode: " auto" , // whether to enable dark mode. defaultValue: auto
353- useLogoLoader: true ,
354- },
355338};
356339
357- const openloginAdapter = new OpenloginAdapter ({
358- loginSettings: {
359- mfaLevel: " optional" ,
360- },
361- adapterSettings: {
362- uxMode: " redirect" , // "redirect" | "popup"
363- whiteLabel: {
364- logoLight: " https://web3auth.io/images/web3authlog.png" ,
365- logoDark: " https://web3auth.io/images/web3authlogodark.png" ,
366- defaultLanguage: " en" , // en, de, ja, ko, zh, es, fr, pt, nl, tr
367- mode: " dark" , // whether to enable dark, light or auto mode. defaultValue: auto [ system theme]
368- },
369- mfaSettings: {
370- deviceShareFactor: {
371- enable: true ,
372- priority: 1 ,
373- mandatory: true ,
374- },
375- backUpShareFactor: {
376- enable: true ,
377- priority: 2 ,
378- mandatory: false ,
379- },
380- socialBackupFactor: {
381- enable: true ,
382- priority: 3 ,
383- mandatory: false ,
384- },
385- passwordFactor: {
386- enable: true ,
387- priority: 4 ,
388- mandatory: true ,
389- },
390- },
391- },
392- });
340+ const openloginAdapter = new OpenloginAdapter ();
393341
394342const walletServicesPlugin = new WalletServicesPlugin ({
395343 wsEmbedOpts: {},
0 commit comments