Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignedTransaction needs to take "chain" parameter #89

Open
theoreticalbts opened this issue Oct 26, 2017 · 0 comments
Open

SignedTransaction needs to take "chain" parameter #89

theoreticalbts opened this issue Oct 26, 2017 · 0 comments

Comments

@theoreticalbts
Copy link
Contributor

Here is a minimal example that demonstrates the issue:

#!/usr/bin/env python3

import steem
from steembase.transactions import SignedTransaction

tx_json = {"operations": [["account_update", {"account": "initminer", "owner": {"weight_threshold": 1, "account_auths": [], "key_auths": [["TST7WsaeWJEyuZDNUjAKGhiz3QiYArAo2iZQ6uXybQwDSLywiWimd", 1]]}, "active": {"weight_threshold": 1, "account_auths": [], "key_auths": [["TST66Df3nRNXZPRwXsSdU8J8wMBaYZQc1FqNi3FWrjsUh3Vc8WqD4", 1]]}, "posting": {"weight_threshold": 1, "account_auths": [], "key_auths": [["TST5XDJPKttDdhXKciVY5WbZEwwwsL3ki74ftJf5U581pzLZzCSkW", 1]]}, "memo_key": "TST7gVFwxitzhAhVsVNMmiUJhcW7d9Xog9s9d2tXNQKQmpNvwqXn1", "json_metadata": ""}]], "ref_block_num": 6, "ref_block_prefix": 429565289, "expiration": "2016-01-01T00:01:18"}
steemd = steem.Steem(nodes=["127.0.0.1:13520"])
signed_tx = SignedTransaction(tx_json)

What needs to happen is the SignedTransaction() constructor needs to be adapted to take a named parameter called chain which contains a dictionary of chain settings including prefix, asset names and chain ID. (As a convenience chain can also be a string, in which case the dictionary is determined by looking it up in known_chains.) Then these are passed to the appropriate sub-objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant