fix unset inbound discount

This commit is contained in:
Alex Bosworth 2024-08-07 08:00:36 -07:00
parent 1884811e00
commit 087fa9cb29
No known key found for this signature in database
GPG key ID: E80D2F3F311FD87E
4 changed files with 8 additions and 6 deletions

View file

@ -1,6 +1,6 @@
# Versions
## 19.2.0
## 19.2.1
- `fees`: Add `--set-inbound-rate-discount` to set a source-based rate discount

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "balanceofsatoshis",
"version": "19.2.0",
"version": "19.2.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "balanceofsatoshis",
"version": "19.2.0",
"version": "19.2.1",
"license": "MIT",
"dependencies": {
"@alexbosworth/blockchain": "2.0.0",

View file

@ -84,5 +84,5 @@
"postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis -t alexbosworth/balanceofsatoshis:$npm_package_version --push .",
"test": "npx nyc@17.0.0 node --experimental-test-coverage --test test/arrays/*.js test/balances/*.js test/chain/*.js test/display/*.js test/encryption/*.js test/lnd/*.js test/network/*.js test/nodes/*.js test/peers/*.js test/responses/*.js test/routing/*.js test/services/*.js test/swaps/*.js test/tags/*.js test/telegram/*.js test/wallets/*.js"
},
"version": "19.2.0"
"version": "19.2.1"
}

View file

@ -97,8 +97,10 @@ module.exports = (args, cbk) => {
return cbk([400, 'SettingGlobalInboundRateDiscountNotSupported']);
}
if (!isNumber(args.inbound_rate_discount)) {
return cbk([400, 'ExpectedNumericRateToSetInboundRateDiscount']);
if (!!args.inbound_rate_discount) {
if (!isNumber(args.inbound_rate_discount)) {
return cbk([400, 'ExpectedNumericRateToSetInboundRateDiscount']);
}
}
return cbk();