-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/Delta support #183
base: master
Are you sure you want to change the base?
Feat/Delta support #183
Conversation
src/helpers/misc.ts
Outdated
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
v = 27 + (bytes[32]! >> 7); | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
bytes[32]! &= 0x7f; // Clear the highest bit | ||
} else { | ||
// Extract v directly for 65-byte signature | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
v = bytes[64]!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it expected that I don't have linter errors here without disabling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strangely, I also don't have errors anymore 🤷
import type { Address, ConstructFetchInput } from '../../types'; | ||
import type { ParaswapDeltaAuction } from './helpers/types'; | ||
|
||
type OrderFromAPI = Omit<ParaswapDeltaAuction, 'signature'>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed, API now return a new orderHash
field. Was added most likely with V2 release
src/methods/delta/postDeltaOrder.ts
Outdated
import { DeltaAuctionOrder, ParaswapDeltaAuction } from './helpers/types'; | ||
|
||
export type DeltaOrderToPost = { | ||
partner?: string; // @TODO not sure if this is optional, need to check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indeed optional, just checked
'anon'
is assigned if not specified during /post
src/sdk/simple.ts
Outdated
@@ -117,16 +145,25 @@ export type NFTOrdersFetchMethods = GetNFTOrdersContractFunctions & | |||
PostNFTOrderFunctions & | |||
BuildNFTOrdersTxFunctions; | |||
|
|||
export type DeltaFetchMehods = BuildDeltaOrderFunctions & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export type DeltaFetchMehods = BuildDeltaOrderFunctions & | |
export type DeltaFetchMethods = BuildDeltaOrderFunctions & |
src/index.ts
Outdated
@@ -256,11 +313,27 @@ export type { | |||
BuildNFTOrderInput, | |||
BuildNFTOrderDataInput, | |||
NFTOrdersUserParams, | |||
//types for Delta methos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//types for Delta methos | |
//types for Delta methods |
tests/test.testX.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most likely this is left over from previous branches.
as discussed, let's cleanup this
Adding support for Delta v2
closes FRNT-847