-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dappkit-web functionality #7328
Conversation
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.
Looks good! I think this is a better direction to be taking (separate implementations for web and react-native).
I'd prefer we move the web package into its own file rather than suffixing functions with *Web
. That way we could just do import {waitForAccountAuth} from '@celo/dappkit/web
.
It also probably makes sense for there to be a timeout on the polling action? If not, at least we should provide a way to cancel polling. Reading LocalStorage every 100ms until someone refreshes their isn't terrible but not ideal either.
@AlexBHarley split into two files for now but without any special nesting/configuration--was playing around with this a bit but it felt messy to have nested tsconfigs and wasn't working as cleanly as I'd hoped, so for now web imports would look like Added a simple timeout for now, but yeah I think canceling dappkit flows would be a nice feature (and has a different ticket out for it?) will continue thinking about how that could look! |
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.
This looks good to me!
a43175b
to
8c28a71
Compare
Want to get some initial feedback since there was a lot of discussion on how we want to structure the separate modules.
waitForAccountAuthWeb
,waitForSignedTxsWeb
,parseURLOnRender
).listenToAccount
orlistenToSignedTxs
-- it seems like we never use these in the tutorials/docs anyways (maybe it makes sense to deprecate these?? the functionality is very very similar to thewaitFor*
functions except for not requiring arequestId
)(web mods heavily based on Alex's workaround in
use-contractkit
(- Includes Alex's change from Expo -> react-native (can rebase again once that is pushed to devx/update-dappkit))
Closes #7348