Skip to content

Commit

Permalink
change creator listing endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
borispoehland committed Sep 18, 2024
1 parent d016c15 commit f81ca77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/types/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface IMintInfoExtended extends IMintInfo {
}
}

export interface CreatorInfo {
export interface CollectionCreatorInfo {
name: string
contractAddress: string
address: string
Expand All @@ -67,6 +67,9 @@ export interface CreatorInfo {
socials?: any
id: string
listing: IMintInfoExtended[]
}

export interface CreatorInfo extends CollectionCreatorInfo {
events: IEventDoc[]
}

Expand Down
5 changes: 3 additions & 2 deletions src/users/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CollectionModule, XOXNOClient } from '..'
import type {
CollectionCreatorInfo,
CreatorInfo,
GetNFTsArgs,
IMintInfo,
Expand Down Expand Up @@ -232,10 +233,10 @@ export class UserModule {
* */
public getCreatorListings = async (
address: string
): Promise<IMintInfoExtended[]> => {
): Promise<CollectionCreatorInfo> => {
if (!isAddressValid(address)) throw new Error('Invalid address')

const response = await this.api.fetchWithTimeout<IMintInfoExtended[]>(
const response = await this.api.fetchWithTimeout<CollectionCreatorInfo>(
`/user/${address}/creator/listing`
)
return response
Expand Down

0 comments on commit f81ca77

Please sign in to comment.