Skip to content

Commit

Permalink
fix(sdk): update output order to ensure inscription is on 0th index (#74
Browse files Browse the repository at this point in the history
)

fix: update output to ensure inscription is on 0th index
  • Loading branch information
iamcrazycoder authored Sep 29, 2023
1 parent 112963c commit b1ef7b5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/sdk/src/transactions/Inscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ export class Inscriber extends PSBTBuilder {
]

if (!this.recovery) {
this.outputs.push({
address: this.destinationAddress || this.address,
value: this.postage
})
this.outputs = [
{
address: this.destinationAddress || this.address,
value: this.postage
}
].concat(this.outputs)
}

if (this.recovery) {
Expand Down Expand Up @@ -195,7 +197,7 @@ export class Inscriber extends PSBTBuilder {
this.initPSBT()
this.suitableUnspent = null
this.ready = false
this.outputs.pop()
this.outputs.shift()
this.previewMode = false
}
}
Expand Down

0 comments on commit b1ef7b5

Please sign in to comment.