Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Commit

Permalink
#80
Browse files Browse the repository at this point in the history
  • Loading branch information
Sing Painter committed Sep 4, 2018
1 parent a2c3ab2 commit 106d554
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ <h5 class="modal-title">Node address</h5>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/plotly.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/swagger-ui-bundle.js"></script>
<script src="utils.js?201807131930"></script>
<script src="init.js?201809041010"></script>
<script src="init.js?201809041040"></script>
<script src="analytics.js"></script>
</body>
</html>
9 changes: 6 additions & 3 deletions init.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let golosJsVersion = '0.7.0';
let golosJsVersion = '0.7.3';
let $nodeAddress = document.getElementById('node-address');
let $nodeAddressInput = $nodeAddress.querySelector('.form-control[name="node-address"]');

Expand Down Expand Up @@ -28,7 +28,7 @@ let getBlockchainVersion = (nodeAddress, callback) => {
jsonrpc: '2.0',
id: 1,
method: 'call',
params: ['database_api', 'get_config', [0], ]
params: ['database_api', 'get_config', [], ]
}));
socket.onmessage = (raw) => {
let data = JSON.parse(raw.data);
Expand All @@ -45,6 +45,9 @@ let getBlockchainVersion = (nodeAddress, callback) => {
};

getBlockchainVersion(nodeAddress, (err, result) => {
if (result && parseFloat(result.STEEMIT_BLOCKCHAIN_VERSION) < 0.18) golosJsVersion = '0.6.3';
if (result) {
if (result.STEEMIT_BLOCKCHAIN_VERSION < '0.18.0') golosJsVersion = '0.6.3';
else if (result.STEEMIT_BLOCKCHAIN_VERSION < '0.18.4') golosJsVersion = '0.7.0';
}
loadGolosJsLib();
});

0 comments on commit 106d554

Please sign in to comment.