From 0a9bcdfac93abec2a67668b046d6b0d19c1a6cd1 Mon Sep 17 00:00:00 2001
From: pharesim <pharesim@protonmail.com>
Date: Mon, 29 Jun 2020 17:47:02 +0200
Subject: [PATCH] HF24 preparations

---
 docs/conf.py       |  2 +-
 hive/__init__.py   |  2 +-
 hive/account.py    |  2 +-
 hive/blog.py       |  2 +-
 hive/cli.py        |  2 +-
 hive/commit.py     | 16 ++++++++--------
 hivebase/chains.py |  2 +-
 setup.py           |  2 +-
 8 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index 3b200a5..f19d808 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -68,7 +68,7 @@ author = 'pharesim@protonmail.com'
 # The short X.Y version.
 version = '0.9'
 # The full version, including alpha/beta/rc tags.
-release = '0.9.9999'
+release = '0.9.10001'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/hive/__init__.py b/hive/__init__.py
index 0fec608..9ff5921 100644
--- a/hive/__init__.py
+++ b/hive/__init__.py
@@ -1,4 +1,4 @@
 # -*- coding: utf-8 -*-
 from .hive import Hive
 
-__version__ = '0.9.9999'
+__version__ = '0.9.10001'
diff --git a/hive/account.py b/hive/account.py
index 4ea312b..81f9c6e 100644
--- a/hive/account.py
+++ b/hive/account.py
@@ -83,7 +83,7 @@ class Account(dict):
             self['savings_hbd_balance'] = self['savings_sbd_balance']
             self['reward_hive_balance'] = self['reward_steem_balance']
             self['reward_hbd_balance'] = self['reward_sbd_balance']
-        
+
         available = {
             'HIVE': Amount(self['balance']).amount,
             'HBD': Amount(self['hbd_balance']).amount,
diff --git a/hive/blog.py b/hive/blog.py
index f2d3f12..858f953 100644
--- a/hive/blog.py
+++ b/hive/blog.py
@@ -46,7 +46,7 @@ class Blog:
                  hived_instance=None):
         self.hive = hived_instance or shared_hived_instance()
         self.comments_only = comments_only
-        self.account = Account(account_name)
+        self.account = Account(account_name, hived_instance=self.hive)
         self.history = self.account.history_reverse(filter_by='comment')
         self.seen_items = set()
 
diff --git a/hive/cli.py b/hive/cli.py
index b289b6e..688020b 100644
--- a/hive/cli.py
+++ b/hive/cli.py
@@ -1015,7 +1015,7 @@ def legacyentry():
     elif args.command == "balance":
         if args.account and isinstance(args.account, list):
             for account in args.account:
-                a = Account(account)
+                a = Account(account, hived_instance = hive)
 
                 print("\n%s" % a.name)
                 t = PrettyTable(["Account", "HIVE", "HBD", "VESTS"])
diff --git a/hive/commit.py b/hive/commit.py
index b5db4f9..329d5fb 100644
--- a/hive/commit.py
+++ b/hive/commit.py
@@ -123,7 +123,6 @@ class Commit(object):
             no_broadcast=self.no_broadcast,
             expiration=self.expiration)
         tx.appendOps(ops)
-
         if self.unsigned:
             tx.addSigningInformation(account, permission)
             return tx
@@ -644,7 +643,7 @@ class Commit(object):
 
         # temporarily allow both steem and hive symbols until after HF24
         legacy_symbols = 0
-        a = Account(account)
+        a = Account(account,hived_instance=self.hived)
         if 'reward_steem_balance' in a:
             legacy_symbols = 1
         if legacy_symbols == 1:
@@ -682,6 +681,7 @@ class Commit(object):
                 "memo":
                     memo
             })
+        print(op)
         return self.finalizeOp(op, account, "active")
 
     def withdraw_vesting(self, amount, account=None):
@@ -732,7 +732,7 @@ class Commit(object):
 
         # temporarily allow both steem and hive symbols until after HF24
         asset_symbol = 'HIVE'
-        a = Account(account)
+        a = Account(account, hived_instance=self.hived)
         if 'reward_steem_balance' in a:
             asset_symbol = 'STEEM'
 
@@ -797,7 +797,7 @@ class Commit(object):
 
         # temporarily allow both steem and hive symbols until after HF24
         legacy_symbols = 0
-        a = Account(account)
+        a = Account(account, hived_instance=self.hived)
         if 'reward_steem_balance' in a:
             legacy_symbols = 1
         if legacy_symbols == 1:
@@ -851,7 +851,7 @@ class Commit(object):
 
         # temporarily allow both steem and hive symbols until after HF24
         legacy_symbols = 0
-        a = Account(account)
+        a = Account(account, hived_instance=self.hived)
         if 'reward_steem_balance' in a:
             legacy_symbols = 1
         if legacy_symbols == 1:
@@ -939,7 +939,7 @@ class Commit(object):
         if none(
                 float(first(x.split(' ')))
                 for x in [reward_hbd, reward_hive, reward_vests]):
-            a = Account(account)
+            a = Account(account, hived_instance=self.hived)
             # temporarily allow both steem and hive symbols until after HF24
             if 'sbd_balance' in a:
                 a['hbd_balance'] = a['sbd_balance']
@@ -952,7 +952,7 @@ class Commit(object):
             reward_vests = a['reward_vesting_balance']
 
         # temporarily allow both steem and hive symbols until after HF24
-        a = Account(account)
+        a = Account(account, hived_instance=self.hived)
         if 'sbd_balance' in a:
             if reward_hive[-4:] == 'HIVE':
                 reward_hive = reward_hive[:-4]+'STEEM'
@@ -1089,7 +1089,7 @@ class Commit(object):
 
         # temporarily allow both steem and hive symbols until after HF24
         legacy_symbols = 0
-        a = Account(account)
+        a = Account(account, hived_instance=self.hived)
         if 'reward_steem_balance' in a:
             legacy_symbols = 1
 
diff --git a/hivebase/chains.py b/hivebase/chains.py
index 42c63d7..1ae87dc 100644
--- a/hivebase/chains.py
+++ b/hivebase/chains.py
@@ -2,7 +2,7 @@ default_prefix = "STM"
 
 known_chains = {
     "HIVE": {
-        "chain_id": "beeabode00000000000000000000000000000000000000000000000000000000",
+        "chain_id": "0" * int(256 / 4),
         "prefix": "STM",
         "hive_symbol": "HIVE",
         "hbd_symbol": "HBD",
diff --git a/setup.py b/setup.py
index 1c243ed..4ddf777 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ from setuptools.command.test import test as TestCommand
 
 # Package meta-data.
 NAME = 'hivepy'
-VERSION = '0.9.9999'
+VERSION = '0.9.10001'
 DESCRIPTION = 'A python hive library.'
 URL = 'https://github.com/pharesim/hive-python'
 EMAIL = 'pharesim@protonmail.com'
-- 
GitLab