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

fix(solid): fix transaction signing functions #172

Merged
merged 2 commits into from
May 16, 2024

Conversation

drichar
Copy link
Collaborator

@drichar drichar commented May 16, 2024

The Solid adapter's two signing functions returned by useWalletsignTransactions and transactionSigner – were using optional chaining to satisfy TypeScript and handle potentially null values for activeWallet(). But that meant the type signatures for those functions were a union including | undefined.

This removes the need for optional chaining by first assigning the activeWallet() return value to a variable and throwing an error if it is null.

To verify it works correctly, this PR also adds test transaction signing capabilities in the Solid example app.

@drichar drichar force-pushed the fix/solid-signing-function-types branch from cb2a88c to 0aad5f1 Compare May 16, 2024 18:21
@drichar drichar merged commit 097638f into v3 May 16, 2024
1 check passed
@drichar drichar deleted the fix/solid-signing-function-types branch May 16, 2024 18:24
@drichar drichar added the v3 label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant