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

@exodus/currency

Package Overview
Dependencies
Maintainers
0
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/currency - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

13

package.json
{
"name": "@exodus/currency",
"version": "5.0.1",
"version": "5.0.2",
"description": "Currency support.",

@@ -16,3 +16,2 @@ "type": "module",

"@exodus/bigint": "^3.0.0",
"bn.js": "^5.2.1",
"lodash": "^4.17.11",

@@ -22,9 +21,7 @@ "minimalistic-assert": "^1.0.1"

"devDependencies": {
"jest": "^29.3.1"
"bn.js": "^5.2.1"
},
"scripts": {
"test:native-bigint": "run -T jest --selectProjects native-bigint",
"test:bn.js": "run -T jest --selectProjects bn.js",
"test": "run -T jest",
"lint": "eslint . --ignore-path ../../.gitignore",
"test": "run -T exodus-test --jest '**/__tests__/**/?(*.)+(spec|test).(t|j)s?(x)'",
"lint": "run -T eslint . --ignore-path ../../.gitignore",
"lint:fix": "yarn lint --fix"

@@ -39,3 +36,3 @@ },

},
"gitHead": "a37317af4caf9e14cf8c097c145736964ebfaf53"
"gitHead": "f5906d21aa52794b881bac338655f838bc4f3e68"
}

@@ -1,5 +0,14 @@

import BN from 'bn.js'
import deprecationWarning from './deprecation-warning.js'
import BigIntWrapper from '@exodus/bigint'
function isMaybeBN(num) {
const BNwordSize = 26 // always have been
return (
num !== null &&
typeof num === 'object' &&
num.constructor.wordSize === BNwordSize &&
Array.isArray(num.words)
)
}
export function createNumber(num, power) {

@@ -10,3 +19,3 @@ if (num.isBigIntWrapper?.()) {

if (BN.isBN(num) && power > 0) {
if (isMaybeBN(num) && power > 0) {
// throwing error because this convo truncated zeros incorrectly.

@@ -43,3 +52,3 @@ throw new Error(

num = num.toLowerCase()
} else if (BN.isBN(num)) {
} else if (isMaybeBN(num)) {
num = num.toString()

@@ -46,0 +55,0 @@ } else if (typeof num === 'bigint') {

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