Page MenuHomePhabricator

[lib] Fix return value of `getSIWENonce`
ClosedPublic

Authored by atul on Dec 20 2022, 11:29 PM.
Tags
None
Referenced Files
F3394348: D5965.diff
Sat, Nov 30, 7:14 PM
Unknown Object (File)
Thu, Nov 28, 7:49 AM
Unknown Object (File)
Thu, Nov 28, 6:50 AM
Unknown Object (File)
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
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
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul published this revision for review.Dec 20 2022, 11:29 PM
tomek added inline comments.
lib/actions/siwe-actions.js
13

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.