feat(react): add allowance, vault deposit, and proposal vote hooks - #1061
Merged
Merged
Conversation
|
@Ayfataan Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
p3ris0n
approved these changes
Sep 28, 2026
p3ris0n
left a comment
Contributor
There was a problem hiding this comment.
Review
This covers #951.
useAllowance,useVaultDeposit, anduseProposalVoteare exported throughreact/src/hooks.ts, which@bc-forge/reactalready re-exports.- Deposit signs with the vault wallet adapter (
sourceomitted). Vote callsapproveProposalwith no secret key. - Jest tests mock the token and vault clients. SDK coverage checks adapter-backed deposit and the missing-signer rejection.
useAllowanceclears a stale error on the next read.
CI is green and the branch merges cleanly. Approving.
After #1063 lands, rebase so useVaultDeposit and useProposalVote also go through the shared connected-wallet guard. Those hooks are not in this branch's useRequireConnectedWallet path because that guard is only on #1063.
5 of 12 tasks
4 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
API behavior
useAllowance with owner and spender returns data, loading, error, and refetch. useVaultDeposit returns deposit, loading, and error; it requires vaultConfig on BcForgeProvider, and the action does not accept a secret key. useProposalVote returns vote, loading, and error and uses the client wallet adapter.
Closes #951