Skip to content

Commit 5024659

Browse files
committed
refactor: remove TRUSTED_ZERO_CONF_PEERS from environment templates and related code
1 parent 88a9bd5 commit 5024659

File tree

6 files changed

+5
-25
lines changed

6 files changed

+5
-25
lines changed

.env.development.template

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ ELECTRUM_REGTEST_TCP_PORT=18483
1717
ELECTRUM_REGTEST_SSL_PORT=18484
1818
ELECTRUM_REGTEST_PROTO=tcp
1919

20-
# format: "<pubkey>,<pubkey>,..."
21-
TRUSTED_ZERO_CONF_PEERS="028a8910b0048630d4eb17af25668cdd7ea6f2d8ae20956e7a06e2ae46ebcb69fc,0296b2db342fcf87ea94d981757fdf4d3e545bd5cef4919f58b5d38dfdd73bf5c9,03b9a456fb45d5ac98c02040d39aec77fa3eeb41fd22cf40b862b393bcfc43473a,039b8b4dd1d88c2c5db374290cda397a8f5d79f312d6ea5d5bfdfc7c6ff363eae3,03342eac98d8c07ac8a4f303b2ad09a34b3350357730013d534d0537a4d1d8a14d,03816141f1dce7782ec32b66a300783b1d436b19777e7c686ed00115bd4b88ff4b"
22-
2320
# Default Slashtags Web Relay
2421
WEB_RELAY=https://dht-relay.synonym.to/staging/web-relay
2522

.env.production.template

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ ELECTRUM_REGTEST_TCP_PORT=18483
1717
ELECTRUM_REGTEST_SSL_PORT=18484
1818
ELECTRUM_REGTEST_PROTO=tcp
1919

20-
# format: "<pubkey>,<pubkey>,..."
21-
TRUSTED_ZERO_CONF_PEERS="039b8b4dd1d88c2c5db374290cda397a8f5d79f312d6ea5d5bfdfc7c6ff363eae3,03816141f1dce7782ec32b66a300783b1d436b19777e7c686ed00115bd4b88ff4b,02a371038863605300d0b3fc9de0cf5ccb57728b7f8906535709a831b16e311187"
22-
2320
# Default Slashtags Web Relay
2421
WEB_RELAY=https://webrelay.slashtags.to
2522

.env.test.template

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ ELECTRUM_REGTEST_TCP_PORT=60001
1717
ELECTRUM_REGTEST_SSL_PORT=60002
1818
ELECTRUM_REGTEST_PROTO=tcp
1919

20-
# format: "<pubkey>,<pubkey>,..."
21-
TRUSTED_ZERO_CONF_PEERS=""
22-
2320
# Default Slashtags Web Relay
2421
WEB_RELAY=https://dht-relay.synonym.to/staging/web-relay
2522

src/@types/env.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ declare module '@env' {
1111
export const ELECTRUM_REGTEST_TCP_PORT: number;
1212
export const ELECTRUM_REGTEST_PROTO: string;
1313

14-
export const TRUSTED_ZERO_CONF_PEERS: string;
15-
1614
export const WEB_RELAY: string;
1715
export const TREASURE_HUNT_HOST: string;
1816
export const CHATWOOT_API: string;

src/constants/env.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
ENABLE_REDUX_IMMUTABLE_CHECK,
1717
ENABLE_REDUX_LOGGER,
1818
TREASURE_HUNT_HOST,
19-
TRUSTED_ZERO_CONF_PEERS,
2019
WEB_RELAY,
2120
} from '@env';
2221
import { isProtocol } from '../store/types/settings';
@@ -57,19 +56,14 @@ export const __BACKUPS_SERVER_PUBKEY__ = BACKUPS_SERVER_PUBKEY;
5756

5857
export const __BLOCKTANK_HOST__ = BLOCKTANK_HOST;
5958

59+
export const __DEFAULT_BITCOIN_NETWORK__ = DEFAULT_BITCOIN_NETWORK;
60+
6061
export const __ELECTRUM_REGTEST_HOST__ = ELECTRUM_REGTEST_HOST;
6162
export const __ELECTRUM_REGTEST_SSL_PORT__ = ELECTRUM_REGTEST_SSL_PORT;
6263
export const __ELECTRUM_REGTEST_TCP_PORT__ = ELECTRUM_REGTEST_TCP_PORT;
6364
export const __ELECTRUM_REGTEST_PROTO__ = ELECTRUM_REGTEST_PROTO;
6465

65-
export const __TREASURE_HUNT_HOST__ = TREASURE_HUNT_HOST;
66-
67-
export const __TRUSTED_ZERO_CONF_PEERS__ = TRUSTED_ZERO_CONF_PEERS.split(
68-
',',
69-
).map((nodeId) => nodeId.trim());
70-
71-
export const __DEFAULT_BITCOIN_NETWORK__ = DEFAULT_BITCOIN_NETWORK;
72-
73-
export const __E2E__ = E2E === 'true';
7466
export const __WEB_RELAY__ = WEB_RELAY;
67+
export const __TREASURE_HUNT_HOST__ = TREASURE_HUNT_HOST;
7568
export const __CHATWOOT_API__ = CHATWOOT_API;
69+
export const __E2E__ = E2E === 'true';

src/utils/lightning/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import Keychain from 'react-native-keychain';
4040
import {
4141
__BACKUPS_SERVER_HOST__,
4242
__BACKUPS_SERVER_PUBKEY__,
43-
__TRUSTED_ZERO_CONF_PEERS__,
4443
} from '../../constants/env';
4544
import { sendNavigation } from '../../navigation/bottom-sheet/SendNavigation';
4645
import {
@@ -1712,9 +1711,7 @@ export const addTrustedPeers = async (): Promise<Result<string>> => {
17121711
const btInfo = await getBlocktankInfo(true);
17131712
const btNodeIds = btInfo.nodes.map((n) => n.pubkey);
17141713

1715-
await lm.setTrustedZeroConfPeerNodeIds(
1716-
Array.from(new Set([...btNodeIds, ...__TRUSTED_ZERO_CONF_PEERS__])),
1717-
);
1714+
await lm.setTrustedZeroConfPeerNodeIds(btNodeIds);
17181715
return ok('Trusted peers added.');
17191716
};
17201717

0 commit comments

Comments
 (0)