Page MenuHomePhabricator

Handle backup message type with different user texts in siwe.reac.js
ClosedPublic

Authored by marcin on Apr 11 2024, 9:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 10:05 PM
Unknown Object (File)
Tue, May 7, 11:10 AM
Unknown Object (File)
Mon, Apr 22, 5:25 AM
Unknown Object (File)
Sun, Apr 21, 10:24 PM
Unknown Object (File)
Apr 16 2024, 1:10 PM
Unknown Object (File)
Apr 16 2024, 7:31 AM
Unknown Object (File)
Apr 15 2024, 12:17 PM
Unknown Object (File)
Apr 11 2024, 12:46 PM
Subscribers

Details

Summary

This differential modifies SIWE component so that it renders different user texts based on the type of message we want to sign.

Test Plan

It may sound a little strange:

  1. Modify fullscreen-siwe-panel.react.js/connect-ethereum.react.js to provide SIWEMEssageTypes.MSG_BACKUP instead of MSG_AUTH.
  2. Attempt/log in registration process.
  3. Ensure that log in/registration is succesfull but the texts that are displayed refer to backup message generation.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul added inline comments.
landing/siwe.react.js
128–134

This is relevant both for backup flow and auth flow, right?

Just want not make sure this early return won't break anything for auth

135–140

Guessing backup flow also requires nonce since it's still a SIWE message(?), so this won't break anything

This revision is now accepted and ready to land.Apr 11 2024, 6:25 PM

Would be good to include screenshots of what the various screens look like from mobile. (You can omit the original screen if it's unchanged.)

landing/siwe.react.js
128–134

Yes - as we introduced type for both backup and auth the auth flow also needs to provide this parameter. I added it explicitly in each place that performs SIWE auth.

135–140

Yes - the only thing in which backup and auth differ are user texts. The rest of the flow - including message format - are the same.

Would be good to include screenshots of what the various screens look like from mobile. (You can omit the original screen if it's unchanged.)

Included in D11636