native expects a string but fid received is a number.
Context: https://linear.app/comm/issue/ENG-7679/type-mismatch-bug-in-farcaster-web-view-reactjs
Differential D11626
[lib] have landing send `fid` as a string and not a number will on Apr 10 2024, 11:19 PM. Authored by Tags None Referenced Files
Details native expects a string but fid received is a number. Context: https://linear.app/comm/issue/ENG-7679/type-mismatch-bug-in-farcaster-web-view-reactjs flow check. Checked on native that receiving correct string fid after connecting my farcaster account
Diff Detail
Event TimelineComment Actions thanks for catching this @will. I thought I addressed this but looking at connect-farcaster.react.js now I can see I accidentally only toString() the farcaster auth url. Would you mind updating this diff to remove the toString() for the auth url? It's typed as a string already so doesn't make sense to toString() a string |
We definitely should return something from this lambda since otherwise it is useless to assign it to variable.
If we find that we don't have permissions then just calling await this.requestAndroidNotificationsPermission(); would result in a prompt asking for notifications permissions. However if the user grants those permissions then hasPermissions is still falsy (since promise returned nothing), so deviceToken will be set to null. Nevertheless permissions are actually granted byt the OS, so the state on the device and keyserver would heal itself on next render.
This differential fixes this case so that if user grants permissions correct state is achieved immediately without need for additional re-render to heal the state.