Fix: update Bank Details Form copies #2791
Closed
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.
Description
Secrets setup
Important
If you haven't done the secrets file set up yet, expand this section:
Click to expand and view the secrets setup 👈 🤫
Setting up your local environment
Create a
.env.local.secrets
file in the parent directory and populate it with the correct environment variables:echo -e "BSCSCAN_API_KEY=\nETHERSCAN_API_KEY=\nGOOGLE_TAG_MANAGER_ID=\nPINATA_API_KEY=\nPINATA_API_SECRET=\nCOINGECKO_API_KEY=\nCOINGECKO_API_URL=\nPOSTHOG_KEY=\nPOSTHOG_HOST=\nUSDC_LOCAL_ADDRESS=" > .env.local.secrets
Once the
.env.local.secrets
file is created, open it and you should see the following content. You will need to provide values forPOSTHOG_KEY
andPOSTHOG_HOST
so please ask a fellow dev about this.Once you've provided values for
POSTHOG_KEY
andPOSTHOG_HOST
, inject them:npm run prepare
Testing
Important
Open the
amplify/backend/function/bridgeXYZMutation/src/index.js
file and make sure you enter the right sandbox api key. Otherwise, you won't be able to do the KYC flow:Enable the Crypto to Fiat tab via our Feature Flag. I'm sure there's a better way to do this but open the
src/context/FeatureFlagsContext/FeatureFlagsContextProvider.tsx
file and do the following replacement:Visit the following URL: http://localhost:9091/account/crypto-to-fiat. It should take you directly to the Crypto to Fiat tab.
New stuff ✨
A new
formErrorMessage
convenience function for displaying form error messages. Example usage:This function accepts different validation types, which I tried to intentionally be a 1:1 mapping of Yup's out-of-the-box schema test functions names:
You will be required to pass in a number as the 3rd param if you choose
min | max | length
It will throw an error if you pass in a 3rd param but your type is
required | invalid
Here are the new translation copies in
en.json
:Resolves #2742