mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-22 19:50:50 +00:00
use topic param for listenTo
This commit is contained in:
parent
11bf667ad4
commit
d3f897e204
@ -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">
|
||||
|
@ -164,11 +164,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