WalletConnect / walletconnect-monorepo

WalletConnect Monorepo
Apache License 2.0
1.25k stars 622 forks source link

feat: implements `irn_batchFetchMessages` #4459

Closed ganchoradkov closed 1 month ago

ganchoradkov commented 1 month ago

Description

Implemented irn_batchFetchMessages that is called before subscribing to topics so we can sort all pending messages from the mailbox and avoid out of sync messages and improve consistency in handling when a peer comes online and receives bunch of mailbox messages

Type of change

How has this been tested?

this test covers exactly this scenario https://github.com/WalletConnect/walletconnect-monorepo/blob/v2.0/packages/web3wallet/test/sign.spec.ts#L142

Checklist

Additional Information (Optional)

Please include any additional information that may be useful for the reviewer.

ganchoradkov commented 1 month ago

waiting on https://github.com/WalletConnect/walletconnect-utils/pull/170 to be merged/release so I can bump versions in this PR

bkrem commented 1 month ago

waiting on WalletConnect/walletconnect-utils#170 to be merged/release so I can bump versions in this PR

Approved ✅