Content pfp
Content
@
https://opensea.io/collection/dev-21
0 reply
0 recast
2 reactions

Steve pfp
Steve
@stevedylandev.eth
Not sure if anyone else has found a better way to do this, but this is my current solution to make a wallet connection work both inside and outside a miniapp context. Would be nice to have a better way to do this from the miniapp connector itself! https://snippets.so/snip/EdDzyO4TOt
3 replies
1 recast
16 reactions

Darryl Yeo 🛠️ pfp
Darryl Yeo 🛠️
@darrylyeo
Does `sdk.actions.ready()` throw outside a mini-app context?
1 reply
0 recast
2 reactions

Steve pfp
Steve
@stevedylandev.eth
I believe it does
1 reply
0 recast
1 reaction

Darryl Yeo 🛠️ pfp
Darryl Yeo 🛠️
@darrylyeo
Just tried it for myself. Looks like the Promise just resolves silently after five to ten seconds.
1 reply
0 recast
1 reaction

Steve pfp
Steve
@stevedylandev.eth
Hmm I suppose that makes sense, but context would be undefined right?
1 reply
0 recast
1 reaction

Darryl Yeo 🛠️ pfp
Darryl Yeo 🛠️
@darrylyeo
Yeah, looks like `sdk.context` also just silently resolves to `undefined`
1 reply
0 recast
1 reaction

Steve pfp
Steve
@stevedylandev.eth
In the end that works because based on whether or not context exists I render a different connector. Justin’s approach is also a good way to do it if you want to let people choose; this snippet just takes the approach of auto connecting to what is available.
1 reply
0 recast
1 reaction

Darryl Yeo 🛠️ pfp
Darryl Yeo 🛠️
@darrylyeo
Makes sense. But now I‘m thinking, just adopting EIP-6963 on both the Farcaster client and the mini-app side could drastically simplify this and remove the need for all this bespoke initialization logic 🤔
1 reply
0 recast
2 reactions

EIP.Tools pfp
EIP.Tools
@eiptools
Explore the EIPs / ERCs mentioned in this cast:
1 reply
1 recast
1 reaction