added view progress button for bitcoin transactions

This commit is contained in:
Blake Kaufman
2026-06-26 08:58:43 -04:00
parent a2ace2a20c
commit 38c6cabd02
9 changed files with 66 additions and 15 deletions
+50 -7
View File
@@ -86,11 +86,9 @@ export default function ExpandedTx(props) {
const contactSupportLabel = t(
'screens.inAccount.expandedTxPage.contactSupport',
);
const viewProgressLabel = t('screens.inAccount.expandedTxPage.viewProgress');
const { showToast } = useToast();
const { shouldStack, containerProps, getLabelProps } =
useAdaptiveButtonLayout([techicalDetailsLabel, contactSupportLabel]);
const [transaction, setTransaction] = useState(
props.route.params.transaction,
);
@@ -100,6 +98,27 @@ export default function ExpandedTx(props) {
const showLNOrchestraAsFailed = isOrchestraSwapFailed(transaction);
const isFailedPayment =
transaction.paymentStatus === 'failed' || showLNOrchestraAsFailed;
const isPending =
transaction.paymentStatus === 'pending' || transaction.isBalancePending;
const showViewProgress =
isPending &&
transaction.paymentType === 'bitcoin' &&
!!transaction.details?.onChainTxid;
const secondaryLabel = isFailedPayment
? contactSupportLabel
: showViewProgress
? viewProgressLabel
: null;
const { shouldStack, containerProps, getLabelProps } =
useAdaptiveButtonLayout(
[techicalDetailsLabel, secondaryLabel].filter(Boolean),
);
// Contacts for ProfileImageRow — successful recipients only
const bulkContacts = bulkPaymentGroup
.filter(e => e.status !== 'failed')
@@ -167,10 +186,6 @@ export default function ExpandedTx(props) {
? t('screens.inAccount.expandedTxPage.gift')
: transaction.paymentType;
const isFailedPayment =
transaction.paymentStatus === 'failed' || showLNOrchestraAsFailed;
const isPending =
transaction.paymentStatus === 'pending' || transaction.isBalancePending;
const isSuccessful = !isFailedPayment && !isPending;
const paymentDate = new Date(transaction.details.time);
const amount = transaction?.details?.amount;
@@ -765,6 +780,34 @@ export default function ExpandedTx(props) {
/>
</TouchableOpacity>
)}
{showViewProgress && (
<TouchableOpacity
onPress={() =>
navigate.navigate('CustomWebView', {
webViewURL: `https://mempool.space/tx/${transaction.details.onChainTxid}`,
headerText: viewProgressLabel,
})
}
style={[
styles.button,
{
backgroundColor: theme
? COLORS.darkModeText
: COLORS.primary,
},
shouldStack ? styles.buttonStacked : styles.buttonColumn,
]}
>
<ThemeText
styles={{
includeFontPadding: false,
color: theme ? COLORS.lightModeText : COLORS.darkModeText,
}}
{...getLabelProps(1)}
content={viewProgressLabel}
/>
</TouchableOpacity>
)}
</View>
{/* Receipt Dots */}
+2 -1
View File
@@ -2157,7 +2157,8 @@
"splitPayment": "Aufteilen",
"chainSwap_other": "Stablecoin",
"chainSwap_lightning": "Lightning",
"contactSupport": "Support"
"contactSupport": "Support",
"viewProgress": "Fortschritt anzeigen"
},
"explorePage": {
"timeLeft": "({{time}} verbleibend)",
+2 -1
View File
@@ -2158,7 +2158,8 @@
"splitPayment": "Split",
"chainSwap_other": "Stablecoin",
"chainSwap_lightning": "Lightning",
"contactSupport": "Support"
"contactSupport": "Support",
"viewProgress": "View progress"
},
"explorePage": {
"timeLeft": "({{time}} left)",
+2 -1
View File
@@ -2158,7 +2158,8 @@
"splitPayment": "Dividir",
"chainSwap_other": "Stablecoin",
"chainSwap_lightning": "Lightning",
"contactSupport": "Soporte"
"contactSupport": "Soporte",
"viewProgress": "Ver progreso"
},
"explorePage": {
"timeLeft": "({{time}} restantes)",
+2 -1
View File
@@ -2158,7 +2158,8 @@
"splitPayment": "Partager",
"chainSwap_other": "Stablecoin",
"chainSwap_lightning": "Lightning",
"contactSupport": "Support"
"contactSupport": "Support",
"viewProgress": "Voir la progression"
},
"explorePage": {
"timeLeft": "({{time}} restantes)",
+2 -1
View File
@@ -2158,7 +2158,8 @@
"splitPayment": "Dividi",
"chainSwap_other": "Stablecoin",
"chainSwap_lightning": "Lightning",
"contactSupport": "Supporto"
"contactSupport": "Supporto",
"viewProgress": "Vedi avanzamento"
},
"explorePage": {
"timeLeft": "({{time}} rimanenti)",
+2 -1
View File
@@ -2157,7 +2157,8 @@
"splitPayment": "Dividir",
"chainSwap_other": "Dólar digital",
"chainSwap_lightning": "Lightning",
"contactSupport": "Suporte"
"contactSupport": "Suporte",
"viewProgress": "Ver progresso"
},
"explorePage": {
"timeLeft": "({{time}} restantes)",
+2 -1
View File
@@ -2159,7 +2159,8 @@
"splitPayment": "Разделить",
"chainSwap_other": "Stablecoin",
"chainSwap_lightning": "Lightning",
"contactSupport": "Поддержка"
"contactSupport": "Поддержка",
"viewProgress": "Посмотреть статус"
},
"explorePage": {
"timeLeft": "(осталось {{time}})",
+2 -1
View File
@@ -2158,7 +2158,8 @@
"splitPayment": "Dela",
"chainSwap_other": "Stablecoin",
"chainSwap_lightning": "Lightning",
"contactSupport": "Support"
"contactSupport": "Support",
"viewProgress": "Visa förlopp"
},
"explorePage": {
"timeLeft": "({{time}} kvar)",