From 294705854e3dc91f77ca8e1c0f42ab006fa2d2ba Mon Sep 17 00:00:00 2001
From: Mahdi Yari <m.yary16@gmail.com>
Date: Sat, 14 Nov 2020 15:02:53 +0330
Subject: [PATCH] remove the bad practice

---
 src/api/transports/http.js | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/api/transports/http.js b/src/api/transports/http.js
index 7a23b2d..f4faff2 100644
--- a/src/api/transports/http.js
+++ b/src/api/transports/http.js
@@ -60,16 +60,16 @@ export default class HttpTransport extends Transport {
     const id = data.id || this.id++;
     let params = [api, data.method, data.params];
     //SPECIAL CODE - can be removed after all API node operators upgrade to get the updated get_account_history api call
-    if (this.options.uri !== 'https://api.hive.blog' && data.method === 'get_account_history' && data.params.length >= 4)
-    {
-        //We are experimenting with a new version of get_account_history that can now take up to 5 params
-        //but this is only deployed on api.hive.blog nodes, so if this particular request is going to a different
-        //backend, just strip the extra parameters off the call to avoid breaking it. Once all API nodes have upgraded
-        //this code can be removed.
-        while (data.params.length > 3)
-            data.params.pop();
-        params = [api, data.method, data.params];
-    }
+    // if (this.options.uri !== 'https://api.hive.blog' && data.method === 'get_account_history' && data.params.length >= 4)
+    // {
+    //     //We are experimenting with a new version of get_account_history that can now take up to 5 params
+    //     //but this is only deployed on api.hive.blog nodes, so if this particular request is going to a different
+    //     //backend, just strip the extra parameters off the call to avoid breaking it. Once all API nodes have upgraded
+    //     //this code can be removed.
+    //     while (data.params.length > 3)
+    //         data.params.pop();
+    //     params = [api, data.method, data.params];
+    // }
     //END SPECIAL CODE
     const retriable = this.retriable(api, data);
     const fetchMethod = this.options.fetchMethod;
-- 
GitLab