whale icon indicating copy to clipboard operation
whale copied to clipboard

feat(controller): anchors API service

Open siradji opened this issue 3 years ago • 8 comments

Signed-off-by: Suraj Auwal [email protected]

What kind of PR is this?:

/kind feature

What this PR does / why we need it:

Expose anchors endpoint

Which issue(s) does this PR fixes?:

Fixes JellyfishSDK/jellyfish#1488

Additional comments?:

siradji avatar Jan 20 '22 09:01 siradji

@siradji: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind fix
  • /kind chore
  • /kind docs
  • /kind refactor
  • /kind dependencies
Details

I am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository.

defichain-bot avatar Jan 20 '22 09:01 defichain-bot

Code Climate has analyzed commit 0d81172c and detected 0 issues on this pull request.

View more on Code Climate.

codeclimate[bot] avatar Jan 20 '22 09:01 codeclimate[bot]

Codecov Report

Merging #719 (1ad54db) into main (6434ccd) will increase coverage by 0.05%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #719      +/-   ##
==========================================
+ Coverage   92.31%   92.37%   +0.05%     
==========================================
  Files         121      123       +2     
  Lines        3163     3187      +24     
  Branches      384      386       +2     
==========================================
+ Hits         2920     2944      +24     
  Misses        234      234              
  Partials        9        9              
Impacted Files Coverage Δ
packages/whale-api-client/src/api/anchors.ts 100.00% <100.00%> (ø)
packages/whale-api-client/src/index.ts 100.00% <100.00%> (ø)
packages/whale-api-client/src/whale.api.client.ts 79.76% <100.00%> (+0.49%) :arrow_up:
src/module.api/_module.ts 100.00% <100.00%> (ø)
src/module.api/anchors.controller.ts 100.00% <100.00%> (ø)

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 6434ccd...1ad54db. Read the comment docs.

codecov[bot] avatar Jan 20 '22 09:01 codecov[bot]

Adding on top of what @canonbrother mentioned here , using startBtcHeight for pagination won't work. Got it to work using limit and maxBtcHeight

siradji avatar Jan 21 '22 12:01 siradji

@siradji please resolve the comments and fix the test

fuxingloh avatar Jan 31 '22 05:01 fuxingloh

@siradji we need solve the scenario on commit 0d81172

canonbrother avatar Jan 31 '22 07:01 canonbrother

@siradji please resolve the comments and fix the test

@fuxingloh i will be fixing it today. Found out a new issue with the query.

siradji avatar Jan 31 '22 10:01 siradji

Initially, i thought that using startBtcHeight will be ideal for pagination but due to how the anchors are listed (from top to genesis) that would be impossible. The only option left is to use maxBtcHeight which worked out fine till @canonbrother pointed out a scenario where there is more than one anchor in a block.

siradji avatar Feb 04 '22 11:02 siradji