20
import 'package:collection/collection.dart';
21
import 'package:cw_core/transaction_direction.dart';
22
import 'package:cw_core/transaction_priority.dart';
23
+import 'package:flutter/foundation.dart';
24
import 'package:hive/hive.dart';
25
import 'package:intl/src/intl/date_format.dart';
26
import 'package:mobx/mobx.dart';
53
break;
54
case WalletType.bitcoin:
55
_addElectrumListItems(tx, dateFormat);
55
- if(!canReplaceByFee)_checkForRBF(tx);
56
+ if (!canReplaceByFee) _checkForRBF(tx);
57
break;
58
case WalletType.litecoin:
59
case WalletType.bitcoinCash:
84
break;
85
}
86
86
- final descriptionKey =
87
- '${transactionInfo.txHash}_${wallet.walletAddresses.primaryAddress}';
87
+ final descriptionKey = '${transactionInfo.txHash}_${wallet.walletAddresses.primaryAddress}';
88
final description = transactionDescriptionBox.values.firstWhere(
89
(val) => val.id == descriptionKey || val.id == transactionInfo.txHash,
90
orElse: () => TransactionDescription(id: descriptionKey));
93
final recipientAddress = description.recipientAddress;
94
95
if (recipientAddress?.isNotEmpty ?? false) {
96
- items.add(StandartListItem(
97
- title: S.current.transaction_details_recipient_address,
98
- value: recipientAddress!));
96
+ items.add(
97
+ StandartListItem(
98
+ title: S.current.transaction_details_recipient_address,
99
+ value: recipientAddress!,
100
+ key: ValueKey('standard_list_item_${recipientAddress}_key'),
101
+ ),
102
+ );
103
}
104
}
105
106
final type = wallet.type;
107
104
- items.add(BlockExplorerListItem(
108
+ items.add(
109
+ BlockExplorerListItem(
110
title: S.current.view_in_block_explorer,
111
value: _explorerDescription(type),
112
onTap: () async {
114
final uri = Uri.parse(_explorerUrl(type, tx.txHash));
115
if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication);
116
} catch (e) {}
112
- }));
117
+ },
118
+ key: ValueKey('block_explorer_list_item_${type.name}_wallet_type_key'),
119
+ ),
120
+ );
121
114
- items.add(TextFieldListItem(
122
+ items.add(
123
+ TextFieldListItem(
124
title: S.current.note_tap_to_change,
125
value: description.note,
126
onSubmitted: (value) {
131
} else {
132
transactionDescriptionBox.add(description);
133
}
125
- }));
134
+ },
135
+ key: ValueKey('textfield_list_item_note_entry_key'),
136
+ ),
137
+ );
138
}
139
140
final TransactionInfo transactionInfo;
221
final addressIndex = tx.additionalInfo['addressIndex'] as int;
222
final feeFormatted = tx.feeFormatted();
223
final _items = [
212
- StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash),
224
StandartListItem(
214
- title: S.current.transaction_details_date, value: dateFormat.format(tx.date)),
215
- StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'),
216
- StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()),
225
+ title: S.current.transaction_details_transaction_id,
226
+ value: tx.txHash,
227
+ key: ValueKey('standard_list_item_transaction_details_id_key'),
228
+ ),
229
+ StandartListItem(
230
+ title: S.current.transaction_details_date,
231
+ value: dateFormat.format(tx.date),
232
+ key: ValueKey('standard_list_item_transaction_details_date_key'),
233
+ ),
234
+ StandartListItem(
235
+ title: S.current.transaction_details_height,
236
+ value: '${tx.height}',
237
+ key: ValueKey('standard_list_item_transaction_details_height_key'),
238
+ ),
239
+ StandartListItem(
240
+ title: S.current.transaction_details_amount,
241
+ value: tx.amountFormatted(),
242
+ key: ValueKey('standard_list_item_transaction_details_amount_key'),
243
+ ),
244
if (feeFormatted != null)
218
- StandartListItem(title: S.current.transaction_details_fee, value: feeFormatted),
219
- if (key?.isNotEmpty ?? false) StandartListItem(title: S.current.transaction_key, value: key!),
245
+ StandartListItem(
246
+ title: S.current.transaction_details_fee,
247
+ value: feeFormatted,
248
+ key: ValueKey('standard_list_item_transaction_details_fee_key'),
249
+ ),
250
+ if (key?.isNotEmpty ?? false)
251
+ StandartListItem(
252
+ title: S.current.transaction_key,
253
+ value: key!,
254
+ key: ValueKey('standard_list_item_transaction_key'),
255
+ ),
256
];
257
258
if (tx.direction == TransactionDirection.incoming) {
262
263
if (address.isNotEmpty) {
264
isRecipientAddressShown = true;
229
- _items.add(StandartListItem(
230
- title: S.current.transaction_details_recipient_address,
231
- value: address,
232
- ));
265
+ _items.add(
266
+ StandartListItem(
267
+ title: S.current.transaction_details_recipient_address,
268
+ value: address,
269
+ key: ValueKey('standard_list_item_transaction_details_recipient_address_key'),
270
+ ),
271
+ );
272
}
273
274
if (label.isNotEmpty) {
236
- _items.add(StandartListItem(title: S.current.address_label, value: label));
275
+ _items.add(StandartListItem(
276
+ title: S.current.address_label,
277
+ value: label,
278
+ key: ValueKey('standard_list_item_address_label_key'),
279
+ ));
280
}
281
} catch (e) {
282
print(e.toString());
288
289
void _addElectrumListItems(TransactionInfo tx, DateFormat dateFormat) {
290
final _items = [
248
- StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash),
291
StandartListItem(
250
- title: S.current.transaction_details_date, value: dateFormat.format(tx.date)),
251
- StandartListItem(title: S.current.confirmations, value: tx.confirmations.toString()),
252
- StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'),
253
- StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()),
292
+ title: S.current.transaction_details_transaction_id,
293
+ value: tx.txHash,
294
+ key: ValueKey('standard_list_item_transaction_details_id_key'),
295
+ ),
296
+ StandartListItem(
297
+ title: S.current.transaction_details_date,
298
+ value: dateFormat.format(tx.date),
299
+ key: ValueKey('standard_list_item_transaction_details_date_key'),
300
+ ),
301
+ StandartListItem(
302
+ title: S.current.confirmations,
303
+ value: tx.confirmations.toString(),
304
+ key: ValueKey('standard_list_item_transaction_confirmations_key'),
305
+ ),
306
+ StandartListItem(
307
+ title: S.current.transaction_details_height,
308
+ value: '${tx.height}',
309
+ key: ValueKey('standard_list_item_transaction_details_height_key'),
310
+ ),
311
+ StandartListItem(
312
+ title: S.current.transaction_details_amount,
313
+ value: tx.amountFormatted(),
314
+ key: ValueKey('standard_list_item_transaction_details_amount_key'),
315
+ ),
316
if (tx.feeFormatted()?.isNotEmpty ?? false)
255
- StandartListItem(title: S.current.transaction_details_fee, value: tx.feeFormatted()!),
317
+ StandartListItem(
318
+ title: S.current.transaction_details_fee,
319
+ value: tx.feeFormatted()!,
320
+ key: ValueKey('standard_list_item_transaction_details_fee_key'),
321
+ ),
322
];
323
324
items.addAll(_items);
326
327
void _addHavenListItems(TransactionInfo tx, DateFormat dateFormat) {
328
items.addAll([
263
- StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash),
329
StandartListItem(
265
- title: S.current.transaction_details_date, value: dateFormat.format(tx.date)),
266
- StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'),
267
- StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()),
330
+ title: S.current.transaction_details_transaction_id,
331
+ value: tx.txHash,
332
+ key: ValueKey('standard_list_item_transaction_details_id_key'),
333
+ ),
334
+ StandartListItem(
335
+ title: S.current.transaction_details_date,
336
+ value: dateFormat.format(tx.date),
337
+ key: ValueKey('standard_list_item_transaction_details_date_key'),
338
+ ),
339
+ StandartListItem(
340
+ title: S.current.transaction_details_height,
341
+ value: '${tx.height}',
342
+ key: ValueKey('standard_list_item_transaction_details_height_key'),
343
+ ),
344
+ StandartListItem(
345
+ title: S.current.transaction_details_amount,
346
+ value: tx.amountFormatted(),
347
+ key: ValueKey('standard_list_item_transaction_details_amount_key'),
348
+ ),
349
if (tx.feeFormatted()?.isNotEmpty ?? false)
269
- StandartListItem(title: S.current.transaction_details_fee, value: tx.feeFormatted()!),
350
+ StandartListItem(
351
+ title: S.current.transaction_details_fee,
352
+ value: tx.feeFormatted()!,
353
+ key: ValueKey('standard_list_item_transaction_details_fee_key'),
354
+ ),
355
]);
356
}
357
358
void _addEthereumListItems(TransactionInfo tx, DateFormat dateFormat) {
359
final _items = [
275
- StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash),
360
StandartListItem(
277
- title: S.current.transaction_details_date, value: dateFormat.format(tx.date)),
278
- StandartListItem(title: S.current.confirmations, value: tx.confirmations.toString()),
279
- StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'),
280
- StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()),
361
+ title: S.current.transaction_details_transaction_id,
362
+ value: tx.txHash,
363
+ key: ValueKey('standard_list_item_transaction_details_id_key'),
364
+ ),
365
+ StandartListItem(
366
+ title: S.current.transaction_details_date,
367
+ value: dateFormat.format(tx.date),
368
+ key: ValueKey('standard_list_item_transaction_details_date_key'),
369
+ ),
370
+ StandartListItem(
371
+ title: S.current.confirmations,
372
+ value: tx.confirmations.toString(),
373
+ key: ValueKey('standard_list_item_transaction_confirmations_key'),
374
+ ),
375
+ StandartListItem(
376
+ title: S.current.transaction_details_height,
377
+ value: '${tx.height}',
378
+ key: ValueKey('standard_list_item_transaction_details_height_key'),
379
+ ),
380
+ StandartListItem(
381
+ title: S.current.transaction_details_amount,
382
+ value: tx.amountFormatted(),
383
+ key: ValueKey('standard_list_item_transaction_details_amount_key'),
384
+ ),
385
if (tx.feeFormatted()?.isNotEmpty ?? false)
282
- StandartListItem(title: S.current.transaction_details_fee, value: tx.feeFormatted()!),
386
+ StandartListItem(
387
+ title: S.current.transaction_details_fee,
388
+ value: tx.feeFormatted()!,
389
+ key: ValueKey('standard_list_item_transaction_details_fee_key'),
390
+ ),
391
if (showRecipientAddress && tx.to != null)
284
- StandartListItem(title: S.current.transaction_details_recipient_address, value: tx.to!),
392
+ StandartListItem(
393
+ title: S.current.transaction_details_recipient_address,
394
+ value: tx.to!,
395
+ key: ValueKey('standard_list_item_transaction_details_recipient_address_key'),
396
+ ),
397
if (tx.direction == TransactionDirection.incoming && tx.from != null)
286
- StandartListItem(title: S.current.transaction_details_source_address, value: tx.from!),
398
+ StandartListItem(
399
+ title: S.current.transaction_details_source_address,
400
+ value: tx.from!,
401
+ key: ValueKey('standard_list_item_transaction_details_source_address_key'),
402
+ ),
403
];
404
405
items.addAll(_items);
407
408
void _addNanoListItems(TransactionInfo tx, DateFormat dateFormat) {
409
final _items = [
294
- StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash),
410
+ StandartListItem(
411
+ title: S.current.transaction_details_transaction_id,
412
+ value: tx.txHash,
413
+ key: ValueKey('standard_list_item_transaction_details_id_key'),
414
+ ),
415
if (showRecipientAddress && tx.to != null)
296
- StandartListItem(title: S.current.transaction_details_recipient_address, value: tx.to!),
416
+ StandartListItem(
417
+ title: S.current.transaction_details_recipient_address,
418
+ value: tx.to!,
419
+ key: ValueKey('standard_list_item_transaction_details_recipient_address_key'),
420
+ ),
421
if (showRecipientAddress && tx.from != null)
298
- StandartListItem(title: S.current.transaction_details_source_address, value: tx.from!),
299
- StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()),
422
+ StandartListItem(
423
+ title: S.current.transaction_details_source_address,
424
+ value: tx.from!,
425
+ key: ValueKey('standard_list_item_transaction_details_source_address_key'),
426
+ ),
427
StandartListItem(
301
- title: S.current.transaction_details_date, value: dateFormat.format(tx.date)),
302
- StandartListItem(title: S.current.confirmed_tx, value: (tx.confirmations > 0).toString()),
303
- StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'),
428
+ title: S.current.transaction_details_amount,
429
+ value: tx.amountFormatted(),
430
+ key: ValueKey('standard_list_item_transaction_details_amount_key'),
431
+ ),
432
+ StandartListItem(
433
+ title: S.current.transaction_details_date,
434
+ value: dateFormat.format(tx.date),
435
+ key: ValueKey('standard_list_item_transaction_details_date_key'),
436
+ ),
437
+ StandartListItem(
438
+ title: S.current.confirmed_tx,
439
+ value: (tx.confirmations > 0).toString(),
440
+ key: ValueKey('standard_list_item_transaction_confirmed_key'),
441
+ ),
442
+ StandartListItem(
443
+ title: S.current.transaction_details_height,
444
+ value: '${tx.height}',
445
+ key: ValueKey('standard_list_item_transaction_details_height_key'),
446
+ ),
447
];
448
449
items.addAll(_items);
451
452
void _addPolygonListItems(TransactionInfo tx, DateFormat dateFormat) {
453
final _items = [
311
- StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash),
454
StandartListItem(
313
- title: S.current.transaction_details_date, value: dateFormat.format(tx.date)),
314
- StandartListItem(title: S.current.confirmations, value: tx.confirmations.toString()),
315
- StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'),
316
- StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()),
455
+ title: S.current.transaction_details_transaction_id,
456
+ value: tx.txHash,
457
+ key: ValueKey('standard_list_item_transaction_details_id_key'),
458
+ ),
459
+ StandartListItem(
460
+ title: S.current.transaction_details_date,
461
+ value: dateFormat.format(tx.date),
462
+ key: ValueKey('standard_list_item_transaction_details_date_key'),
463
+ ),
464
+ StandartListItem(
465
+ title: S.current.confirmations,
466
+ value: tx.confirmations.toString(),
467
+ key: ValueKey('standard_list_item_transaction_confirmations_key'),
468
+ ),
469
+ StandartListItem(
470
+ title: S.current.transaction_details_height,
471
+ value: '${tx.height}',
472
+ key: ValueKey('standard_list_item_transaction_details_height_key'),
473
+ ),
474
+ StandartListItem(
475
+ title: S.current.transaction_details_amount,
476
+ value: tx.amountFormatted(),
477
+ key: ValueKey('standard_list_item_transaction_details_amount_key'),
478
+ ),
479
if (tx.feeFormatted()?.isNotEmpty ?? false)
318
- StandartListItem(title: S.current.transaction_details_fee, value: tx.feeFormatted()!),
480
+ StandartListItem(
481
+ title: S.current.transaction_details_fee,
482
+ value: tx.feeFormatted()!,
483
+ key: ValueKey('standard_list_item_transaction_details_fee_key'),
484
+ ),
485
if (showRecipientAddress && tx.to != null && tx.direction == TransactionDirection.outgoing)
320
- StandartListItem(title: S.current.transaction_details_recipient_address, value: tx.to!),
486
+ StandartListItem(
487
+ title: S.current.transaction_details_recipient_address,
488
+ value: tx.to!,
489
+ key: ValueKey('standard_list_item_transaction_details_recipient_address_key'),
490
+ ),
491
if (tx.direction == TransactionDirection.incoming && tx.from != null)
322
- StandartListItem(title: S.current.transaction_details_source_address, value: tx.from!),
492
+ StandartListItem(
493
+ title: S.current.transaction_details_source_address,
494
+ value: tx.from!,
495
+ key: ValueKey('standard_list_item_transaction_details_source_address_key'),
496
+ ),
497
];
498
499
items.addAll(_items);
501
502
void _addSolanaListItems(TransactionInfo tx, DateFormat dateFormat) {
503
final _items = [
330
- StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash),
504
StandartListItem(
332
- title: S.current.transaction_details_date, value: dateFormat.format(tx.date)),
333
- StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()),
505
+ title: S.current.transaction_details_transaction_id,
506
+ value: tx.txHash,
507
+ key: ValueKey('standard_list_item_transaction_details_id_key'),
508
+ ),
509
+ StandartListItem(
510
+ title: S.current.transaction_details_date,
511
+ value: dateFormat.format(tx.date),
512
+ key: ValueKey('standard_list_item_transaction_details_date_key'),
513
+ ),
514
+ StandartListItem(
515
+ title: S.current.transaction_details_amount,
516
+ value: tx.amountFormatted(),
517
+ key: ValueKey('standard_list_item_transaction_details_amount_key'),
518
+ ),
519
if (tx.feeFormatted()?.isNotEmpty ?? false)
335
- StandartListItem(title: S.current.transaction_details_fee, value: tx.feeFormatted()!),
520
+ StandartListItem(
521
+ title: S.current.transaction_details_fee,
522
+ value: tx.feeFormatted()!,
523
+ key: ValueKey('standard_list_item_transaction_details_fee_key'),
524
+ ),
525
if (showRecipientAddress && tx.to != null)
337
- StandartListItem(title: S.current.transaction_details_recipient_address, value: tx.to!),
526
+ StandartListItem(
527
+ title: S.current.transaction_details_recipient_address,
528
+ value: tx.to!,
529
+ key: ValueKey('standard_list_item_transaction_details_recipient_address_key'),
530
+ ),
531
if (tx.from != null)
339
- StandartListItem(title: S.current.transaction_details_source_address, value: tx.from!),
532
+ StandartListItem(
533
+ title: S.current.transaction_details_source_address,
534
+ value: tx.from!,
535
+ key: ValueKey('standard_list_item_transaction_details_source_address_key'),
536
+ ),
537
];
538
539
items.addAll(_items);
551
newFee = bitcoin!.getFeeAmountForPriority(
552
wallet, bitcoin!.getBitcoinTransactionPriorityMedium(), inputsCount, outputsCount);
553
357
- RBFListItems.add(StandartListItem(title: S.current.old_fee, value: tx.feeFormatted() ?? '0.0'));
554
+ RBFListItems.add(
555
+ StandartListItem(
556
+ title: S.current.old_fee,
557
+ value: tx.feeFormatted() ?? '0.0',
558
+ key: ValueKey('standard_list_item_rbf_old_fee_key'),
559
+ ),
560
+ );
561
562
if (transactionInfo.fee != null && rawTransaction.isNotEmpty) {
563
final size = bitcoin!.getTransactionVSize(wallet, rawTransaction);
574
final customItemIndex = customItem != null ? priorities.indexOf(customItem) : null;
575
final maxCustomFeeRate = sendViewModel.maxCustomFeeRate?.toDouble();
576
374
- RBFListItems.add(StandardPickerListItem(
577
+ RBFListItems.add(
578
+ StandardPickerListItem(
579
+ key: ValueKey('standard_picker_list_item_transaction_priorities_key'),
580
title: S.current.estimated_new_fee,
581
value: bitcoin!.formatterBitcoinAmountToString(amount: newFee) +
582
' ${walletTypeToCryptoCurrency(wallet.type)}',
592
onItemSelected: (dynamic item, double sliderValue) {
593
transactionPriority = item as TransactionPriority;
594
return setNewFee(value: sliderValue, priority: transactionPriority!);
390
- }));
595
+ },
596
+ ),
597
+ );
598
599
if (transactionInfo.inputAddresses != null && transactionInfo.inputAddresses!.isNotEmpty) {
393
- RBFListItems.add(StandardExpandableListItem(
394
- title: S.current.inputs, expandableItems: transactionInfo.inputAddresses!));
600
+ RBFListItems.add(
601
+ StandardExpandableListItem(
602
+ key: ValueKey('standard_expandable_list_item_transaction_input_addresses_key'),
603
+ title: S.current.inputs,
604
+ expandableItems: transactionInfo.inputAddresses!,
605
+ ),
606
+ );
607
}
608
609
if (transactionInfo.outputAddresses != null && transactionInfo.outputAddresses!.isNotEmpty) {
610
final outputAddresses = transactionInfo.outputAddresses!.map((element) {
611
if (element.contains('OP_RETURN:') && element.length > 40) {
400
- return element.substring(0, 40) + '...';
612
+ return element.substring(0, 40) + '...';
613
}
614
return element;
615
}).toList();
616
617
RBFListItems.add(
406
- StandardExpandableListItem(title: S.current.outputs, expandableItems: outputAddresses));
618
+ StandardExpandableListItem(
619
+ title: S.current.outputs,
620
+ expandableItems: outputAddresses,
621
+ key: ValueKey('standard_expandable_list_item_transaction_output_addresses_key'),
622
+ ),
623
+ );
624
}
625
}
626
627
void _addTronListItems(TransactionInfo tx, DateFormat dateFormat) {
628
final _items = [
412
- StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash),
629
StandartListItem(
414
- title: S.current.transaction_details_date, value: dateFormat.format(tx.date)),
415
- StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()),
630
+ title: S.current.transaction_details_transaction_id,
631
+ value: tx.txHash,
632
+ key: ValueKey('standard_list_item_transaction_details_id_key'),
633
+ ),
634
+ StandartListItem(
635
+ title: S.current.transaction_details_date,
636
+ value: dateFormat.format(tx.date),
637
+ key: ValueKey('standard_list_item_transaction_details_date_key'),
638
+ ),
639
+ StandartListItem(
640
+ title: S.current.transaction_details_amount,
641
+ value: tx.amountFormatted(),
642
+ key: ValueKey('standard_list_item_transaction_details_amount_key'),
643
+ ),
644
if (tx.feeFormatted()?.isNotEmpty ?? false)
417
- StandartListItem(title: S.current.transaction_details_fee, value: tx.feeFormatted()!),
645
+ StandartListItem(
646
+ title: S.current.transaction_details_fee,
647
+ value: tx.feeFormatted()!,
648
+ key: ValueKey('standard_list_item_transaction_details_fee_key'),
649
+ ),
650
if (showRecipientAddress && tx.to != null)
651
StandartListItem(
420
- title: S.current.transaction_details_recipient_address,
421
- value: tron!.getTronBase58Address(tx.to!, wallet)),
652
+ title: S.current.transaction_details_recipient_address,
653
+ value: tron!.getTronBase58Address(tx.to!, wallet),
654
+ key: ValueKey('standard_list_item_transaction_details_recipient_address_key'),
655
+ ),
656
if (tx.from != null)
657
StandartListItem(
424
- title: S.current.transaction_details_source_address,
425
- value: tron!.getTronBase58Address(tx.from!, wallet)),
658
+ title: S.current.transaction_details_source_address,
659
+ value: tron!.getTronBase58Address(tx.from!, wallet),
660
+ key: ValueKey('standard_list_item_transaction_details_source_address_key'),
661
+ ),
662
];
663
664
items.addAll(_items);
691
return bitcoin!.formatterBitcoinAmountToString(amount: newFee);
692
}
693
458
- void replaceByFee(String newFee) => sendViewModel.replaceByFee(transactionInfo, newFee,);
694
+ void replaceByFee(String newFee) => sendViewModel.replaceByFee(transactionInfo, newFee);
695
696
@computed
697
String get pendingTransactionFiatAmountValueFormatted => sendViewModel.isFiatDisabled
709
final addressIndex = tx.additionalInfo['addressIndex'] as int;
710
final feeFormatted = tx.feeFormatted();
711
final _items = [
476
- StandartListItem(title: S.current.transaction_details_transaction_id, value: tx.txHash),
712
StandartListItem(
478
- title: S.current.transaction_details_date, value: dateFormat.format(tx.date)),
479
- StandartListItem(title: S.current.transaction_details_height, value: '${tx.height}'),
480
- StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()),
713
+ title: S.current.transaction_details_transaction_id,
714
+ value: tx.txHash,
715
+ key: ValueKey('standard_list_item_transaction_details_id_key'),
716
+ ),
717
+ StandartListItem(
718
+ title: S.current.transaction_details_date,
719
+ value: dateFormat.format(tx.date),
720
+ key: ValueKey('standard_list_item_transaction_details_date_key'),
721
+ ),
722
+ StandartListItem(
723
+ title: S.current.transaction_details_height,
724
+ value: '${tx.height}',
725
+ key: ValueKey('standard_list_item_transaction_details_height_key'),
726
+ ),
727
+ StandartListItem(
728
+ title: S.current.transaction_details_amount,
729
+ value: tx.amountFormatted(),
730
+ key: ValueKey('standard_list_item_transaction_details_amount_key'),
731
+ ),
732
if (feeFormatted != null)
482
- StandartListItem(title: S.current.transaction_details_fee, value: feeFormatted),
483
- if (key?.isNotEmpty ?? false) StandartListItem(title: S.current.transaction_key, value: key!),
733
+ StandartListItem(
734
+ title: S.current.transaction_details_fee,
735
+ value: feeFormatted,
736
+ key: ValueKey('standard_list_item_transaction_details_fee_key'),
737
+ ),
738
+ if (key?.isNotEmpty ?? false)
739
+ StandartListItem(
740
+ title: S.current.transaction_key,
741
+ value: key!,
742
+ key: ValueKey('standard_list_item_transaction_key'),
743
+ ),
744
];
745
746
if (tx.direction == TransactionDirection.incoming) {
750
751
if (address.isNotEmpty) {
752
isRecipientAddressShown = true;
493
- _items.add(StandartListItem(
494
- title: S.current.transaction_details_recipient_address,
495
- value: address,
496
- ));
753
+ _items.add(
754
+ StandartListItem(
755
+ title: S.current.transaction_details_recipient_address,
756
+ value: address,
757
+ key: ValueKey('standard_list_item_transaction_details_recipient_address_key'),
758
+ ),
759
+ );
760
}
761
762
if (label.isNotEmpty) {
500
- _items.add(StandartListItem(title: S.current.address_label, value: label));
763
+ _items.add(
764
+ StandartListItem(
765
+ title: S.current.address_label,
766
+ value: label,
767
+ key: ValueKey('standard_list_item_address_label_key'),
768
+ ),
769
+ );
770
}
771
} catch (e) {
772
print(e.toString());