Skip to content

Commit

Permalink
sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
EzePze committed Feb 24, 2024
1 parent 1870d23 commit e1c76f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/launchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ export abstract class LaunchPad {
throw new Error("Admin datum must be in the closed state!");
}

depositedUtxos.sort((a, b) => {
let txCompare = a.txHash.localeCompare(b.txHash)
if (txCompare==0){
return a.outputIndex-b.outputIndex
}
return txCompare
})

const depositReturns = depositedUtxos.map((depositUTxO) => {
const depositDatum = Data.from(depositUTxO.datum!, SaleTypes2["_r"]);
return calculateProrata(
Expand Down

0 comments on commit e1c76f7

Please sign in to comment.