feat(core): full memo type support and SEP-29 memo-required checks - #271
Merged
RaceeyXo merged 3 commits intoSep 1, 2026
Conversation
|
@Meemlahsabi 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! 🚀 |
…rt-id-hash-return
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.
Overview
This PR adds full Stellar memo type support to
useSendPayment—MEMO_TEXT,MEMO_ID,MEMO_HASH, andMEMO_RETURN— with pre-flight validation and SEP-29 memo-required checks so exchange deposits are credited correctly instead of silently landing in an omnibus account.Related Issue
Changes
📝 Full Memo Type Support
MemoInputinpackages/core/src/types/index.tsSendPaymentOptions.memowidened fromstringtoMemoInput.MEMO_TEXTfor backwards compatibility.useSendPaymentinpackages/core/src/hooks/useSendPayment.tstextis measured in UTF-8 bytes (TextEncoder) and limited to 28 bytes.idstays a string end-to-end and is passed directly toMemo.id()— noNumberparsing, so values aboveNumber.MAX_SAFE_INTEGERare preserved.hash/returnrequire exactly 64 hexadecimal characters.INVALID_MEMOcode inpackages/core/src/errors/codes.tsUNKNOWN.🛡️ SEP-29 Memo-Required Checks
useSendPaymentM...address.config.memo_requireddata entry; if present, refuses withMEMO_REQUIRED.🧪 Tests & Docs
packages/core/src/hooks/useSendPayment.test.tsxMEMO_TEXTpath.textmemos with emoji/CJK.idaboveNumber.MAX_SAFE_INTEGERand asserts the exact value on the built transaction.INVALID_MEMOfor non-numericidand badhash/return.MEMO_REQUIRED, skip conditions, and muxed + memo rejection.docs/hooks/use-send-payment.mdMEMO_ID.Verification Results
memo: "hello"still producesMEMO_TEXT— no breaking changetextmemo over 28 bytes fails validation with a clear message before any network call, not asUNKNOWNidmemo is carried as a string end-to-end; a test uses a value aboveNumber.MAX_SAFE_INTEGERand asserts the exact value on the built transactionid, andhash/returnthat are not 64 hex chars, are rejected withINVALID_MEMOconfig.memo_requiredand no memo fails withMEMO_REQUIREDbefore submissiondocs/hooks/use-send-payment.mddocuments the exchange-deposit casepnpm test,pnpm lint,pnpm typecheck, andpnpm buildall pass locallyCloses #[issue number]devbranchCloses #202