forked from primodiumxyz/primodium
-
Notifications
You must be signed in to change notification settings - Fork 0
happy wallet 🤝🏻 primodium/client #3
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a0a478d
feat: integrate happy wallet into primodium client
ultraviolet10 02bf49b
remove connector
ultraviolet10 35a200b
chore: fork log comments
ultraviolet10 317fa92
remove commented setup helper
ultraviolet10 2544f94
use custom happy wagmi config app-wide
ultraviolet10 212f6a1
remove primodium drip eth step
ultraviolet10 b361e0e
feat: add toast notification for low balance and clean up Connect co…
ultraviolet10 83d4dc2
enhance chain retrievel from core to fetch by chainID and not name
ultraviolet10 5018614
connect w happychain and nothing else
ultraviolet10 88c7caf
remove login as guest
ultraviolet10 47864f1
mini fixes
ultraviolet10 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,5 @@ | ||
| import { createClient } from "viem"; | ||
| import { createConfig, http } from "wagmi"; | ||
| import { coinbaseWallet, walletConnect } from "wagmi/connectors"; | ||
| import { createHappyChainWagmiConfig, happyChainSepolia } from "@happy.tech/core"; | ||
| import { Config } from "wagmi"; | ||
|
|
||
| import { getCoreConfig } from "@/config/getCoreConfig"; | ||
|
|
||
| const env = import.meta.env; | ||
| const projectId = env.PRI_WALLETCONNECT_PROJECT_ID; | ||
|
|
||
| const { chain } = getCoreConfig(); | ||
|
|
||
| export const wagmiConfig = createConfig({ | ||
| chains: [chain], | ||
|
|
||
| client({ chain }) { | ||
| return createClient({ chain, transport: http() }); | ||
| }, | ||
| connectors: [ | ||
| walletConnect({ projectId }), | ||
| coinbaseWallet({ appName: "wagmi" }), | ||
| // injected({target: 'Injected', shimDisconnect: true}), | ||
| ], | ||
| }); | ||
| // [HAPPY_PRIM] use custom config tailored to HappyChain | ||
| export const wagmiConfig: Config = createHappyChainWagmiConfig(happyChainSepolia); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 was earlier commented out since it was giving an error for not being able to fetch a receipt → the fix here (made earlier but untested for this flow) to initialise the
publicClientincreateNetworkusing a custom connector with the happyProviderThere 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.
cc @aodhgan #2 (comment)