Problem
1. TransactionPanel does not support a defaultDestination or defaultAmount prop — consumers embedding TransactionPanel in a "Pay X" flow (e.g. a donation button) have no way to pre-fill the form fields.
2. TransactionPanel does not emit an onSuccess callback with the TxResult — after submission, setResult(data) updates internal state but no external callback fires. Consumers building automated workflows have no way to react to a successful payment.
3. TransactionPanel memo field has no character count indicator — Stellar text memos are limited to 28 bytes. Users typing long memos do not see the limit until they hit it or the transaction fails.
Solution
- Add
defaultDestination?: string, defaultAmount?: string, defaultMemo?: string props initializing the form state.
- Add
onSuccess?: (result: TxResult) => void and onError?: (error: string) => void callback props.
- Add a character counter label below the memo input:
{memo.length}/28 with red colour when at/above 28.
Acceptance Criteria
Note for Contributors: Write a clear PR description. Include a screenshot of the memo counter at the 28-char limit.
Problem
1.
TransactionPaneldoes not support adefaultDestinationordefaultAmountprop — consumers embeddingTransactionPanelin a "Pay X" flow (e.g. a donation button) have no way to pre-fill the form fields.2.
TransactionPaneldoes not emit anonSuccesscallback with theTxResult— after submission,setResult(data)updates internal state but no external callback fires. Consumers building automated workflows have no way to react to a successful payment.3.
TransactionPanelmemofield has no character count indicator — Stellar text memos are limited to 28 bytes. Users typing long memos do not see the limit until they hit it or the transaction fails.Solution
defaultDestination?: string,defaultAmount?: string,defaultMemo?: stringprops initializing the form state.onSuccess?: (result: TxResult) => voidandonError?: (error: string) => voidcallback props.{memo.length}/28with red colour when at/above 28.Acceptance Criteria
onSuccessfires withTxResultafter a successful submissiononErrorfires with the error string on failure{n}/28with red colour at/above limitnpm run buildpasses