bitpay / bitcore-lib

A pure and powerful JavaScript Bitcoin library
https://bitcore.io/
Other
611 stars 1.03k forks source link

Fix subtxcloseaccount payload bug for case when creditFee is 0 #276

Closed Cofresi closed 5 years ago

Cofresi commented 5 years ago

Removing redundant check if creditFee isUnsignedInteger, because creditFee is an optional field in the subtxcloseaccount payload and if it is not set then it will be set to 0 in the special tx payload. Which in turn will cause an error in the utils.isUnsignedInteger check. Removing it is save because the field has already been checked if it's being a number