jellyfishsdk icon indicating copy to clipboard operation
jellyfishsdk copied to clipboard

feat(whale-api): whitelist `getrawtransaction` for RPC Controller

Open p3root opened this issue 1 year ago • 4 comments

What this PR does / why we need it:

Get the raw transaction from the rpc

Which issue(s) does this PR fixes?:

Fixes #1718 Needed for jellywallet to finish the ledger hardware wallet integration

p3root avatar Aug 30 '22 06:08 p3root

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

View more on Code Climate.

codeclimate[bot] avatar Aug 30 '22 06:08 codeclimate[bot]

Deploy Preview for jellyfishsdk ready!

Name Link
Latest commit 6d492ce08408f4c2bd646ad20479bd9f245c5f07
Latest deploy log https://app.netlify.com/sites/jellyfishsdk/deploys/631985cdf68405000846bbce
Deploy Preview https://deploy-preview-1729--jellyfishsdk.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Aug 30 '22 06:08 netlify[bot]

@fuxingloh I have added the test. But no clue how to run the tests locally. Just get a ton of errors. Documentation did not help either.

p3root avatar Aug 30 '22 08:08 p3root

Codecov Report

Merging #1729 (6d492ce) into main (1448424) will increase coverage by 0.02%. The diff coverage is 90.00%.

@@            Coverage Diff             @@
##             main    #1729      +/-   ##
==========================================
+ Coverage   93.88%   93.91%   +0.02%     
==========================================
  Files         361      361              
  Lines       10407    10416       +9     
  Branches     1302     1304       +2     
==========================================
+ Hits         9771     9782      +11     
+ Misses        610      608       -2     
  Partials       26       26              
Impacted Files Coverage Δ
apps/whale-api/src/module.api/rpc.controller.ts 90.62% <ø> (ø)
packages/jellyfish-api-core/src/category/rawtx.ts 100.00% <ø> (ø)
apps/whale-api/src/module.api/rawtx.controller.ts 74.62% <87.50%> (+1.29%) :arrow_up:
packages/whale-api-client/src/api/rawtx.ts 100.00% <100.00%> (ø)
...h-transaction-builder/src/txn/txn_builder_vault.ts 70.58% <0.00%> (-29.42%) :arrow_down:
...llyfish-transaction-builder/src/txn/txn_builder.ts 89.28% <0.00%> (-8.93%) :arrow_down:
...whale-api/src/module.indexer/rpc.block.provider.ts 89.28% <0.00%> (-2.39%) :arrow_down:
packages/jellyfish-api-jsonrpc/src/index.ts 97.67% <0.00%> (-2.33%) :arrow_down:
packages/jellyfish-testing/src/icxorderbook.ts 100.00% <0.00%> (+1.61%) :arrow_up:
...action-builder/src/txn/txn_builder_icxorderbook.ts 100.00% <0.00%> (+7.14%) :arrow_up:
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Aug 30 '22 08:08 codecov[bot]

@fuxingloh can we move on here?

p3root avatar Sep 05 '22 13:09 p3root

@fuxingloh can't get npm run lint to run on my PC. Tried my best to fix it without the linter

p3root avatar Sep 06 '22 06:09 p3root

@fuxingloh can't get npm run lint to run on my PC. Tried my best to fix it without the linter

Try npm ci && npm run lint?

fuxingloh avatar Sep 06 '22 07:09 fuxingloh

Try npm ci && npm run lint?

nope. does not work either. I am working on windows.

p3root avatar Sep 06 '22 08:09 p3root

Try npm ci && npm run lint?

nope. does not work either. I am working on windows.

I don't have permission to fix it for you either (when you created this PR, you blocked contributor access to push to your fork). See below:

image

You can also use codespace and npm run lint to push to your branch.

fuxingloh avatar Sep 06 '22 08:09 fuxingloh

@fuxingloh I will try it inside the WSL. No codespaces available.

p3root avatar Sep 06 '22 08:09 p3root

@fuxingloh lint should be fixed now

p3root avatar Sep 06 '22 09:09 p3root

@fuxingloh looks good now. only tests that are failing are some SPV tests. nothing todo with my changes?

p3root avatar Sep 06 '22 10:09 p3root

Hey, @p3root, sorry we still need the lint fixed otherwise, we can't merge them due to failing "CI / Lint" workflow. I would fix it for you but I can't push to that branch.

fuxingloh avatar Sep 07 '22 08:09 fuxingloh

Hey, @p3root, sorry we still need the lint fixed otherwise, we can't merge them due to failing "CI / Lint" workflow. I would fix it for you but I can't push to that branch.

I think I got it!

p3root avatar Sep 07 '22 08:09 p3root

@fuxingloh thanks for merging it :) any clue when this will get deployed?

p3root avatar Sep 08 '22 08:09 p3root

@fuxingloh thanks for merging it :) any clue when this will get deployed?

About a day time, it utilizes rolling updates - depending on the traffic load, it takes about 2-12 hours to do a full worldwide rollout.

fuxingloh avatar Sep 08 '22 08:09 fuxingloh