Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

fix: move updating Web3Context into hook#34

Merged
kristiehuang merged 3 commits intowcf/basic-funcfrom
wcf/dont-expose-context
Jun 16, 2022
Merged

fix: move updating Web3Context into hook#34
kristiehuang merged 3 commits intowcf/basic-funcfrom
wcf/dont-expose-context

Conversation

@kristiehuang
Copy link
Contributor

@kristiehuang kristiehuang commented Jun 16, 2022

Want to move the update logic for Web3Context from ConnectWalletDialog into the useActiveWeb3React hook so that we don't expose the full context object to the component

Added a setter fxn, so Web3Context is now { web3, updateWeb3 }

@vercel
Copy link

vercel bot commented Jun 16, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
widgets ✅ Ready (Inspect) Visit Preview Jun 16, 2022 at 4:08PM (UTC)

@vercel vercel bot temporarily deployed to Preview June 16, 2022 16:08 Inactive
@kristiehuang kristiehuang merged commit df89e25 into wcf/basic-func Jun 16, 2022
kristiehuang added a commit that referenced this pull request Jun 17, 2022
* feat: set up ui elements for wallet connect

* set up account avatar function

* structure connect wallet modal

* more ui updates for wc modal

* wip provider utils

* mm connection wip

* linter

* semi-working MM connection flow

* Implement Metamask connection

* minor alignment css

* Add WIP WC functionality

* Refactor useprovider fxn

* Add link to help center for nowallet

* Clean up useProvider

* Fix WalletConnect; need window.Buffer polyfill

* Fix WC connection

* Add mainnet RPC URL fallback constant

* Leave TODOs for readability

* Leave TODOs for readability

* Another todo

* Update yarn.lock

* Update .nvmrc for new @node/types

* Better modal layout UI

* Only use wallet if wallet is active

* Update yarn.lock

* Should only use our own flow iff provider & callbacks not given

* fix: refactor wallet connection components (#33)

* Refactor connect wallet into a separate component, and rename connect wallet callbacks

* Rename callbacks

* Fixes from PRs

* Remove fallback JSON RPC URL logic; move to separate PR

* Move web3 connection-related hooks into new folder

* Rename and move connect web3-related hooks

* fix: move updating Web3Context into hook (#34)

* wip

* Move context s.t. context is not exposed

* Clean commit

* Connect eagerly on mount

* Minor css

* Move components to Wallet

* Rename dialog buttons to wallet name

* Put network conditional back (fallback not implemented yet)

* Add back disabled prop

* Use e.preventDefault to determine opening our connection flow

* Clean up unused code

* nit

* Clean comments

* Don't deactivate other wallets before activating this one

* Update yarn.lock
@kristiehuang kristiehuang deleted the wcf/dont-expose-context branch June 30, 2022 20:08
tinaszheng added a commit that referenced this pull request Feb 25, 2023
feat: add $0 network fee label for gouda swaps
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant