Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SEP0029 #272

Closed
4 tasks
abuiles opened this issue Mar 26, 2020 · 0 comments · Fixed by #273
Closed
4 tasks

Add support for SEP0029 #272

abuiles opened this issue Mar 26, 2020 · 0 comments · Fixed by #273

Comments

@abuiles
Copy link
Contributor

abuiles commented Mar 26, 2020

Add support for SEP 29. This is important to provide a simple way to protect users from forgetting memos when submitting payments to exchanges.

What would you like to see?

  • Add server.checkMemoRequired(tx) with support for SEP0029.
    If any of the operations included in tx are of type payment, pathPaymentStrictReceive, pathPaymentStrictSend, or mergeAccount, then the SDK will load the destination account from Horizon and check if config.memo_required is set to 1 as defined in SEP0029.

    • While you could do the check in parallel, we decided to do a sequential check to avoid getting rate limited by SDF's public horizon which is used by default by many clients (read more here).
  • Change server.SubmitTransaction to always check if memo is required.

  • Allow the the check to be bypassed by setting skipMemoRequiredCheck to true, but default to requiring the check:

    server.SubmitTransaction(tx, {skipMemoRequiredCheck: true})
    
  • The check should be skipped automatically if the transaction includes a memo.

You can use the following implementations as a reference:

Refs: stellar/stellar-protocol#575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant