Skip to content
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(bitcoin): add configurable default data provider per method when use mempool #231

Merged

Conversation

ahonn
Copy link
Contributor

@ahonn ahonn commented Jan 16, 2025

New Env

Only available when BITCOIN_DATA_PROVIDER = mempool

 /**
   * The IBitcoinClient methods to use Electrs as default data provider
   * use electrs as default, mempool.space as fallback
   */
  BITCOIN_METHODS_USE_ELECTRS_BY_DEFAULT: z
    .string()
    .default('')
    .transform((value) => value.split(','))
    .pipe(z.string().array()),

This will make some IBitcoinDataProvider methods use Electrs as the primary data provider in order to resolve the issue: #221.

The configured methods will prioritize using the electrs as the primary data provider and fallback to mempool.space API when electrs is not available.

@ahonn ahonn linked an issue Jan 16, 2025 that may be closed by this pull request
Copy link

vercel bot commented Jan 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
btc-assets-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 17, 2025 8:51am

@ahonn ahonn requested a review from Flouse January 16, 2025 06:02
@Flouse
Copy link
Contributor

Flouse commented Jan 16, 2025

Please bump the version later.

@ahonn ahonn merged commit 7ae028b into develop Jan 17, 2025
3 of 4 checks passed
@ahonn ahonn deleted the 221-mempoolspace-api-returns-an-incorrectdifferent-valueorder branch January 17, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mempool.space API returns an incorrect/different value/order
3 participants