Add economyFee field in /api/fees/recommended API

This commit is contained in:
nymkappa 2022-05-31 10:40:58 +02:00
parent fcbf7d9c57
commit 09b2e21fea
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
2 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,3 @@
import config from '../config';
import { MempoolBlock } from '../mempool.interfaces';
import { Common } from './common';
import mempool from './mempool';
@ -19,6 +18,7 @@ class FeeApi {
'fastestFee': this.defaultFee,
'halfHourFee': this.defaultFee,
'hourFee': this.defaultFee,
'economyFee': minimumFee,
'minimumFee': minimumFee,
};
}
@ -31,6 +31,7 @@ class FeeApi {
'fastestFee': firstMedianFee,
'halfHourFee': secondMedianFee,
'hourFee': thirdMedianFee,
'economyFee': Math.min(2 * minimumFee, thirdMedianFee),
'minimumFee': minimumFee,
};
}

View File

@ -4470,6 +4470,7 @@ export const restApiDocsData = [
fastestFee: 1,
halfHourFee: 1,
hourFee: 1,
economyFee: 1,
minimumFee: 1
}`
},
@ -4481,6 +4482,7 @@ export const restApiDocsData = [
fastestFee: 1,
halfHourFee: 1,
hourFee: 1,
economyFee: 1,
minimumFee: 1
}`
},
@ -4492,6 +4494,7 @@ export const restApiDocsData = [
fastestFee: 1,
halfHourFee: 1,
hourFee: 1,
economyFee: 1,
minimumFee: 1
}`
},
@ -4503,7 +4506,8 @@ export const restApiDocsData = [
fastestFee: 0.1,
halfHourFee: 0.1,
hourFee: 0.1,
minimumFee: 1
economyFee: 0.1,
minimumFee: 0.1
}`
},
codeSampleLiquidTestnet: {
@ -4514,7 +4518,8 @@ export const restApiDocsData = [
fastestFee: 0.1,
halfHourFee: 0.1,
hourFee: 0.1,
minimumFee: 1
economyFee: 0.1,
minimumFee: 0.1
}`
},
codeSampleBisq: emptyCodeSample,