Content
@
https://warpcast.com/~/channel/miniapps
0 reply
0 recast
0 reaction
rish
@rish
anyone actively working on building a leaderboard in their mini app?
37 replies
6 recasts
75 reactions
Itsai ⌐◨-◨
@itsai
We were trying for Freezerverse, wanted one leaderboard to show who have player more times, had troubles getting the usernames and their pfps before so we paused it https://farcaster.xyz/miniapps/n8SLH5CXltOd/freezerverse
1 reply
0 recast
0 reaction
rish
@rish
what was the trouble?
1 reply
0 recast
0 reaction
Itsai ⌐◨-◨
@itsai
We were getting null responses getting the info. const fid = sdk.context?.user?.fid; Its always null. the sdk.context is also always null
2 replies
0 recast
0 reaction
rish
@rish
this is not neynar specific but @veganbeef any idea why this might happen? cc @deodad
1 reply
0 recast
1 reaction
veganbeef
@veganbeef
@itsai if sdk.context is null inside a farcaster client, you might be trying to access it before it's ready or resolved, depending on your setup; if you're accessing the sdk directly from the Frame SDK, you might try "const context = await sdk.context", as context is technically a promise now (see here https://github.com/farcasterxyz/miniapps/blob/main/packages/frame-sdk/src/types.ts#L67) if you created your project using the Neynar Starter Kit, you can just do "const { context } = useMiniApp();" and the context should automatically be defined once the SDK promise is resolved
1 reply
0 recast
1 reaction
Itsai ⌐◨-◨
@itsai
Thanks fam, Ill pass to my dev as Im just the UX designer, hope we can launch our new update soon
0 reply
0 recast
0 reaction