From ef6631bef460b41bb3f23b3297375e89fdac59b7 Mon Sep 17 00:00:00 2001 From: Nishant Ghodke Date: Thu, 28 Sep 2023 13:06:03 +0530 Subject: [PATCH] fix: fetch all inscriptions to find by outpoint --- packages/sdk/src/instant-trade/InstantTradeBuilder.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/sdk/src/instant-trade/InstantTradeBuilder.ts b/packages/sdk/src/instant-trade/InstantTradeBuilder.ts index b1c458a0..8ed49dbe 100644 --- a/packages/sdk/src/instant-trade/InstantTradeBuilder.ts +++ b/packages/sdk/src/instant-trade/InstantTradeBuilder.ts @@ -66,7 +66,8 @@ export default class InstantTradeBuilder extends PSBTBuilder { throw new Error("set inscription outpoint to the class") } - this.inscription = await this.datasource.getInscription(this.inscriptionOutpoint) + const inscriptions = await this.datasource.getInscriptions({ outpoint: this.inscriptionOutpoint }) + this.inscription = inscriptions.find((inscription) => inscription.outpoint === this.inscriptionOutpoint) if (!this.inscription) { throw new Error("Inscription not found") }