Skip to content

Commit

Permalink
update addOrder; OrderFilter (#1277)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmosites authored Jan 29, 2024
1 parent beb2a45 commit 9e2dc21
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tools/libraries/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airswap/libraries",
"version": "4.2.1",
"version": "4.2.2",
"description": "AirSwap: Libraries for Developers",
"repository": {
"type": "git",
Expand Down
7 changes: 5 additions & 2 deletions tools/libraries/src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,13 @@ export class Server extends TypedEmitter<ServerEvents> {
/**
* Protocols.IndexingERC20
*/
public async addOrderERC20(fullOrder: FullOrderERC20): Promise<boolean> {
public async addOrderERC20(
order: FullOrderERC20,
tags = []
): Promise<boolean> {
try {
return Promise.resolve(
(await this.httpCall('addOrderERC20', [fullOrder])) as boolean
(await this.httpCall('addOrderERC20', [order, tags])) as boolean
)
} catch (err) {
return Promise.reject(err)
Expand Down
8 changes: 3 additions & 5 deletions tools/utils/src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@ export type SupportedProtocolInfo = {
params?: any
}

export type OrderERC20Filter = {
export type OrderFilter = {
chainId?: number
signerWallet?: string
signerToken?: string
signerId?: string
senderWallet?: string
senderToken?: string
tags?: string[]
}

export type OrderFilter = {
signerId?: string
} & OrderERC20Filter

export type OrderResponse<OrderType> = {
orders: OrderType[]
offset: number
Expand Down

0 comments on commit 9e2dc21

Please sign in to comment.