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

[Wallet SDK] Port useful changes from MGI guide to the generic Sep-24 guide #930

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

CassioMG
Copy link
Contributor

@CassioMG CassioMG commented Aug 20, 2024

This PR ports some useful changes from Integrate with MoneyGram Access specific guide to the generic Hosted Deposit and Withdrawal guide.

This PR also fixes some small typos and consolidate the variable name token to be authToken (since a few places were using token and other places were using authToken for the same thing).

Preview is available here (most of the changes are on the Typescript tab): https://developers-pr930.previews.kube001.services.stellar-ops.com/docs/build/apps/wallet/sep24

@stellar-jenkins
Copy link

@@ -542,6 +701,12 @@ final paymentResult = await sdk.submitTransaction(transaction);

Where `keypair` is the SEP-10 authenticated account. If you want to transfer funds from a different address, refer to [Changing Stellar Transfer Account](#changing-stellar-transfer-account) section.

Code for submitting transactions to Stellar should be developed thoughtfully. The SDF has a documentation page dedicated to [submitting transactions and handling errors gracefully]. Here are a few things you need to keep in mind:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a link?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val transaction = sep24.getTransactionBy(authToken, id = "transaction id")

// "stellarTransactionId" (aka "stellar_transaction_id" on the SEP spec)
// is the hash of the Stellar network transaction payment related to this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to expand on "is the hash of the Stellar network transaction payment"?
Do we think the reader assumes sha256 already or should we add a snippet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aristidesstaffieri good point, I've added a change here: fd92a20
let me know what you think - thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@stellar-jenkins
Copy link

@CassioMG CassioMG merged commit 443e2ec into main Aug 21, 2024
2 checks passed
@CassioMG CassioMG deleted the cg-hosted-deposit-withdrawal branch August 21, 2024 15:12
janewang pushed a commit that referenced this pull request Sep 12, 2024
… guide (#930)

* Consolidate 'token' => 'authToken' in all places

* Fix typos

* Port useful changes from MGI guide to this Sep-24 guide

* Expand on stellar id hash format
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 this pull request may close these issues.

4 participants