Socket
Socket
Sign inDemoInstall

@dynamic-labs/utils

Package Overview
Dependencies
Maintainers
0
Versions
493
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynamic-labs/utils - npm Package Compare versions

Comparing version 2.5.2 to 2.5.3

6

package.json
{
"name": "@dynamic-labs/utils",
"version": "2.5.2",
"version": "2.5.3",
"repository": {

@@ -31,4 +31,4 @@ "type": "git",

"tldts": "6.0.16",
"@dynamic-labs/logger": "2.5.2",
"@dynamic-labs/types": "2.5.2",
"@dynamic-labs/logger": "2.5.3",
"@dynamic-labs/types": "2.5.3",
"buffer": "6.0.3",

@@ -35,0 +35,0 @@ "stream": "0.0.2"

'use client'
import * as chains from 'viem/chains';
import { logger } from './logger/logger.js';

@@ -41,12 +42,17 @@ // eslint-disable-next-line import/no-namespace

const getOrMapViemChain = (network) => {
let chain;
let viemChain;
try {
chain = getChain(network.chainId);
viemChain = getChain(network.chainId);
}
catch (_a) {
chain = mapChain(network);
logger.debug(`Chain with id ${network.chainId} not found in viem's chains`);
}
return chain;
const mappedChain = mapChain(network);
if (!viemChain) {
return mappedChain;
}
// even if a chain is found in viem's chains, we still want to overwrite some values
return Object.assign(Object.assign({}, viemChain), mappedChain);
};
export { getChain, getOrMapViemChain, mapChain };

Sorry, the diff of this file is too big to display

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