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: scaffold pricing module lib #28

Merged
merged 5 commits into from
Jul 29, 2024
Merged

Conversation

0xnigir1
Copy link
Collaborator

🤖 Linear

Closes ZKS-63

Description

Scaffold Pricing module library:

  • CoingeckoService

@0xnigir1 0xnigir1 requested review from 0xkenj1 and 0xyaco July 23, 2024 18:29
Copy link

linear bot commented Jul 23, 2024

ZKS-63 Base

Create base package and interfaces

0xyaco
0xyaco previously approved these changes Jul 24, 2024
Copy link
Collaborator

@0xkenj1 0xkenj1 left a comment

Choose a reason for hiding this comment

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

We need to add an interface that will be used by the consumers of this module. The CoingeckoService should implement this interface. It could be named IPricingService, for example. This will ensure that the pricing service is easily replaceable with any provider in the future.

@0xnigir1 0xnigir1 requested a review from 0xkenj1 July 26, 2024 18:34

@Injectable()
export class CoingeckoService implements IPricingService {
private readonly API_BASE_URL = "https://api.coingecko.com/api/v3/";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wdyt if we remove this hardcoded value and ask for 2 parameters baseUrl and apiKey instead???

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

okayy sound good to me

@0xnigir1
Copy link
Collaborator Author

I'll setup the ConfigService in a different PR according to what we discussed in DM, injecting ConfigService instead of raw value

@0xnigir1 0xnigir1 merged commit 080dd7c into dev Jul 29, 2024
6 checks passed
@0xnigir1 0xnigir1 deleted the feat/scaffold-pricing-module branch July 29, 2024 17:46
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.

3 participants