fix: hide pending orders from GQL (#6955)
* fix: hide pending orders from GQL * fix: update comment and add TODO
This commit is contained in:
parent
4c58258f01
commit
e9f469d399
@ -12,6 +12,7 @@ import {
|
||||
NftApproveForAllPartsFragment,
|
||||
NftTransferPartsFragment,
|
||||
SwapOrderDetailsPartsFragment,
|
||||
SwapOrderStatus,
|
||||
TokenApprovalPartsFragment,
|
||||
TokenAssetPartsFragment,
|
||||
TokenTransferPartsFragment,
|
||||
@ -289,6 +290,10 @@ function getLogoSrcs(changes: TransactionChanges): string[] {
|
||||
}
|
||||
|
||||
function parseUniswapXOrder({ details, chain, timestamp }: OrderActivity): Activity | undefined {
|
||||
// We currently only have a polling mechanism for locally-sent pending orders, so we hide remote pending orders since they won't update upon completion
|
||||
// TODO(WEB-2487): Add polling mechanism for remote orders to allow displaying remote pending orders
|
||||
if (details.orderStatus === SwapOrderStatus.Open) return undefined
|
||||
|
||||
const { inputToken, inputTokenQuantity, outputToken, outputTokenQuantity, orderStatus } = details
|
||||
const uniswapXOrderStatus = OrderStatusTable[orderStatus]
|
||||
const { status, statusMessage, title } = OrderTextTable[uniswapXOrderStatus]
|
||||
|
Loading…
Reference in New Issue
Block a user