feat(tests): Add address MAC device tests.

matejcik/one-of
Andrew Kozlik 2 years ago committed by Andrew Kozlik
parent 42ace2aed8
commit 90c32e0a2f

@ -135,6 +135,62 @@ def test_elements(client):
)
@pytest.mark.skip_t1
def test_address_mac(client):
resp = btc.get_authenticated_address(
client, "Bitcoin", parse_path("m/44'/0'/0'/1/0")
)
assert resp.address == "1DyHzbQUoQEsLxJn6M7fMD8Xdt1XvNiwNE"
assert (
resp.mac.hex()
== "9cf7c230041d6ed95b8273bd32e023d3f227ec8c44257f6463c743a4b4add028"
)
resp = btc.get_authenticated_address(
client, "Testnet", parse_path("m/44'/1'/0'/1/0")
)
assert resp.address == "mm6kLYbGEL1tGe4ZA8xacfgRPdW1NLjCbZ"
assert (
resp.mac.hex()
== "4375089e50423505dc3480e6e85b0ba37a52bd1e009db5d260b6329f22c950d9"
)
# Script type mismatch.
resp = btc.get_authenticated_address(
client, "Bitcoin", parse_path("84'/0'/0'/0/0"), show_display=False
)
assert resp.mac is None
@pytest.mark.skip_t1
@pytest.mark.altcoin
def test_altcoin_address_mac(client):
resp = btc.get_authenticated_address(
client, "Litecoin", parse_path("m/44'/2'/0'/1/0")
)
assert resp.address == "LWj6ApswZxay4cJEJES2sGe7fLMLRvvv8h"
assert (
resp.mac.hex()
== "eaf47182d7ae17d2046ec2e204bc5b67477db20a5eaea3cec5393c25664bc4d2"
)
resp = btc.get_authenticated_address(client, "Bcash", parse_path("44'/145'/0'/1/0"))
assert resp.address == "bitcoincash:qzc5q87w069lzg7g3gzx0c8dz83mn7l02scej5aluw"
assert (
resp.mac.hex()
== "46d8e369b499a9dc62eb9e4472f4a12640ae0fb7a63c1a4dde6752123b2b7274"
)
resp = btc.get_authenticated_address(
client, "Groestlcoin", parse_path("44'/17'/0'/1/1")
)
assert resp.address == "Fmhtxeh7YdCBkyQF7AQG4QnY8y3rJg89di"
assert (
resp.mac.hex()
== "08d67c5f1ee20fd03f3e5aa26f798574716c122238ac280e33a6f3787d531552"
)
@pytest.mark.multisig
def test_multisig(client):
xpubs = []

@ -52,6 +52,8 @@
"bitcoin-test_descriptors.py::test_descriptors[Testnet-1-InputScriptType.SPENDWITNESS-wpkh([-996ae319": "3181b25e844eb1047d2904abb1099029c5f5ae4ba4d333be21336d1a745aafe0",
"bitcoin-test_firo.py::test_spend_lelantus": "7b68b613a1ed9dc03c0416d8b86353effdaaacb703dcc40bbf7b8dbcd6254745",
"bitcoin-test_fujicoin.py::test_send_p2tr": "18bdbbceedee99f00b4f23d0b78b8e6b4d17b3eaced0cd13010188cc49747230",
"bitcoin-test_getaddress.py::test_address_mac": "c09de07fbbf1e047442180e2facb5482d06a1a428891b875b7dd93c9e4704ae1",
"bitcoin-test_getaddress.py::test_altcoin_address_mac": "c09de07fbbf1e047442180e2facb5482d06a1a428891b875b7dd93c9e4704ae1",
"bitcoin-test_getaddress.py::test_bch": "c09de07fbbf1e047442180e2facb5482d06a1a428891b875b7dd93c9e4704ae1",
"bitcoin-test_getaddress.py::test_bch_multisig": "e3dbcee904b54393c3a6d4488fc6cb3c621c1cc907795061c6a05bc2d335cad1",
"bitcoin-test_getaddress.py::test_btc": "c09de07fbbf1e047442180e2facb5482d06a1a428891b875b7dd93c9e4704ae1",

Loading…
Cancel
Save