Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 0d43b4d

Browse files
committed
use BigInt.fromString
1 parent ee28289 commit 0d43b4d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Features/Swap/Sources/ViewModels/SwapSceneViewModel.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,7 @@ extension SwapSceneViewModel {
377377
}
378378

379379
private func applyAccumulatedQuotes(_ accumulated: inout [SwapperQuote]) {
380-
let sorted = try? accumulated.sorted { try BigInt.from(string: $0.toValue) > BigInt.from(string: $1.toValue) }
381-
accumulated = sorted ?? accumulated
380+
accumulated.sort { BigInt.fromString($0.toValue) > BigInt.fromString($1.toValue) }
382381
swapState.quotes = .data(accumulated)
383382
selectedSwapQuote = accumulated.first
384383
if let selectedSwapQuote, let asset = toAsset?.asset {

0 commit comments

Comments
 (0)