Context
KYB applications for Brazilian entities are not instant and can take a few hours to days. Since users don't want to check back on the Vortex page all the time, a status update via email is preferable. With the account feature live, this can now be built.
TODO
- Implement listening to webhook events for Avenia.
- Listen to KYB events for a specific account that has the sign-up pending.
- On a status change, send an email to the respective registered user's email address.
- For sending the email, consider using a Supabase edge function, see this doc.