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

Fix payment_queryInfo #2188

Merged
merged 15 commits into from
Aug 21, 2024
Merged

Fix payment_queryInfo #2188

merged 15 commits into from
Aug 21, 2024

Conversation

kamilsa
Copy link
Contributor

@kamilsa kamilsa commented Aug 20, 2024

Referenced issues

Closes #2183

Description of the Change

Fixes payment_queryInfo, for compatibility with e.g. Nova wallet

Possible Drawbacks

Older versions of query_info runtime api is now obsolete

Checklist Before Opening a PR

Before you open a Pull Request (PR), please make sure you've completed the following steps and confirm by answering 'Yes' to each item:

  1. Code is formatted: Have you run your code through clang-format to ensure it adheres to the project's coding standards? Yes
  2. Code is documented: Have you added comments and documentation to your code according to the guidelines in the project's contributing guidelines? Yes
  3. Self-review: Have you reviewed your own code to ensure it is free of typos, syntax errors, logical errors, and unresolved TODOs or FIXME without linking to an issue? Yes
  4. Zombienet Tests: Have you ensured that the zombienet tests are passing? Zombienet is a network simulation and testing tool used in this project. It's important to ensure that these tests pass to maintain the stability and reliability of the project. No (not needed as this is RPC related PR)

@kamilsa kamilsa changed the title Test/print rpc Fix payment_queryInfo Aug 20, 2024
@@ -110,10 +110,6 @@ namespace kagome::host_api {
storage_type = StorageType::Persistent;
} else if (kind == 2) {
storage_type = StorageType::Local;
} else if (kind == 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Под шумок

@kamilsa kamilsa marked this pull request as ready for review August 20, 2024 11:15
@kamilsa kamilsa requested review from xDimon and Harrm August 20, 2024 11:15
@@ -16,6 +16,8 @@ OUTCOME_CPP_DEFINE_CATEGORY(kagome::runtime,
switch (err) {
case E::TRANSACTION_PAYMENT_API_NOT_FOUND:
return "Transaction payment runtime API is not found in the runtime";
case TransactionPaymentApiImpl::Error::API_BELOW_VERSION_2_NOT_SUPPORTED:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
case TransactionPaymentApiImpl::Error::API_BELOW_VERSION_2_NOT_SUPPORTED:
case E::API_BELOW_VERSION_2_NOT_SUPPORTED:

@kamilsa kamilsa enabled auto-merge (squash) August 21, 2024 09:53
@kamilsa kamilsa merged commit e65f1c5 into master Aug 21, 2024
13 checks passed
@kamilsa kamilsa deleted the test/print-rpc branch August 21, 2024 10:47
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.

[Bug]: payment_queryInfo returns error
3 participants