Skip to content

Commit 551823f

Browse files
committed
Show QuoteID in gift card menu modal
Display the Phaze quoteId at the top of the kebab menu modal for easier debugging and support reference.
1 parent aee22ee commit 551823f

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/components/modals/GiftCardMenuModal.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { EdgeCurrencyWallet, EdgeTransaction } from 'edge-core-js'
22
import * as React from 'react'
33
import { ActivityIndicator, View } from 'react-native'
44
import type { AirshipBridge } from 'react-native-airship'
5+
import { sprintf } from 'sprintf-js'
56

67
import { useHandler } from '../../hooks/useHandler'
78
import { useWatch } from '../../hooks/useWatch'
@@ -10,6 +11,7 @@ import type { PhazeDisplayOrder } from '../../plugins/gift-cards/phazeGiftCardTy
1011
import { useSelector } from '../../types/reactRedux'
1112
import { ArrowRightIcon, CheckIcon } from '../icons/ThemedIcons'
1213
import { cacheStyles, type Theme, useTheme } from '../services/ThemeContext'
14+
import { EdgeText } from '../themed/EdgeText'
1315
import { SelectableRow } from '../themed/SelectableRow'
1416
import { EdgeModal } from './EdgeModal'
1517

@@ -105,6 +107,9 @@ export const GiftCardMenuModal: React.FC<Props> = props => {
105107

106108
return (
107109
<EdgeModal bridge={bridge} title={order.brandName} onCancel={handleCancel}>
110+
<EdgeText style={styles.quoteIdText} numberOfLines={1}>
111+
{sprintf(lstrings.gift_card_quote_id_label_1s, order.quoteId)}
112+
</EdgeText>
108113
<SelectableRow
109114
marginRem={0.5}
110115
title={lstrings.gift_card_go_to_transaction}
@@ -140,6 +145,12 @@ export const GiftCardMenuModal: React.FC<Props> = props => {
140145
}
141146

142147
const getStyles = cacheStyles((theme: Theme) => ({
148+
quoteIdText: {
149+
fontSize: theme.rem(0.75),
150+
color: theme.secondaryText,
151+
marginHorizontal: theme.rem(0.5),
152+
marginBottom: theme.rem(0.5)
153+
},
143154
iconContainer: {
144155
width: theme.rem(2.5),
145156
height: theme.rem(2.5),

src/locales/en_US.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,7 @@ const strings = {
19581958
gift_card_pending: 'Pending Delivery, Please Wait...',
19591959
gift_card_pending_toast:
19601960
'Your gift card is being delivered. Please wait for a few minutes for it to arrive.',
1961+
gift_card_quote_id_label_1s: 'QuoteID: %1$s',
19611962
gift_card_quote_expired_toast: 'Your quote has expired. Please try again.',
19621963
gift_card_product_unavailable_title: 'Temporarily Unavailable',
19631964
gift_card_product_unavailable_warning:

src/locales/strings/enUS.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,6 +1523,7 @@
15231523
"gift_card_failed": "Failed",
15241524
"gift_card_pending": "Pending Delivery, Please Wait...",
15251525
"gift_card_pending_toast": "Your gift card is being delivered. Please wait for a few minutes for it to arrive.",
1526+
"gift_card_quote_id_label_1s": "QuoteID: %1$s",
15261527
"gift_card_quote_expired_toast": "Your quote has expired. Please try again.",
15271528
"gift_card_product_unavailable_title": "Temporarily Unavailable",
15281529
"gift_card_product_unavailable_warning": "Card is temporarily unavailable. Please select another card from this brand or try again later.",

0 commit comments

Comments
 (0)