WalletConnect / walletconnect-specs

WalletConnect Specifications
https://walletconnect-specs.vercel.app
MIT License
36 stars 19 forks source link

[specs] Properly handle invalid pending requests originating from a DAPP #152

Open chadyj opened 2 years ago

chadyj commented 2 years ago

Had this feedback from Unstoppable:

To deliver the first version of WC2 in Unstoppable only needs for WC2 SDK to properly handle invalid pending requests originating from a DAPP.

In other words the SDK on a client side should:

  1. update itself when a request on the DAPP side is cancelled or times out.

  2. the SDK should also notify the client so that invalid requests are removed from the client UI.

Both of the above are required to have a smooth and fast UI on a client side. btw, same applies to Kotlin. Android integration is planned for the next week.

So, with that in mind, are you able to address the item above in the near future? Should be a quick fix on your end. We can assist as well if you need anything from our end

Status

Updated in:

chadyj commented 2 years ago

@WalletConnect/sdk-team Who was going to own this proposal? From memory I think it was @jakobuid?

jakubuid commented 2 years ago

I don't remember tbh. But the what they say is good improvement on how we handle requests on wallet side.

jakubuid commented 2 years ago

Let's come back to this topic after protocol refactor.

pedrouid commented 2 years ago

To be investigated with Swift and Kotlin... if session requests are rejected after 5mins

llbartekll commented 2 years ago

To sum up after SDK meeting: We can add timestamp to each requests: wc_sessionRequest and wc_authRequest. In 5 minutes requests should expire on both peers. After expiry, rpc history record should be removed and future responses ignored.

this will be a protocol change so should the timestamp be optional first and we could make i required after leaving RC?