Page MenuHomePhabricator

[web] Pull `SIWEButton` out of `SIWE` component and use in `LogInForm` directly
ClosedPublic

Authored by atul on Feb 1 2023, 12:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 1:28 PM
Unknown Object (File)
Fri, Nov 1, 1:28 PM
Unknown Object (File)
Fri, Nov 1, 1:28 PM
Unknown Object (File)
Fri, Nov 1, 1:11 PM
Unknown Object (File)
Tue, Oct 29, 8:20 PM
Unknown Object (File)
Sep 30 2024, 6:00 AM
Unknown Object (File)
Sep 30 2024, 6:00 AM
Unknown Object (File)
Sep 30 2024, 5:59 AM
Subscribers
None

Details

Summary

Pull SIWEButton out of SIWE component and use in LogInForm component directly. This allows us to render SIWEButton OR SIWE.

In following diffs will display traditional login form and SIWEButton OR just SIWE WITHOUT traditional login form.

Test Plan

If the user has a wallet connected (signer is truthy) and refreshes the page they will be shown SIWEButton and will need to click it again to see SIWELoginForm

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul edited the test plan for this revision. (Show Details)
atul published this revision for review.Feb 1 2023, 12:40 PM

Didn't review closely

web/account/log-in-form.react.js
145 ↗(On Diff #21782)

I don't think this is a no-op – the behavior changes if the user is logged in with ETH and refreshes the page, right?

This revision is now accepted and ready to land.Feb 1 2023, 1:09 PM
web/account/log-in-form.react.js
145 ↗(On Diff #21782)

Ah yeah, this does require the user to hit the "Sign in with Ethereum" button in order to see the SIWE statements and "Sign in" button on reload.

web/account/log-in-form.react.js
145 ↗(On Diff #21782)

(Which is the behavior we decided we want... just shouldn't have said it was a noop)