Skip to content
Snippets Groups Projects
Commit 4fc39ce6 authored by Mahdi Yari's avatar Mahdi Yari
Browse files

fix helper

parent 6f58087a
No related branches found
No related tags found
1 merge request!7Rebrand hf24
import types from "./auth/serializer/src/types"
import Serializer from "./auth/serializer/src/serializer"
import { Hive } from './api'
import config from './config'
import { Promise } from 'bluebird';
const ByteBuffer = require('bytebuffer')
const hiveApi = require('./api')
const {
uint16,
uint32,
......@@ -127,8 +127,10 @@ export function buildWitnessUpdateOp(
return ["witness_set_properties", data];
}
// doesn't work - hiveApi is empty - couldn't import api here - feel free to try
export function autoDetectApiVersion() {
return new Promise((resolve, reject) => {
const hiveApi = new Hive(config)
hiveApi.getVersionAsync().then(res => {
if (res.blockchain_version !== "0.23.0") {
config.set("rebranded_api", true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment