Merge pull request #1738 from mempool/nymkappa/feature/additional-fee-tiers

Add `economyFee` field in /api/fees/recommended API
This commit is contained in:
wiz 2022-05-31 18:34:32 +09:00 committed by GitHub
commit cee15020fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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,