Skip to content

Commit

Permalink
fix: remove toSorted function, use normal sort
Browse files Browse the repository at this point in the history
  • Loading branch information
solidsnakedev committed May 30, 2024
1 parent c079bb5 commit 25b0416
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 25b0416

Please sign in to comment.