Skip to content

Commit

Permalink
fix: fetch all inscriptions to find by outpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
iamcrazycoder committed Sep 28, 2023
1 parent 373a70f commit ef6631b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sdk/src/instant-trade/InstantTradeBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit ef6631b

Please sign in to comment.