-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix: Add missing labels for crypto to fiat and refactor bridgeXYZMutation #3778
base: master
Are you sure you want to change the base?
Conversation
Refactor: bridgeXYZMutation lambda
Fix: Add missing routing number label
Refactor: Add generic request helpers for rest calls
Refactor: Move consts
Fix: Add default badge and cta props for crypto to fiat page
4ee476e
to
6e5c0f0
Compare
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 tested it together on a call against Bridge production and confirmed everything still works as expected, including:
- getting KYC status
- updating bank details
- drains history
- creating liquidation addresses
Nice refactoring effort, thank you for taking the time to make it look prettier 🎉
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.
Perhaps operations.js
would be a better name, similarly to how it's called in domain balance lambdas?
Description
This PR addresses multiple issues:
the label shown for the 3rd column
Routing number
forUSD
accounts andBIC
forEUR
accountsthe status pill and call-to-action default values if the retrieved
kycStatus
is null or emptyimproving the error handling when an invalid liquidation address is created by
Bridge
by usingisAddress
fromethers
and returning anull
value if the check is falseaaaaand a bit of refactoring of the
bridgeXYZMutation
lambdaTesting
TODO: So let's also test these changes locally, though the focus on this PR review should be more related to the code refactoring.
.env
files to thebridgeXYZMutation
lambdaImportant
It should have the following content - please ping me for the values if you don't already have them
Step 2. Now connect as
leela
and go to http://localhost:9091/account/crypto-to-fiatStep 3. Enter the personal details, go to the next step, close the modal and refresh the page - you should be able to add you
Bank details
nowStep 4. Add an
USD
account (you can use this https://randommer.io/routing-number-generator to generate some values, though theRouting number
needs an extra digit)Step 5. Check that the
Routing number
column is displayedStep 6. Add an
EUR
account and now check the column label gets updated toBIC
Step 7. Now if you check the
amplify
logs you'll see a message similar tobut the details still show up on the page, beside the liquidation address
The thing is, on
DEV
, Bridge will generate liquidation addresses that are not considered to be valid -utils.isAddress
will return false, hence this value will not be stored.Before the changes on this PR, we directly called
that threw an error in case of an invalid address, causing the UI to no longer display any information without a page refresh. Now this should be fixed, just that the liquidation address will not be displayed without a page refresh
checkKYCHandler
at line 32 addthrow new Error()
and refresh the pagecompared to master
Diffs
Changes 🏗
bridgeXYZMutation
lambda refactoringutils.isAddress
for checking the liquidation address before storing itResolves #3442
Resolves #3496