Skip to content

Commit bc6baf7

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 9c9c4f7 commit bc6baf7

3 files changed

Lines changed: 15 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
@@ -1956,6 +1956,7 @@ const strings = {
19561956
gift_card_pending: 'Pending Delivery, Please Wait...',
19571957
gift_card_pending_toast:
19581958
'Your gift card is being delivered. Please wait for a few minutes for it to arrive.',
1959+
gift_card_quote_id_label_1s: 'QuoteID: %1$s',
19591960
gift_card_quote_expired_toast: 'Your quote has expired. Please try again.',
19601961
gift_card_product_unavailable_title: 'Temporarily Unavailable',
19611962
gift_card_product_unavailable_warning:

src/locales/strings/enUS.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,8 +1517,11 @@
15171517
"gift_card_redeemed_cards": "Redeemed Cards",
15181518
"gift_card_unmark_as_redeemed": "Unmark as Redeemed",
15191519
"gift_card_active_cards": "Active Cards",
1520+
"gift_card_confirming": "Awaiting Payment Confirmations...",
1521+
"gift_card_failed": "Failed",
15201522
"gift_card_pending": "Pending Delivery, Please Wait...",
15211523
"gift_card_pending_toast": "Your gift card is being delivered. Please wait for a few minutes for it to arrive.",
1524+
"gift_card_quote_id_label_1s": "QuoteID: %1$s",
15221525
"gift_card_quote_expired_toast": "Your quote has expired. Please try again.",
15231526
"gift_card_product_unavailable_title": "Temporarily Unavailable",
15241527
"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)