Skip to content

Commit

Permalink
Sort transactions by purchase date
Browse files Browse the repository at this point in the history
  • Loading branch information
shimastripe committed Apr 6, 2024
1 parent 81c24bb commit 28833f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/IAPClient/AppStoreServerClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ extension AppStoreServerClient: DependencyKey {
signedTransaction))
}

items = items.sorted(by: { ($0.purchaseDate ?? .distantPast) < ($1.purchaseDate ?? .distantPast) })

return .init(
revision: response.revision, hasMore: response.hasMore,
bundleId: response.bundleId, appAppleId: response.appAppleId,
Expand Down

0 comments on commit 28833f0

Please sign in to comment.