New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@web3modal/wagmi

Package Overview
Dependencies
Maintainers
11
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3modal/wagmi - npm Package Compare versions

Comparing version 4.2.2 to 4.2.3-cn-social.0

48

dist/esm/src/client.js

@@ -8,2 +8,3 @@ import { EthereumProvider, OPTIONAL_METHODS } from '@walletconnect/ethereum-provider';

import { ConstantsUtil, PresetsUtil, HelpersUtil } from '@web3modal/scaffold-utils';
import { ConstantsUtil as CommonConstants } from '@web3modal/common';
import { getCaipDefaultChain, getEmailCaipNetworks, getWalletConnectCaipNetworks } from './utils/helpers.js';

@@ -176,11 +177,20 @@ import { W3mFrameConstants, W3mFrameHelpers, W3mFrameRpcConstants } from '@web3modal/wallet';

getEnsAddress: async (value) => {
const chainId = NetworkUtil.caipNetworkIdToNumber(this.getCaipNetwork()?.id);
if (chainId !== mainnet.id) {
try {
const chainId = NetworkUtil.caipNetworkIdToNumber(this.getCaipNetwork()?.id);
let ensName = false;
let wcName = false;
if (value?.endsWith(CommonConstants.WC_NAME_SUFFIX)) {
wcName = await this.resolveWalletConnectName(value);
}
if (chainId === mainnet.id) {
ensName = await wagmiGetEnsAddress(this.wagmiConfig, {
name: normalize(value),
chainId
});
}
return ensName || wcName || false;
}
catch {
return false;
}
const address = await wagmiGetEnsAddress(this.wagmiConfig, {
name: normalize(value),
chainId
});
return address || false;
},

@@ -295,2 +305,17 @@ getEnsAvatar: async (value) => {

}
async syncWalletConnectName(address) {
try {
const registeredWcNames = await this.getWalletConnectName(address);
if (registeredWcNames[0]) {
const wcName = registeredWcNames[0];
this.setProfileName(wcName.name);
}
else {
this.setProfileName(null);
}
}
catch {
this.setProfileName(null);
}
}
async syncProfile(address, chainId) {

@@ -303,2 +328,5 @@ try {

this.setProfileImage(avatar);
if (!name) {
await this.syncWalletConnectName(address);
}
}

@@ -318,5 +346,9 @@ catch {

}
else {
await this.syncWalletConnectName(address);
this.setProfileImage(null);
}
}
else {
this.setProfileName(null);
await this.syncWalletConnectName(address);
this.setProfileImage(null);

@@ -323,0 +355,0 @@ }

@@ -36,2 +36,3 @@ import type { Chain } from '@wagmi/core/chains';

private syncNetwork;
private syncWalletConnectName;
private syncProfile;

@@ -38,0 +39,0 @@ private syncBalance;

14

package.json
{
"name": "@web3modal/wagmi",
"version": "4.2.2",
"version": "4.2.3-cn-social.0",
"type": "module",

@@ -55,8 +55,8 @@ "main": "./dist/esm/exports/index.js",

"@walletconnect/ethereum-provider": "2.13.0",
"@web3modal/polyfills": "4.2.2",
"@web3modal/scaffold": "4.2.2",
"@web3modal/scaffold-react": "4.2.2",
"@web3modal/scaffold-utils": "4.2.2",
"@web3modal/scaffold-vue": "4.2.2",
"@web3modal/siwe": "4.2.2"
"@web3modal/polyfills": "4.2.3-cn-social.0",
"@web3modal/scaffold": "4.2.3-cn-social.0",
"@web3modal/scaffold-react": "4.2.3-cn-social.0",
"@web3modal/scaffold-utils": "4.2.3-cn-social.0",
"@web3modal/scaffold-vue": "4.2.3-cn-social.0",
"@web3modal/siwe": "4.2.3-cn-social.0"
},

@@ -63,0 +63,0 @@ "devDependencies": {

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