Page MenuHomePhabricator

[Cashtab] Flag msgs received from addresses not in contact list
ClosedPublic

Authored by bytesofman on Apr 21 2022, 22:27.

Details

Summary

T2410, T2399

Flags incoming message transactions that originate from addresses not in the user's contact list

This is in response to the appearance of scam messages in Cashtab's messaging feature

Test Plan

npm start
Receive a Cashtab Message from an address that is in your contact list, observe it appears as normal
Receive a Cashtab Message from an address that is not in your contact list, observe a warning

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emack requested changes to this revision.Apr 21 2022, 23:27
emack added inline comments.
web/cashtab/src/components/Home/Tx.js
598 ↗(On Diff #33278)

There's a gap here whereby opreturn messages sent from ElectrumABC or any custom nodejs scripts will bypass this scam alert.

image.png (381×515 px, 33 KB)

since this block is already the case when data.opReturnMessage exists, suggest no need for the 'data.isCashtabMessage ?' condition.

web/cashtab/src/utils/validation.js
148 ↗(On Diff #33278)

'contact' minor typo

167 ↗(On Diff #33278)

&& contactObj.name.length < 24

This revision now requires changes to proceed.Apr 21 2022, 23:27
web/cashtab/src/utils/validation.js
167 ↗(On Diff #33278)

Waiting on D11332 to land so that this is consistently applied. Will get this into this diff before landing though.

Accepted subject to rebasing D11332 prior to landing.

This revision is now accepted and ready to land.Apr 22 2022, 04:37