Skip to content

SignedTransaction needs to take "chain" parameter #89

Description

@theoreticalbts

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions