urbit / urbit-key-generation

Key derivation and HD wallet generation functions for Urbit
MIT License
15 stars 8 forks source link

Don't derive spawn proxy for planet wallets #70

Closed Fang- closed 5 years ago

Fang- commented 5 years ago

Quick and dirty edit. Reminder that we should replace these ship class checks with something more standard at some point.

Not sure why we put the {} for things we don't derive, instead of straight-up null. Certainly the latter would be easier to check for?

jtobin commented 5 years ago

On Fri, Jun 28, 2019 at 06:31:34AM -0700, Fang wrote:

Quick and dirty edit. Reminder that we should replace these ship class checks with something more standard at some point.

LGTM bru. I replaced the magic numbers with constants, plus added test cases to keep our vaunted 100% coverage.

Not sure why we put the {} for things we don't derive, instead of straight-up null. Certainly the latter would be easier to check for?

Yeah that sounds about right. I think I used {} initially because I was new to the JavaScripts and thought that it was more appropriate than null (as it is intuitively of the same type). But of course typeof null returns 'object', so.. :-)