WalletConnect / WalletConnectSwiftV2

WalletConnect Swift SDK v2
https://docs.walletconnect.com
Apache License 2.0
368 stars 180 forks source link

Session.Proposal missing public access to expiryTimestamp #1359

Open simonmcl opened 5 months ago

simonmcl commented 5 months ago

Describe the bug Recently updated to 1.18.8 from a much older version, and updating my app to use the inbuilt request queue. My intention was to query for

Sign.instance.getPendingRequests()
Sign.instance.getPendingProposals()

merge the two and sort by expiryTimestamp to see which incoming object should be actioned next. The Request object has an expiryTimestamp, but Session.proposal doesn't. One of its properties, of type SessionProposal, does but its marked internal and inaccessible. I need access to this internal property so I can queue these items up appropriately

In general, quite a lot of the SDK is marked private/internal. There are other things i've tried to do and been unable to due to these restrictions. For example when the socket disconnects, I display a spinner. I've encountered a rare bug where it doesn't disappear and i'm trying to pin down where the issue is occurring. I wanted to run a check inside viewDidAppear checking the underlying web-socket's connection status property, to check if it needs to be updated manually, but again the socket is inaccessible. I really feel like an SDK such as this should be a lot more open to allowing devs to at least have read-only access on the majority of properties, to keep integrations as flexible as possible

SDK Version