Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ import {
import dayjs from 'dayjs'
import { getProviderForChainId } from '@/token-bridge-sdk/utils'

import { isTokenDeposit } from '../../state/app/utils'
import {
ChainPair,
UseTransactionHistoryResult
} from '../../hooks/useTransactionHistory'
import { Tooltip } from '../common/Tooltip'
import { getNetworkName } from '../../util/networks'
import { isTxPending } from './helpers'
import { getTransactionType, isTxPending } from './helpers'
import { PendingDepositWarning } from './PendingDepositWarning'
import { TransactionsTableRow } from './TransactionsTableRow'
import { EmptyTransactionHistory } from './EmptyTransactionHistory'
Expand Down Expand Up @@ -176,9 +175,10 @@ export const TransactionHistoryTable = (
)
}, [contentWrapperRef.current?.offsetTop, transactions.length])

const pendingTokenDepositsCount = useMemo(() => {
return transactions.filter(tx => isTokenDeposit(tx) && isTxPending(tx))
.length
const hasPendingArbitrumBridgeDeposits = useMemo(() => {
return transactions.some(
tx => !tx.isWithdrawal && getTransactionType(tx) === 'arbitrum'
)
}, [transactions])

const topmostPendingTxId = useMemo(() => {
Expand Down Expand Up @@ -237,7 +237,9 @@ export const TransactionHistoryTable = (
{!completed && <LoadMoreButton onClick={resume} />}
</div>
)}
<div>{pendingTokenDepositsCount > 0 && <PendingDepositWarning />}</div>
<div>
{hasPendingArbitrumBridgeDeposits && <PendingDepositWarning />}
</div>
</div>

<Table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ export class EthDepositStarter extends BridgeTransferStarter {
destinationAddress: destinationAddress ?? address,
overrides: parentChainOverrides,
retryableGasOverrides: {
// the gas limit may vary by about 20k due to SSTORE (zero vs nonzero)
// the 30% gas limit increase should cover the difference
gasLimit: { percentIncrease: BigNumber.from(30) }
gasLimit: {
percentIncrease: BigNumber.from(DEFAULT_GAS_PRICE_PERCENT_INCREASE)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is supposed to be used on gas price, not gas limit, so this ain't right. Looks like we already do the same gas price increase in EthDepositStarter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking if maxFeePerGas to be bumped, and should we bump it in the sdk instead?

}
}
})

Expand Down
Loading