Page MenuHomePhabricator

[native] Remove dangling device after QR auth failure
ClosedPublic

Authored by bartek on Thu, Mar 6, 12:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 20, 12:11 AM
Unknown Object (File)
Wed, Mar 19, 11:46 AM
Unknown Object (File)
Mon, Mar 17, 12:27 PM
Unknown Object (File)
Sun, Mar 16, 5:13 PM
Unknown Object (File)
Fri, Mar 14, 7:34 AM
Unknown Object (File)
Fri, Mar 14, 7:34 AM
Unknown Object (File)
Fri, Mar 14, 7:34 AM
Unknown Object (File)
Fri, Mar 14, 7:31 AM
Subscribers

Details

Summary

Address ENG-10309.
Try reverting device list update after the process failed at a later point.

Test Plan
  1. Replaced await sendDeviceListUpdateSuccessMessage() with throw new Error('foo')
  2. After alert is shown, verified that:
    • No new device is present on the Linked Devices screen
    • Checked DynamoDB - two device list updates are present: the first update added a new device and the second update removed it. Before this diff, only the former update was present, resulting in dangling device on the list.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Thu, Mar 6, 1:26 AM
bartek added inline comments.
native/account/qr-auth/primary-device-qr-auth-context-provider.js
196–199 ↗(On Diff #47365)

Perhaps I should wrap it with ignorePromiseRejections? Just in case this call fails too

ashoat added inline comments.
native/account/qr-auth/primary-device-qr-auth-context-provider.js
196–199 ↗(On Diff #47365)

Doesn’t hurt

This revision is now accepted and ready to land.Thu, Mar 6, 8:10 AM

Wrap in ignorePromiseRejections

This revision was landed with ongoing or failed builds.Fri, Mar 14, 1:58 AM
This revision was automatically updated to reflect the committed changes.