Page MenuHomePhabricator

[lib] Fix return value of `getSIWENonce`
ClosedPublic

Authored by atul on Dec 20 2022, 11:29 PM.
Tags
None
Referenced Files
F3381391: D5965.id19960.diff
Thu, Nov 28, 4:48 AM
Unknown Object (File)
Fri, Nov 8, 9:13 PM
Unknown Object (File)
Fri, Nov 8, 9:13 PM
Unknown Object (File)
Fri, Nov 8, 9:13 PM
Unknown Object (File)
Fri, Nov 8, 9:13 PM
Unknown Object (File)
Fri, Nov 8, 9:13 PM
Unknown Object (File)
Wed, Nov 6, 3:35 PM
Unknown Object (File)
Tue, Nov 5, 2:08 AM
Subscribers
None

Details

Summary

Fix getSIWENonce to return the nonce (string) as expected instead of the object that's returned by callServerEndpoint('siwe_nonce').


Depends on D5964

Test Plan

Was able to log values and set breakpoints to ensure that things were as expected.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Dec 20 2022, 11:29 PM
tomek added inline comments.
lib/actions/siwe-actions.js
13 ↗(On Diff #19930)

We can consider making callServerEndpoint generic in terms of T and returning Promise<T>. Some issues will remain, like validation, but at this point we're also not doing that, so it's still an improvement. Obviously it shouldn't be addressed in this diff or a stack - it is just an idea for the future.

This revision is now accepted and ready to land.Dec 21 2022, 8:37 AM
This revision was landed with ongoing or failed builds.Dec 21 2022, 10:23 AM
This revision was automatically updated to reflect the committed changes.