[nanowallet] Update hardcoded testnet and mainnet node lists - #481
Merged
Conversation
Jaguar0625
reviewed
Aug 4, 2026
| 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); |
Contributor
There was a problem hiding this comment.
would prefer you pick random node, so the fallback is balanced and does not overwhelm a single node
Contributor
Author
There was a problem hiding this comment.
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
force-pushed
the
nanowallet/fix-update-hardcoded-node-list
branch
from
August 4, 2026 17:04
564f282 to
3bf00d2
Compare
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NEM wallet ships hardcoded NIS node lists. The testnet list (overridden in the
Nodesservice constructor) pointed athugetestalice,hugetestalice2andmedalice2, 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.ninjahosts. This PR replaces both with the current node sets.Testnet
http://libertalia.nemtest.nethttp://ocracoke.nemtest.nethttp://tortuga.nemtest.nethttp://ntn1.dusanjp.comhttp://localhostMainnet
http://portobelo.nemmain.nethttp://hugealice.nem.ninjahttp://hugealice2.nem.ninjahttp://hugealice3.nem.ninjahttp://1n.dusanjp.comhttp://2n.dusanjp.comhttp://localhostChanges
src/app/services/nodes.service.js— replaced the testnet list and added an explicitnem.model.nodes.mainnetoverride in the constructor.src/app/services/nodes.service.js—setDefault()no longer repeats'http://hugetestalice.nem.ninja'as the testnet fallback; it now readsnem.model.nodes.testnet[0].uri, matching how the mainnet branch already work.