Revert "ADD: TX Details action action"

This reverts commit cdd923db7c.
This commit is contained in:
Marcos Rodriguez Velez 2025-02-20 19:32:01 -04:00
parent cdd923db7c
commit 0b5e640630
27 changed files with 46 additions and 79 deletions

View file

@ -246,19 +246,7 @@ export const TransactionListItem: React.FC<TransactionListItemProps> = React.mem
setSubtitleNumberOfLines(0);
}, []);
const handleOnDetailsPress = useCallback(() => {
if (walletID && item && item.hash) {
navigate('TransactionDetails', { tx: item, hash: item.hash, walletID });
} else {
const lightningWallet = wallets.find(wallet => wallet?.getID() === item.walletID);
if (lightningWallet) {
navigate('LNDViewInvoice', {
invoice: item,
walletID: lightningWallet.getID(),
});
}
}
}, [item, navigate, walletID, wallets]);
const subtitleProps = useMemo(() => ({ numberOfLines: subtitleNumberOfLines }), [subtitleNumberOfLines]);
const handleOnCopyAmountTap = useCallback(() => Clipboard.setString(rowTitle.replace(/[\s\\-]/g, '')), [rowTitle]);
const handleOnCopyTransactionID = useCallback(() => Clipboard.setString(item.hash), [item.hash]);
@ -289,8 +277,6 @@ export const TransactionListItem: React.FC<TransactionListItemProps> = React.mem
handleCopyOpenInBlockExplorerPress();
} else if (id === CommonToolTipActions.CopyTXID.id) {
handleOnCopyTransactionID();
} else if (id === CommonToolTipActions.Details.id) {
handleOnDetailsPress();
}
},
[
@ -298,40 +284,31 @@ export const TransactionListItem: React.FC<TransactionListItemProps> = React.mem
handleOnCopyAmountTap,
handleOnCopyNote,
handleOnCopyTransactionID,
handleOnDetailsPress,
handleOnExpandNote,
handleOnViewOnBlockExplorer,
],
);
const toolTipActions = useMemo((): Action[] => {
const actions: (Action | Action[])[] = [
{
...CommonToolTipActions.CopyAmount,
hidden: rowTitle === loc.lnd.expired,
},
{
...CommonToolTipActions.CopyNote,
hidden: !subtitle,
},
{
...CommonToolTipActions.CopyTXID,
hidden: !item.hash,
},
{
...CommonToolTipActions.CopyBlockExplorerLink,
hidden: !item.hash,
},
[{ ...CommonToolTipActions.OpenInBlockExplorer, hidden: !item.hash }, CommonToolTipActions.Details],
[
{
...CommonToolTipActions.ExpandNote,
hidden: subtitleNumberOfLines !== 1,
},
],
];
const actions: (Action | Action[])[] = [];
if (rowTitle !== loc.lnd.expired) {
actions.push(CommonToolTipActions.CopyAmount);
}
if (subtitle) {
actions.push(CommonToolTipActions.CopyNote);
}
if (item.hash) {
actions.push(CommonToolTipActions.CopyTXID, CommonToolTipActions.CopyBlockExplorerLink, [CommonToolTipActions.OpenInBlockExplorer]);
}
if (subtitle && subtitleNumberOfLines === 1) {
actions.push([CommonToolTipActions.ExpandNote]);
}
return actions as Action[];
}, [rowTitle, subtitle, item.hash, subtitleNumberOfLines]);
}, [item.hash, subtitle, rowTitle, subtitleNumberOfLines]);
const accessibilityState = useMemo(() => {
return {
@ -339,8 +316,6 @@ export const TransactionListItem: React.FC<TransactionListItemProps> = React.mem
};
}, [subtitleNumberOfLines]);
const subtitleProps = useMemo(() => ({ numberOfLines: subtitleNumberOfLines }), [subtitleNumberOfLines]);
return (
<ToolTipMenu
isButton

View file

@ -275,7 +275,7 @@
"details_balance_hide": "إخفاء الرصيد",
"details_balance_show": "عرض الرصيد",
"details_copy": "نسخ",
"details_copy_browser_link": "نسخ رابط متصفح الكتل",
"details_copy_block_explorer_link": "نسخ رابط متصفح الكتل",
"details_copy_note": "نسخ الملاحظة",
"details_copy_txid": "نسخ معرّف المعاملة",
"details_from": "من",

View file

@ -338,7 +338,7 @@
"details_balance_hide": "Skrýt zůstatek",
"details_balance_show": "Zobrazit zůstatek",
"details_copy": "Zkopírovat",
"details_copy_browser_link": "Zkopírovat odkaz na průzkumník bloků",
"details_copy_block_explorer_link": "Zkopírovat odkaz na průzkumník bloků",
"details_copy_note": "Zkopírovat poznámku",
"details_copy_txid": "Zkopírovat ID transakce",
"details_from": "Vstup",

View file

@ -339,7 +339,7 @@
"details_balance_hide": "Guthaben verbergen",
"details_balance_show": "Guthaben zeigen",
"details_copy": "Kopieren",
"details_copy_browser_link": "Block-Explorer Link kopieren",
"details_copy_block_explorer_link": "Block-Explorer Link kopieren",
"details_copy_note": "Beschreibung kopieren",
"details_copy_txid": "Transaktions-ID kopieren",
"details_from": "Eingang",

View file

@ -332,7 +332,6 @@
"confirmations_lowercase": "{confirmations} confirmations",
"copy_link": "Copy Link",
"expand_note": "Expand Note",
"copy_amount": "Copy Amount",
"cpfp_create": "Create",
"cpfp_exp": "We will create another transaction that spends your unconfirmed transaction. The total fee will be higher than the original transaction fee, so it should be mined faster. This is called CPFP—Child Pays for Parent.",
"cpfp_no_bump": "This transaction is not bumpable.",
@ -340,7 +339,7 @@
"details_balance_hide": "Hide Balance",
"details_balance_show": "Show Balance",
"details_copy": "Copy",
"details_copy_browser_link": "Copy Browser Link",
"details_copy_block_explorer_link": "Copy Block Explorer Link",
"details_copy_note": "Copy Note",
"details_copy_txid": "Copy Transaction ID",
"details_from": "Input",

View file

@ -266,7 +266,7 @@
"details_balance_hide": "Esconder balance",
"details_balance_show": "Mostrar balance",
"details_copy": "Copiar",
"details_copy_browser_link": "Copiar el enlace del explorador de bloques",
"details_copy_block_explorer_link": "Copiar el enlace del explorador de bloques",
"details_copy_note": "Copiar nota",
"details_copy_txid": "Copiar el ID de la transacción",
"details_from": "Origen",

View file

@ -339,7 +339,7 @@
"details_balance_hide": "Ocultar Balance",
"details_balance_show": "Mostrar Balance",
"details_copy": "Copiar",
"details_copy_browser_link": "Copiar el enlace del explorador de bloques",
"details_copy_block_explorer_link": "Copiar el enlace del explorador de bloques",
"details_copy_note": "Copiar nota",
"details_copy_txid": "Copiar ID de transacción",
"details_from": "Entrada",

View file

@ -277,7 +277,7 @@
"details_balance_hide": "پنهان‌کردن موجودی",
"details_balance_show": "نمایش موجودی",
"details_copy": "کپی",
"details_copy_browser_link": "کپی لینک مرورگر بلاک",
"details_copy_block_explorer_link": "کپی لینک مرورگر بلاک",
"details_copy_note": "کپی یادداشت",
"details_copy_txid": "کپی شناسهٔ تراکنش",
"details_from": "ورودی",

View file

@ -292,7 +292,7 @@
"details_balance_hide": "Piilota Saldo",
"details_balance_show": "Näytä Saldo",
"details_copy": "Kopioi",
"details_copy_browser_link": "Kopioi linkki lohkoketjuselaimeen",
"details_copy_block_explorer_link": "Kopioi linkki lohkoketjuselaimeen",
"details_copy_note": "Kopioi muistiinpanot",
"details_copy_txid": "Kopioi tapahtumatunnus",
"details_from": "Syöte",

View file

@ -339,7 +339,7 @@
"details_balance_hide": "Cacher le solde",
"details_balance_show": "Montrer le solde",
"details_copy": "Copier",
"details_copy_browser_link": "Copier le lien Block Explorer",
"details_copy_block_explorer_link": "Copier le lien Block Explorer",
"details_copy_note": "Copier la note",
"details_copy_txid": "Copier l'ID de transaction",
"details_from": "De",

View file

@ -330,7 +330,7 @@
"details_balance_hide": "הסתרת מאזן",
"details_balance_show": "הצגת מאזן",
"details_copy": "העתקה",
"details_copy_browser_link": "העתקת קישור סייר בלוקים",
"details_copy_block_explorer_link": "העתקת קישור סייר בלוקים",
"details_copy_note": "העתקת הערה",
"details_copy_txid": "העתקת מזהה פעולה",
"details_from": "קלט",

View file

@ -274,7 +274,7 @@
"details_balance_hide": "Egyenleg elrejtése",
"details_balance_show": "Egyenleg mutatása",
"details_copy": "Másolás",
"details_copy_browser_link": "Blokk Böngésző Link Másolása",
"details_copy_block_explorer_link": "Blokk Böngésző Link Másolása",
"details_copy_note": "Megjegyzés Másolása",
"details_copy_txid": "Tranzakciós ID Másolása",
"details_from": "Bejövő utalás",

View file

@ -272,7 +272,7 @@
"details_balance_hide": "Nascondi il saldo",
"details_balance_show": "Mostra il saldo",
"details_copy": "Copia",
"details_copy_browser_link": "Copia link del Block Explorer",
"details_copy_block_explorer_link": "Copia link del Block Explorer",
"details_copy_note": "Copia Nota",
"details_copy_txid": "Copia ID di transazione",
"details_from": "Da",

View file

@ -338,7 +338,7 @@
"details_balance_hide": "残高を隠す",
"details_balance_show": "残高を表示",
"details_copy": "コピー",
"details_copy_browser_link": "ブロックエクスプローラーのリンクをコピー",
"details_copy_block_explorer_link": "ブロックエクスプローラーのリンクをコピー",
"details_copy_note": "ノートをコピー",
"details_copy_txid": "取引IDをコピー",
"details_from": "送り主",

View file

@ -281,7 +281,7 @@
"details_balance_hide": "잔고 감추기",
"details_balance_show": "잔고 보여주기",
"details_copy": "복사",
"details_copy_browser_link": "블록 익스플로러 링크 복사하기",
"details_copy_block_explorer_link": "블록 익스플로러 링크 복사하기",
"details_copy_note": "노트 복사하기",
"details_copy_txid": "거래 아이디 복사하기",
"details_from": "입력",

View file

@ -262,7 +262,7 @@
"details_balance_hide": "Gjem Balanse",
"details_balance_show": "Vis Balanse",
"details_copy": "Kopier",
"details_copy_browser_link": "Kopier Block Explorer-lenken",
"details_copy_block_explorer_link": "Kopier Block Explorer-lenken",
"details_copy_note": "Kopier Merknad",
"details_copy_txid": "Kopier Transaksjons-ID",
"details_from": "Inndata",

View file

@ -266,7 +266,7 @@
"details_balance_hide": "Verberg saldo",
"details_balance_show": "Toon saldo",
"details_copy": "Kopiëren",
"details_copy_browser_link": "Kopieer blok explorer Link",
"details_copy_block_explorer_link": "Kopieer blok explorer Link",
"details_copy_note": "Kopieer Note",
"details_copy_txid": "Kopieer Transactie ID",
"details_from": "Invoer",

View file

@ -339,7 +339,7 @@
"details_balance_hide": "Ukryj Saldo",
"details_balance_show": "Pokaż Saldo",
"details_copy": "Kopiuj",
"details_copy_browser_link": "Kopiuj link do eksploratora bloków",
"details_copy_block_explorer_link": "Kopiuj link do eksploratora bloków",
"details_copy_note": "Kopiuj notatkę",
"details_copy_txid": "Kopiuj ID transakcji",
"details_from": "Wejście",

View file

@ -326,7 +326,7 @@
"details_balance_hide": "Esconder Saldo",
"details_balance_show": "Mostrar Saldo",
"details_copy": "Copiar",
"details_copy_browser_link": "Copiar Link do Explorador de Blocos",
"details_copy_block_explorer_link": "Copiar Link do Explorador de Blocos",
"details_copy_note": "Copiar Nota",
"details_copy_txid": "Copiar ID da transação",
"details_from": "Entrada",

View file

@ -251,7 +251,7 @@
"details_balance_hide": "Ascunde balanța",
"details_balance_show": "Afișează balanța",
"details_copy": "Copiază",
"details_copy_browser_link": "Copiază link-ul block explorer-ului.",
"details_copy_block_explorer_link": "Copiază link-ul block explorer-ului.",
"details_copy_txid": "Copiază ID-ul tranzacției",
"details_from": "Input",
"details_inputs": "Input-uri",

View file

@ -327,7 +327,7 @@
"details_balance_hide": "Скрыть баланс",
"details_balance_show": "Показать баланс",
"details_copy": "Копировать",
"details_copy_browser_link": "Копировать ссылку на обозреватель блоков",
"details_copy_block_explorer_link": "Копировать ссылку на обозреватель блоков",
"details_copy_note": "Копировать заметку",
"details_copy_txid": "Копировать ID транзакции",
"details_from": "От",

View file

@ -259,7 +259,7 @@
"details_balance_hide": "Hide Balance",
"details_balance_show": "ශේෂය පෙන්වන්න",
"details_copy": "පිටපත් කරන්න",
"details_copy_browser_link": "බ්ලොක් එක්ස්ප්ලෝරර් සම්බන්ධකය පිටපත් කරන්න",
"details_copy_block_explorer_link": "බ්ලොක් එක්ස්ප්ලෝරර් සම්බන්ධකය පිටපත් කරන්න",
"details_copy_note": "සටහන පිටපත් කරන්න",
"details_copy_txid": "ගනුදෙනු හැඳුනුම්පත පිටපත් කරන්න",
"details_from": "ආදානය",

View file

@ -266,7 +266,7 @@
"details_balance_hide": "Skrij Stanje",
"details_balance_show": "Prikaži Stanje",
"details_copy": "Kopiraj",
"details_copy_browser_link": "Kopiraj povezavo razisk. blokov",
"details_copy_block_explorer_link": "Kopiraj povezavo razisk. blokov",
"details_copy_note": "Kopiraj opis",
"details_copy_txid": "Kopiraj ID transakcije",
"details_from": "Vhod",

View file

@ -273,7 +273,7 @@
"details_balance_hide": "Göm saldo",
"details_balance_show": "Visa saldo",
"details_copy": "Kopiera",
"details_copy_browser_link": "Kopiera Block Explorer Länk",
"details_copy_block_explorer_link": "Kopiera Block Explorer Länk",
"details_copy_note": "Kopiera anteckning",
"details_copy_txid": "Kopiera Transaktions ID",
"details_from": "Input",

View file

@ -267,7 +267,7 @@
"details_balance_hide": "Giấu số dư",
"details_balance_show": "Hiển thị số dư ",
"details_copy": "Sao chép",
"details_copy_browser_link": "Sao chép liên kết Block Explorer",
"details_copy_block_explorer_link": "Sao chép liên kết Block Explorer",
"details_copy_note": "Sao chép ghi chú",
"details_copy_txid": "Sao chép ID giao dịch",
"details_from": "Đầu vào",

View file

@ -338,7 +338,7 @@
"details_balance_hide": "隐藏余额",
"details_balance_show": "显示余额",
"details_copy": "复制",
"details_copy_browser_link": "复制区块浏览器链接",
"details_copy_block_explorer_link": "复制区块浏览器链接",
"details_copy_note": "复印备注",
"details_copy_txid": "复制 Tx ID",
"details_from": "输入",

View file

@ -51,7 +51,6 @@ const keys = {
SortLabel: 'sortLabel',
SortStatus: 'sortStatus',
Delete: 'delete',
Details: 'details',
} as const;
const icons = {
@ -81,7 +80,6 @@ const icons = {
RemoveAllRecipients: { iconValue: 'person.2.slash' },
AddRecipient: { iconValue: 'person.badge.plus' },
RemoveRecipient: { iconValue: 'person.badge.minus' },
Details: { iconValue: 'info.circle' },
ScanQR: { iconValue: Platform.OS === 'ios' ? 'qrcode.viewfinder' : 'ic_menu_camera' },
ChoosePhoto: { iconValue: Platform.OS === 'ios' ? 'photo.on.rectangle' : 'ic_menu_gallery' },
Clipboard: { iconValue: Platform.OS === 'ios' ? 'document.on.clipboard' : 'ic_menu_file' },
@ -116,7 +114,7 @@ export const CommonToolTipActions: Record<string, ToolTipAction> = {
},
CopyBlockExplorerLink: {
id: keys.CopyBlockExplorerLink,
text: loc.transactions.details_copy_browser_link,
text: loc.transactions.details_copy_block_explorer_link,
icon: icons.Clipboard,
},
OpenInBlockExplorer: {
@ -124,11 +122,6 @@ export const CommonToolTipActions: Record<string, ToolTipAction> = {
text: loc.transactions.details_view_in_browser,
icon: icons.Link,
},
Details: {
id: keys.Details,
text: loc.send.create_details,
icon: icons.Details,
},
ExpandNote: {
id: keys.ExpandNote,
text: loc.transactions.expand_note,
@ -136,7 +129,7 @@ export const CommonToolTipActions: Record<string, ToolTipAction> = {
},
CopyAmount: {
id: keys.CopyAmount,
text: loc.transactions.copy_amount,
text: loc.transactions.details_copy,
icon: icons.Clipboard,
},
AddRecipient: {