Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

refactor(xrp): use ripple-lib connection for API requests #93

Merged
merged 7 commits into from
May 1, 2020

Conversation

faustbrian
Copy link
Contributor

@faustbrian faustbrian commented Apr 30, 2020

Resolves #92

Currently running into an issue with mocking the WebSocket requests that ripple-lib sends, will need to figure out how to intercept them with nock.

Update 1
Doesn't seem to be possible to mock websocket with nock nock/nock#129 so might need to mock the whole module via jest.

Update 2
Ripple runs a local server that replies with stub data https://github.com/ripple/ripple-lib/blob/f1c1c7033a554823b489fd3c53d27ee12fc76ed1/test/setup-api.ts#L6-L22 so will probably have to do the same.

@codecov
Copy link

codecov bot commented Apr 30, 2020

Codecov Report

Merging #93 into master will increase coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
+ Coverage   80.17%   80.29%   +0.11%     
==========================================
  Files          23       22       -1     
  Lines         686      619      -67     
  Branches      108      103       -5     
==========================================
- Hits          550      497      -53     
+ Misses        133      118      -15     
- Partials        3        4       +1     
Impacted Files Coverage Δ
src/dto/delegate.ts 33.33% <0.00%> (-16.67%) ⬇️
src/services/client.ts 67.00% <0.00%> (-4.43%) ⬇️
src/transformers/market-transformer.ts 92.85% <0.00%> (-1.59%) ⬇️
src/services/message.ts 87.50% <0.00%> (-0.74%) ⬇️
src/transformers/historical-price-transformer.ts 100.00% <0.00%> (ø)
src/transformers/historical-volume-transformer.ts
src/services/identity.ts 81.39% <0.00%> (+0.93%) ⬆️
src/services/transaction.ts 60.00% <0.00%> (+2.30%) ⬆️
src/services/tracker.ts 93.02% <0.00%> (+10.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f18a6d1...19ef335. Read the comment docs.

@faustbrian faustbrian mentioned this pull request May 1, 2020
Brian Faust added 3 commits May 1, 2020 06:47
@faustbrian faustbrian merged commit 31617bb into master May 1, 2020
@faustbrian faustbrian deleted the xrp-testnet branch May 1, 2020 04:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use network specific data endpoints for XRP
1 participant