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

Create Skip API client #14

Merged
merged 16 commits into from
Jul 28, 2023
Merged

Create Skip API client #14

merged 16 commits into from
Jul 28, 2023

Conversation

thal0x
Copy link
Member

@thal0x thal0x commented Jul 27, 2023

This is the first PR in a series of PRs to clean up code and add tests.

  • Creates a SkipClient that provides methods for calling the Skip API.
  • Adds some basic tests for logic within the SkipClient that modifies requests or responses.
  • Adds CI job for tests

@thal0x thal0x self-assigned this Jul 27, 2023
@vercel
Copy link

vercel bot commented Jul 27, 2023

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

Name Status Preview Comments Updated (UTC)
ibc-dot-fun ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2023 0:09am

@thal0x thal0x marked this pull request as ready for review July 27, 2023 11:14
@thal0x thal0x requested a review from bpiv400 July 27, 2023 11:14
@thal0x thal0x marked this pull request as draft July 27, 2023 11:15
@thal0x thal0x marked this pull request as ready for review July 27, 2023 11:17
Comment on lines 8 to 13
export const ENDPOINTS = {
GET_CHAINS: `${API_URL}/info/chains`,
GET_ROUTE: `${API_URL}/fungible/route`,
};

export const IGNORE_CHAINS = ["agoric", "8ball", "akashnet-2"];
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these be passed into the client as arguments?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah probably, updated

const API_URL = process.env.NEXT_PUBLIC_API_URL ?? "https://api.skip.money/v1";

export const ENDPOINTS = {
GET_CHAINS: `${API_URL}/info/chains`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we only defining endpoints for these routes?

Shouldn't these be given by functions / vars on the client itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah this was something i started to do and then abandoned, just removed it

thal0x and others added 5 commits July 27, 2023 12:28
[ENG-1513] Scroll relay warning into view when opened
Track amount and asset of successful txs
[ENG-1528] Use assets endpoint instead of chain registry
@thal0x thal0x merged commit b11fadc into staging Jul 28, 2023
2 checks passed
@thal0x thal0x deleted the create-skip-api-client branch July 28, 2023 00:02
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