-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Start using Protobuf types #19
base: jessepinho/profile-screen
Are you sure you want to change the base?
Conversation
bef7ca4
to
6be2224
Compare
6f47cd1
to
b53d703
Compare
4d40d9b
to
7cdb47c
Compare
@TalDerei commits from this PR (for when you need to rebase after |
|
||
## Weird issues/gotchas | ||
|
||
### Importing `@penumbra-zone/*` packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually don't think this is a solution at all, and this PR probably shouldn't be merged in its present state, but I'll leave that up to y'all to decide. I couldn't get the package imports to work without these metro.config
changes (along with the tsconfig/package.json changes).
At a high level, this PR is about introducing Protobuf types to the mobile app (rather than the proprietary types I was using to quickly scaffold up a UI).
@TalDerei I'm requesting a review even though this is in draft. Up to you whether to merge it and build off of it, or resolve the module resolution issues first.
Issues I ran into
There's something really weird going on with the
@penumbra-zone/...
packages. VSCode would complain that it couldn't resolve the e.g.@penumbra-zone/protobuf
modules. I had to add"type": "module"
to ourpackage.json
, and then add"moduleResolution": "bundler"
totsconfig.json
. While that made VSCode happy, I was still getting build failures from Expo, so I also needed to add aliases tometro.config.cjs
(which I also had to rename from its previous.js
extension). The aliases specifically are super hacky, and not really a long-term solution, so I unfortunately have to leave this up to y'all to resolve as I won't be able to fix these module resolution issues in time. I'm not sure why it's happening only with our@penumbra-zone
packages, but I'm guessing we're somehow publishing them incorrectly.One other issue I ran into: Redux complains about non-serializable values in state due to the
BigInt
s we're storing in Redux. This is going to need to be addressed head-on, since we useBigInt
s everywhere. I was hoping there was some cleantransform
middleware for Redux where you can serialize/deserialize problematic values, but I'm not sure it'll be that simple. Needs some investigation.All that said, here's what I did accomplish...
In this PR
reselect
to memoize slower-to-calculate selectors.BalancesResponse
s instead of my customBalance
type.Address
es instead of my customAddress
type.