bitpay/bitcore — pull request #500 by sagivo (2014-08-23 22:12:05+00:00)
Title: fix bug - 0 fee is not working!

if the user pass 0 fee (in fee or feeSat arguments) - there's a bug in the program that will add fee even if specified 0 fee:

- in case fee or feeSat is 0 the if statement `if (opts.fee || opts.feeSat)` will be false.
from some reason `0 || undefined` in js returns `undefined` and in case a user set the fee to 0 in options this condition will not happen.

- second fix: `var feeSat = this.givenFeeSat ? ...` fixed since if `this.givenFeeSat` is 0 the condition will return false (and we want true in this case) since `0 ? true : false` will return `false` in js language.