Skip to content

[nanowallet] Update hardcoded testnet and mainnet node lists - #481

Merged
cryptoBeliever merged 2 commits into
devfrom
nanowallet/fix-update-hardcoded-node-list
Aug 5, 2026
Merged

[nanowallet] Update hardcoded testnet and mainnet node lists#481
cryptoBeliever merged 2 commits into
devfrom
nanowallet/fix-update-hardcoded-node-list

Conversation

@cryptoBeliever

@cryptoBeliever cryptoBeliever commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

NEM wallet ships hardcoded NIS node lists. The testnet list (overridden in the Nodes service constructor) pointed at hugetestalice, hugetestalice2 and medalice2, and the mainnet list was not overridden at all, so it fell through to the nem-sdk default — a 15-entry list of mostly unreachable *.nem.ninja hosts. This PR replaces both with the current node sets.

Testnet

  • http://libertalia.nemtest.net
  • http://ocracoke.nemtest.net
  • http://tortuga.nemtest.net
  • http://ntn1.dusanjp.com
  • http://localhost

Mainnet

  • http://portobelo.nemmain.net
  • http://hugealice.nem.ninja
  • http://hugealice2.nem.ninja
  • http://hugealice3.nem.ninja
  • http://1n.dusanjp.com
  • http://2n.dusanjp.com
  • http://localhost

Changes

  • src/app/services/nodes.service.js — replaced the testnet list and added an explicit nem.model.nodes.mainnet override in the constructor.
  • src/app/services/nodes.service.jssetDefault() no longer repeats 'http://hugetestalice.nem.ninja' as the testnet fallback; it now reads nem.model.nodes.testnet[0].uri, matching how the mainnet branch already work.

this._Wallet.node = this._storage.selectedTestnetNode;
} else {
let endpoint = nem.model.objects.create("endpoint")("http://hugetestalice.nem.ninja", nem.model.nodes.defaultPort);
let endpoint = nem.model.objects.create("endpoint")(nem.model.nodes.testnet[0].uri, nem.model.nodes.defaultPort);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would prefer you pick random node, so the fallback is balanced and does not overwhelm a single node

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed - setDefault() now picks a random node. Applied to the mainnet and mijin branches too, and extracted the pick into getRandomNodeUri(), reused in update(), which had the same expression inlined three times.

The bundled testnet list pointed at hugetestalice/medalice hosts and the mainnet list fell through to the nem-sdk default, both of which contain nodes that are no longer reachable. Replace the testnet list and add an explicit mainnet override in the Nodes service constructor.

Also derive the testnet fallback endpoint in setDefault() from nem.model.nodes.testnet[0] instead of repeating a hostname literal, so the default node always follows the configured list.
@cryptoBeliever
cryptoBeliever force-pushed the nanowallet/fix-update-hardcoded-node-list branch from 564f282 to 3bf00d2 Compare August 4, 2026 17:04
…elect node randomly

The bundled testnet list pointed at hugetestalice/medalice hosts and the mainnet list fell through to the nem-sdk default, both of which contain nodes that are no longer reachable. Replace the testnet list and add an explicit mainnet override in the Nodes service constructor.

Also derive the testnet fallback endpoint in setDefault() from nem.model.nodes.testnet[0] instead of repeating a hostname literal, so the default node always follows the configured list.

@Jaguar0625 Jaguar0625 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@cryptoBeliever
cryptoBeliever enabled auto-merge (squash) August 4, 2026 20:56
@cryptoBeliever
cryptoBeliever merged commit 5d6b9a0 into dev Aug 5, 2026
5 checks passed
@cryptoBeliever
cryptoBeliever deleted the nanowallet/fix-update-hardcoded-node-list branch August 5, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants