mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-18 21:35:21 +01:00
wip
This commit is contained in:
parent
179745ae00
commit
a7e496513a
@ -92,7 +92,7 @@ const AddressInput = ({
|
||||
}
|
||||
|
||||
break;
|
||||
case CommonToolTipActions.CopyFromClipboard.id:
|
||||
case CommonToolTipActions.PasteFromClipboard.id:
|
||||
try {
|
||||
let getImage: string | null = null;
|
||||
|
||||
@ -234,7 +234,7 @@ const styles = StyleSheet.create({
|
||||
|
||||
const actionKeys = {
|
||||
ScanQR: 'scan_qr',
|
||||
CopyFromClipboard: 'copy_from_clipboard',
|
||||
PasteFromClipboard: 'copy_from_clipboard',
|
||||
ChoosePhoto: 'choose_photo',
|
||||
ImportFile: 'import_file',
|
||||
};
|
||||
@ -261,7 +261,7 @@ const actions = [
|
||||
icon: actionIcons.ScanQR,
|
||||
},
|
||||
{
|
||||
id: actionKeys.CopyFromClipboard,
|
||||
id: actionKeys.PasteFromClipboard,
|
||||
text: loc.wallets.paste_from_clipboard,
|
||||
icon: actionIcons.Clipboard,
|
||||
},
|
||||
|
@ -288,7 +288,7 @@ const WalletTransactions: React.FC<WalletTransactionsProps> = ({ route }) => {
|
||||
|
||||
const _keyExtractor = (_item: any, index: number) => index.toString();
|
||||
|
||||
const copyFromClipboard = async () => {
|
||||
const pasteFromClipboard = async () => {
|
||||
onBarCodeRead({ data: await BlueClipboard().getClipboardContent() });
|
||||
};
|
||||
|
||||
@ -353,7 +353,7 @@ const WalletTransactions: React.FC<WalletTransactionsProps> = ({ route }) => {
|
||||
}
|
||||
case 3:
|
||||
if (!isClipboardEmpty) {
|
||||
copyFromClipboard();
|
||||
pasteFromClipboard();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ const WalletsList: React.FC = () => {
|
||||
[navigate],
|
||||
);
|
||||
|
||||
const copyFromClipboard = useCallback(async () => {
|
||||
const pasteFromClipboard = useCallback(async () => {
|
||||
onBarScanned(await BlueClipboard().getClipboardContent());
|
||||
}, [onBarScanned]);
|
||||
|
||||
@ -402,12 +402,12 @@ const WalletsList: React.FC = () => {
|
||||
break;
|
||||
case 3:
|
||||
if (!isClipboardEmpty) {
|
||||
copyFromClipboard();
|
||||
pasteFromClipboard();
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
}, [copyFromClipboard, onBarScanned, routeName]);
|
||||
}, [pasteFromClipboard, onBarScanned, routeName]);
|
||||
|
||||
const onRefresh = useCallback(() => {
|
||||
console.debug('WalletsList onRefresh');
|
||||
|
@ -22,7 +22,7 @@ const keys = {
|
||||
RemoveAllRecipients: 'RemoveAllRecipients',
|
||||
AddRecipient: 'AddRecipient',
|
||||
RemoveRecipient: 'RemoveRecipient',
|
||||
CopyFromClipboard: 'copyFromClipboard',
|
||||
PasteFromClipboard: 'pasteFromClipboard',
|
||||
};
|
||||
|
||||
const icons = {
|
||||
@ -74,7 +74,7 @@ const icons = {
|
||||
RemoveAllRecipients: { iconValue: 'person.2.slash' },
|
||||
AddRecipient: { iconValue: 'person.badge.plus' },
|
||||
RemoveRecipient: { iconValue: 'person.badge.minus' },
|
||||
CopyFromClipboard: { iconValue: 'doc.on.clipboard' },
|
||||
PasteFromClipboard: { iconValue: 'document.on.clipboard' },
|
||||
};
|
||||
|
||||
export const CommonToolTipActions = {
|
||||
@ -187,9 +187,9 @@ export const CommonToolTipActions = {
|
||||
icon: icons.PaymentsCode,
|
||||
menuState: false,
|
||||
},
|
||||
CopyFromClipboard: {
|
||||
id: keys.CopyFromClipboard,
|
||||
PasteFromClipboard: {
|
||||
id: keys.PasteFromClipboard,
|
||||
text: loc.transactions.details_copy_amount,
|
||||
icon: icons.CopyFromClipboard,
|
||||
icon: icons.PasteFromClipboard,
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user