Skip to content

POST /v5/channel/:id/pay #477

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

Merged
merged 15 commits into from
Mar 24, 2022
Merged

POST /v5/channel/:id/pay #477

merged 15 commits into from
Mar 24, 2022

Conversation

simzzz
Copy link
Contributor

@simzzz simzzz commented Mar 1, 2022

TODO:

  • Verify logic
  • Testing
  • Documentation

Questions:
How do we handle an empty body? Right now the validator will return OK without modifying anything.

@simzzz simzzz requested a review from elpiel March 1, 2022 18:07
@simzzz simzzz changed the base branch from master to aip-61-adex-v5 March 2, 2022 10:24
Copy link
Member

@elpiel elpiel left a comment

Choose a reason for hiding this comment

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

The main logic should be adjusted as follows:

max payout = Deposit - accounting spent + accounting earned

max payout <= request.payouts.sum()

Copy link
Member

@elpiel elpiel left a comment

Choose a reason for hiding this comment

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

The for loop logic is messed up.

@simzzz simzzz marked this pull request as ready for review March 15, 2022 10:30
@simzzz simzzz requested a review from elpiel March 15, 2022 16:27
@CLAassistant
Copy link

CLAassistant commented Mar 21, 2022

CLA assistant check
All committers have signed the CLA.

@simzzz simzzz requested a review from elpiel March 24, 2022 14:19
@elpiel elpiel merged commit 304984b into aip-61-adex-v5 Mar 24, 2022
@elpiel elpiel deleted the channel-pay-route branch March 28, 2022 15:10
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.

AIP #61: AdEx v5: significantly cheaper channels AIP #61 v5: Channel and Campaign
3 participants