Skip to content

Commit

Permalink
Merge pull request #524 from us3r-network/u3-dev
Browse files Browse the repository at this point in the history
hotfix explore slow page load
  • Loading branch information
qbig authored Feb 4, 2024
2 parents 50603be + 656340f commit 0580d96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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

0 comments on commit 0580d96

Please sign in to comment.