Desktop Working Again

This commit is contained in:
Luis Fernando Molina committed 2021-11-05 08:56:52 +01:00
1 parent 7e0b5cdb5e
commit 7e06aad6d1
5 files changed
+10 -9

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ exports.newDesktopApp = function newDesktopApp() {
console.log('Desktop Client Web Sockets Interface ....................................... Listening at port ' + global.env.DESKTOP_WEB_SOCKETS_INTERFACE_PORT)
thisObject.webSocketsClient = DK.projects.socialTrading.modules.httpInterface.newDesktopModulesHttpInterface()
thisObject.httpInterface = DK.projects.socialTrading.modules.httpInterface.newDesktopModulesHttpInterface()
thisObject.httpInterface.initialize()
console.log('Desktop Client Http Interface .............................................. Listening at port ' + global.env.DESKTOP_HTTP_INTERFACE_PORT)
@@ -1,4 +1,4 @@
function newEducationFunctionLibraryDocsStats() {
function newEducationFunctionLibraryDocsStatisticsFunctions() {
let thisObject = {
printDocsStats: printDocsStats
}
+3 -2
View File
@@ -64,7 +64,8 @@ exports.newNetworkModulesUserProfiles = function newNetworkModulesUserProfiles()
let config = JSON.parse(signingAccount.config)
let signatureObject = config.signature
let web3 = new SA.nodeModules.web3()
let blockchainAccount = web3.eth.accounts.recover(signatureObject)
let blockchainAccount = web3.eth.accounts.recover(signatureObject)
SA.projects.network.globals.memory.maps.USER_PROFILES_BY_BLOKCHAIN_ACCOUNT.set(blockchainAccount, userProfile)
/*
If the Signing Account is for a P2P node, we will add the node to the array of available nodes at the p2p network.
*/
@@ -84,7 +85,7 @@ exports.newNetworkModulesUserProfiles = function newNetworkModulesUserProfiles()
}
if (config.webSocketsPort === undefined) {
continue
}
}
p2pNetworkNode = SA.projects.network.modules.p2pNetworkNode.newNetworkModulesP2PNetworkNode()
p2pNetworkNode.initialize(signingAccount.signingAccountChild, userProfile, blockchainAccount)
@@ -36,7 +36,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
await setUpWebsocketClient(callerRole, p2pNetworkNode)
}
async function setUpWebsocketClient(callerRole) {
async function setUpWebsocketClient(callerRole, p2pNetworkNode) {
return new Promise(connectToNewtwork)
@@ -167,7 +167,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb
*/
socketClient.onmessage = socketMessage => { stepTwoResponse(socketMessage) }
let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).userProfileHandle)
let signature = web3.eth.accounts.sign(JSON.stringify(signedMessage), SA.secrets.map.get(global.env.DESKTOP_APP_SIGNING_ACCOUNT).privateKey)
let message = {
messageType: 'Handshake',
+3 -3
View File
@@ -1093,7 +1093,7 @@
{
"name": "Docs Statistics Functions",
"propertyName": "docsStatisticsFunctions",
"functionName": "newEducationFunctionLibraryDocsStats"
"functionName": "newEducationFunctionLibraryDocsStatisticsFunctions"
}
],
"utilities": [
@@ -1405,13 +1405,13 @@
{
"name": "P2P Network",
"propertyName": "p2pNetwork",
"functionName": "newSocialTradingModulesP2PNetwork",
"functionName": "newNetworkModulesP2PNetwork",
"fileName": "P2PNetwork.js"
},
{
"name": "P2P Network Node",
"propertyName": "p2pNetworkNode",
"functionName": "newSocialTradingModulesP2PNetworkNode",
"functionName": "newNetworkModulesP2PNetworkNode",
"fileName": "P2PNetworkNode.js"
}
],