-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(service|btc)!: adapt org mempool updates in btc-assets-api #148
Conversation
87b4a3a
to
4f97df2
Compare
packages/btc/src/query/source.ts
Outdated
} | ||
|
||
// Get the recommended average fee rate. | ||
async getAverageFeeRate(): Promise<number> { | ||
const fees = await this.getRecommendedFeeRates(); | ||
const fees = await this.service.getBtcRecommendedFeeRates(); | ||
return fees.halfHourFee; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we just need getRecommendedFeeRates
, getAverageFeeRate
looks like it just goes to one of the fields. Are there compatibility considerations here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, personally I would like to remove both DataSource.getRecommendedFeeRates
and DataSource.getAverageFeeRate
, but I didn't do it due to compatibility concerns. The PR #98 was stuck for the same reason. I think if JoyID is not using them directly, we can remove them with a BREAKING CHANGE
mark in the PR.
Update: after discussion with ahonn and yuche, I think it's okay to remove these APIs with a BREAKING CHANGE mark. The reason for removing them: the BtcAssetsApi provides the fees API directly, and the DataSource does nothing but re-route it.
…om DataSource, and use fastestFee by default in TxBuilder
Changes
BtcAssetsApi.getBtcRecommendedFeeRates()
as the btc-assets-api service provides the API directlyafter_txid
filter inBtcAssetsApi. getBtcTransactions()
API to allow query starts after a btc txidDataSource.getRecommendedFeeRates()
andDataSource.getAverageFeeRate()
APIfastestFee
as the default fee rate in TxBuilder (it washalfHourFee
)mempool.js
from the service lib's dependenciesParent PR
Most of the updates in this pull request are based on the org mempool api updates in btc-assets-api:
Related issues
TODOs
after_txid
filter