Skip to content
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

Open
wants to merge 177 commits into
base: master
Choose a base branch
from
Open

Feat/Delta support #183

wants to merge 177 commits into from

Conversation

Velenir
Copy link
Member

@Velenir Velenir commented Nov 7, 2024

Adding support for Delta v2

closes FRNT-847

@Velenir Velenir marked this pull request as ready for review November 11, 2024 14:23
Base automatically changed from feat/etherV6_support to feat/web3_upgrade November 12, 2024 13:30
Base automatically changed from feat/web3_upgrade to feat/deps_update November 12, 2024 13:32
Base automatically changed from feat/deps_update to feat/viem_support November 12, 2024 13:33
Base automatically changed from feat/viem_support to feat/build_upgrade November 12, 2024 13:33
Base automatically changed from feat/build_upgrade to master November 12, 2024 13:39
Comment on lines 188 to 195
// 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]!;

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?

Copy link
Member Author

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'>;

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

import { DeltaAuctionOrder, ParaswapDeltaAuction } from './helpers/types';

export type DeltaOrderToPost = {
partner?: string; // @TODO not sure if this is optional, need to check

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

@@ -117,16 +145,25 @@ export type NFTOrdersFetchMethods = GetNFTOrdersContractFunctions &
PostNFTOrderFunctions &
BuildNFTOrdersTxFunctions;

export type DeltaFetchMehods = BuildDeltaOrderFunctions &

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//types for Delta methos
//types for Delta methods

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants