https://github.com/CoinAlpha/gateway-api/blob/8100a1df86c7bc362b50459203bb1bbf58d95a70/src/services/fees.js#L27
When ethGasStationEnabled is the default value false, the first condition fails, the second condition triggers an error because it is not a string and thus skips the else branch. The else branch would only be called if the user manually set the env var ENABLE_ETH_GAS_STATION to a string that isn't equal to true. Would it be better that the default value calls the else branch and sets this.ethGasPrice = ethManualGasPrice.
https://github.com/CoinAlpha/gateway-api/blob/8100a1df86c7bc362b50459203bb1bbf58d95a70/src/services/fees.js#L10 This defaults it to
false
.https://github.com/CoinAlpha/gateway-api/blob/8100a1df86c7bc362b50459203bb1bbf58d95a70/src/services/fees.js#L27 When
ethGasStationEnabled
is the default valuefalse
, the first condition fails, the second condition triggers an error because it is not a string and thus skips the else branch. The else branch would only be called if the user manually set the env var ENABLE_ETH_GAS_STATION to a string that isn't equal to true. Would it be better that the default value calls the else branch and setsthis.ethGasPrice = ethManualGasPrice
.