-
Notifications
You must be signed in to change notification settings - Fork 15
feat: partial tx facade #408
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #408 +/- ##
==========================================
+ Coverage 55.21% 56.68% +1.46%
==========================================
Files 55 55
Lines 4551 4603 +52
Branches 846 879 +33
==========================================
+ Hits 2513 2609 +96
+ Misses 1848 1804 -44
Partials 190 190
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only suggestions I made were about comment blocks and configs, so the code is approved already.
@@ -7,7 +7,7 @@ module.exports = { | |||
modulePathIgnorePatterns: ["__fixtures__/*","integration/*"], | |||
coverageThreshold: { | |||
global: { | |||
branches: 43, | |||
branches: 45, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one! Always good to improve our coverage and update this config 👍
src/models/partial_tx.ts
Outdated
const token = tokenIndex === 0 ? HATHOR_TOKEN_CONFIG.uid : tx.tokens[tokenIndex-1]; | ||
let authorities = 0; | ||
if (output.isMint()) { | ||
authorities += 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use here TOKEN_MINT_MASK
(this is meant also for the melt below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isMint
already checks for TOKEN_AUTHORITY_MASK
(on token data) and TOKEN_MINT_MASK
(on value).
I think this seems more readable.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment was to use authorities += TOKEN_MINT_MASK
and authorities += TOKEN_MELT_MASK
below, instead of the hardcoded += 1 and += 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
224d0d8
to
f821ef7
Compare
Acceptance Criteria
Security Checklist