Update AddressIndex enum use in Python test and example
This commit is contained in:
parent
a1b112cbbb
commit
3128fad690
@ -40,7 +40,7 @@ wallet = bdk.Wallet(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# print new receive address
|
# print new receive address
|
||||||
address_info = wallet.get_address(bdk.AddressIndex.LAST_UNUSED)
|
address_info = wallet.get_address(bdk.AddressIndex.LAST_UNUSED())
|
||||||
address = address_info.address
|
address = address_info.address
|
||||||
index = address_info.index
|
index = address_info.index
|
||||||
print(f"New BIP84 testnet address: {address} at index {index}")
|
print(f"New BIP84 testnet address: {address} at index {index}")
|
||||||
|
@ -26,7 +26,7 @@ class TestSimpleBip84Wallet(unittest.TestCase):
|
|||||||
network=bdk.Network.TESTNET,
|
network=bdk.Network.TESTNET,
|
||||||
database_config=db_config
|
database_config=db_config
|
||||||
)
|
)
|
||||||
address_info = wallet.get_address(bdk.AddressIndex.LAST_UNUSED)
|
address_info = wallet.get_address(bdk.AddressIndex.LAST_UNUSED())
|
||||||
address = address_info.address
|
address = address_info.address
|
||||||
# print(f"New address is {address}")
|
# print(f"New address is {address}")
|
||||||
assert address == "tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e", f"Wrong address {address}, should be tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e"
|
assert address == "tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e", f"Wrong address {address}, should be tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user