LiskArchive / lisk-elements

⚙️ Library for sending Lisk transactions from the client or server
https://lisk.io/
GNU General Public License v3.0
250 stars 64 forks source link

Transaction fee should not be overwritten in the constructor of transactions #1144

Closed SargeKhan closed 5 years ago

SargeKhan commented 5 years ago

Expected behavior

The constructor should create transaction object with fee parameter provided in the JSON object. It should invalidate a transaction if the fee of the transaction does not match the fee of the transaction type when validate() function is called.

Actual behavior

The fee of transaction is overwritten in the constructor of each transaction type. Which is not a correct behaviour since genesis block contains transactions with 0 fee.

Steps to reproduce

N/A

Which version(s) does this affect? (Environment, OS, etc...)

2.1.0