From 6d84fd94547a22b0c1f940290d51af98cc7744c1 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Sun, 10 Nov 2024 01:07:35 -0400 Subject: [PATCH] REF: Latest package supports function on both OS --- components/AddressInputScanButton.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/components/AddressInputScanButton.tsx b/components/AddressInputScanButton.tsx index 95fb78128..7af991791 100644 --- a/components/AddressInputScanButton.tsx +++ b/components/AddressInputScanButton.tsx @@ -75,14 +75,15 @@ export const AddressInputScanButton = ({ case CommonToolTipActions.PasteFromClipboard.id: try { let getImage: string | null = null; - + let hasImage = false; if (Platform.OS === 'android') { - getImage = await Clipboard.getImage(); + hasImage = true; } else { - const hasImage = await Clipboard.hasImage(); - if (hasImage) { - getImage = await Clipboard.getImageJPG(); - } + hasImage = await Clipboard.hasImage(); + } + + if (hasImage) { + getImage = await Clipboard.getImage(); } if (getImage) {