Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Quexington committed Oct 18, 2024
1 parent 90785d7 commit 77bf4df
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions tests/test_cat_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import pytest
from chia._tests.wallet.rpc.test_wallet_rpc import WalletRpcTestEnvironment, farm_transaction, generate_funds
from chia.rpc.wallet_request_types import GetPrivateKey
from chia.rpc.wallet_rpc_client import WalletRpcClient
from chia.simulator.full_node_simulator import FullNodeSimulator
from chia.types.blockchain_format.sized_bytes import bytes32
Expand Down Expand Up @@ -103,10 +104,9 @@ async def test_cat_tokenization_workflow(

await generate_funds(full_node_api, env.wallet_1)

fingerprint: int = await wallet_client_1.get_logged_in_fingerprint()
result = await wallet_client_1.get_private_key(fingerprint=fingerprint)
master_secret_key: PrivateKey = PrivateKey.from_bytes(bytes.fromhex(result["sk"]))
root_secret_key: PrivateKey = master_sk_to_root_sk(master_secret_key)
fingerprint = (await wallet_client_1.get_logged_in_fingerprint()).fingerprint
result = await wallet_client_1.get_private_key(GetPrivateKey(fingerprint=fingerprint))
root_secret_key: PrivateKey = master_sk_to_root_sk(result.private_key.sk)

token_index = ClimateTokenIndex(
org_uid=org_uid,
Expand Down Expand Up @@ -163,10 +163,9 @@ async def test_cat_detokenization_workflow(

full_node_api: FullNodeSimulator = env.full_node.api

fingerprint: int = await wallet_client_1.get_logged_in_fingerprint()
result = await wallet_client_1.get_private_key(fingerprint=fingerprint)
master_secret_key: PrivateKey = PrivateKey.from_bytes(bytes.fromhex(result["sk"]))
root_secret_key: PrivateKey = master_sk_to_root_sk(master_secret_key)
fingerprint = (await wallet_client_1.get_logged_in_fingerprint()).fingerprint
result = await wallet_client_1.get_private_key(GetPrivateKey(fingerprint=fingerprint))
root_secret_key: PrivateKey = master_sk_to_root_sk(result.private_key.sk)

# block: initial fund deposits

Expand Down Expand Up @@ -257,10 +256,9 @@ async def test_cat_permissionless_retirement_workflow(
full_node_api: FullNodeSimulator = env.full_node.api
full_node_client = env.full_node.rpc_client

fingerprint: int = await wallet_client_1.get_logged_in_fingerprint()
result = await wallet_client_1.get_private_key(fingerprint=fingerprint)
master_secret_key = PrivateKey.from_bytes(bytes.fromhex(result["sk"]))
root_secret_key = master_sk_to_root_sk(master_secret_key)
fingerprint = (await wallet_client_1.get_logged_in_fingerprint()).fingerprint
result = await wallet_client_1.get_private_key(GetPrivateKey(fingerprint=fingerprint))
root_secret_key = master_sk_to_root_sk(result.private_key.sk)

# block: initial fund deposits

Expand Down

0 comments on commit 77bf4df

Please sign in to comment.