reverse-mirage
Advanced tools
Comparing version 0.1.1 to 0.1.3
import type { BigIntIsh, Currency, CurrencyAmount, Fraction } from "./types.js"; | ||
export declare const scaleUp: (currency: Currency, amount: bigint) => bigint; | ||
export declare const scaleDown: (currency: Currency, amount: bigint) => bigint; | ||
export declare const isCurrencyAmount: <TCurrency extends Currency>(x: BigIntIsh | CurrencyAmount<TCurrency>) => x is CurrencyAmount<TCurrency>; | ||
export declare const isCurrencyAmount: <TCurrency extends Currency>(x: CurrencyAmount<TCurrency> | BigIntIsh) => x is CurrencyAmount<TCurrency>; | ||
export declare const makeCurrencyAmountFromString: <TCurrency extends Currency>(currency: TCurrency, amount: string) => CurrencyAmount<TCurrency>; | ||
@@ -6,0 +6,0 @@ export declare const makeCurrencyAmountFromFraction: <TCurrency extends Currency>(currency: TCurrency, amount: Fraction) => CurrencyAmount<TCurrency>; |
{ | ||
"name": "reverse-mirage", | ||
"version": "0.1.1", | ||
"version": "0.1.3", | ||
"description": "", | ||
"type": "module", | ||
"main": "./dist/cjs/index.js", | ||
"module": "./dist/esm/index.js", | ||
"sideEffects": false, | ||
"module": "./dist/index.js", | ||
"types": "./dist/types/index.d.ts", | ||
@@ -24,4 +24,3 @@ "typings": "./dist/types/index.d.ts", | ||
"types": "./dist/types/index.d.ts", | ||
"import": "./dist/esm/index.js", | ||
"default": "./dist/cjs/index.js" | ||
"import": "./dist/index.js" | ||
} | ||
@@ -33,3 +32,3 @@ }, | ||
"peerDependencies": { | ||
"viem": ">=0.3.35" | ||
"viem": ">=1" | ||
}, | ||
@@ -42,3 +41,4 @@ "devDependencies": { | ||
"rome": "^12.1.3", | ||
"typescript": "^5.1.6", | ||
"typescript": "^5.0.4", | ||
"viem": "^1.3.0", | ||
"vitest": "^0.33.0" | ||
@@ -49,6 +49,3 @@ }, | ||
"bench:ci": "CI=true vitest bench", | ||
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", | ||
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir ./dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'", | ||
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir ./dist/esm && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'", | ||
"build:types": "tsc --project tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", | ||
"build": "tsc --outdir ./dist", | ||
"format": "rome format . --write", | ||
@@ -55,0 +52,0 @@ "lint": "rome check .", |
import type { Currency, NativeCurrency, Token } from "./types.js"; | ||
import invariant from "tiny-invariant"; | ||
import { isAddressEqual } from "viem"; | ||
@@ -23,5 +24,3 @@ /** | ||
a.decimals === b.decimals && | ||
(isToken(a) | ||
? a.address.toLowerCase() === (b as Token).address.toLowerCase() | ||
: true) | ||
(isToken(a) ? isAddressEqual(a.address, (b as Token).address) : true) | ||
); | ||
@@ -28,0 +27,0 @@ }; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104779
8
62
2187
1