danreeves / dt-exchange

39 stars 18 forks source link

Better account name handling #46

Closed Coconutcoo closed 1 year ago

Coconutcoo commented 1 year ago

Fixes #45

image

I believe, but can't confirm, that FS assigns every AccountName a discriminator, so I'm using that as a warning of the end of the AccountName.

If someone has a user from some other platform or something that doesn't have this, please let me know as I'll need to rethink.

Also, this PR has some tidying involved with the "get user from local storage" function, since it was conflicting with a non-exported function from useLocalStorage.

Coconutcoo commented 1 year ago

Please hang fire on a review - I know that safeUserParse doesn't decode the string right now - need to adjust the tests accordingly.

danreeves commented 1 year ago

Looking good so far

I believe, but can't confirm, that FS assigns every AccountName a discriminator

I think it's a pretty good bet all accounts have it