Skip to content

Commit

Permalink
Merge branch 'frontend-ln-guide' into staging-ln
Browse files Browse the repository at this point in the history
  • Loading branch information
thisconnect committed Feb 27, 2024
2 parents 689a378 + 606a684 commit 8b31dd8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 56 deletions.
22 changes: 22 additions & 0 deletions frontends/web/src/locales/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,28 @@
"title": "Why show the secure chip model?"
}
},
"lightning": {
"multipleDevices": {
"text": "Yes, just plug in your BitBox02 into a different device and activate lightning on the BitBoxApp. The lighting wallet will be the same one as your previous device if you use the same BitBox02 wallet.",
"title": "Can I use my lightning wallet on multiple devices?"
},
"multipleWallets": {
"text": "No, currently you cannot make multiple lightning wallets with the same BitBox02, nor use multiple lightning wallets on the same BitBoxApp, even if you have multiple BitBox02 wallets.",
"title": "Can I make multiple lightning wallets?"
},
"privateKey": {
"text": "The BitBoxApp lightning wallet is non-custodial, which means only you have access to the keys. The private keys are stored in the BitBoxApp. This makes your lightning wallet a “Hot wallet”, since the lightning keys are on your computer/phone instead of on your BitBox02. Therefore, only store a small amount of coins on your Lighting wallet",
"title": "Where are my lightning private keys stored?"
},
"providers": {
"text": "Yes, the lightning wallet utilizes Blockstream Greenlight and uses Breez as a liquidity provider. The BitBoxApp controls your lightning keys, while your own tiny lightning node is created in the cloud using Greenlight, an open-source project by Blockstream. This enables you to use your lightning wallet from multiple devices. The lightning channels of your node are managed automatically by Breez, who charge a small fee to create them.",
"title": "Are there external parties involved in this solution?"
},
"securedByBitBox": {
"text": "No, the BitBox02 wallet is just used to create and restore your lightning wallet. Once your lightning wallet is created, it is a “hot wallet”.",
"title": "Is my lightning wallet secured by my BitBox02?"
}
},
"receive": {
"address": {
"text": "You can give the address to others to send you some coins. Just make sure they are sending to the correct address.",
Expand Down
59 changes: 8 additions & 51 deletions frontends/web/src/routes/lightning/guide.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* Copyright 2018 Shift Devices AG
* Copyright 2022 Shift Crypto AG
* Copyright 2024 Shift Crypto AG
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,57 +18,15 @@ import { useTranslation } from 'react-i18next';
import { Entry } from '../../components/guide/entry';
import { Guide } from '../../components/guide/guide';

type Props = {
unit?: string;
hasNoBalance?: boolean;
hasPayments?: boolean;
};

export function LightningGuide({
unit,
hasNoBalance,
hasPayments,
}: Props) {
export const LightningGuide = () => {
const { t } = useTranslation();
return (
<Guide>
<Entry key="accountDescription" entry={t('guide.accountDescription')} />
{hasNoBalance && (
<Entry key="accountSendDisabled" entry={t('guide.accountSendDisabled', {
unit
})} />
)}
<Entry key="accountReload" entry={t('guide.accountReload')} />
{hasPayments && (
<Entry key="accountTransactionLabel" entry={t('guide.accountTransactionLabel')} />
)}
{hasPayments && (
<Entry key="accountTransactionTime" entry={t('guide.accountTransactionTime')} />
)}
{hasPayments && (
<Entry key="accountTransactionAttributesGeneric" entry={t('guide.accountTransactionAttributesGeneric')} />
)}
<Entry key="accountTransactionConfirmation" entry={t('guide.accountTransactionConfirmation')} />
<Entry key="accountFiat" entry={t('guide.accountFiat')} />

{ /* careful, also used in Settings */ }
<Entry key="accountRates" entry={{
link: {
text: 'www.coingecko.com',
url: 'https://www.coingecko.com/'
},
text: t('guide.accountRates.text'),
title: t('guide.accountRates.title')
}} />

<Entry key="cointracking" entry={{
link: {
text: 'CoinTracking',
url: 'https://cointracking.info/import/bitbox/?ref=BITBOX',
},
text: t('guide.cointracking.text'),
title: t('guide.cointracking.title')
}} />
<Entry key="privateKey" entry={t('guide.lightning.privateKey')} />
<Entry key="securedByBitBox" entry={t('guide.lightning.securedByBitBox')} />
<Entry key="multipleDevices" entry={t('guide.lightning.multipleDevices')} />
<Entry key="multipleWallets" entry={t('guide.lightning.multipleWallets')} />
<Entry key="providers" entry={t('guide.lightning.providers')} />
</Guide>
);
}
};
6 changes: 1 addition & 5 deletions frontends/web/src/routes/lightning/lightning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ export function Lightning() {
</div>
</Main>
</GuidedContent>
<LightningGuide
unit="sats"
hasPayments={payments && payments.length > 0}
hasNoBalance={balance && balance.available.amount === '0'}
/>
<LightningGuide />
</GuideWrapper>
);
}

0 comments on commit 8b31dd8

Please sign in to comment.