Repository navigation
feat(react): add wallet-aware vault and proposal hooks - #1018
williamleewilliam1-star wants to merge 1 commit into
Conversation
Signed-off-by: williamleewilliam1-star <330827913+williamleewilliam1-star@users.noreply.github.com>
|
CI is green and the remaining #951 hook-parity scope is implemented in PR #1018. Since Stellar Wave 9 closes on September 30, could a maintainer please review this PR and, if it is eligible for the Wave, accept/assign the contribution in Drips or tell me if an additional Drips-side application step is required? I am ready to address review feedback immediately. |
p3ris0n
left a comment
There was a problem hiding this comment.
Review
This is a second implementation of #951, alongside #1061.
#1061 is mergeable, CI is green, and it adds the same three hooks, vault adapter signing, and mocked tests. This branch is CONFLICTING with main, so it cannot be merged under the current rule (green CI and no conflicts).
Please rebase onto current main only if #1061 does not land. If #1061 merges, close this PR so #951 is not implemented twice.
What does this PR do?
Completes the remaining hook-parity work for #951 against current
main:useAllowance(owner, spender)hook and adds focused coverage for it.useVaultDeposit(), backed by aVaultClientsupplied throughBcForgeProvider.useProposalVote(), which calls the wallet-awarebcForgeClient.approveProposalpath without exposing a Keypair argument.VaultClient.setWalletAdapter/getWalletAdapterand letsdepositfall back to the configured connectedWalletAdapterwhen no Keypair is passed.The issue text still says
useAllowanceis missing, but it is already present on currentmain; this PR does not duplicate or replace it.AI assistance was used for implementation and verification; the resulting diff and test output were reviewed before submission.
Type of change
Checklist
pre-commit run --all-fileslocally and it passed (repository has no.pre-commit-config.yaml)Local verification:
npm run build --workspace=@bc-forge/sdknpm test --workspace=@bc-forge/sdk -- --runInBand— 92/92 passingnpm run build --workspace=@bc-forge/reactnpm test --workspace=@bc-forge/react -- --runInBand— 72/72 passinggit diff --checkRepository-wide lint still contains pre-existing failures on
main(including the existingreact-hooks/set-state-in-effectfindings inreact/src/hooks.ts); this PR does not broaden scope to unrelated lint cleanup.Breaking changes?
No. Existing hook and SDK call patterns remain supported; wallet-adapter signing is additive.
Related issues
Closes #951