Skip to content
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

hotfix explore slow page load #524

Merged
merged 4 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/u3/src/components/social/farcaster/FCastTips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,14 @@ function TipTransaction({
}, [address, tipAmount, result, cast]);

const allowanceAction = useCallback(async () => {
if (
Number.isNaN(Number(allowanceValue)) ||
Number.isNaN(Number(allowance)) ||
Number(allowanceValue) > Number(allowance)
) {
toast.error('not enough allowance');
return;
}
try {
const castToReply = (
await makeCastAdd(
Expand Down Expand Up @@ -355,7 +363,7 @@ function TipTransaction({
console.error(error);
toast.success('allowance tip failed');
}
}, [allowanceValue, currFid, encryptedSigner]);
}, [allowanceValue, currFid, encryptedSigner, allowance]);

useEffect(() => {
if (Number(allowance) > 0) {
Expand Down
4 changes: 2 additions & 2 deletions apps/u3/src/services/shared/api/explore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export function getHotPosts() {
// TODO 后期换成包含farcaster和lens的trending
return getFarcasterTrending({
start: 0,
end: 30, // TODO 多取些暂时规避可能取不到6条的问题(fcast 可能被删除)
least: 20,
end: 15, // TODO 多取些暂时规避可能取不到6条的问题(fcast 可能被删除)
least: 10,
});
}

Expand Down
Loading