Merge pull request #1484 from stackernews/fix-wallet-logs-pagination

Fix first page of wallet logs loaded twice
This commit is contained in:
Keyan 2024-10-18 09:07:54 -05:00 committed by GitHub
commit ad1244c260
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ export function useWalletLogs (wallet, initialPage = 1, logsPerPage = 10) {
const loadMore = useCallback(async () => {
if (hasMore) {
setLoading(true)
const result = await loadLogsPage(page, logsPerPage, wallet)
const result = await loadLogsPage(page + 1, logsPerPage, wallet)
setLogs(prevLogs => [...prevLogs, ...result.data])
setHasMore(result.hasMore)
setTotal(result.total)