dominant-strategies / quais.js

JavaScript library for interacting with Quai Network.
MIT License
2 stars 5 forks source link

[Quais] - Improve null or empty value checks in transaction.from methods #244

Closed rileystephens28 closed 2 months ago

rileystephens28 commented 3 months ago

Currently, in the QuaiTransaction.from() and QiTransaction.from() methods we are only doing null checks against tx fields. For the most part this is okay but when users specify fields with for example and empty string this can cause issues. The specific example that revealed this was when passing in a tx where the data field was an empty string which threw an error on the data field setter method. Where it applies we should be doing null checks AND empty string checks.