-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ABW-3759] Claim account lockers #1323
[ABW-3759] Claim account lockers #1323
Conversation
Co-authored-by: Ghenadie Vasiliev-Pusca <[email protected]>
RadixWallet/Features/TransactionReviewFeature/SubmitTransaction/SubmitTransaction.swift
Outdated
Show resolved
Hide resolved
Co-authored-by: Ghenadie Vasiliev-Pusca <[email protected]>
@@ -56,6 +57,10 @@ extension Home { | |||
.send(.delegate(.openDetails)) | |||
case .securityProblemsTapped: | |||
.send(.delegate(.openSecurityCenter)) | |||
case let .accountLockerClaimTapped(details): | |||
.run { _ in | |||
try await accountLockersClient.claimContent(details) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont care about errors? maybe the client logs errors? otherwise we might wanna log errors here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding some logs here just to consider the case the given method throws an error. However, this won't be the case for the edge case discussed last Friday, where user attempts to claim an outdated locker (which no longer has the resources available). In such case, the failure would be at TransactionReview level, which will add logs as the following.
2024-09-09T12:31:47+0200 🟥 error com.radixpublishing : Transaction preview failed, error: failedToPrepareTXReview(Radix_Wallet_Dev.TransactionFailure.FailedToPreviewTXReview.failedToRetrieveTXReceipt("ApplicationError(VaultError(ResourceError(InsufficientBalance { requested: 3, actual: 1 })))"))
2024-09-09T12:31:47+0200 🟥 error com.radixpublishing : An error occurred: TransactionReviewFailure(underylying: Radix_Wallet_Dev.TransactionFailure.failedToPrepareTXReview(Radix_Wallet_Dev.TransactionFailure.FailedToPreviewTXReview.failedToRetrieveTXReceipt("ApplicationError(VaultError(ResourceError(InsufficientBalance { requested: 3, actual: 1 })))")))
@@ -180,4 +187,8 @@ extension SubmitTransaction.State.TXStatus { | |||
case .notYetSubmitted, .submitting, .submitted, .committedSuccessfully: false | |||
} | |||
} | |||
|
|||
var isFinal: Bool { | |||
!isInProgress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm this says that temporarilyRejected
is final, which sounds like an oxymoron to me. Perhaps not crucial but might be a minor thing you wanna check. I think David Edey is a good person to ask about the meaning of "temporarilyRejected" status, we have not worked to much with it in the past I think (As in Wallet does not use that state a lot).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ended up being removed since we no longer force refresh on final status updates, but inside the AccountLockerClient after awaiting for TX.
Anyway, good to know about this temporarilyRejected
status to take it into consideration next time.
# Conflicts: # RadixWallet.xcodeproj/project.pbxproj # RadixWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Jira ticket: ABW-3759
Complements: [ABW-3762 Account lock claim status](#1312)
Description
This PR allows the user to claim an account locker deposit.