Closed chrissiwaffler closed 4 months ago
self._network
is going to be deprecated, and it is not a commended way of getting network. base_url
is a preferred way of getting and setting network for blockfrost chain context.
The Problem is that only setting the base url is not enough and will lead to errors down the line - one needs to set network or an unusable context is obtained.
You are right @nielstron , I forgot that this network value is used when building addresses. It is fixed in this PR: https://github.com/Python-Cardano/pycardano/pull/353
Describe the bug The code of
pycardano/backend/blockfrost.py
seems to be faultyIn this initialization of the
BlockFrostChainContext
class, theself._network
gets always set toNetwork.TESTNET
regardless of the value ofbase_url
.To Reproduce initialize a context:
output:
Expected behavior The
self._network
value should be correcly updated according to the value ofbase_url
.