2021-08-16 18:10:04 +02:00
|
|
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
2024-05-20 11:54:13 +02:00
|
|
|
import Clipboard from '@react-native-clipboard/clipboard';
|
2023-10-24 03:28:44 +02:00
|
|
|
import { useNavigation } from '@react-navigation/native';
|
2024-05-20 11:54:13 +02:00
|
|
|
import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
|
import { Linking, StyleSheet, View } from 'react-native';
|
|
|
|
|
2021-08-16 18:10:04 +02:00
|
|
|
import { BlueStorageContext } from '../blue_modules/storage-context';
|
2024-05-20 11:54:13 +02:00
|
|
|
import Lnurl from '../class/lnurl';
|
|
|
|
import { LightningTransaction, Transaction } from '../class/wallets/types';
|
2022-01-28 12:13:53 +01:00
|
|
|
import TransactionExpiredIcon from '../components/icons/TransactionExpiredIcon';
|
|
|
|
import TransactionIncomingIcon from '../components/icons/TransactionIncomingIcon';
|
|
|
|
import TransactionOffchainIcon from '../components/icons/TransactionOffchainIcon';
|
|
|
|
import TransactionOffchainIncomingIcon from '../components/icons/TransactionOffchainIncomingIcon';
|
|
|
|
import TransactionOnchainIcon from '../components/icons/TransactionOnchainIcon';
|
|
|
|
import TransactionOutgoingIcon from '../components/icons/TransactionOutgoingIcon';
|
|
|
|
import TransactionPendingIcon from '../components/icons/TransactionPendingIcon';
|
2024-05-20 11:54:13 +02:00
|
|
|
import loc, { formatBalanceWithoutSuffix, transactionTimeToReadable } from '../loc';
|
|
|
|
import { BitcoinUnit } from '../models/bitcoinUnits';
|
|
|
|
import * as NavigationService from '../NavigationService';
|
2024-04-18 03:05:48 +02:00
|
|
|
import { useSettings } from './Context/SettingsContext';
|
2024-05-20 11:54:13 +02:00
|
|
|
import ListItem from './ListItem';
|
|
|
|
import { useTheme } from './themes';
|
|
|
|
import ToolTipMenu from './TooltipMenu';
|
2024-05-18 18:48:03 +02:00
|
|
|
import { Action } from './types';
|
2021-08-16 18:10:04 +02:00
|
|
|
|
2024-05-05 21:27:43 +02:00
|
|
|
interface TransactionListItemProps {
|
|
|
|
itemPriceUnit: BitcoinUnit;
|
|
|
|
walletID: string;
|
|
|
|
item: Transaction & LightningTransaction; // using type intersection to have less issues with ts
|
|
|
|
}
|
|
|
|
|
|
|
|
export const TransactionListItem: React.FC<TransactionListItemProps> = React.memo(({ item, itemPriceUnit = BitcoinUnit.BTC, walletID }) => {
|
2021-08-16 18:10:04 +02:00
|
|
|
const [subtitleNumberOfLines, setSubtitleNumberOfLines] = useState(1);
|
|
|
|
const { colors } = useTheme();
|
|
|
|
const { navigate } = useNavigation();
|
2021-10-07 05:15:32 +02:00
|
|
|
const menuRef = useRef();
|
2024-05-08 20:08:52 +02:00
|
|
|
const { txMetadata, counterpartyMetadata, wallets } = useContext(BlueStorageContext);
|
2024-04-18 03:05:48 +02:00
|
|
|
const { preferredFiatCurrency, language } = useSettings();
|
2021-08-16 18:10:04 +02:00
|
|
|
const containerStyle = useMemo(
|
|
|
|
() => ({
|
|
|
|
backgroundColor: 'transparent',
|
|
|
|
borderBottomColor: colors.lightBorder,
|
|
|
|
paddingTop: 16,
|
|
|
|
paddingBottom: 16,
|
|
|
|
paddingRight: 0,
|
|
|
|
}),
|
|
|
|
[colors.lightBorder],
|
|
|
|
);
|
|
|
|
|
2024-05-08 20:08:52 +02:00
|
|
|
const shortenContactName = (name: string): string => {
|
|
|
|
if (name.length < 16) return name;
|
|
|
|
return name.substr(0, 8) + '...' + name.substr(name.length - 8, 8);
|
2024-05-05 21:27:43 +02:00
|
|
|
};
|
|
|
|
|
2021-08-16 18:10:04 +02:00
|
|
|
const title = useMemo(() => {
|
|
|
|
if (item.confirmations === 0) {
|
|
|
|
return loc.transactions.pending;
|
|
|
|
} else {
|
2024-05-05 21:27:43 +02:00
|
|
|
return transactionTimeToReadable(item.received!);
|
2021-08-16 18:10:04 +02:00
|
|
|
}
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
}, [item.confirmations, item.received, language]);
|
2024-05-05 21:27:43 +02:00
|
|
|
|
2024-05-08 20:08:52 +02:00
|
|
|
let counterparty;
|
|
|
|
if (item.counterparty) {
|
|
|
|
counterparty = counterpartyMetadata?.[item.counterparty]?.label ?? item.counterparty;
|
|
|
|
}
|
|
|
|
const txMemo = (counterparty ? `[${shortenContactName(counterparty)}] ` : '') + (txMetadata[item.hash]?.memo ?? '');
|
2021-08-16 18:10:04 +02:00
|
|
|
const subtitle = useMemo(() => {
|
2024-05-05 21:27:43 +02:00
|
|
|
let sub = Number(item.confirmations) < 7 ? loc.formatString(loc.transactions.list_conf, { number: item.confirmations }) : '';
|
2021-08-16 18:10:04 +02:00
|
|
|
if (sub !== '') sub += ' ';
|
|
|
|
sub += txMemo;
|
|
|
|
if (item.memo) sub += item.memo;
|
|
|
|
return sub || null;
|
|
|
|
}, [txMemo, item.confirmations, item.memo]);
|
|
|
|
|
|
|
|
const rowTitle = useMemo(() => {
|
|
|
|
if (item.type === 'user_invoice' || item.type === 'payment_request') {
|
2024-05-05 21:27:43 +02:00
|
|
|
if (isNaN(Number(item.value))) {
|
|
|
|
item.value = 0;
|
2021-08-16 18:10:04 +02:00
|
|
|
}
|
|
|
|
const currentDate = new Date();
|
2023-07-25 15:50:04 +02:00
|
|
|
const now = (currentDate.getTime() / 1000) | 0; // eslint-disable-line no-bitwise
|
2024-05-05 21:27:43 +02:00
|
|
|
const invoiceExpiration = item.timestamp! + item.expire_time!;
|
2021-08-16 18:10:04 +02:00
|
|
|
|
|
|
|
if (invoiceExpiration > now) {
|
|
|
|
return formatBalanceWithoutSuffix(item.value && item.value, itemPriceUnit, true).toString();
|
|
|
|
} else if (invoiceExpiration < now) {
|
|
|
|
if (item.ispaid) {
|
|
|
|
return formatBalanceWithoutSuffix(item.value && item.value, itemPriceUnit, true).toString();
|
|
|
|
} else {
|
|
|
|
return loc.lnd.expired;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return formatBalanceWithoutSuffix(item.value && item.value, itemPriceUnit, true).toString();
|
|
|
|
}
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
}, [item, itemPriceUnit, preferredFiatCurrency]);
|
|
|
|
|
|
|
|
const rowTitleStyle = useMemo(() => {
|
|
|
|
let color = colors.successColor;
|
|
|
|
|
|
|
|
if (item.type === 'user_invoice' || item.type === 'payment_request') {
|
|
|
|
const currentDate = new Date();
|
2023-07-25 15:50:04 +02:00
|
|
|
const now = (currentDate.getTime() / 1000) | 0; // eslint-disable-line no-bitwise
|
2024-05-05 21:27:43 +02:00
|
|
|
const invoiceExpiration = item.timestamp! + item.expire_time!;
|
2021-08-16 18:10:04 +02:00
|
|
|
|
|
|
|
if (invoiceExpiration > now) {
|
|
|
|
color = colors.successColor;
|
|
|
|
} else if (invoiceExpiration < now) {
|
|
|
|
if (item.ispaid) {
|
|
|
|
color = colors.successColor;
|
|
|
|
} else {
|
|
|
|
color = '#9AA0AA';
|
|
|
|
}
|
|
|
|
}
|
2024-05-05 21:27:43 +02:00
|
|
|
} else if (item.value! / 100000000 < 0) {
|
2021-08-16 18:10:04 +02:00
|
|
|
color = colors.foregroundColor;
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
color,
|
|
|
|
fontSize: 14,
|
|
|
|
fontWeight: '600',
|
|
|
|
textAlign: 'right',
|
|
|
|
};
|
|
|
|
}, [item, colors.foregroundColor, colors.successColor]);
|
|
|
|
|
|
|
|
const avatar = useMemo(() => {
|
|
|
|
// is it lightning refill tx?
|
2024-05-05 21:27:43 +02:00
|
|
|
if (item.category === 'receive' && item.confirmations! < 3) {
|
2021-08-16 18:10:04 +02:00
|
|
|
return (
|
|
|
|
<View style={styles.iconWidth}>
|
2022-01-28 12:13:53 +01:00
|
|
|
<TransactionPendingIcon />
|
2021-08-16 18:10:04 +02:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item.type && item.type === 'bitcoind_tx') {
|
|
|
|
return (
|
|
|
|
<View style={styles.iconWidth}>
|
2022-01-28 12:13:53 +01:00
|
|
|
<TransactionOnchainIcon />
|
2021-08-16 18:10:04 +02:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
if (item.type === 'paid_invoice') {
|
|
|
|
// is it lightning offchain payment?
|
|
|
|
return (
|
|
|
|
<View style={styles.iconWidth}>
|
2022-01-28 12:13:53 +01:00
|
|
|
<TransactionOffchainIcon />
|
2021-08-16 18:10:04 +02:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item.type === 'user_invoice' || item.type === 'payment_request') {
|
|
|
|
if (!item.ispaid) {
|
|
|
|
const currentDate = new Date();
|
2023-07-25 15:50:04 +02:00
|
|
|
const now = (currentDate.getTime() / 1000) | 0; // eslint-disable-line no-bitwise
|
2024-05-05 21:27:43 +02:00
|
|
|
const invoiceExpiration = item.timestamp! + item.expire_time!;
|
2021-08-16 18:10:04 +02:00
|
|
|
if (invoiceExpiration < now) {
|
|
|
|
return (
|
|
|
|
<View style={styles.iconWidth}>
|
2022-01-28 12:13:53 +01:00
|
|
|
<TransactionExpiredIcon />
|
2021-08-16 18:10:04 +02:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return (
|
|
|
|
<View style={styles.iconWidth}>
|
2022-01-28 12:13:53 +01:00
|
|
|
<TransactionOffchainIncomingIcon />
|
2021-08-16 18:10:04 +02:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!item.confirmations) {
|
|
|
|
return (
|
|
|
|
<View style={styles.iconWidth}>
|
2022-01-28 12:13:53 +01:00
|
|
|
<TransactionPendingIcon />
|
2021-08-16 18:10:04 +02:00
|
|
|
</View>
|
|
|
|
);
|
2024-05-05 21:27:43 +02:00
|
|
|
} else if (item.value! < 0) {
|
2021-08-16 18:10:04 +02:00
|
|
|
return (
|
|
|
|
<View style={styles.iconWidth}>
|
2022-01-28 12:13:53 +01:00
|
|
|
<TransactionOutgoingIcon />
|
2021-08-16 18:10:04 +02:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return (
|
|
|
|
<View style={styles.iconWidth}>
|
2022-01-28 12:13:53 +01:00
|
|
|
<TransactionIncomingIcon />
|
2021-08-16 18:10:04 +02:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}, [item]);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
setSubtitleNumberOfLines(1);
|
|
|
|
}, [subtitle]);
|
|
|
|
|
|
|
|
const onPress = useCallback(async () => {
|
2024-05-05 21:27:43 +02:00
|
|
|
// @ts-ignore: idk how to fix
|
|
|
|
menuRef?.current?.dismissMenu?.();
|
2021-08-16 18:10:04 +02:00
|
|
|
if (item.hash) {
|
2024-05-05 21:27:43 +02:00
|
|
|
// @ts-ignore: idk how to fix
|
2021-12-17 11:41:18 +01:00
|
|
|
navigate('TransactionStatus', { hash: item.hash, walletID });
|
2021-08-16 18:10:04 +02:00
|
|
|
} else if (item.type === 'user_invoice' || item.type === 'payment_request' || item.type === 'paid_invoice') {
|
|
|
|
const lightningWallet = wallets.filter(wallet => wallet?.getID() === item.walletID);
|
|
|
|
if (lightningWallet.length === 1) {
|
|
|
|
try {
|
|
|
|
// is it a successful lnurl-pay?
|
|
|
|
const LN = new Lnurl(false, AsyncStorage);
|
2024-05-05 21:27:43 +02:00
|
|
|
let paymentHash = item.payment_hash!;
|
2021-08-16 18:10:04 +02:00
|
|
|
if (typeof paymentHash === 'object') {
|
|
|
|
paymentHash = Buffer.from(paymentHash.data).toString('hex');
|
|
|
|
}
|
|
|
|
const loaded = await LN.loadSuccessfulPayment(paymentHash);
|
|
|
|
if (loaded) {
|
|
|
|
NavigationService.navigate('ScanLndInvoiceRoot', {
|
2024-05-05 21:27:43 +02:00
|
|
|
// @ts-ignore: idk how to fix
|
2021-08-16 18:10:04 +02:00
|
|
|
screen: 'LnurlPaySuccess',
|
|
|
|
params: {
|
|
|
|
paymentHash,
|
|
|
|
justPaid: false,
|
|
|
|
fromWalletID: lightningWallet[0].getID(),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
console.log(e);
|
|
|
|
}
|
|
|
|
|
2024-05-05 21:27:43 +02:00
|
|
|
// @ts-ignore: idk how to fix
|
2021-08-16 18:10:04 +02:00
|
|
|
navigate('LNDViewInvoice', {
|
|
|
|
invoice: item,
|
|
|
|
walletID: lightningWallet[0].getID(),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
}, [item, wallets]);
|
|
|
|
|
|
|
|
const handleOnExpandNote = useCallback(() => {
|
|
|
|
setSubtitleNumberOfLines(0);
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
}, [subtitle]);
|
|
|
|
|
|
|
|
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]);
|
|
|
|
const handleOnCopyNote = useCallback(() => Clipboard.setString(subtitle), [subtitle]);
|
|
|
|
const handleOnViewOnBlockExplorer = useCallback(() => {
|
|
|
|
const url = `https://mempool.space/tx/${item.hash}`;
|
|
|
|
Linking.canOpenURL(url).then(supported => {
|
|
|
|
if (supported) {
|
|
|
|
Linking.openURL(url);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}, [item.hash]);
|
|
|
|
const handleCopyOpenInBlockExplorerPress = useCallback(() => {
|
|
|
|
Clipboard.setString(`https://mempool.space/tx/${item.hash}`);
|
|
|
|
}, [item.hash]);
|
|
|
|
|
2021-10-07 21:29:27 +02:00
|
|
|
const onToolTipPress = useCallback(
|
2024-05-05 21:27:43 +02:00
|
|
|
(id: any) => {
|
|
|
|
if (id === actionKeys.CopyAmount) {
|
2021-10-07 21:29:27 +02:00
|
|
|
handleOnCopyAmountTap();
|
2024-05-05 21:27:43 +02:00
|
|
|
} else if (id === actionKeys.CopyNote) {
|
2021-10-07 21:29:27 +02:00
|
|
|
handleOnCopyNote();
|
2024-05-05 21:27:43 +02:00
|
|
|
} else if (id === actionKeys.OpenInBlockExplorer) {
|
2021-10-07 21:29:27 +02:00
|
|
|
handleOnViewOnBlockExplorer();
|
2024-05-05 21:27:43 +02:00
|
|
|
} else if (id === actionKeys.ExpandNote) {
|
2021-10-07 21:29:27 +02:00
|
|
|
handleOnExpandNote();
|
2024-05-05 21:27:43 +02:00
|
|
|
} else if (id === actionKeys.CopyBlockExplorerLink) {
|
2021-10-07 21:29:27 +02:00
|
|
|
handleCopyOpenInBlockExplorerPress();
|
2024-05-05 21:27:43 +02:00
|
|
|
} else if (id === actionKeys.CopyTXID) {
|
2021-10-07 21:29:27 +02:00
|
|
|
handleOnCopyTransactionID();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
[
|
|
|
|
handleCopyOpenInBlockExplorerPress,
|
|
|
|
handleOnCopyAmountTap,
|
|
|
|
handleOnCopyNote,
|
|
|
|
handleOnCopyTransactionID,
|
|
|
|
handleOnExpandNote,
|
|
|
|
handleOnViewOnBlockExplorer,
|
|
|
|
],
|
|
|
|
);
|
2024-05-18 18:48:03 +02:00
|
|
|
const toolTipActions = useMemo((): Action[] | Action[][] => {
|
|
|
|
const actions: (Action | Action[])[] = [];
|
2021-08-16 18:10:04 +02:00
|
|
|
|
|
|
|
if (rowTitle !== loc.lnd.expired) {
|
|
|
|
actions.push({
|
2024-05-05 21:27:43 +02:00
|
|
|
id: actionKeys.CopyAmount,
|
2021-09-25 09:55:01 +02:00
|
|
|
text: loc.transactions.details_copy_amount,
|
2024-05-05 21:27:43 +02:00
|
|
|
icon: actionIcons.Clipboard,
|
2021-08-16 18:10:04 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
if (subtitle) {
|
|
|
|
actions.push({
|
2024-05-05 21:27:43 +02:00
|
|
|
id: actionKeys.CopyNote,
|
2021-09-25 09:55:01 +02:00
|
|
|
text: loc.transactions.details_copy_note,
|
2024-05-05 21:27:43 +02:00
|
|
|
icon: actionIcons.Clipboard,
|
2021-08-16 18:10:04 +02:00
|
|
|
});
|
|
|
|
}
|
2024-05-18 18:48:03 +02:00
|
|
|
|
2021-08-16 18:10:04 +02:00
|
|
|
if (item.hash) {
|
|
|
|
actions.push(
|
|
|
|
{
|
2024-05-05 21:27:43 +02:00
|
|
|
id: actionKeys.CopyTXID,
|
2021-09-25 09:55:01 +02:00
|
|
|
text: loc.transactions.details_copy_txid,
|
2024-05-05 21:27:43 +02:00
|
|
|
icon: actionIcons.Clipboard,
|
2021-08-16 18:10:04 +02:00
|
|
|
},
|
|
|
|
{
|
2024-05-05 21:27:43 +02:00
|
|
|
id: actionKeys.CopyBlockExplorerLink,
|
2021-09-25 09:55:01 +02:00
|
|
|
text: loc.transactions.details_copy_block_explorer_link,
|
2024-05-05 21:27:43 +02:00
|
|
|
icon: actionIcons.Clipboard,
|
2021-08-16 18:10:04 +02:00
|
|
|
},
|
2021-10-04 05:47:01 +02:00
|
|
|
[
|
|
|
|
{
|
2024-05-05 21:27:43 +02:00
|
|
|
id: actionKeys.OpenInBlockExplorer,
|
2021-10-04 05:47:01 +02:00
|
|
|
text: loc.transactions.details_show_in_block_explorer,
|
2024-05-05 21:27:43 +02:00
|
|
|
icon: actionIcons.Link,
|
2021-10-04 05:47:01 +02:00
|
|
|
},
|
|
|
|
],
|
2021-08-16 18:10:04 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (subtitle && subtitleNumberOfLines === 1) {
|
2021-10-04 05:47:01 +02:00
|
|
|
actions.push([
|
|
|
|
{
|
2024-05-05 21:27:43 +02:00
|
|
|
id: actionKeys.ExpandNote,
|
2021-10-04 05:47:01 +02:00
|
|
|
text: loc.transactions.expand_note,
|
2024-05-05 21:27:43 +02:00
|
|
|
icon: actionIcons.Note,
|
2021-10-04 05:47:01 +02:00
|
|
|
},
|
|
|
|
]);
|
2021-08-16 18:10:04 +02:00
|
|
|
}
|
2021-10-04 05:47:01 +02:00
|
|
|
|
2024-05-18 18:48:03 +02:00
|
|
|
return actions as Action[] | Action[][];
|
2021-08-16 18:10:04 +02:00
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
2021-10-04 05:47:01 +02:00
|
|
|
}, [item.hash, subtitle, rowTitle, subtitleNumberOfLines, txMetadata]);
|
2021-08-16 18:10:04 +02:00
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
2021-10-21 20:54:32 +02:00
|
|
|
<ToolTipMenu ref={menuRef} actions={toolTipActions} onPressMenuItem={onToolTipPress} onPress={onPress}>
|
2023-12-16 22:44:35 +01:00
|
|
|
<ListItem
|
2024-05-05 21:27:43 +02:00
|
|
|
// @ts-ignore wtf
|
2021-08-16 18:10:04 +02:00
|
|
|
leftAvatar={avatar}
|
|
|
|
title={title}
|
|
|
|
subtitleNumberOfLines={subtitleNumberOfLines}
|
|
|
|
subtitle={subtitle}
|
2021-10-22 16:15:52 +02:00
|
|
|
Component={View}
|
2021-08-16 18:10:04 +02:00
|
|
|
subtitleProps={subtitleProps}
|
|
|
|
chevron={false}
|
|
|
|
rightTitle={rowTitle}
|
|
|
|
rightTitleStyle={rowTitleStyle}
|
|
|
|
containerStyle={containerStyle}
|
|
|
|
/>
|
|
|
|
</ToolTipMenu>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
2024-05-05 21:27:43 +02:00
|
|
|
const actionKeys = {
|
2021-08-16 18:10:04 +02:00
|
|
|
CopyTXID: 'copyTX_ID',
|
|
|
|
CopyBlockExplorerLink: 'copy_blockExplorer',
|
|
|
|
ExpandNote: 'expandNote',
|
|
|
|
OpenInBlockExplorer: 'open_in_blockExplorer',
|
|
|
|
CopyAmount: 'copyAmount',
|
|
|
|
CopyNote: 'copyNote',
|
|
|
|
};
|
|
|
|
|
2024-05-05 21:27:43 +02:00
|
|
|
const actionIcons = {
|
2021-08-16 18:10:04 +02:00
|
|
|
Eye: {
|
|
|
|
iconType: 'SYSTEM',
|
|
|
|
iconValue: 'eye',
|
|
|
|
},
|
|
|
|
EyeSlash: {
|
|
|
|
iconType: 'SYSTEM',
|
|
|
|
iconValue: 'eye.slash',
|
|
|
|
},
|
|
|
|
Clipboard: {
|
|
|
|
iconType: 'SYSTEM',
|
2021-08-27 03:31:36 +02:00
|
|
|
iconValue: 'doc.on.doc',
|
2021-08-16 18:10:04 +02:00
|
|
|
},
|
|
|
|
Link: {
|
|
|
|
iconType: 'SYSTEM',
|
|
|
|
iconValue: 'link',
|
|
|
|
},
|
|
|
|
Note: {
|
|
|
|
iconType: 'SYSTEM',
|
|
|
|
iconValue: 'note.text',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
iconWidth: { width: 25 },
|
|
|
|
container: { marginHorizontal: 4 },
|
|
|
|
});
|