Skip to content

Commit

Permalink
revert: remove ledger
Browse files Browse the repository at this point in the history
  • Loading branch information
limpbrains committed Dec 3, 2024
1 parent 88247bc commit b5d6bb3
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 894 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@shopify/react-native-skia": "1.3.11",
"@synonymdev/blocktank-lsp-http-client": "2.0.0",
"@synonymdev/feeds": "3.0.0",
"@synonymdev/ledger": "0.0.5",
"@synonymdev/react-native-ldk": "0.0.154",
"@synonymdev/react-native-lnurl": "0.0.10",
"@synonymdev/react-native-pubky": "^0.3.0",
Expand Down
1 change: 0 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { ThemeProvider } from 'styled-components/native';

import './utils/i18n';
import './utils/quick-actions';
import './utils/ledger';
import AppOnboarded from './AppOnboarded';
import { SlashtagsProvider } from './components/SlashtagsProvider';
import { toastConfig } from './components/Toast';
Expand Down
6 changes: 0 additions & 6 deletions src/navigation/settings/SettingsNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ import ResetAndRestore from '../../screens/Settings/Backup/ResetAndRestore';
import TagsSettings from '../../screens/Settings/Tags';
import FeeSettings from '../../screens/Settings/Fee';
import WebRelay from '../../screens/Settings/WebRelay';
import Ledger from '../../screens/Settings/Ledger';
import LedgerTransaction from '../../screens/Settings/Ledger/LedgerTransaction';
import { __E2E__ } from '../../constants/env';
import AppStatus from '../../screens/Settings/AppStatus';
import { TChannel } from '../../store/types/lightning';
Expand Down Expand Up @@ -104,8 +102,6 @@ export type SettingsStackParamList = {
AddressViewer: undefined;
FeeSettings: undefined;
WebRelay: undefined;
Ledger: undefined;
LedgerTransaction: { ledgerTxId: number };
};

const Stack = createNativeStackNavigator<SettingsStackParamList>();
Expand Down Expand Up @@ -178,8 +174,6 @@ const SettingsNavigator = (): ReactElement => {
<Stack.Screen name="TagsSettings" component={TagsSettings} />
<Stack.Screen name="FeeSettings" component={FeeSettings} />
<Stack.Screen name="WebRelay" component={WebRelay} />
<Stack.Screen name="Ledger" component={Ledger} />
<Stack.Screen name="LedgerTransaction" component={LedgerTransaction} />
</Stack.Navigator>
);
};
Expand Down
5 changes: 1 addition & 4 deletions src/screens/Settings/AddressViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { err, ok, Result } from '@synonymdev/result';
import Clipboard from '@react-native-clipboard/clipboard';
import fuzzysort from 'fuzzysort';
import { ldk } from '@synonymdev/react-native-ldk';
import { EAddressType, IAddress, IUtxo } from 'beignet';

import {
TouchableOpacity,
Expand Down Expand Up @@ -68,8 +69,6 @@ import { setupLdk } from '../../../utils/lightning';
import { startWalletServices } from '../../../utils/startup';
import { updateOnchainFeeEstimates } from '../../../store/utils/fees';
import { viewControllerIsOpenSelector } from '../../../store/reselect/ui';
import { EAddressType, IAddress, IUtxo } from 'beignet';
import { setupLedger, syncLedger } from '../../../utils/ledger';

export type TAddressViewerData = {
[EAddressType.p2tr]: {
Expand Down Expand Up @@ -743,7 +742,6 @@ const AddressViewer = ({
if (selectedNetwork !== config.selectedNetwork) {
// Wipe existing activity
dispatch(resetActivityState());
setupLedger({ selectedWallet, selectedNetwork });
ldk.stop();
// Switch to new network.
dispatch(updateWallet({ selectedNetwork: config.selectedNetwork }));
Expand All @@ -753,7 +751,6 @@ const AddressViewer = ({
await startWalletServices({ selectedNetwork: config.selectedNetwork });
await updateOnchainFeeEstimates({ forceUpdate: true });
updateActivityList();
await syncLedger();
}

let _utxos: IUtxo[] = [];
Expand Down
8 changes: 0 additions & 8 deletions src/screens/Settings/DevSettings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ const DevSettings = ({
navigation.navigate('FeeSettings');
},
},
{
title: 'Ledger',
type: EItemType.button,
testID: 'FeeSettings',
onPress: (): void => {
navigation.navigate('Ledger');
},
},
{
title: t('RBF'),
type: EItemType.switch,
Expand Down
233 changes: 0 additions & 233 deletions src/screens/Settings/Ledger/LedgerTransaction.tsx

This file was deleted.

Loading

0 comments on commit b5d6bb3

Please sign in to comment.