update domainData chainId type

This commit is contained in:
TheJuze
2024-05-23 21:12:01 +03:00
parent fd81062fe4
commit 15da8fef89
5 changed files with 6 additions and 6 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@orionprotocol/sdk",
"version": "0.21.0-rc17",
"version": "0.21.0-rc18",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@orionprotocol/sdk",
"version": "0.21.0-rc17",
"version": "0.21.0-rc18",
"hasInstallScript": true,
"license": "ISC",
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.21.0-rc17",
"version": "0.21.0-rc18",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -1,5 +1,5 @@
export const LOCK_ORDER_TYPES = {
Order: [
LockOrder: [
{ name: 'sender', type: 'address' },
{ name: 'expiration', type: 'uint64' },
{ name: 'asset', type: 'address' },

View File

@@ -19,7 +19,7 @@ function removeUndefined<T>(obj: Record<string, T | undefined>) {
*/
const getDomainData = (chainId: SupportedChainId) => ({
...removeUndefined(EIP712Domain),
chainId,
chainId: Number(chainId), // check if it broke
});
export default getDomainData;

View File

@@ -1,5 +1,5 @@
import { ethers } from 'ethers';
import type { LockOrder, SignedLockOrder, SupportedChainId } from '../types.js';
import type { SupportedChainId, LockOrder, SignedLockOrder } from '../types.js';
import getDomainData from './getDomainData.js';
import generateSecret from '../utils/generateSecret';
import { BigNumber } from 'bignumber.js';