File tree Expand file tree Collapse file tree
src/libs/TransactionUtils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -558,9 +558,11 @@ function isPartialMerchant(merchant: string): boolean {
558558}
559559
560560function isFailedScanAmountPlaceholder ( transaction : OnyxEntry < Transaction > ) {
561+ // OPEN is included since editing another field (e.g. merchant) optimistically flips receipt.state to OPEN,
562+ // which would otherwise flicker the amount back to "$0.00" until the server confirms it's still missing.
561563 return (
562564 isScanRequest ( transaction ) &&
563- transaction ?. receipt ?. state === CONST . IOU . RECEIPT_STATE . SCAN_FAILED &&
565+ ( transaction ?. receipt ?. state === CONST . IOU . RECEIPT_STATE . SCAN_FAILED || transaction ?. receipt ?. state === CONST . IOU . RECEIPT_STATE . OPEN ) &&
564566 ( transaction ?. amount === 0 || transaction ?. amount === undefined ) &&
565567 ! hasValidModifiedAmount ( transaction )
566568 ) ;
You can’t perform that action at this time.
0 commit comments