Skip to content

Commit 984d6fc

Browse files
committed
FAQ tweaks, bug fixes
1 parent b4da959 commit 984d6fc

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

src/components/FAQ.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function FAQ() {
3838
<AccordionContent>
3939
To recover your descriptor, start by inputting two master fingerprints and
4040
pressing "Recover." This will fetch all descriptors that have been encrypted
41-
and inscribed on Bitcoin and contain these two master fingerprints.
41+
and inscribed on Bitcoin that contain these two master fingerprints.
4242

4343
<br/><br/>
4444

@@ -56,8 +56,8 @@ export default function FAQ() {
5656
<AccordionItem value="item-4">
5757
<AccordionTrigger>Can you see my descriptor?</AccordionTrigger>
5858
<AccordionContent>
59-
No, this tool never transmits your plaintext descriptor.
60-
Your descriptor is encrypted and decrypted entirely in your browser.
59+
No, this tool never transmits your plaintext descriptor, xpubs, or master fingrprints.
60+
Your data is encrypted and decrypted entirely within your browser.
6161
</AccordionContent>
6262
</AccordionItem>
6363
<AccordionItem value="item-5">

src/components/Recover.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const Recover: React.FC<RecoverProps> = ({ state, setState }) => {
4545
const [recoverError, setRecoverError] = useState<string>('');
4646
const [requiredShares, setRequiredShares] = useState<number>(0);
4747
const [decryptedShares, setDecryptedShares] = useState<number>(0);
48-
const textToDecrypt = selectedInscription ?? input;
48+
const textToDecrypt = selectedInscription || input;
4949

5050
const handleAddXpub = () => {
5151
setState((prevState: RecoverState) => ({
@@ -80,10 +80,7 @@ const Recover: React.FC<RecoverProps> = ({ state, setState }) => {
8080
const updateInput = (value: string) => {
8181
setState((prevState: RecoverState) => ({
8282
...prevState,
83-
encryptedData: {
84-
input: value,
85-
inscriptions,
86-
},
83+
input: value,
8784
}));
8885
};
8986

@@ -294,7 +291,7 @@ const Recover: React.FC<RecoverProps> = ({ state, setState }) => {
294291
<p className='text-left text-sm'>
295292
<span className='font-bold'>Step 2: </span>
296293
Decrypt the descriptor using any <span className='font-bold'>
297-
{inscriptions ? xpubs.length : 'k'}
294+
{inscriptions.length > 0 ? xpubs.length : 'k'}
298295
</span> extended public keys.
299296
</p>
300297
<p
@@ -305,7 +302,7 @@ const Recover: React.FC<RecoverProps> = ({ state, setState }) => {
305302
</p>
306303
</div>
307304

308-
{inscriptions ? (
305+
{inscriptions.length > 0 ? (
309306
<Select value={selectedInscription} onValueChange={updateSelectedInscription}>
310307
<SelectTrigger >
311308
<SelectValue />
@@ -340,7 +337,7 @@ const Recover: React.FC<RecoverProps> = ({ state, setState }) => {
340337
</div>
341338
))}
342339

343-
{!inscriptions && (
340+
{inscriptions.length === 0 && (
344341
<Button
345342
onClick={handleAddXpub}
346343
variant="outline"

0 commit comments

Comments
 (0)