From 4fc39ce67d9ac5771e4b72914fcd26d614f6fc99 Mon Sep 17 00:00:00 2001 From: Mahdi Yari <m.yary16@gmail.com> Date: Thu, 9 Jul 2020 09:53:52 +0430 Subject: [PATCH] fix helper --- src/utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index b057f2d..095ca44 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,10 +1,10 @@ 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) -- GitLab