Small updates

This commit is contained in:
Mikhail Gladchenko
2023-03-02 14:13:20 +00:00
parent 853f6b5a13
commit dbeb271e5d
2 changed files with 16 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.17.25-rc.6",
"version": "0.17.25-rc.7",
"description": "Orion Protocol SDK",
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",

View File

@@ -30,21 +30,21 @@ export const signCFDOrder = async (
const nonce = Date.now();
const expiration = nonce + DEFAULT_EXPIRATION;
console.log('price', price);
console.log('price to string', price.toString());
console.log('normalizeNumber', normalizeNumber(
price,
INTERNAL_ORION_PRECISION,
BigNumber.ROUND_FLOOR,
).toNumber());
console.log('stopPrice', stopPrice);
console.log('stopPrice to string', stopPrice?.toString());
console.log('new BigNumber(stopPrice).toNumber()', new BigNumber(stopPrice ?? 0).toNumber());
console.log('normalizeNumber', normalizeNumber(
stopPrice ?? 0,
INTERNAL_ORION_PRECISION,
BigNumber.ROUND_FLOOR,
).toNumber());
// console.log('price', price);
// console.log('price to string', price.toString());
// console.log('normalizeNumber', normalizeNumber(
// price,
// INTERNAL_ORION_PRECISION,
// BigNumber.ROUND_FLOOR,
// ).toNumber());
// console.log('stopPrice', stopPrice);
// console.log('stopPrice to string', stopPrice?.toString());
// console.log('new BigNumber(stopPrice).toNumber()', new BigNumber(stopPrice ?? 0).toNumber());
// console.log('normalizeNumber', normalizeNumber(
// stopPrice ?? 0,
// INTERNAL_ORION_PRECISION,
// BigNumber.ROUND_FLOOR,
// ).toNumber());
// console.log('ethers.BigNumber.from(stopPrice)', ethers.BigNumber.from(stopPrice?.toString()));
// console.log('ethers.BigNumber.from(stopPrice).toNumber()', ethers.BigNumber.from(stopPrice?.toString()).toNumber());