diff --git a/packages/sdk/src/instant-trade/InstantTradeBuyerTxBuilder.ts b/packages/sdk/src/instant-trade/InstantTradeBuyerTxBuilder.ts index eab15d1f..76bab690 100644 --- a/packages/sdk/src/instant-trade/InstantTradeBuyerTxBuilder.ts +++ b/packages/sdk/src/instant-trade/InstantTradeBuyerTxBuilder.ts @@ -64,6 +64,8 @@ export default class InstantTradeBuyerTxBuilder extends InstantTradeBuilder { private decodeRoyalty() { const royaltyOutput = (this.sellerPSBT.data.globalMap.unsignedTx as any).tx.outs[1] + if (!royaltyOutput) return + const scriptPayload = getScriptType(royaltyOutput.script, this.network).payload const amount = royaltyOutput && royaltyOutput.value >= MINIMUM_AMOUNT_IN_SATS ? royaltyOutput.value : 0 const receiver = scriptPayload ? scriptPayload.address : null