Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@web3modal/react

Package Overview
Dependencies
Maintainers
4
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3modal/react - npm Package Compare versions

Comparing version 2.2.0-02f443d to 2.2.0-17f140d

5

dist/_types/src/components/Web3Modal.d.ts

@@ -1,4 +0,4 @@

/// <reference types="react" />
import type { ConfigCtrlState, ThemeCtrlState } from '@web3modal/core';
import type { EthereumClient } from '@web3modal/ethereum';
import React from 'react';
/**

@@ -13,3 +13,4 @@ * Props

*/
export declare function Web3Modal({ ethereumClient, ...config }: Props): JSX.Element;
declare function CreateWeb3Modal({ ethereumClient, ...config }: Props): JSX.Element;
export declare const Web3Modal: React.MemoExoticComponent<typeof CreateWeb3Modal>;
export {};

2

dist/index.js

@@ -1,2 +0,2 @@

import c,{useCallback as C,useEffect as i,useState as d}from"react";import{ThemeCtrl as a,ClientCtrl as P,ConfigCtrl as g,OptionsCtrl as h,ModalCtrl as o}from"@web3modal/core";var E=Object.defineProperty,p=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,u=(t,e,r)=>e in t?E(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,I=(t,e)=>{for(var r in e||(e={}))M.call(e,r)&&u(t,r,e[r]);if(p)for(var r of p(e))S.call(e,r)&&u(t,r,e[r]);return t};function Y(t){return c.createElement("w3m-core-button",I({},t))}var T=Object.defineProperty,f=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,s=(t,e,r)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||(e={}))W.call(e,r)&&s(t,r,e[r]);if(f)for(var r of f(e))k.call(e,r)&&s(t,r,e[r]);return t};function D(t){return c.createElement("w3m-modal",x({},t))}var V=Object.defineProperty,B=Object.defineProperties,L=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,v=(t,e,r)=>e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N=(t,e)=>{for(var r in e||(e={}))j.call(e,r)&&v(t,r,e[r]);if(l)for(var r of l(e))$.call(e,r)&&v(t,r,e[r]);return t},U=(t,e)=>B(t,L(e)),q=(t,e)=>{var r={};for(var n in t)j.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&l)for(var n of l(t))e.indexOf(n)<0&&$.call(t,n)&&(r[n]=t[n]);return r};function Z(t){var e=t,{ethereumClient:r}=e,n=q(e,["ethereumClient"]);const b=C(async()=>{a.setThemeConfig(n),r&&P.setEthereumClient(r),g.setConfig(U(N({},n),{walletConnectVersion:r?.walletConnectVersion})),await import("@web3modal/ui"),h.setIsUiLoaded(!0)},[r,n]);return i(()=>{b()},[b]),c.createElement(D,null)}var z=Object.defineProperty,m=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,G=(t,e)=>{for(var r in e||(e={}))A.call(e,r)&&y(t,r,e[r]);if(m)for(var r of m(e))F.call(e,r)&&y(t,r,e[r]);return t};function _(t){return c.createElement("w3m-network-switch",G({},t))}var H=Object.defineProperty,O=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,w=(t,e,r)=>e in t?H(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Q=(t,e)=>{for(var r in e||(e={}))J.call(e,r)&&w(t,r,e[r]);if(O)for(var r of O(e))K.call(e,r)&&w(t,r,e[r]);return t};function ee(){const[t,e]=d(o.state);return i(()=>{const r=o.subscribe(n=>e(Q({},n)));return()=>{r()}},[]),{isOpen:t.open,open:o.open,close:o.close,setDefaultChain:h.setSelectedChain}}function re(){const[t,e]=d({themeMode:a.state.themeMode});return i(()=>{const r=a.subscribe(n=>e({themeMode:n.themeMode}));return()=>{r()}},[]),{theme:t,setTheme:a.setThemeConfig}}export{Y as Web3Button,Z as Web3Modal,_ as Web3NetworkSwitch,ee as useWeb3Modal,re as useWeb3ModalTheme};
import c,{memo as C,useCallback as P,useEffect as i,useState as d}from"react";import{ThemeCtrl as a,ClientCtrl as g,ConfigCtrl as E,OptionsCtrl as h,ModalCtrl as o}from"@web3modal/core";var M=Object.defineProperty,p=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,u=(t,e,r)=>e in t?M(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T=(t,e)=>{for(var r in e||(e={}))S.call(e,r)&&u(t,r,e[r]);if(p)for(var r of p(e))I.call(e,r)&&u(t,r,e[r]);return t};function _(t){return c.createElement("w3m-core-button",T({},t))}var W=Object.defineProperty,f=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,s=(t,e,r)=>e in t?W(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||(e={}))k.call(e,r)&&s(t,r,e[r]);if(f)for(var r of f(e))x.call(e,r)&&s(t,r,e[r]);return t};function V(t){return c.createElement("w3m-modal",D({},t))}var B=Object.defineProperty,L=Object.defineProperties,N=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,v=(t,e,r)=>e in t?B(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,U=(t,e)=>{for(var r in e||(e={}))j.call(e,r)&&v(t,r,e[r]);if(l)for(var r of l(e))$.call(e,r)&&v(t,r,e[r]);return t},q=(t,e)=>L(t,N(e)),z=(t,e)=>{var r={};for(var n in t)j.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&l)for(var n of l(t))e.indexOf(n)<0&&$.call(t,n)&&(r[n]=t[n]);return r};function A(t){var e=t,{ethereumClient:r}=e,n=z(e,["ethereumClient"]);const b=P(async()=>{a.setThemeConfig(n),r&&g.setEthereumClient(r),E.setConfig(q(U({},n),{walletConnectVersion:r?.walletConnectVersion})),await import("@web3modal/ui"),h.setIsUiLoaded(!0)},[r,n]);return i(()=>{b()},[b]),c.createElement(V,null)}const ee=C(A);var F=Object.defineProperty,m=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,J=(t,e)=>{for(var r in e||(e={}))G.call(e,r)&&y(t,r,e[r]);if(m)for(var r of m(e))H.call(e,r)&&y(t,r,e[r]);return t};function re(t){return c.createElement("w3m-network-switch",J({},t))}var K=Object.defineProperty,O=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,w=(t,e,r)=>e in t?K(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,X=(t,e)=>{for(var r in e||(e={}))Q.call(e,r)&&w(t,r,e[r]);if(O)for(var r of O(e))R.call(e,r)&&w(t,r,e[r]);return t};function te(){const[t,e]=d(o.state);return i(()=>{const r=o.subscribe(n=>e(X({},n)));return()=>{r()}},[]),{isOpen:t.open,open:o.open,close:o.close,setDefaultChain:h.setSelectedChain}}function ne(){const[t,e]=d({themeMode:a.state.themeMode});return i(()=>{const r=a.subscribe(n=>e({themeMode:n.themeMode}));return()=>{r()}},[]),{theme:t,setTheme:a.setThemeConfig}}export{_ as Web3Button,ee as Web3Modal,re as Web3NetworkSwitch,te as useWeb3Modal,ne as useWeb3ModalTheme};
//# sourceMappingURL=index.js.map
{
"name": "@web3modal/react",
"version": "2.2.0-02f443d",
"version": "2.2.0-17f140d",
"main": "dist/index.js",

@@ -19,4 +19,4 @@ "type": "module",

"dependencies": {
"@web3modal/core": "2.2.0-02f443d",
"@web3modal/ui": "2.2.0-02f443d"
"@web3modal/core": "2.2.0-17f140d",
"@web3modal/ui": "2.2.0-17f140d"
},

@@ -26,3 +26,3 @@ "devDependencies": {

"@types/react-dom": "18.0.11",
"@web3modal/ethereum": "2.2.0-02f443d",
"@web3modal/ethereum": "2.2.0-17f140d",
"eslint-plugin-react": "7.32.2",

@@ -29,0 +29,0 @@ "eslint-plugin-react-hooks": "4.6.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc