mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-04 05:43:57 +00:00
Check transaction list before trying to assing guard element to infinite scroll in pending list (#1972)
This commit is contained in:
parent
1f6172204c
commit
0236a4c536
@ -82,11 +82,13 @@ export const QueueTxList = ({ transactions }: QueueTxListProps): ReactElement =>
|
||||
const title = txLocation === 'queued.next' ? 'NEXT TRANSACTION' : 'QUEUE'
|
||||
|
||||
const { lastItemId, setLastItemId } = useContext(TxsInfiniteScrollContext)
|
||||
const [, lastTransactionsGroup] = transactions[transactions.length - 1]
|
||||
const lastTransaction = lastTransactionsGroup[lastTransactionsGroup.length - 1]
|
||||
if (transactions.length) {
|
||||
const [, lastTransactionsGroup] = transactions[transactions.length - 1]
|
||||
const lastTransaction = lastTransactionsGroup[lastTransactionsGroup.length - 1]
|
||||
|
||||
if (txLocation === 'queued.queued' && !sameString(lastItemId, lastTransaction.id)) {
|
||||
setLastItemId(lastTransaction.id)
|
||||
if (txLocation === 'queued.queued' && !sameString(lastItemId, lastTransaction.id)) {
|
||||
setLastItemId(lastTransaction.id)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
Loading…
x
Reference in New Issue
Block a user