mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
display error in case whisper is not available
This commit is contained in:
parent
27b2f33adc
commit
878b5aa2da
@ -75,6 +75,7 @@
|
||||
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="communication">
|
||||
<span class="error">The node you are using does not support whisper</span>
|
||||
|
||||
<h3>Listen To channel</h3>
|
||||
<div class="form-group form-inline listen">
|
||||
|
@ -71,7 +71,15 @@ $(document).ready(function() {
|
||||
// Communication (Whisper) example
|
||||
// ===========================
|
||||
$(document).ready(function() {
|
||||
EmbarkJS.Messages.setProvider('whisper');
|
||||
|
||||
$("#communication .error").hide();
|
||||
web3.version.getWhisper(function(err, res) {
|
||||
if (err) {
|
||||
$("#communication .error").show();
|
||||
} else {
|
||||
EmbarkJS.Messages.setProvider('whisper');
|
||||
}
|
||||
});
|
||||
|
||||
$("#communication button.listenToChannel").click(function() {
|
||||
var channel = $("#communication .listen input.channel").val();
|
||||
|
Loading…
x
Reference in New Issue
Block a user