Closed jahabeebs closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
od-app | ✅ Ready (Inspect) | Visit Preview | Jul 24, 2024 10:08pm |
od-app-hai | ✅ Ready (Inspect) | Visit Preview | Jul 24, 2024 10:08pm |
od-app-testnet | ✅ Ready (Inspect) | Visit Preview | Jul 24, 2024 10:08pm |
@pi0neerpat I made the following changes based on our discussion today: 1) I moved the geoblock logic into the /screen endpoint in the bot repo (see this PR: https://github.com/open-dollar/od-bot/pull/128). We also now use Vercel's request headers to get the country so there's no API call needed to an external API 2) In the app I consolidated sanctionsCheck() and geoBlockCheck() into a single function and we only ever make 1 API call at most to our bot /screen endpoint
Testing locally the geoblock logic is working and I logged the country in Vercel to be sure it was identifying the right country and blocking properly (I added 'CO' to the block list temporarily to test)
closes #656
bot PR is here: https://github.com/open-dollar/od-bot/pull/128
^ depends on https://github.com/open-dollar/od-bot/pull/128
Description
Screenshots
Works locally
https://github.com/user-attachments/assets/c6db37f5-cad5-470b-9024-16aa073e8f28