stacks-archive / stacks-transactions-js

The JavaScript library for generating Stacks 2.0 transactions
19 stars 17 forks source link

Fetch nonce automatically in transaction builder #74

Closed yknl closed 4 years ago

yknl commented 4 years ago

This PR updates the transaction builder functions to automatically fetch the account nonce from a Stacks node if a nonce is not specified. This saves a step and makes integration easier. Nonce can be set manually in the options arg.

Resolves #73

Type of Change

Does this introduce a breaking change?

No

Are documentation updates required?

Readme updated.

Testing information

Nonce should be fetched automatically in transaction builder when not specified via the options object.

Checklist

codecov[bot] commented 4 years ago

Codecov Report

Merging #74 into feature/option-arg-builders will decrease coverage by 0.56%. The diff coverage is 63.88%.

Impacted file tree graph

@@                       Coverage Diff                       @@
##           feature/option-arg-builders      #74      +/-   ##
===============================================================
- Coverage                        85.47%   84.90%   -0.57%     
===============================================================
  Files                               26       26              
  Lines                             1404     1438      +34     
  Branches                           252      262      +10     
===============================================================
+ Hits                              1200     1221      +21     
- Misses                             203      215      +12     
- Partials                             1        2       +1     
Impacted Files Coverage Δ
src/utils.ts 73.43% <ø> (ø)
src/builders.ts 71.50% <50.00%> (-3.82%) :arrow_down:
src/authorization.ts 76.96% <100.00%> (+0.26%) :arrow_up:
src/keys.ts 95.23% <100.00%> (+0.23%) :arrow_up:
src/network.ts 100.00% <100.00%> (ø)
src/transaction.ts 79.06% <100.00%> (+0.49%) :arrow_up:

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 7c4180e...fc90839. Read the comment docs.