This repository has been archived by the owner on Jul 15, 2022. It is now read-only.
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.
This pr prepares to handle the error cases that might arise when interacting with the swap feature with the new provider. Due to the limitations, we have in the KYC form, the error handling is at a generic level and not per field. It also includes a reset mechanism (and disabling of the form) based on a specific error for unauthorized rates for the specified user.
This needs to be tested once all the pieces are in place.
It also includes a fix for the
requireLatestFirmware
mod we introduced, ironically I only made it work for all flows except swap. Thanks @LFBarreto for helping find this bug, I was not passing the flag to the nestedconnectApp
insideinitSwap
.Update
Tested against the latest deployed staging, the error handling is as good as we can make it currently. If you are adventurous and want to try it before it gets merged, yalc this version on LLD, and replace your valid ID for wyre in the app.json file with something invalid, for instance, turn your "US_123456" into "_US_123456" and refresh the app. It should let you reach the form but throw the unauthorized error later.