Skip to content

Commit

Permalink
Merge pull request Anastasia-Labs#124 from Anastasia-Labs/fix/toSorted
Browse files Browse the repository at this point in the history
fix: remove toSorted function, use normal sort
  • Loading branch information
solidsnakedev authored May 30, 2024
2 parents c079bb5 + 25b0416 commit 7d957be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/hip-peas-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lucid-evolution/utils": patch
---

remove toSorted function, use normal sort
2 changes: 1 addition & 1 deletion packages/utils/src/utxo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const sortUTxOs = (
utxos: UTxO[],
order: "ascending" | "descending" = "descending",
): UTxO[] => {
return utxos.toSorted((a, b) => {
return [...utxos].sort((a, b) => {
if (a.assets["lovelace"] > b.assets["lovelace"]) {
return order === "ascending" ? 1 : -1;
}
Expand Down

0 comments on commit 7d957be

Please sign in to comment.