Page MenuHomePhabricator

[identity] db method to get inbound keys for user
ClosedPublic

Authored by varun on Aug 8 2023, 7:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 16, 9:30 AM
Unknown Object (File)
Mon, May 6, 4:51 PM
Unknown Object (File)
Mon, May 6, 4:51 PM
Unknown Object (File)
Sat, May 4, 4:50 PM
Unknown Object (File)
Sat, May 4, 4:50 PM
Unknown Object (File)
Sat, May 4, 2:41 PM
Unknown Object (File)
Sat, May 4, 1:12 PM
Unknown Object (File)
Sat, May 4, 1:12 PM
Subscribers

Details

Summary

Use username/wallet address to get the inbound keys for a user

Test Plan

tested in next diff

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Aug 8 2023, 7:58 AM

Just minor nits ;)

services/identity/src/database.rs
581–585 ↗(On Diff #29618)

My preference, but up to you.

Note that to format let-else you need to use cargo +nightly fmt - it is available in rustfmt v 1.6+

592 ↗(On Diff #29618)

Minor optimization

This revision is now accepted and ready to land.Aug 8 2023, 8:29 AM
services/identity/src/database.rs
580 ↗(On Diff #29618)

Maybe introduce some type aliases for these maps? It becomes difficult to keep up with what they represent.

jon requested changes to this revision.Aug 8 2023, 9:02 AM

I landed D8627, please rebase

This revision now requires changes to proceed.Aug 8 2023, 9:02 AM
varun marked 2 inline comments as done.

rebase and address feedback

jon added inline comments.
services/identity/src/database.rs
737–739 ↗(On Diff #30058)

After D8721, this could be just be

This revision is now accepted and ready to land.Aug 18 2023, 1:31 PM
services/identity/src/database.rs
737–739 ↗(On Diff #30058)

will address this in a new diff. i'd like to make the to_string method return a String instead of &String first