Skip to content

Commit

Permalink
Fix first page of wallet logs loaded twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Oct 18, 2024
1 parent 153f47d commit 49ddace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/wallet-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 49ddace

Please sign in to comment.