-
Notifications
You must be signed in to change notification settings - Fork 5
Functional one-time payments and tests #12
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
Open
turukawa
wants to merge
13
commits into
interledger:main
Choose a base branch
from
turukawa:core-payments
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
`http-sfv` is deprecated in favour of `http-sf`. Replaced accordingly.
`classmethod` must return the value holding class data.
Optional fields are optional and not always returned.
These take in a variety of fixes: - Row alignment and spacing - Correct dependency import path Note that this is only the most basic of fixes and much more needs to be done to fix duplicate functions and inefficient models.
It is good practice to place all environment variables - even demo ones used in 'test' - into a `.env` file that is excluded in the `.gitignore`. This commit adds: - `pydantic-settings` to import environment variables from a `.env` - `.env.example` for others to add their own settings - `config.py` to import the settings and make them available in tests.
There are numerous changes: - Removal of all unnecessary `RootModel` classes and refactoring for simple inheritence. - Removal of duplicated `WalletAddress` class from `resource.py` and `auth.py`. - Simplification of bizarre duplication of `LimitsOutgoing1`, `LimitsOutgoing2`, etc into a single class. And multiple other quality of life fixes and improves. I have no doubt this could be improved further, but this is significantly easier to navigate and read.
The parser is useful for: - Normalising wallet addresses from the form `$ilp.` to `https://ilp`. - Converting stored private keys back to PEM format. - Verifying payment response hash to validate buyer authentication.
This is the simplest function for processing a one-off payment between a purchaser and seller. Includes: - Pydantic models defining a seller account, and a pending incoming payment transaction that can be used to store stateless interactions (i.e. generate approval link -> third-party approval -> redirect for transaction completion) - One-time payment process workflow. A README covers the context and future functionality for this feature.
New dev dependencies required: `selenium` for authenticating purchase transactions via web, and `jupyterlab` for dev testing of code. the `.env` requires a test wallet login and password to test the purchase approval workflow.
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.
This is a fairly substantial pull request to get to a working version of the SDK. The updates can be divided into the following components:
RootModelsmuch of which could be deleted and simplified.processfolder details the main objectives and roadmap, and this update implements the simplest possible payments workflow for purchase and sale.I have commented the code I've introduced, with references, and hope this is straightforward to read.
All tests green. To run your own tests, please review the
.env.exampleand add your own values.