Aller au contenu
login
arrow_backRetour aux issues
StellarLock/StellarLock #500

LP lock creation silently ignores the beneficiary override field

ecoDébutant bug good first issue frontend Maybe Rewarded GrantFox OSS Third Campaign

descriptionDescription

## Summary `src/components/locks/CreateLpLockForm.tsx` renders a "Beneficiary (optional)" input (`beneficiaryOverride` state, lines 336-343) with its own Address Book picker and validation styling, but the value is never actually used anywhere else in the file. ## Problem `confirmLock()` hard-codes `beneficiary: address!` when calling `createLpLock` (line 167), and the `ConfirmLockModal` preview data also hard-codes `beneficiary: address!` (line 467). A user who types a different beneficiary address believes they are locking LP tokens for someone else, but the lock is always created with the connected wallet as beneficiary — their input is silently discarded with no error or warning. ## Task Thread `beneficiaryOverride` through to both the actual contract call and the confirmation preview: use `beneficiaryOverride.trim() || address!` in place of the hard-coded `address!` at both line 167 and line 467, and include it in the form's validity check. ## Acceptance Criteria - [ ] Entering a beneficiary address in the LP lock form actually locks the tokens for that address - [ ] The confirmation modal preview shows the entered beneficiary, not always the connected wallet - [ ] Leaving the field blank still defaults to the connected wallet
codeOuvre sur GitHub