From 7915119af5d35a858d16e9af1752253908983aa0 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 26 Oct 2020 12:44:52 +0300 Subject: [PATCH] height: Improve naming of internal promise --- es/chain/node.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/es/chain/node.js b/es/chain/node.js index 1c87778962..d98f3e32c6 100644 --- a/es/chain/node.js +++ b/es/chain/node.js @@ -106,12 +106,12 @@ async function tx (hash, info = true) { async function height () { try { - if (this.height_query_promise === undefined) { - this.height_query_promise = this.api.getCurrentKeyBlockHeight() + if (this._heightPromise === undefined) { + this._heightPromise = this.api.getCurrentKeyBlockHeight() } - return (await this.height_query_promise).height + return (await this._heightPromise).height } finally { - this.height_query_promise = undefined + this._heightPromise = undefined } }