-
Notifications
You must be signed in to change notification settings - Fork 424
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 L1s networks manager, provide also information #2183
base: master
Are you sure you want to change the base?
add L1s networks manager, provide also information #2183
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
import { createWalletClient, custom, AddEthereumChainParameter } from 'viem'; | ||
import { useExampleStore } from "../../utils/store"; | ||
|
||
interface Chain { |
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.
Can you get this type from the AvacloudSDK?
const [copiedField, setCopiedField] = useState<string | null>(null); | ||
|
||
// Connect to wallet and update store state - only once | ||
useEffect(() => { |
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.
Is this necessary? Check the other tools
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.
True, it's already checked outside, I'll remove it and fix it
setError(null); | ||
try { | ||
// Use the actual Glacier API endpoint | ||
const url = new URL('https://glacier-api.avax.network/v1/chains'); |
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.
Use AvacloudSDK to fetch the chains instead of via manual calling
}; | ||
|
||
// Add the chain to wallet | ||
await walletClient.request({ |
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.
Let's use the viem extension that Ilya is building for that
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.
It's not in the main branch yet. So you might want to wait for him to merge it on monday
31ae524
to
09d3a73
Compare
Provided the modifications requested. Waiting for the viem extension from Ilya to integrate |
No description provided.