mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-23 13:48:49 +00:00
Removing code. Doesn't make sense to specify keys when everyone can read them
This commit is contained in:
parent
a0e4edef6d
commit
0db860659b
@ -17,27 +17,12 @@ __embarkWhisperNewWeb3.setProvider = function (options) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
console.log("whisper not available");
|
console.log("whisper not available");
|
||||||
} else if (version >= 5) {
|
} else if (version >= 5) {
|
||||||
|
|
||||||
if (options.symKey) {
|
|
||||||
self.web3.shh.addSymKey(options.symKey).then(id => {
|
|
||||||
self.symKeyID = id;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
self.web3.shh.newSymKey().then((id) => {
|
self.web3.shh.newSymKey().then((id) => {
|
||||||
self.symKeyID = id;
|
self.symKeyID = id;
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (options.privateKey) {
|
|
||||||
self.web3.shh.addPrivateKey(options.privateKey).then((id) => {
|
|
||||||
self.sig = id;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
self.web3.shh.newKeyPair().then((id) => {
|
self.web3.shh.newKeyPair().then((id) => {
|
||||||
self.sig = id;
|
self.sig = id;
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error("version of whisper not supported");
|
throw new Error("version of whisper not supported");
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,6 @@ module.exports = {
|
|||||||
port: 8546, // Port of the blockchain node
|
port: 8546, // Port of the blockchain node
|
||||||
type: "ws" // Type of connection (ws or rpc)
|
type: "ws" // Type of connection (ws or rpc)
|
||||||
}
|
}
|
||||||
// Use this section when you need a specific symmetric or private keys in whisper
|
|
||||||
/*
|
|
||||||
,keys: {
|
|
||||||
symmetricKey: "your_symmetric_key",// Symmetric key for message decryption
|
|
||||||
privateKey: "your_private_key" // Private Key to be used as a signing key and for message decryption
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,12 +8,5 @@ module.exports = {
|
|||||||
port: 8546, // Port of the blockchain node
|
port: 8546, // Port of the blockchain node
|
||||||
type: "ws" // Type of connection (ws or rpc)
|
type: "ws" // Type of connection (ws or rpc)
|
||||||
}
|
}
|
||||||
// Use this section when you need a specific symmetric or private keys in whisper
|
|
||||||
/*
|
|
||||||
,keys: {
|
|
||||||
symmetricKey: "your_symmetric_key",// Symmetric key for message decryption
|
|
||||||
privateKey: "your_private_key" // Private Key to be used as a signing key and for message decryption
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user