Skip to content

Commit

Permalink
[sdk] add getNftPurchasePayload
Browse files Browse the repository at this point in the history
LIQ-1191
  • Loading branch information
RustySol committed Jan 9, 2023
1 parent 713dd2e commit b8a4bd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/sdk/src/factory/conveyor/eth/EthereumPort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ export class EthereumPort {
};
}

async getShopByUuid(uuid: string): Promise<{ result: ShopResponse }> {
getShopByUuid(uuid: string): Promise<{ result: ShopResponse }> {
return axiosInstance.get(`${this.apiPath}/shop/${uuid}`).then((res) => res.data);
}

async getOrderByUuid(uuid: string): Promise<OrderResponse> {
getOrderByUuid(uuid: string): Promise<OrderResponse> {
return axiosInstance.get(`${this.apiPath}/order/${uuid}`).then((res) => res.data.result);
}

async getFulfillOrderPayloadByUuid(uuid: string, buyerAddress: string): Promise<OrderPayloadResponse> {
getFulfillOrderPayloadByUuidAndBuyerAddress(uuid: string, buyerAddress: string): Promise<OrderPayloadResponse> {
return axiosInstance
.get(`${this.apiPath}/order/payload/${uuid}/buyer/${buyerAddress}`)
.then((res) => res.data.result);
Expand Down
5 changes: 5 additions & 0 deletions core/sdk/src/shop/eth/EthCandyShop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,9 @@ export class EthCandyShop extends BaseShop {
const txHash = await this.ethereumPort.cancelOrder(wallet, orderUuid);
return txHash;
}

getNftPurchasePayload(params: { buyerAddress: string; orderUuid: string }) {
const { buyerAddress, orderUuid } = params;
return this.ethereumPort.getFulfillOrderPayloadByUuidAndBuyerAddress(orderUuid, buyerAddress);
}
}

0 comments on commit b8a4bd5

Please sign in to comment.