
    %j                     F    d dl Zd dlmc mZ d dlZd dlmZ d dl	m
Z
 d ZdS )    N)Account)build_diagnosis_payloadc           	      	   t          j                    }t          j                    j        }| dz                      d| d|j                                         d|j         dd           t          d| f	          }t          j        |          }|d
         }d}||k    }|slt          j
        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|d         }d}||u }|slt          j
        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|d         }|j        }d}
 ||
          }|ssdt          j        |          t          j        |          t          j        |
          t          j        |          dz  }t          t          j        |                    d x}x}x}
}|d         }d}||u }|slt          j
        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|d         }|d         }||k    }|slt          j
        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|d         }d}||k    }|slt          j
        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }	t          t          j        |	                    d x}x}}|j        }|j        } |            }||v}|st          j
        d|fd||f          dt          j                    v st          j        |          rt          j        |          ndt          j        |          t          j        |          t          j        |          dt          j                    v st          j        |          rt          j        |          ndd z  }d!d"|iz  }t          t          j        |                    d x}x}x}}d S )#NzTestnet.envzHL_WALLET_ADDRESS=z
HL_API_PRIVATE_KEY=z&
API Wallet Name=Hermes Agent
API Key=
zutf-8)encodingtestnet)envsearch_dirsr	   )==)z%(py1)s == %(py4)s)py1py4zassert %(py6)spy6env_file_foundT)is)z%(py1)s is %(py4)senv_file_pathzJassert %(py7)s
{%(py7)s = %(py3)s
{%(py3)s = %(py1)s.endswith
}(%(py5)s)
})r   py3py5py7"api_wallet_key_matches_private_keysdk_account_address_will_beaccount_address_maskedsdk_secret_key_sourcez!HL_API_PRIVATE_KEY in Testnet.env)not in)z_%(py6)s
{%(py6)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.key
}.hex
}()
} not in %(py8)sapidumped)py0py2r   r   py8zassert %(py10)spy10)r   createaddress
write_textkeyhexr   jsondumps
@pytest_ar_call_reprcompare	_safereprAssertionError_format_explanationendswith@py_builtinslocals_should_repr_global_name)tmp_pathr   walletpayloadr   @py_assert0@py_assert3@py_assert2@py_format5@py_format7@py_assert4@py_assert6@py_format8@py_assert1@py_assert5@py_assert7@py_format9@py_format11s                     T/home/agent/projects/CryptoTradingBot/Crypto_Agent/tests/test_hl_env_diagnose_cli.pyCtest_diagnose_cli_payload_has_no_private_key_and_uses_expected_filerA      s   
.

C^%F))	#V 	# 	#!gkkmm	# 	# ;	# 	# 	#  *    &)(MMMGZ  F5>&Y&>Y&&&&&&&&&&>Y&&&&&>&&&&Y&&&&&&&&&&&&&&&&&&&&&&&&&&&#$,,$,,,,,,,,,,$,,,,,$,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,?#;#,;];,,];;;;;;;;#;;;;,;;;;];;;;;;;;;;;;;;;;;;;;;;;;;;;;78@D@8D@@@@@@@@@@8D@@@@@8@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@01VW=U5VV15VVVVVVVVVVV15VVVVVV1VVVV5VVVVVVVVVVVVVVVVVVVVVVVVVVVV*+R/RR+/RRRRRRRRRRR+/RRRRRR+RRRR/RRRRRRRRRRRRRRRRRRRRRRRRRRRR7&7;&;;==&=&&&&&&&&&&=&&&&&&&&&&&&3&&&&&3&&&&&&7&&&&;&&&&=&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&    )builtinsr-   _pytest.assertion.rewrite	assertionrewriter'   r%   eth_accountr   src.tools.hl_env_diagnoser   rA    rB   r@   <module>rJ      se                        = = = = = =' ' ' ' 'rB   