Skip to content

Implement From<Pool> → CurrencyPair & InstrumentAny #2693

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

Merged
merged 2 commits into from
Jun 7, 2025

Conversation

nicolad
Copy link
Collaborator

@nicolad nicolad commented Jun 6, 2025

Add two impl From<Pool> blocks:

  • Pool → CurrencyPair
  • Pool → InstrumentAny

Why

  • Downstream services (price-feed, risk, matching) already speak CurrencyPair/InstrumentAny.
  • Reduces boilerplate in adapters: CurrencyPair::from(pool) vs manually building IDs, symbols, increments.

@nicolad nicolad self-assigned this Jun 6, 2025
@nicolad nicolad force-pushed the feat/defi-pool-conversions branch from ee8c0a9 to 6cc80cf Compare June 7, 2025 03:48
@nautechsystems nautechsystems deleted a comment from CLAassistant Jun 7, 2025
@nicolad nicolad requested a review from cjdsellers June 7, 2025 03:53
@nicolad nicolad marked this pull request as ready for review June 7, 2025 03:55
@cjdsellers cjdsellers changed the title feat(defi): implement From<Pool> → CurrencyPair & InstrumentAny Implement From<Pool> → CurrencyPair & InstrumentAny Jun 7, 2025
Copy link
Member

@cjdsellers cjdsellers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this useful impl @nicolad !

@cjdsellers cjdsellers merged commit 2d60cec into develop Jun 7, 2025
13 checks passed
@cjdsellers cjdsellers deleted the feat/defi-pool-conversions branch June 7, 2025 07:28
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.

2 participants