@@ -208,7 +208,7 @@ async def process_host_command(self, stream, show_screen):
208208 "message" : "Scan it with your wallet" ,
209209 }
210210 return res , obj
211- return
211+ return False
212212 if cmd == SIGN_BCUR :
213213 # move to the end of UR:BYTES/
214214 stream .seek (9 , 1 )
@@ -231,18 +231,18 @@ async def process_host_command(self, stream, show_screen):
231231 "message" : "Scan it with your wallet" ,
232232 }
233233 return res , obj
234- return
234+ return False
235235 elif cmd == LIST_WALLETS :
236236 wnames = json .dumps ([w .name for w in self .wallets ])
237237 return BytesIO (wnames .encode ()), {}
238238 elif cmd == ADD_WALLET :
239239 # read content, it's small
240240 desc = stream .read ().decode ().strip ()
241241 w = self .parse_wallet (desc )
242- res = await self .confirm_new_wallet (w , show_screen )
243- if res :
242+ confirm = await self .confirm_new_wallet (w , show_screen )
243+ if confirm :
244244 self .add_wallet (w )
245- return
245+ return bool ( confirm )
246246 elif cmd == VERIFY_ADDRESS :
247247 data = stream .read ().decode ().replace ("bitcoin:" , "" )
248248 # should be of the form addr?index=N or similar
@@ -257,7 +257,7 @@ async def process_host_command(self, stream, show_screen):
257257 break
258258 w , _ = self .find_wallet_from_address (addr , index = idx )
259259 await show_screen (WalletScreen (w , self .network , idx ))
260- return
260+ return True
261261 elif cmd == DERIVE_ADDRESS :
262262 arr = stream .read ().split (b" " )
263263 redeem_script = None
0 commit comments