mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-26 23:57:48 +03:00
@@ -1,11 +1,10 @@
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
import { TypedDataSigner } from '@ethersproject/abstract-signer';
|
||||
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 ORDER_TYPES from '../constants/orderTypes';
|
||||
import { Order, SignedOrder, SupportedChainId } from '../types';
|
||||
import { type Order, type SignedOrder, type SupportedChainId } from '../types';
|
||||
import normalizeNumber from '../utils/normalizeNumber';
|
||||
import getDomainData from './getDomainData';
|
||||
import hashOrder from './hashOrder';
|
||||
@@ -74,7 +73,7 @@ export const signOrder = async (
|
||||
// "Signature's v was always send as 27 or 28, but from Ledger was 0 or 1"
|
||||
const fixedSignature = joinSignature(splitSignature(signature));
|
||||
|
||||
if (!fixedSignature) throw new Error("Can't sign order");
|
||||
// if (!fixedSignature) throw new Error("Can't sign order");
|
||||
|
||||
const signedOrder: SignedOrder = {
|
||||
...order,
|
||||
|
||||
Reference in New Issue
Block a user