Skip to content

Commit

Permalink
Merge pull request #2454 from kaloudis/new-default-nostr-relays
Browse files Browse the repository at this point in the history
Nostr: new default relays
  • Loading branch information
kaloudis authored Oct 7, 2024
2 parents ab08b0d + ac22418 commit e229c67
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion stores/SettingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -997,12 +997,20 @@ export const DEFAULT_LSPS1_PUBKEY_TESTNET =
export const DEFAULT_LSPS1_HOST_MAINNET = '45.79.192.236:9735';
export const DEFAULT_LSPS1_HOST_TESTNET = '139.144.22.237:9735';

export const DEFAULT_NOSTR_RELAYS = [
export const DEFAULT_NOSTR_RELAYS_2023 = [
'wss://nostr.mutinywallet.com',
'wss://relay.damus.io',
'wss://nostr.lnproxy.org'
];

export const DEFAULT_NOSTR_RELAYS = [
'wss://relay.damus.io',
'wss://nostr.land',
'wss://nostr.wine',
'wss://nos.lol',
'wss://relay.snort.social'
];

export const NOTIFICATIONS_PREF_KEYS = [
{ key: 'Disabled', translateKey: 'views.Settings.disabled', value: 0 },
{
Expand Down Expand Up @@ -1542,6 +1550,22 @@ export default class SettingsStore {
await EncryptedStorage.setItem(MOD_KEY7, 'true');
}

const MOD_KEY8 = 'nostr-relays-2024';
const mod8 = await EncryptedStorage.getItem(MOD_KEY8);
if (!mod8) {
if (
JSON.stringify(
newSettings?.lightningAddress?.nostrRelays
) === JSON.stringify(DEFAULT_NOSTR_RELAYS_2023)
) {
newSettings.lightningAddress.nostrRelays =
DEFAULT_NOSTR_RELAYS;
}

this.setSettings(JSON.stringify(newSettings));
await EncryptedStorage.setItem(MOD_KEY8, 'true');
}

// migrate old POS squareEnabled setting to posEnabled
if (newSettings?.pos?.squareEnabled) {
newSettings.pos.posEnabled = PosEnabled.Square;
Expand Down

0 comments on commit e229c67

Please sign in to comment.