Desktop Working Again
This commit is contained in:
1 parent
7e0b5cdb5e
commit
7e06aad6d1
5 files changed
+10
-9
No files matched your search
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user