steemit / steem-python

The official Python (3) library for the Steem Blockchain.
https://steem.io
MIT License
153 stars 98 forks source link

Note to consider private chains on ASSET evaluation #282

Open nnnarvaez opened 5 years ago

nnnarvaez commented 5 years ago

The current state only evaluates for the 3 main assets for private chains this blocks operations. check /steembase/chains.py

from chain import know_chains
Iterate ASSETS

I tried to fetch the current prefix from steemd.chain_params

    @property
    def chain_params(self):
        """ Identify the connected network. This call returns a
            dictionary with keys chain_id, prefix, and other chain
            specific settings
        """
        props = self.get_dynamic_global_properties()
        chain = props["current_supply"].split(" ")[1]

        assert chain in known_chains, "The chain you are connecting " + \
                                      "to is not supported"
        return known_chains.get(chain)

Leaving it here to come back to it when time allows, quick and dirty solution would be to just replace your ASSET names there or use the NAI