From 6959f26b905d0ae061145a0bd66c72738ad237ca Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Tue, 15 Jan 2019 09:13:48 +0100 Subject: [PATCH] fix(wallet): show as unconfirmed transactions Show unconfirmed transactions as "Unconfirmed" rather than being in block 0. Fix #1344 --- .../TransactionModal/TransactionModal.js | 23 ++++++++++++------- .../Activity/TransactionModal/messages.js | 5 ++-- app/translations/af-ZA.json | 1 + app/translations/ar-SA.json | 1 + app/translations/bg-BG.json | 1 + app/translations/ca-ES.json | 1 + app/translations/cs-CZ.json | 1 + app/translations/da-DK.json | 1 + app/translations/de-DE.json | 1 + app/translations/el-GR.json | 1 + app/translations/en.json | 3 ++- app/translations/es-ES.json | 1 + app/translations/fi-FI.json | 1 + app/translations/fr-FR.json | 1 + app/translations/ga-IE.json | 1 + app/translations/he-IL.json | 1 + app/translations/hi-IN.json | 1 + app/translations/hr-HR.json | 1 + app/translations/hu-HU.json | 1 + app/translations/it-IT.json | 1 + app/translations/ja-JP.json | 1 + app/translations/ko-KR.json | 1 + app/translations/nl-NL.json | 1 + app/translations/no-NO.json | 1 + app/translations/pl-PL.json | 1 + app/translations/pt-BR.json | 1 + app/translations/pt-PT.json | 1 + app/translations/ro-RO.json | 1 + app/translations/ru-RU.json | 1 + app/translations/sr-SP.json | 1 + app/translations/sv-SE.json | 1 + app/translations/tr-TR.json | 1 + app/translations/uk-UA.json | 1 + app/translations/vi-VN.json | 1 + app/translations/zh-CN.json | 1 + app/translations/zh-TW.json | 1 + 36 files changed, 53 insertions(+), 11 deletions(-) diff --git a/app/components/Activity/TransactionModal/TransactionModal.js b/app/components/Activity/TransactionModal/TransactionModal.js index 956888b5e14..77386b921e1 100644 --- a/app/components/Activity/TransactionModal/TransactionModal.js +++ b/app/components/Activity/TransactionModal/TransactionModal.js @@ -170,15 +170,22 @@ export default class TransactionModal extends React.PureComponent { )} } + left={} right={ - blockExplorer.showBlock(network, item.block_hash)} - > - {item.block_height} - + item.block_height ? ( + blockExplorer.showBlock(network, item.block_hash)} + > + + + ) : ( + + ) } /> diff --git a/app/components/Activity/TransactionModal/messages.js b/app/components/Activity/TransactionModal/messages.js index 3283304a5be..b7643da6bdc 100644 --- a/app/components/Activity/TransactionModal/messages.js +++ b/app/components/Activity/TransactionModal/messages.js @@ -10,6 +10,7 @@ export default defineMessages({ status: 'Status', current_value: 'Current value', address: 'Address', - block_height: 'Confirmed in Block', - tx_hash: 'Transaction ID' + block_height: 'Confirmed in block {height}', + tx_hash: 'Transaction ID', + unconfirmed: 'Unconfirmed' }) diff --git a/app/translations/af-ZA.json b/app/translations/af-ZA.json index 6d576d49486..e6322564854 100644 --- a/app/translations/af-ZA.json +++ b/app/translations/af-ZA.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/ar-SA.json b/app/translations/ar-SA.json index 30fdb9c0c40..0c323a92a1f 100644 --- a/app/translations/ar-SA.json +++ b/app/translations/ar-SA.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "قيد الانتظار", diff --git a/app/translations/bg-BG.json b/app/translations/bg-BG.json index 0e296b83203..1b02b36857a 100644 --- a/app/translations/bg-BG.json +++ b/app/translations/bg-BG.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Всички", "components.Activity.hide_expired": "Скрии изтеклите заявки", "components.Activity.pending": "Чакащи", diff --git a/app/translations/ca-ES.json b/app/translations/ca-ES.json index 6d576d49486..e6322564854 100644 --- a/app/translations/ca-ES.json +++ b/app/translations/ca-ES.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/cs-CZ.json b/app/translations/cs-CZ.json index 48a4f96d64e..af35170bdbc 100644 --- a/app/translations/cs-CZ.json +++ b/app/translations/cs-CZ.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Všechny", "components.Activity.hide_expired": "", "components.Activity.pending": "Čekající", diff --git a/app/translations/da-DK.json b/app/translations/da-DK.json index cedf39fba8a..f1762ebb7bf 100644 --- a/app/translations/da-DK.json +++ b/app/translations/da-DK.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/de-DE.json b/app/translations/de-DE.json index b7f7e21fe20..02761020820 100644 --- a/app/translations/de-DE.json +++ b/app/translations/de-DE.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Alle", "components.Activity.hide_expired": "Verstecke abgelaufene Anfragen", "components.Activity.pending": "Ausstehend", diff --git a/app/translations/el-GR.json b/app/translations/el-GR.json index e9b2280fed5..8dec1f84805 100644 --- a/app/translations/el-GR.json +++ b/app/translations/el-GR.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Ολα", "components.Activity.hide_expired": "", "components.Activity.pending": "Εκκρεμής", diff --git a/app/translations/en.json b/app/translations/en.json index 9bc2c1185f3..637970677bf 100644 --- a/app/translations/en.json +++ b/app/translations/en.json @@ -38,7 +38,7 @@ "components.Activity.Transaction.type": "On-chain transaction", "components.Activity.TransactionModal.address": "Address", "components.Activity.TransactionModal.amount": "Amount", - "components.Activity.TransactionModal.block_height": "Confirmed in Block", + "components.Activity.TransactionModal.block_height": "Confirmed in block {height}", "components.Activity.TransactionModal.current_value": "Current value", "components.Activity.TransactionModal.date_confirmed": "Date of confirmation", "components.Activity.TransactionModal.fee": "Total fee", @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "Received", "components.Activity.TransactionModal.title_sent": "Sent", "components.Activity.TransactionModal.tx_hash": "Transaction ID", + "components.Activity.TransactionModal.unconfirmed": "Unconfirmed", "components.Activity.all": "All", "components.Activity.hide_expired": "Hide Expired Requests", "components.Activity.pending": "Pending", diff --git a/app/translations/es-ES.json b/app/translations/es-ES.json index 55cb28025c3..0cea8f95eef 100644 --- a/app/translations/es-ES.json +++ b/app/translations/es-ES.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Todo", "components.Activity.hide_expired": "", "components.Activity.pending": "Pendiente", diff --git a/app/translations/fi-FI.json b/app/translations/fi-FI.json index 6d576d49486..e6322564854 100644 --- a/app/translations/fi-FI.json +++ b/app/translations/fi-FI.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/fr-FR.json b/app/translations/fr-FR.json index 937721c75d2..c6f20fa485b 100644 --- a/app/translations/fr-FR.json +++ b/app/translations/fr-FR.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Tout", "components.Activity.hide_expired": "", "components.Activity.pending": "En attente", diff --git a/app/translations/ga-IE.json b/app/translations/ga-IE.json index d62b1e656dd..ac54f3f5256 100644 --- a/app/translations/ga-IE.json +++ b/app/translations/ga-IE.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Gach", "components.Activity.hide_expired": "Folaigh Iarratais Leathnaithe", "components.Activity.pending": "Ar feitheamh", diff --git a/app/translations/he-IL.json b/app/translations/he-IL.json index 3ddae2c6a9f..e9ac1a8b864 100644 --- a/app/translations/he-IL.json +++ b/app/translations/he-IL.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/hi-IN.json b/app/translations/hi-IN.json index ee9123fdbcb..eb16d890c2b 100644 --- a/app/translations/hi-IN.json +++ b/app/translations/hi-IN.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "सभी", "components.Activity.hide_expired": "", "components.Activity.pending": "लंबित", diff --git a/app/translations/hr-HR.json b/app/translations/hr-HR.json index 42558460f88..7691f3f3621 100644 --- a/app/translations/hr-HR.json +++ b/app/translations/hr-HR.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Sve", "components.Activity.hide_expired": "Sakrij istekle zahtjeve", "components.Activity.pending": "Na čekanju", diff --git a/app/translations/hu-HU.json b/app/translations/hu-HU.json index 6d576d49486..e6322564854 100644 --- a/app/translations/hu-HU.json +++ b/app/translations/hu-HU.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/it-IT.json b/app/translations/it-IT.json index 1fcf2b72dc5..91b800f8a88 100644 --- a/app/translations/it-IT.json +++ b/app/translations/it-IT.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/ja-JP.json b/app/translations/ja-JP.json index 4251b12af1c..ccadac2ccff 100644 --- a/app/translations/ja-JP.json +++ b/app/translations/ja-JP.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "全て", "components.Activity.hide_expired": "", "components.Activity.pending": "保留中", diff --git a/app/translations/ko-KR.json b/app/translations/ko-KR.json index 6d576d49486..e6322564854 100644 --- a/app/translations/ko-KR.json +++ b/app/translations/ko-KR.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/nl-NL.json b/app/translations/nl-NL.json index c6180f8779d..723b16f7207 100644 --- a/app/translations/nl-NL.json +++ b/app/translations/nl-NL.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Alle", "components.Activity.hide_expired": "", "components.Activity.pending": "In behandeling", diff --git a/app/translations/no-NO.json b/app/translations/no-NO.json index 6d576d49486..e6322564854 100644 --- a/app/translations/no-NO.json +++ b/app/translations/no-NO.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/pl-PL.json b/app/translations/pl-PL.json index d03065382d2..cf7eb4024b0 100644 --- a/app/translations/pl-PL.json +++ b/app/translations/pl-PL.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/pt-BR.json b/app/translations/pt-BR.json index b50ae3a0977..0b68a0a0de1 100644 --- a/app/translations/pt-BR.json +++ b/app/translations/pt-BR.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Tudo", "components.Activity.hide_expired": "", "components.Activity.pending": "Pendente", diff --git a/app/translations/pt-PT.json b/app/translations/pt-PT.json index 94bba34d4b8..dcaaea7aba5 100644 --- a/app/translations/pt-PT.json +++ b/app/translations/pt-PT.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/ro-RO.json b/app/translations/ro-RO.json index 7c128651752..d6b6cc9f8e1 100644 --- a/app/translations/ro-RO.json +++ b/app/translations/ro-RO.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Toate", "components.Activity.hide_expired": "", "components.Activity.pending": "În aşteptare", diff --git a/app/translations/ru-RU.json b/app/translations/ru-RU.json index 42859901ccb..67f0bd9f9e7 100644 --- a/app/translations/ru-RU.json +++ b/app/translations/ru-RU.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Все", "components.Activity.hide_expired": "", "components.Activity.pending": "Ожидание", diff --git a/app/translations/sr-SP.json b/app/translations/sr-SP.json index 6d576d49486..e6322564854 100644 --- a/app/translations/sr-SP.json +++ b/app/translations/sr-SP.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/sv-SE.json b/app/translations/sv-SE.json index 015af0645f3..516154a965d 100644 --- a/app/translations/sv-SE.json +++ b/app/translations/sv-SE.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Alla", "components.Activity.hide_expired": "", "components.Activity.pending": "Väntande", diff --git a/app/translations/tr-TR.json b/app/translations/tr-TR.json index 7b75fb95a19..b28196ba033 100644 --- a/app/translations/tr-TR.json +++ b/app/translations/tr-TR.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Tüm", "components.Activity.hide_expired": "", "components.Activity.pending": "Bekleyen", diff --git a/app/translations/uk-UA.json b/app/translations/uk-UA.json index 5c8d5570eb5..6d195b94eba 100644 --- a/app/translations/uk-UA.json +++ b/app/translations/uk-UA.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "Усі", "components.Activity.hide_expired": "", "components.Activity.pending": "Очікування", diff --git a/app/translations/vi-VN.json b/app/translations/vi-VN.json index 6d576d49486..e6322564854 100644 --- a/app/translations/vi-VN.json +++ b/app/translations/vi-VN.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "", "components.Activity.hide_expired": "", "components.Activity.pending": "", diff --git a/app/translations/zh-CN.json b/app/translations/zh-CN.json index 5592af39e46..58ca22dbe54 100644 --- a/app/translations/zh-CN.json +++ b/app/translations/zh-CN.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "所有", "components.Activity.hide_expired": "", "components.Activity.pending": "等待", diff --git a/app/translations/zh-TW.json b/app/translations/zh-TW.json index 0f8b9d7781b..871671c7b23 100644 --- a/app/translations/zh-TW.json +++ b/app/translations/zh-TW.json @@ -47,6 +47,7 @@ "components.Activity.TransactionModal.title_received": "", "components.Activity.TransactionModal.title_sent": "", "components.Activity.TransactionModal.tx_hash": "", + "components.Activity.TransactionModal.unconfirmed": "", "components.Activity.all": "所有", "components.Activity.hide_expired": "", "components.Activity.pending": "等待",