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 SEP-0007 pay and transaction requests #1202

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

ebma
Copy link
Member

@ebma ebma commented Jan 25, 2021

Supersedes #1179.

  • Add transactionRequest context (to parse and store incoming SEP-0007 requests)
  • Add <TransactionRequestHandler> that checks the uri stored in the transactionRequest context and shows dialogs according to its content
  • Add <VerifyTrustedServiceDialog> that is shown for incoming SEP-0007 requests that have an origin_domain but are not in the list of trusted services. The user can then decide to trust this domain and it will be added to the list of trusted services.
  • Add <PaymentRequestContent> that renders an inline payment form and account selection list
  • Add <TransactionRequestContent> that renders a transaction summary and an account selection list, either for selecting the source account (if a source account -replacement is defined) or for selecting the signing account
  • Add <StellarRequestReviewDialog> that will render the PaymentRequestContent or TransactionRequestContent based on the type of the incoming SEP-0007 request.
  • Add preselectedParams as a prop to the <PaymentForm> to be able to pre-fill the respective input fields with values of the pay request. Pre-filled input fields will be disabled so that the user cannot change the value.
  • Enable trusted services by default (Remove the feature flag)
  • Save settings to localStorage in web build (makes it easier to test trusted services but is useful in general)
  • Add <NoAccountsDialog> that is shown if no accounts are available for the network specified in the SEP-0007 request

Closes #323.

Sample SEP-0007 requests can be found here and here.

Payment request:
Screenshot 2021-01-20 at 16 08 22

Transaction request:
Screenshot 2021-01-25 at 12 05 10

No accounts:
Screenshot 2021-01-20 at 15 49 54

ebma and others added 30 commits November 23, 2020 12:56
when it is opened by the PaymentAccountSelectionDialog
The onCancel prop was not used before so now it indicates
whether the payment form should show a dismiss button or not
Setting padding-right and -left to zero removes the shadows and
looks weird
@ebma ebma changed the title Support SEP-0007 pay and transaction requests Add support for SEP-0007 pay and transaction requests Jan 25, 2021
@cblp
Copy link

cblp commented Nov 20, 2022

Good work! We really need this in our DAO!

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.

Support SEP-0007 payment requests
3 participants