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

SIWF v2 Process Payloads #600

Merged
merged 17 commits into from
Oct 14, 2024
Merged

SIWF v2 Process Payloads #600

merged 17 commits into from
Oct 14, 2024

Conversation

wilwade
Copy link
Contributor

@wilwade wilwade commented Oct 7, 2024

Problem

We want to process the SIWF v2 payloads. Authenticate the user, and process chain interactions.

Closes #526
Closes #527
Closes #529

Solution

Processed the data using SIWF v2 library and then built the extrinsics to re-use the same queue as SIWF v1.

Steps to Verify:

  1. Checkout the branch
  2. Use config:
    • Testnet
    • "Provider12" Provider Id: 729
  3. Start redis: docker compose up redis
  4. Start the api npm run start:account-api:dev
  5. Start the worker: npm run start:account-worker:debug
  6. Start the example: node tools/siwfv2/example.mjs
  7. Open http://localhost:3030
  8. Follow the prompts!

@wilwade wilwade force-pushed the siwf-v2/process-return-526 branch 5 times, most recently from 37b1d35 to d99e06c Compare October 10, 2024 21:16
@wilwade wilwade force-pushed the siwf-v2/process-return-526 branch from d9aa75e to f815dd7 Compare October 11, 2024 14:28
@wilwade wilwade changed the title WIP: Siwf v2/process return SIWF v2 Process Payloads Oct 11, 2024
@wilwade wilwade marked this pull request as ready for review October 11, 2024 14:36
expect(response.body).toHaveProperty('rawCredentials');
});

// TODO: Is there a way to mock the fetch in the e2e?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a way to do this? I don't think there is which means we would need to setup a mock server.

Worth doing it? I can do it fairly easily as we already have a mock server system and clean response json

Copy link
Contributor

Choose a reason for hiding this comment

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

If the merge is not urgent then I feel it will be nice to have your piece of mock server already in place, will come handy as we develop more.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll see what I can do on Monday.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added!

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mattheworris mattheworris left a comment

Choose a reason for hiding this comment

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

  • Read through changes
  • Tested example, saw log messages flowing (authorizationCode was invalid, maybe that's expected for testing?)

🚢 it!

Copy link
Contributor

@saraswatpuneet saraswatpuneet left a comment

Choose a reason for hiding this comment

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

Read through the code, looks good 💯

@wilwade
Copy link
Contributor Author

wilwade commented Oct 11, 2024

  • (authorizationCode was invalid, maybe that's expected for testing?)

That was expected.

@wilwade wilwade enabled auto-merge (squash) October 14, 2024 20:46
@wilwade wilwade merged commit 9a4218c into main Oct 14, 2024
13 checks passed
@wilwade wilwade deleted the siwf-v2/process-return-526 branch October 14, 2024 20:52
wilwade added a commit that referenced this pull request Oct 18, 2024
# Problem

Missed generating the openapi json for the new siwf v2 endpoint.

Missed in #600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants