Skip to content

Commit

Permalink
Merge pull request #35 from shimastripe/improve/transaction-history
Browse files Browse the repository at this point in the history
Sort transactions by purchase date
  • Loading branch information
shimastripe authored Apr 6, 2024
2 parents dd6b466 + 28833f0 commit 587e9e9
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 587e9e9

Please sign in to comment.