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

rawtx.createRawTransaction, rawtx.signRawTransactionWithKey, rawtx.testMempoolAccept, rawtx.sendRawTransaction #127

Merged
merged 5 commits into from
Apr 16, 2021

Conversation

fuxingloh
Copy link
Contributor

@fuxingloh fuxingloh commented Apr 16, 2021

What kind of PR is this?:

/kind feature

What this PR does / why we need it:

Added types for rawtx.ts #48

  1. createRawTransaction
  2. signRawTransactionWithKey
  3. testMempoolAccept
  4. sendRawTransaction

I added //TODO comments for some parts of the code as it's beyond my scope to implement them. Need to work on others features now.

@fuxingloh fuxingloh added this to the Jellyfish Wallet milestone Apr 16, 2021
@netlify
Copy link

netlify bot commented Apr 16, 2021

Deploy preview for jellyfish-defi ready!

Built with commit cee5030

https://deploy-preview-127--jellyfish-defi.netlify.app

@github-actions
Copy link

github-actions bot commented Apr 16, 2021

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/jellyfish/dist/jellyfish.umd.js 17.13 KB (+3.04% 🔺) 343 ms (+3.04% 🔺) 158 ms (-11.4% 🔽) 501 ms

@codecov
Copy link

codecov bot commented Apr 16, 2021

Codecov Report

Merging #127 (5d0d8d2) into main (ac7d29c) will increase coverage by 0.06%.
The diff coverage is 98.36%.

❗ Current head 5d0d8d2 differs from pull request most recent head cee5030. Consider uploading reports for the commit cee5030 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
+ Coverage   94.32%   94.38%   +0.06%     
==========================================
  Files          36       37       +1     
  Lines         793      784       -9     
  Branches       92       93       +1     
==========================================
- Hits          748      740       -8     
  Misses         42       42              
+ Partials        3        2       -1     
Impacted Files Coverage Δ
packages/jellyfish-json/src/remap.ts 96.66% <96.42%> (-0.21%) ⬇️
...ish-api-core/__tests__/container_adapter_client.ts 100.00% <100.00%> (ø)
...ages/jellyfish-api-core/src/category/blockchain.ts 100.00% <100.00%> (ø)
packages/jellyfish-api-core/src/category/rawtx.ts 100.00% <100.00%> (ø)
packages/jellyfish-api-core/src/index.ts 100.00% <100.00%> (ø)
packages/jellyfish-api-jsonrpc/src/index.ts 96.77% <100.00%> (ø)
packages/jellyfish-json/src/index.ts 91.66% <100.00%> (+0.36%) ⬆️

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 db5a0b9...cee5030. Read the comment docs.

@fuxingloh fuxingloh marked this pull request as ready for review April 16, 2021 07:08
testMempoolAccept
createRawTransaction
signRawTransactionWithKey
@fuxingloh fuxingloh force-pushed the fuxingloh/jellyfish-api-core-rawtx branch from 33191ce to a66fcf6 Compare April 16, 2021 10:34
@fuxingloh fuxingloh enabled auto-merge (squash) April 16, 2021 10:37
@fuxingloh fuxingloh requested a review from canonbrother April 16, 2021 11:39
@fuxingloh fuxingloh force-pushed the fuxingloh/jellyfish-api-core-rawtx branch from b3526df to b88cbe9 Compare April 16, 2021 11:46
Comment on lines 62 to 67
const { sigHashType = SigHashType.ALL } = options
return await this.client.call('signrawtransactionwithkey', [
rawTx, privKeys, options.prevTxs, sigHashType
], 'number')
}

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh.. one more..

const { privKeys = [], sigHashType = SigHashType.ALL } = options
  return await this.client.call('signrawtransactionwithkey', [
    rawTx, privKeys, prevTxs, sigHashType
], 'number')

This comment was marked as off-topic.

Copy link
Contributor

@canonbrother canonbrother left a comment

Choose a reason for hiding this comment

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

The tests are super solid 👏👏

@fuxingloh fuxingloh requested a review from canonbrother April 16, 2021 12:30
@fuxingloh fuxingloh merged commit dd1851e into main Apr 16, 2021
@fuxingloh fuxingloh deleted the fuxingloh/jellyfish-api-core-rawtx branch April 16, 2021 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants