mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-17 00:31:34 +03:00
Small updates
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.17.25-rc.5",
|
||||
"version": "0.17.25-rc.6",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/esm/index.js",
|
||||
"module": "./lib/esm/index.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { TypedDataSigner } from '@ethersproject/abstract-signer';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import { ethers } from 'ethers';
|
||||
import type { ethers } from 'ethers';
|
||||
import { joinSignature, splitSignature } from 'ethers/lib/utils';
|
||||
import { INTERNAL_ORION_PRECISION } from '../constants';
|
||||
import type { CFDOrder, SignedCFDOrder, SupportedChainId } from '../types';
|
||||
@@ -45,8 +45,8 @@ export const signCFDOrder = async (
|
||||
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());
|
||||
// console.log('ethers.BigNumber.from(stopPrice)', ethers.BigNumber.from(stopPrice?.toString()));
|
||||
// console.log('ethers.BigNumber.from(stopPrice).toNumber()', ethers.BigNumber.from(stopPrice?.toString()).toNumber());
|
||||
|
||||
const order: CFDOrder = {
|
||||
senderAddress,
|
||||
@@ -71,7 +71,7 @@ export const signCFDOrder = async (
|
||||
expiration,
|
||||
buySide: side === 'BUY' ? 1 : 0,
|
||||
stopPrice: stopPrice !== undefined
|
||||
? ethers.BigNumber.from(stopPrice?.toString()).toNumber()
|
||||
? new BigNumber(stopPrice).toNumber()
|
||||
: undefined,
|
||||
isPersonalSign: usePersonalSign,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user