@reservoir0x/reservoir-sdk
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -90,3 +90,3 @@ var $lPQI4$etherslibutils = require("ethers/lib/utils"); | ||
var $134f7602d1733f79$exports = {}; | ||
$134f7602d1733f79$exports = JSON.parse('{"name":"@reservoir0x/reservoir-sdk","version":"0.6.3","description":"An SDK that can be used in any javascript/typescript context to easily interact with Reservoir liquidity APIs","source":"src/index.ts","main":"dist/index.js","module":"dist/index.module.js","types":"dist/index.d.ts","author":"Reservoir Protocol","license":"MIT","files":["dist"],"scripts":{"clean":"rm -rf dist","version":"yarn version","version:package":"sh ../../scripts/package-version.sh","version:update":"yarn version ${0}; PACKAGE_VERSION=$(yarn version:package); git add -A; git commit -m \\"\uD83C\uDF89 Release client package v$PACKAGE_VERSION\\"; git push","syncApi":"node ./sync-api.mjs","changelog":"node ../../scripts/generate-changelog.js package=sdk"},"repository":{"type":"git","url":"https://github.com/reservoirprotocol/reservoir-kit"},"sideEffects":false,"keywords":["nft","reservoir","reservoir-sdk","reservoirkit","protocol","sdk"],"peerDependencies":{"ethers":"^5.6.1"},"dependencies":{"axios":"^0.27.2"},"publishConfig":{"access":"public"},"devDependencies":{"openapi-typescript":"^5.4.1"}}'); | ||
$134f7602d1733f79$exports = JSON.parse('{"name":"@reservoir0x/reservoir-sdk","version":"0.6.4","description":"An SDK that can be used in any javascript/typescript context to easily interact with Reservoir liquidity APIs","source":"src/index.ts","main":"dist/index.js","module":"dist/index.module.js","types":"dist/index.d.ts","author":"Reservoir Protocol","license":"MIT","files":["dist"],"scripts":{"clean":"rm -rf dist","version":"yarn version","version:package":"sh ../../scripts/package-version.sh","version:update":"yarn version ${0}; PACKAGE_VERSION=$(yarn version:package); git add -A; git commit -m \\"\uD83C\uDF89 Release client package v$PACKAGE_VERSION\\"; git push","syncApi":"node ./sync-api.mjs","changelog":"node ../../scripts/generate-changelog.js package=sdk"},"repository":{"type":"git","url":"https://github.com/reservoirprotocol/reservoir-kit"},"sideEffects":false,"keywords":["nft","reservoir","reservoir-sdk","reservoirkit","protocol","sdk"],"peerDependencies":{"ethers":"^5.6.1"},"dependencies":{"axios":"^0.27.2"},"publishConfig":{"access":"public"},"devDependencies":{"openapi-typescript":"^5.4.1"}}'); | ||
@@ -116,5 +116,6 @@ | ||
// than expected when buying and selling for less than expected | ||
if (json1.path && expectedPrice) { | ||
const quote = json1.path.reduce((total, path)=>{ | ||
total += path.quote || 0; | ||
const path = json1.path; | ||
if (path && expectedPrice) { | ||
const quote1 = path.reduce((total, { quote: quote , buyInQuote: buyInQuote })=>{ | ||
total += buyInQuote || quote || 0; | ||
return total; | ||
@@ -124,10 +125,10 @@ }, 0); | ||
let error = null; | ||
if (isSell && Number((quote - expectedPrice).toFixed(6)) < -0.00001) error = { | ||
if (isSell && Number((quote1 - expectedPrice).toFixed(6)) < -0.00001) error = { | ||
type: "price mismatch", | ||
message: `Attention: the offer price of this token is now ${quote}` | ||
message: `Attention: the offer price of this token is now ${quote1}` | ||
}; | ||
// Check if the user is buying | ||
if (isBuy && Number((quote - expectedPrice).toFixed(6)) > 0.00001) error = { | ||
if (isBuy && Number((quote1 - expectedPrice).toFixed(6)) > 0.00001) error = { | ||
type: "price mismatch", | ||
message: `Attention: the price of this token is now ${quote}` | ||
message: `Attention: the price of this token is now ${quote1}` | ||
}; | ||
@@ -134,0 +135,0 @@ if (error) { |
@@ -87,3 +87,3 @@ import {arrayify as $9C8uf$arrayify} from "ethers/lib/utils"; | ||
var $d3dd819ecb91ce83$exports = {}; | ||
$d3dd819ecb91ce83$exports = JSON.parse('{"name":"@reservoir0x/reservoir-sdk","version":"0.6.3","description":"An SDK that can be used in any javascript/typescript context to easily interact with Reservoir liquidity APIs","source":"src/index.ts","main":"dist/index.js","module":"dist/index.module.js","types":"dist/index.d.ts","author":"Reservoir Protocol","license":"MIT","files":["dist"],"scripts":{"clean":"rm -rf dist","version":"yarn version","version:package":"sh ../../scripts/package-version.sh","version:update":"yarn version ${0}; PACKAGE_VERSION=$(yarn version:package); git add -A; git commit -m \\"\uD83C\uDF89 Release client package v$PACKAGE_VERSION\\"; git push","syncApi":"node ./sync-api.mjs","changelog":"node ../../scripts/generate-changelog.js package=sdk"},"repository":{"type":"git","url":"https://github.com/reservoirprotocol/reservoir-kit"},"sideEffects":false,"keywords":["nft","reservoir","reservoir-sdk","reservoirkit","protocol","sdk"],"peerDependencies":{"ethers":"^5.6.1"},"dependencies":{"axios":"^0.27.2"},"publishConfig":{"access":"public"},"devDependencies":{"openapi-typescript":"^5.4.1"}}'); | ||
$d3dd819ecb91ce83$exports = JSON.parse('{"name":"@reservoir0x/reservoir-sdk","version":"0.6.4","description":"An SDK that can be used in any javascript/typescript context to easily interact with Reservoir liquidity APIs","source":"src/index.ts","main":"dist/index.js","module":"dist/index.module.js","types":"dist/index.d.ts","author":"Reservoir Protocol","license":"MIT","files":["dist"],"scripts":{"clean":"rm -rf dist","version":"yarn version","version:package":"sh ../../scripts/package-version.sh","version:update":"yarn version ${0}; PACKAGE_VERSION=$(yarn version:package); git add -A; git commit -m \\"\uD83C\uDF89 Release client package v$PACKAGE_VERSION\\"; git push","syncApi":"node ./sync-api.mjs","changelog":"node ../../scripts/generate-changelog.js package=sdk"},"repository":{"type":"git","url":"https://github.com/reservoirprotocol/reservoir-kit"},"sideEffects":false,"keywords":["nft","reservoir","reservoir-sdk","reservoirkit","protocol","sdk"],"peerDependencies":{"ethers":"^5.6.1"},"dependencies":{"axios":"^0.27.2"},"publishConfig":{"access":"public"},"devDependencies":{"openapi-typescript":"^5.4.1"}}'); | ||
@@ -113,5 +113,6 @@ | ||
// than expected when buying and selling for less than expected | ||
if (json1.path && expectedPrice) { | ||
const quote = json1.path.reduce((total, path)=>{ | ||
total += path.quote || 0; | ||
const path = json1.path; | ||
if (path && expectedPrice) { | ||
const quote1 = path.reduce((total, { quote: quote , buyInQuote: buyInQuote })=>{ | ||
total += buyInQuote || quote || 0; | ||
return total; | ||
@@ -121,10 +122,10 @@ }, 0); | ||
let error = null; | ||
if (isSell && Number((quote - expectedPrice).toFixed(6)) < -0.00001) error = { | ||
if (isSell && Number((quote1 - expectedPrice).toFixed(6)) < -0.00001) error = { | ||
type: "price mismatch", | ||
message: `Attention: the offer price of this token is now ${quote}` | ||
message: `Attention: the offer price of this token is now ${quote1}` | ||
}; | ||
// Check if the user is buying | ||
if (isBuy && Number((quote - expectedPrice).toFixed(6)) > 0.00001) error = { | ||
if (isBuy && Number((quote1 - expectedPrice).toFixed(6)) > 0.00001) error = { | ||
type: "price mismatch", | ||
message: `Attention: the price of this token is now ${quote}` | ||
message: `Attention: the price of this token is now ${quote1}` | ||
}; | ||
@@ -131,0 +132,0 @@ if (error) { |
{ | ||
"name": "@reservoir0x/reservoir-sdk", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "An SDK that can be used in any javascript/typescript context to easily interact with Reservoir liquidity APIs", | ||
@@ -5,0 +5,0 @@ "source": "src/index.ts", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
717942
10251