Dynamic node list - #474
Conversation
|
Thanks for the update 🙏🏼 . To make the implementation easier for the team to maintain in the future, I suggest moving this logic into the existing services:
Keeping the logic inside the existing service structure should make the behavior clearer and easier to test and maintain. This is the suggested direction rather than a required implementation. Please feel free to propose another approach that keeps node-loading responsibility within nodes.service.js. |
| } | ||
| } | ||
|
|
||
| function loadNetworkNodes(key, url) { |
There was a problem hiding this comment.
You can move this logic into nodes.service.js.
| } | ||
|
|
||
| Promise.all([ | ||
| loadNetworkNodes('mainnet', NODEWATCH_URLS.mainnet).then(function (n) { freshByNetwork.mainnet = n; }), |
There was a problem hiding this comment.
This method can be used in the connect() method in dataBridge.service.js, since this is where the wallet begins selecting a node and establishing its connection.
| <!-- Dynamic node list (nodewatch.symbol.tools; falls back to bundled defaults on any failure) --> | ||
| <script src="vendors/dynamic-nodes.js"></script> | ||
|
|
There was a problem hiding this comment.
Once it moves into existing services, we no longer need it here.
e409edf to
5a2776e
Compare
|
Thanks for the review. |
No description provided.