Page MenuHomePhabricator

[token-server + cashtab] Implement captchas for free XEC rewards
ClosedPublic

Authored by bytesofman on Oct 3 2024, 18:02.

Details

Summary

To combat scripted looting of Cashtab's Free XEC rewards (and support high rewards in the future), implement recaptcha v3 on the rewards.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cashtab-xec-captchas
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30490
Build 60497: Build Difftoken-server-tests · cashtab-tests · ecash-lib-tests
Build 60496: arc lint + arc unit

Event Timeline

Failed tests logs:

====== CashTab Unit Tests: <Home /> Renders backup warning, Airdrop button, and QR Code if user loads with a new wallet that is the only created wallet ======
Error: expect(received).toHaveProperty(path, value)

Expected path: "disabled"

Expected value: true
Received value: false
    at Object.toHaveProperty (/work/cashtab/src/components/Home/__tests__/Home.test.js:275:31)

Each failure log is accessible here:
CashTab Unit Tests: <Home /> Renders backup warning, Airdrop button, and QR Code if user loads with a new wallet that is the only created wallet

Failed tests logs:

====== CashTab Unit Tests: <Home /> Renders backup warning, Airdrop button, and QR Code if user loads with a new wallet that is the only created wallet ======
Error: expect(received).toHaveProperty(path, value)

Expected path: "disabled"

Expected value: true
Received value: false
    at Object.toHaveProperty (/work/cashtab/src/components/Home/__tests__/Home.test.js:275:31)

Each failure log is accessible here:
CashTab Unit Tests: <Home /> Renders backup warning, Airdrop button, and QR Code if user loads with a new wallet that is the only created wallet

Failed tests logs:

====== CashTab Unit Tests: <Home /> Renders backup warning, Airdrop button, and QR Code if user loads with a new wallet that is the only created wallet ======
Error: expect(received).toHaveProperty(path, value)

Expected path: "disabled"

Expected value: true
Received value: false
    at Object.toHaveProperty (/work/cashtab/src/components/Home/__tests__/Home.test.js:275:31)

Each failure log is accessible here:
CashTab Unit Tests: <Home /> Renders backup warning, Airdrop button, and QR Code if user loads with a new wallet that is the only created wallet

update mocks for integration tests

bytesofman published this revision for review.Oct 3 2024, 19:03
bytesofman added inline comments.
cashtab/.env
2 ↗(On Diff #49938)

this is a "dev" key. It's real, and will work on localhost

I've configured prod values in our CI deployment that are only valid on the cashtab.com domain

cashtab/src/components/Home/Home.js
156 ↗(On Diff #49938)

in the recaptcha dashboard, we can look at stats by action. So, if we later decide to recaptcha the token rewards, they can be tracked separately.

This revision is now accepted and ready to land.Oct 3 2024, 19:55