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

feat(backend): Fund use of paid signer API #2495

Merged
merged 33 commits into from
Oct 2, 2024
Merged

feat(backend): Fund use of paid signer API #2495

merged 33 commits into from
Oct 2, 2024

Conversation

bitdivine
Copy link
Member

@bitdivine bitdivine commented Sep 24, 2024

Motivation

The chain fusion signer has paid endpoints. To use these, users need to get an ICRC-2 approval from the backend.

Changes

  • Add a method to call ICRC-2 approve for a given user.

Tests

This flow is tested extensively in the PAPI repository: https://github.com/dfinity/papi/blob/main/src/example/paid_service/tests/it/patron_pays_icrc2_cycles.rs#L29

Once the frontend calls this method and a paid endpoint, we can also have an integration/e2e test.

@bitdivine bitdivine changed the title Papi feat(all): Use paid signer API Sep 24, 2024
@bitdivine bitdivine changed the title feat(all): Use paid signer API feat(backend): Fund use of paid signer API Oct 2, 2024
@bitdivine bitdivine marked this pull request as ready for review October 2, 2024 02:29
@bitdivine bitdivine requested a review from a team as a code owner October 2, 2024 02:29
src/backend/src/lib.rs Show resolved Hide resolved
src/backend/src/signer.rs Outdated Show resolved Hide resolved
src/backend/src/signer.rs Show resolved Hide resolved
src/backend/src/signer.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

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

Thanks for the extra comments!!

src/backend/src/signer.rs Show resolved Hide resolved
@bitdivine bitdivine enabled auto-merge (squash) October 2, 2024 08:57
@bitdivine bitdivine merged commit c591390 into main Oct 2, 2024
12 checks passed
@bitdivine bitdivine deleted the papi branch October 2, 2024 08:58
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.

2 participants