mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-08 21:34:55 +00:00
use topic param for listenTo
This commit is contained in:
parent
e5e20b751c
commit
0fb569f02f
@ -74,7 +74,7 @@ class CommunicationContainer extends Component {
|
||||
<div id="subscribeList">
|
||||
{this.state.subscribedChannels.map((item, i) => <p key={i}>{item}</p>)}
|
||||
</div>
|
||||
{this.props.messages && this.props.messages.channels && this.props.messages.channels.length &&
|
||||
{this.props.messages && this.props.messages.channels && Boolean(Object.keys(this.props.messages.channels).length) &&
|
||||
<React.Fragment>
|
||||
<p>Messages received:</p>
|
||||
<div id="messagesList">
|
||||
|
@ -145,11 +145,10 @@ class Whisper {
|
||||
self.embark.registerAPICall(
|
||||
'ws',
|
||||
// FIXME channel name
|
||||
'/embark-api/communication/listenTo/jorain',
|
||||
(ws, _req) => {
|
||||
console.log('Listen to', 'jorain');
|
||||
'/embark-api/communication/listenTo/:topic',
|
||||
(ws, req) => {
|
||||
listenTo({
|
||||
topic: 'jorain',
|
||||
topic: req.params.topic,
|
||||
messageEvents,
|
||||
toHex: self.web3.utils.toHex,
|
||||
toAscii: self.web3.utils.hexToAscii,
|
||||
|
Loading…
x
Reference in New Issue
Block a user