Skip to content

Commit

Permalink
Improve v2 legacy ack messages
Browse files Browse the repository at this point in the history
  • Loading branch information
bitlogik committed Jan 10, 2023
1 parent 4f1decf commit 02e1d2c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pywalletconnect/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,12 @@ def get_data(self):
msg_sub[2]["data"]["message"]
)
logger.debug("Request message decrypted : %s", request_received)

# Send back ack
payload_bin = json_rpc_pack_response(msg_sub[0], True)
logger.debug("Sending result reply.")
self.websock.write_message(payload_bin)

return request_received
return None

Expand Down Expand Up @@ -581,7 +587,7 @@ def open_session(self):
pairing_rpc_id = iparams["topic"]
peer_meta = iparams["proposer"]["metadata"]
chain_id = iparams["permissions"]["blockchain"]["chains"]
break
break
cyclew += 1
if cyclew == CYCLES_TIMEOUT:
self.close()
Expand Down

0 comments on commit 02e1d2c

Please sign in to comment.