Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Commit

Permalink
improve "pending display"
Browse files Browse the repository at this point in the history
  • Loading branch information
CAPtheorem committed Mar 5, 2022
1 parent 789a993 commit ef0fba4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/boba/gateway/src/components/pageHeader/PageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ const PageHeader = ({ maintenance }) => {

//console.log("orderedTransactions:", orderedTransactions)

const now = Math.floor(Date.now() / 1000)

const pendingL1 = orderedTransactions.filter((i) => {
if (i.chain === 'L1pending' && //use the custom API watcher for fast data on pending L1->L2 TXs
i.crossDomainMessage &&
i.crossDomainMessage.crossDomainMessage === 1 &&
i.crossDomainMessage.crossDomainMessageFinalize === 0 &&
i.action.status === "pending"
i.action.status === "pending" &&
(now - i.timeStamp) < 500
) {
return true
}
Expand All @@ -58,7 +61,8 @@ const PageHeader = ({ maintenance }) => {
i.crossDomainMessage &&
i.crossDomainMessage.crossDomainMessage === 1 &&
i.crossDomainMessage.crossDomainMessageFinalize === 0 &&
i.action.status === "pending"
i.action.status === "pending" &&
(now - i.timeStamp) < 500
) {
return true
}
Expand All @@ -70,6 +74,9 @@ const PageHeader = ({ maintenance }) => {
...pendingL2
]

console.log("pending",pending)
console.log("pending",pending.length)

if (maintenance) {
return (
<S.HeaderWrapper>
Expand Down

0 comments on commit ef0fba4

Please sign in to comment.