From abd51c148e936d2254fb344f6aa2a9eb0593149d Mon Sep 17 00:00:00 2001 From: crokkon <33018033+crokkon@users.noreply.github.com> Date: Mon, 26 Nov 2018 09:41:35 +0100 Subject: [PATCH] account.py: fix testnet/3rd-party compatibility replacing hard-coded asset symbols with the generic symbol names. --- beem/account.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beem/account.py b/beem/account.py index 18d82001..f793e00c 100644 --- a/beem/account.py +++ b/beem/account.py @@ -501,8 +501,8 @@ class Account(BlockchainObject): elif isinstance(sbd, string_types): sbd = Amount(sbd, steem_instance=self.steem) else: - sbd = Amount(sbd, 'SBD', steem_instance=self.steem) - if sbd['symbol'] != 'SBD': + sbd = Amount(sbd, self.steem.sbd_symbol, steem_instance=self.steem) + if sbd['symbol'] != self.steem.sbd_symbol: raise AssertionError('Should input SBD, not any other asset!') vote_pct = self.steem.rshares_to_vote_pct(self.steem.sbd_to_rshares(sbd, not_broadcasted_vote=not_broadcasted_vote), voting_power=voting_power * 100, steem_power=steem_power) @@ -2380,7 +2380,7 @@ class Account(BlockchainObject): if not ``default_account`` """ - if asset not in ['STEEM', 'SBD']: + if asset not in [self.steem.steem_symbol, self.steem.sbd_symbol]: raise AssertionError() if account is None: @@ -2424,7 +2424,7 @@ class Account(BlockchainObject): if not ``default_account`` """ - if asset not in ['STEEM', 'SBD']: + if asset not in [self.steem.steem_symbol, self.steem.sbd_symbol]: raise AssertionError() if account is None: -- GitLab