PurchasesOrchestrator.handleDeferredTransaction: check NSError.domain too#1665
Merged
Conversation
cfd0ee2 to
85d3db1
Compare
86c2abb to
2ed8c36
Compare
85d3db1 to
59f6c28
Compare
See #983. This is less error-prone as it's impossible to have deadlocks, or to access the data without locking (like we were doing in some cases). Also, this approach has 2 separate locks for each property, so unrelated accesses won't lock each other now.
2ed8c36 to
2bd983c
Compare
…ain` too Comparing only error codes can lead to collisions with a completely different error. Also refactored this check into an existing extension.
59f6c28 to
7facf7d
Compare
taquitos
approved these changes
Jun 7, 2022
| } else { | ||
| userCancelled = false | ||
| } | ||
| let userCancelled = transaction.error?.isCancelledError ?? false |
Contributor
There was a problem hiding this comment.
FINE make it a single line that reads better 😄
Merged
NachoSoto
added a commit
that referenced
this pull request
Jun 7, 2022
_This version supports Xcode 14 beta 1_ * `PurchasesOrchestrator.handleDeferredTransaction`: check `NSError.domain` too (#1665) via NachoSoto (@NachoSoto) * `PurchasesOrchestrator`: replaced manual `Lock` with `Atomic` (#1664) via NachoSoto (@NachoSoto) * `CodableStrings.decoding_error`: added underlying error information (#1668) via NachoSoto (@NachoSoto) * Fixed Xcode 14 compilation: avoid `@available` properties (#1661) via NachoSoto (@NachoSoto)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Comparing only error codes can lead to collisions with a completely different error.
Also refactored this check into an existing extension.