diff --git a/pkg/btc-wallet/src/js/components/lib/externalInvoice.js b/pkg/btc-wallet/src/js/components/lib/externalInvoice.js
index 023dbc0370..866f00a731 100644
--- a/pkg/btc-wallet/src/js/components/lib/externalInvoice.js
+++ b/pkg/btc-wallet/src/js/components/lib/externalInvoice.js
@@ -23,9 +23,6 @@ const ExternalInvoice = ({ payee, stopSending, satsAmount }) => {
useSettings();
const [txHex, setTxHex] = useState('');
const [ready, setReady] = useState(false);
- const [copiedPsbt, setCopiedPsbt] = useState(false);
- const [downloadedButton, setDownloadedButton] = useState(false);
- const [copiedButton, setCopiedButton] = useState(false);
const [localError, setLocalError] = useState('');
const [broadcasting, setBroadcasting] = useState(false);
const invoiceRef = useRef();
@@ -65,16 +62,9 @@ const ExternalInvoice = ({ payee, stopSending, satsAmount }) => {
const copyPsbt = () => {
copyToClipboard(psbt);
- setCopiedPsbt(true);
- setCopiedButton(true);
- setTimeout(() => {
- setCopiedPsbt(false);
- setCopiedButton(false);
- }, 2000);
};
const downloadPsbtFile = () => {
- setDownloadedButton(true);
const blob = new Blob([psbt]);
const downloadURL = URL.createObjectURL(blob);
const link = document.createElement('a');
@@ -83,9 +73,6 @@ const ExternalInvoice = ({ payee, stopSending, satsAmount }) => {
document.body.appendChild(link);
link.click();
link.parentNode.removeChild(link);
- setTimeout(() => {
- setDownloadedButton(false);
- }, 1000);
};
let inputColor = 'black';
@@ -179,80 +166,65 @@ const ExternalInvoice = ({ payee, stopSending, satsAmount }) => {
- copyPsbt()}
- >
- {copiedPsbt ? 'copied' : psbt}
-
-
-
-
- Paste the signed transaction from your external wallet:
-
-
- checkTxHex(e)}
- />
- {localError !== '' && (
-
-
+
+
+
- )}
+
+
+
+ Signed Tx
+
+ checkTxHex(e)}
+ />
+ {localError !== '' && (
+
+
+
+ )}
+
-
-
-
-
+
{!(signing && !error) ? null : (
{
foreground="orange"
/>
)}
+
toggleSignMethod(choosingSignMethod)}
color={signReady ? 'white' : 'lighterGray'}
@@ -455,7 +474,7 @@ const Send = ({ stopSending, value, conversion }) => {
style={{ cursor: signReady ? 'pointer' : 'default' }}
>
diff --git a/pkg/btc-wallet/src/js/components/lib/signer.js b/pkg/btc-wallet/src/js/components/lib/signer.js
index 098e2da106..06a6dea138 100644
--- a/pkg/btc-wallet/src/js/components/lib/signer.js
+++ b/pkg/btc-wallet/src/js/components/lib/signer.js
@@ -1,11 +1,11 @@
import React from 'react';
-import { Box, Button } from '@tlon/indigo-react';
+import { Box, Button, Icon, Row } from '@tlon/indigo-react';
import { signMethods } from './send';
const signMethodLabels = {
bridge: 'Sign with Bridge',
masterTicket: 'Sign with Master Ticket',
- external: 'Sign Externally',
+ external: 'Sign Externally (PSBT)',
};
const Signer = ({
@@ -18,18 +18,32 @@ const Signer = ({
return choosingSignMethod ? (
{Object.keys(signMethods).map((method) => (
- setSignMethod(signMethods[method])}
- >
- {signMethodLabels[method]}
-
+
+ setSignMethod(signMethods[method])}
+ >
+ {signMethodLabels[method]}
+
+ {signMethod === signMethods[method] && (
+
+
+
+ )}
+
))}
) : (
@@ -38,6 +52,7 @@ const Signer = ({
fontSize={1}
fontWeight="bold"
borderRadius="24px"
+ mr={2}
height="48px"
onClick={initPayment}
color={signReady ? 'white' : 'lighterGray'}