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: use U256 return value for asset volume #4986

Merged
merged 3 commits into from
Jun 21, 2024
Merged

Conversation

dandanlen
Copy link
Collaborator

@dandanlen dandanlen commented Jun 20, 2024

Pull Request

Closes: PRO-1277

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

Summary

Ensures we return hex-encoded amounts from broker api.
Improved error messages.

Examples:

broker_withdraw_fees success:

{
  "jsonrpc": "2.0",
  "result": {
    "tx_hash": "0x3fc8762e54d9eada666adb8adfabe18099611e62544751fff5b5f45a8a8db81d",
    "egress_id": [
      "Ethereum",
      93
    ],
    "egress_amount": "0xa68859da017bcdc",
    "egress_fee": "0x77a10",
    "destination_address": "0xabababababababababababababababababababab"
  },
  "id": 1
}

broker_withdraw_fees error:

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32000,
    "message": "Module error ‘NoFundsAvailable‘ from pallet ‘Swapping‘: ‘The withdrawal is not possible because not enough funds are available.‘"
  },
  "id": 1
}

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 71%. Comparing base (4583957) to head (8c984bb).

Files Patch % Lines
api/lib/src/lib.rs 0% 10 Missing ⚠️
api/lib/src/lp.rs 0% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #4986    +/-   ##
======================================
- Coverage     71%     71%    -0%     
======================================
  Files        429     429            
  Lines      74082   73915   -167     
  Branches   74082   73915   -167     
======================================
- Hits       52931   52732   -199     
- Misses     18315   18345    +30     
- Partials    2836    2838     +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dandanlen dandanlen marked this pull request as ready for review June 21, 2024 10:37
@dandanlen dandanlen requested a review from acdibble June 21, 2024 10:38
@dandanlen dandanlen added this pull request to the merge queue Jun 21, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 21, 2024
@dandanlen dandanlen added this pull request to the merge queue Jun 21, 2024
Merged via the queue into main with commit fb221f4 Jun 21, 2024
47 checks passed
@dandanlen dandanlen deleted the feature/pro-1277 branch June 21, 2024 15:15
dandanlen added a commit that referenced this pull request Jul 1, 2024
* fix: remove `context` from api results

* fix: use U256 return value for asset volume

* clippy
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