Conversation
4bb1331 to
3871785
Compare
4a8175a to
03f2e6d
Compare
03f2e6d to
1cb4f76
Compare
b37cde2 to
15f0993
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #858 +/- ##
==========================================
+ Coverage 84.70% 84.99% +0.29%
==========================================
Files 112 113 +1
Lines 8243 8389 +146
Branches 1791 1832 +41
==========================================
+ Hits 6982 7130 +148
+ Misses 1232 1230 -2
Partials 29 29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
31e3f45 to
797500a
Compare
ab8cdcf to
a9d458a
Compare
578d9ba to
c23972a
Compare
src/types.ts
Outdated
| uid: string; | ||
| name: string; | ||
| symbol: string; | ||
| version: TokenVersion; |
There was a problem hiding this comment.
Maybe the version should be optional for backwards compatibility.
In the event of connecting with an old fullnode/service that does not take token version into account, having it required could break something, what do you think?
There was a problem hiding this comment.
How do you see the treatment of the data? For example, if we don't have the token version it could led us to a wrong calculation, and utxo selection.
src/types.ts
Outdated
| interface IDataTokenCreationTx { | ||
| name: string; | ||
| symbol: string; | ||
| tokenVersion: TokenVersion; |
There was a problem hiding this comment.
We should have a comment here that tokenVersion cannot be named version because it would clash with the tx version field
pedroferreira1
left a comment
There was a problem hiding this comment.
I believe it's also missing changes on the src/wallet/sendTransactionWalletService.ts file, similar to the src/new/sendTransaction.js.
017ff79 to
1d71b48
Compare
|
as we discussed, it will be addressed in another PR. |
integration tests review changes review changes: change fee_per_output to biginit review changes: rename function to getDefaultCustomTokenVersion review changes: remove unecessary casting review changes: validateAddress rename, comments fixes fix: integration tests
Motivation
Hathor now supports a new token versioning system, and with it the
FEEversion. The fee will be charged according to the docs:We accept payments with deposit based tokens in the protocol level. However, in our clients we will not. Accepting only payments with HTR.
Acceptance criteria
This PR should enable preparing a transaction taking into account the fee without affecting the current flow.
Some modifications that will be applied on merge:
versionprop toaddCreatedTokenFromTxmethod.saveTokenmethod in theMemoryStoreto set the default token version.Feeutils, containing the methods to calculate fees depending on the scope.CreateTokenTransactionto accept a token version.generalTokenInfoSchemain the wallet schemas to accept anullable version, since HTR is null or undefined.ITokenData, andIHistoryTxto have thetoken_info_versionfield.FEE_PER_OUTPUTconstant.DEFAULT_NATIVE_TOKEN_CONFIGwith theTokenVersion.NATIVEprop.