@@ -64,7 +64,7 @@ import {autoSwitchToFocusMode} from './actions/PriorityMode';
64
64
import { hasCreditBankAccount } from './actions/ReimbursementAccount/store' ;
65
65
import { handleReportChanged } from './actions/Report' ;
66
66
import { isAnonymousUser as isAnonymousUserSession } from './actions/Session' ;
67
- import { convertToDisplayString } from './CurrencyUtils' ;
67
+ import { convertToDisplayString , getCurrencySymbol } from './CurrencyUtils' ;
68
68
import DateUtils from './DateUtils' ;
69
69
import { hasValidDraftComment } from './DraftCommentUtils' ;
70
70
import { getMicroSecondOnyxErrorWithTranslationKey } from './ErrorUtils' ;
@@ -5136,6 +5136,17 @@ function getWorkspaceNameUpdatedMessage(action: ReportAction) {
5136
5136
return Str . htmlEncode ( message ) ;
5137
5137
}
5138
5138
5139
+ function getDeletedTransactionMessage ( action : ReportAction ) {
5140
+ const deletedTransactionOriginalMessage = getOriginalMessage ( action as ReportAction < typeof CONST . REPORT . ACTIONS . TYPE . DELETED_TRANSACTION > ) ?? { } ;
5141
+ const amount = Math . abs ( deletedTransactionOriginalMessage . amount ?? 0 ) / 100 ;
5142
+ const currency = getCurrencySymbol ( deletedTransactionOriginalMessage . currency ?? '' ) ;
5143
+ const message = translateLocal ( 'iou.deletedTransaction' , {
5144
+ amount : `${ currency } ${ amount } ` ,
5145
+ merchant : deletedTransactionOriginalMessage . merchant ?? '' ,
5146
+ } ) ;
5147
+ return message ;
5148
+ }
5149
+
5139
5150
/**
5140
5151
* @param iouReportID - the report ID of the IOU report the action belongs to
5141
5152
* @param type - IOUReportAction type. Can be oneOf(create, decline, cancel, pay, split)
@@ -8971,6 +8982,7 @@ export {
8971
8982
getIOUForwardedMessage ,
8972
8983
getRejectedReportMessage ,
8973
8984
getWorkspaceNameUpdatedMessage ,
8985
+ getDeletedTransactionMessage ,
8974
8986
getUpgradeWorkspaceMessage ,
8975
8987
getDowngradeWorkspaceMessage ,
8976
8988
getReportAutomaticallySubmittedMessage ,
0 commit comments