implemented feedback from tester. XMRchain.net is the new monero block explorer of choice. improved human readability and changed order

Tanner Silva committed Nov 28, 2020 at 12:42 UTC 630fd4f236f108e8439f14b38ab3fc4f16446095
1 file changed +14 -5
lib/src/screens/transaction_details/transaction_details_page.dart
+14 -5
@@ -15,6 +15,14 @@ import 'package:url_launcher/url_launcher.dart';
15
16 import 'package:hive/hive.dart';
17
18 +String blockExplorerName(String inputName) {
19 + if (inputName.contains("xmrchain")) {
20 + return "XMRChain.net";
21 + } else {
22 + return "Blockchain.com";
23 + }
24 +}
25 +
26 class TransactionDetailsPage extends BasePage {
27 TransactionDetailsPage(this.transactionInfo, bool showRecipientAddress,
28 Box<TransactionDescription> transactionDescriptionBox)
@@ -34,10 +42,10 @@ class TransactionDetailsPage extends BasePage {
42 StandartListItem(
43 title: S.current.transaction_details_amount,
44 value: tx.amountFormatted()),
45 + StandartListItem(title: S.current.send_fee, value: tx.feeFormatted()),
46 StandartListItem(
47 title: "View in Block Explorer",
39 - value: "https://localmonero.co/blocks/search/${tx.id}"),
40 - StandartListItem(title: S.current.send_fee, value: tx.feeFormatted())
48 + value: "https://xmrchain.net/search?value=${tx.id}")
49 ];
50
51 if (showRecipientAddress) {
@@ -110,7 +118,7 @@ class TransactionDetailsPage extends BasePage {
118 final item = _items[index];
119 final isFinalBlockExplorerItem =
120 index == _items.length - 1 ? true : false;
113 - if (isFinalBlockExplorerItem == true) {
121 + if (isFinalBlockExplorerItem == false) {
122 return GestureDetector(
123 onTap: () {
124 Clipboard.setData(ClipboardData(text: item.value));
@@ -119,7 +127,7 @@ class TransactionDetailsPage extends BasePage {
127 },
128 child: StandartListRow(
129 title: '${item.title}:',
122 - value: "",
130 + value: item.value,
131 isDrawBottom: isFinalBlockExplorerItem),
132 );
133 } else {
@@ -129,7 +137,8 @@ class TransactionDetailsPage extends BasePage {
137 },
138 child: StandartListRow(
139 title: '${item.title}:',
132 - value: item.value,
140 + value:
141 + "View transaction on ${blockExplorerName(item.value)}",
142 isDrawBottom: isFinalBlockExplorerItem),
143 );
144 }