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(quote): add more validations #213

Merged
merged 8 commits into from
Aug 25, 2023
Merged

Conversation

satish-ravi
Copy link
Contributor

@satish-ravi satish-ravi commented Aug 23, 2023

Add tests for requests missing required fields, checking if quote can be fetched with either amount

@satish-ravi satish-ravi marked this pull request as ready for review August 24, 2023 20:12
@satish-ravi satish-ravi changed the title feat(quote): add bad request validations feat(quote): add more validations Aug 24, 2023
cryptoType: CryptoType.cUSD,
fiatType: FiatType.NGN,
cryptoAmount: '10',
fiatAmount: '7560',
Copy link
Contributor

Choose a reason for hiding this comment

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

for some providers, 10 is at or near the minimum quote offered. Given that Naira can fluctuate in value, we might want to increase cryptoAmount too so there's more of a buffer. Otherwise if Naira decreased in value, this could drop below the minimum quote amount offered by the provider, assuming that minimum amount is denominated in dollars

Copy link
Contributor

Choose a reason for hiding this comment

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

same with the other mock quotes for 10 cUSD that now have a fiat amount

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated all quotes to be 20 cUSD, and also dropped the in / out in the field names since some objects were just duplicates

validations/quote.test.ts Outdated Show resolved Hide resolved
validations/quote.test.ts Show resolved Hide resolved
@satish-ravi satish-ravi merged commit 3fd1426 into main Aug 25, 2023
1 check passed
@satish-ravi satish-ravi deleted the satish/more-quote-validations branch August 25, 2023 22:57
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