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 redirect field to 1.1 spec #193

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

mcintyre94
Copy link
Collaborator

@mcintyre94 mcintyre94 commented Feb 7, 2023

This PR adds redirect as an optional field for the transfer request, transaction request and message signing specs.

Closes #162

@vercel
Copy link

vercel bot commented Feb 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
solana-pay ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 27, 2023 at 4:13PM (UTC)
solana-pay-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 27, 2023 at 4:13PM (UTC)

Copy link
Collaborator

@jordaaash jordaaash left a comment

Choose a reason for hiding this comment

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

Made a short review, will make another pass!

SPEC1.1.md Outdated Show resolved Hide resolved
SPEC1.1.md Outdated Show resolved Hide resolved
SPEC1.1.md Outdated

A single `success-redirect` field is allowed as an optional query parameter. The value must be a conditionally [URL-encoded](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) absolute HTTPS or solana URL.

The wallet must [URL-decode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) the value. If it is a HTTPS URL then the wallet should display the decoded value to the user. If the transaction is completed successfully and it is a HTTPS URL then the wallet should redirect the user to the URL. If the transaction is completed successfully and it is a solana URL then the wallet should treat it as a new Solana Pay request. If the transaction is not completed successfully then the wallet should not use the URL.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the most important section for wallets with regard to the level of prescription the spec should provide, but some details feel a bit unclear. I'll make another pass and think about how I might clarify.

SPEC1.1.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@jordaaash jordaaash left a comment

Choose a reason for hiding this comment

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

Looks good!

message-signing-spec.md Outdated Show resolved Hide resolved
SPEC1.1.md Outdated Show resolved Hide resolved
SPEC1.1.md Show resolved Hide resolved
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.

[feature request] Support for redirect urls on txn success
2 participants