diff --git a/src/dashboard/js/index.js b/src/dashboard/js/index.js index caa27bf..302e104 100644 --- a/src/dashboard/js/index.js +++ b/src/dashboard/js/index.js @@ -162,6 +162,7 @@ const app = createApp({ if ( "response" in dataObject && + typeof dataObject.response === 'string' && dataObject.response.includes("Emulator downloaded") ) { this.downloadMessage = ""; diff --git a/src/emulator.py b/src/emulator.py index 440a310..632420e 100644 --- a/src/emulator.py +++ b/src/emulator.py @@ -909,15 +909,18 @@ def get_debug_state() -> Dict[str, Any]: debug_state_dict: Dict[str, Any] = {} for key in dir(debug_state): val = getattr(debug_state, key) - # Not interested in private attributes and non-JSON fields (bytes) + # Not interested in private or uppercase attributes if key.startswith("__") or key[0].isupper(): continue + # Not interested in methods + if callable(val): + continue + # Transforming bytes to string if isinstance(val, bytes): try: val = val.decode("utf-8") except UnicodeDecodeError: val = val.hex() - debug_state_dict[key] = val return debug_state_dict @@ -940,9 +943,9 @@ def get_screen_content() -> ScreenContent: if __name__ == "__main__": # read_and_confirm_mnemonic() # read_and_confirm_mnemonic_t3t1() - read_and_confirm_shamir_mnemonic_t3t1(3, 2) + # read_and_confirm_shamir_mnemonic_t3t1(3, 2) # read_and_confirm_shamir_mnemonic_t2t1(3, 2) - # state = get_debug_state() - # print("state", state) + state = get_debug_state() + print("state", state) # screen = get_screen_content() # print("screen", screen)