Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve public key fetching for closed/terminated wallets #813

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

lukasz-zimnoch
Copy link
Member

Closes: #812

The current logic used to fetch wallet public keys was throwing errors while used for Closed or Terminated wallets. This is because the WalletRegistry contract does no longer hold the public key for such wallets. In effect, the exception was propagated upstream and caused problems while searching wallets for redemption.

Here we fix that problem by making the public key field optional and keeping it undefined for closed/terminated wallets. That way, the client code can detect this fact and omit closed/terminated wallets during processing.

The current logic used to fetch wallet public keys was throwing errors while
used for `Closed` or `Terminated` wallets. This is because the `WalletRegistry`
contract does no longer hold the public key for such wallets. In effect,
the exception was propagated upstream and caused problems while searching
wallets for redemption.

Here we fix that problem by making the public key field optional and keeping
it undefined for closed/terminated wallets. That way, the client code can
detect this fact and omit closed/terminated wallets during processing.
@lukasz-zimnoch lukasz-zimnoch self-assigned this Apr 22, 2024
@lukasz-zimnoch lukasz-zimnoch added the 🔌 typescript TypeScript library label Apr 22, 2024
@lukasz-zimnoch lukasz-zimnoch added this to the typescript/v2.4.1 milestone Apr 22, 2024
@lukasz-zimnoch lukasz-zimnoch added the 🐛 bug Something isn't working label Apr 22, 2024
@tomaszslabon tomaszslabon merged commit 51094e4 into main Apr 22, 2024
38 checks passed
@tomaszslabon tomaszslabon deleted the fix-pk-fetch branch April 22, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🔌 typescript TypeScript library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix finding wallets available for handling redemptions
2 participants