thenewboston-blockchain/thenewboston-js

[Task] Get transaction fee from node (feature | tests | docs)

Closed this issue · 3 comments

Task

Contributors are able to complete this task and earn thenewboston coins. Check out the labels to learn how much you can earn for contributing by completing this task. Please make sure to be honest if you wish to contribute by saying you can't finish this and we can just un-assign you with no harm done! There is no point in delaying tasks from being completed for miscommunication!

Overview

Name of function Class To add Function Location in Account Manager Function Description Comments
txFee Primary Validator, Bank src/renderer/utils/transactions.ts Returns transaction fee of bank and pv Currently, the fee details are obtained from the node’s config. It would be better it could be accessed directly from the node

Behavior

  • Resolves: #73
  • user should be able to get transaction fee from node using the SDK
  • changes to existing code should be backward compatible if possible
  • tests should be provided for new methods / updated for old ones
  • documentation should be provided for new method / updated for old ones
/* code examples are awesome */

Please ask for this task to be assigned to you and earn and its sweet reward 😉

Remember to include your account number in your PR description for us to pay you 💰

Can I work on this? @zinoadidi

@zinoadidi Should I implement this on the ServerNode class or both PrimaryValidator and Bank? I'm guessing it would be better on PrimaryValidator and Bank since even the ConfirmationValidator would inherit the method if I do it on the ServerNode class.

PrimaryValidator and Bank would be the safe option here;
then it aligns as well with the account manager somewhat