@@ -33,22 +33,12 @@ const TXID_PLACEHOLDER = '{{TXID}}'
33
33
34
34
export function SwapDetailsCard ( props : Props ) {
35
35
const { swapData, transaction, sourceWallet } = props
36
-
37
36
const { memos = [ ] , spendTargets = [ ] , tokenId } = transaction
38
37
39
- const {
40
- isEstimate,
41
- orderId,
42
- orderUri,
43
- payoutAddress,
44
- payoutWalletId,
45
- plugin,
46
- refundAddress
47
- } = swapData
48
38
const formattedOrderUri =
49
- orderUri == null
39
+ swapData . orderUri == null
50
40
? undefined
51
- : orderUri . replace ( TXID_PLACEHOLDER , transaction . txid )
41
+ : swapData . orderUri . replace ( TXID_PLACEHOLDER , transaction . txid )
52
42
const payoutCurrencyCode = swapData . payoutCurrencyCode
53
43
54
44
const handleExchangeDetails = useHandler ( async ( ) => {
@@ -78,10 +68,12 @@ export function SwapDetailsCard(props: Props) {
78
68
{
79
69
subject : sprintf (
80
70
lstrings . transaction_details_exchange_support_request ,
81
- plugin . displayName
71
+ swapData . plugin . displayName
82
72
) ,
83
73
recipients :
84
- plugin . supportEmail != null ? [ plugin . supportEmail ] : undefined ,
74
+ swapData . plugin . supportEmail != null
75
+ ? [ swapData . plugin . supportEmail ]
76
+ : undefined ,
85
77
body,
86
78
isHTML : true
87
79
} ,
@@ -119,7 +111,7 @@ export function SwapDetailsCard(props: Props) {
119
111
// The wallet may have been deleted:
120
112
const account = useSelector ( state => state . core . account )
121
113
const currencyWallets = useWatch ( account , 'currencyWallets' )
122
- const destinationWallet = currencyWallets [ payoutWalletId ]
114
+ const destinationWallet = currencyWallets [ swapData . payoutWalletId ]
123
115
const destinationWalletName =
124
116
destinationWallet == null ? '' : getWalletName ( destinationWallet )
125
117
const destinationDenomination = useSelector ( state =>
@@ -196,15 +188,17 @@ export function SwapDetailsCard(props: Props) {
196
188
} ,
197
189
{
198
190
title : lstrings . transaction_details_exchange_service ,
199
- body : plugin . displayName
191
+ body : swapData . plugin . displayName
200
192
} ,
201
193
{
202
194
title : lstrings . transaction_details_exchange_order_id ,
203
- body : orderId || ''
195
+ body : swapData . orderId || ''
204
196
} ,
205
197
{
206
198
title : lstrings . quote_type ,
207
- body : isEstimate ? lstrings . estimated_quote : lstrings . fixed_quote
199
+ body : swapData . isEstimate
200
+ ? lstrings . estimated_quote
201
+ : lstrings . fixed_quote
208
202
}
209
203
]
210
204
} ,
@@ -261,11 +255,11 @@ export function SwapDetailsCard(props: Props) {
261
255
: [ ] ) ,
262
256
{
263
257
title : lstrings . transaction_details_exchange_payout_address ,
264
- body : payoutAddress
258
+ body : swapData . payoutAddress
265
259
} ,
266
260
{
267
261
title : lstrings . transaction_details_exchange_refund_address ,
268
- body : refundAddress || ''
262
+ body : swapData . refundAddress || ''
269
263
}
270
264
]
271
265
}
@@ -294,15 +288,15 @@ export function SwapDetailsCard(props: Props) {
294
288
: lstrings . fixed_quote }
295
289
</ EdgeText >
296
290
</ EdgeRow >
297
- { orderUri == null ? null : (
291
+ { swapData . orderUri == null ? null : (
298
292
< EdgeRow
299
293
rightButtonType = "touchable"
300
294
title = { lstrings . transaction_details_exchange_status_page }
301
295
onPress = { handleLink }
302
296
body = { formattedOrderUri }
303
297
/>
304
298
) }
305
- { plugin . supportEmail == null ? null : (
299
+ { swapData . plugin . supportEmail == null ? null : (
306
300
< EdgeRow
307
301
rightButtonType = "touchable"
308
302
title = { lstrings . transaction_details_exchange_support }
0 commit comments