From cb1ed699769a438118d11a84ca4ca8e8b6f6e84f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Emre=20Y=C4=B1lmaz?= <hello@emre.sh>
Date: Sat, 26 Jun 2021 20:12:39 +0200
Subject: [PATCH] Prioritize HIVE_CHAIN_ID property for the chain selection

when both `HIVE_CHAIN_ID` and `STEEM_CHAIN_ID` returns valid IDs, Hive is selected as a network.
---
 beemapi/graphenerpc.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/beemapi/graphenerpc.py b/beemapi/graphenerpc.py
index 48f1f56f..e904406e 100644
--- a/beemapi/graphenerpc.py
+++ b/beemapi/graphenerpc.py
@@ -304,6 +304,8 @@ class GrapheneRPC(object):
         prefix = None
         symbols = []
         chain_assets = []
+        if 'HIVE_CHAIN_ID' in props and 'STEEM_CHAIN_ID' in props:
+            del props['STEEM_CHAIN_ID']
         for key in props:
             if key[-8:] == "CHAIN_ID":
                 chain_id = props[key]
-- 
GitLab