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: Maestro adapter #54

Merged
merged 22 commits into from
Jan 12, 2025
Merged

feat: Maestro adapter #54

merged 22 commits into from
Jan 12, 2025

Conversation

Vardominator
Copy link
Collaborator

@Vardominator Vardominator commented Jan 7, 2025

  • Abstracted Adapter interface
  • Added MaestroAdapter, which implements Adapter interface
  • Added example with MaestroAdapter
  • Various helpers
  • Various cleanup and formatting
  • Updated README
  • Updated tests

@Vardominator Vardominator marked this pull request as draft January 7, 2025 02:22
@longngn longngn marked this pull request as ready for review January 7, 2025 09:30
@lednhatkhanh
Copy link
Contributor

@Vardominator I fixed the test so that it will initilize the adapters correctly. But now it's not exiting, further investigation shows that only the MaestroAdapter has this problem, if I only run test for blockfrost then it exits correctly. You can run jest with --detectOpenHandles and see that the Maestro function like: getStablePoolByNFT are keeping Jest from exiting.

@Vardominator
Copy link
Collaborator Author

@lednhatkhanh @longngn All Maestro tests are now passing but I'm seeing other errors in the test CI step that I don't understand. Can you please take a look?

@lednhatkhanh
Copy link
Contributor

@Vardominator could you please check this log?
image

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  TLSWRAP

      564 |     }
      565 |
    > 566 |     const utxos = await this.maestroClient.addresses.utxosByAddress(
          |                                                      ^
      567 |       poolAddress,
      568 |       {
      569 |         asset: Asset.toString(nft),

      at RedirectableRequest.Object.<anonymous>.RedirectableRequest._performRequest (node_modules/follow-redirects/index.js:337:24)
      at new RedirectableRequest (node_modules/follow-redirects/index.js:111:8)
      at Object.request (node_modules/follow-redirects/index.js:543:14)
      at dispatchHttpRequest (node_modules/axios/lib/adapters/http.js:464:21)
      at node_modules/axios/lib/adapters/http.js:152:5
      at wrapAsync (node_modules/axios/lib/adapters/http.js:132:10)
      at http (node_modules/axios/lib/adapters/http.js:170:10)
      at Axios.dispatchRequest (node_modules/axios/lib/core/dispatchRequest.js:51:10)
      at Axios._request (node_modules/axios/lib/core/Axios.js:178:33)
      at Axios.request (node_modules/axios/lib/core/Axios.js:40:25)
      at Function.wrap [as request] (node_modules/axios/lib/helpers/bind.js:5:15)
      at node_modules/@maestro-org/typescript-sdk/dist/index.js:176:38
      at node_modules/@maestro-org/typescript-sdk/dist/index.js:63:61
      at __async (node_modules/@maestro-org/typescript-sdk/dist/index.js:47:10)
      at node_modules/@maestro-org/typescript-sdk/dist/index.js:174:65
      at AddressesApi.utxosByAddress (node_modules/@maestro-org/typescript-sdk/dist/index.js:1100:92)
      at MaestroAdapter.getStablePoolByNFT (src/adapters/maestro.ts:566:54)
      at Object.<anonymous> (test/adapter.test.ts:192:41)   

@Vardominator
Copy link
Collaborator Author

@lednhatkhanh Please pull the latest changes and try again. This is no longer an issue. There seems to be another issue in your build, check the last Github Actions jobs.

@Vardominator
Copy link
Collaborator Author

Not sure what happened in the last build looks like the build now passes

@Vardominator Vardominator requested a review from longngn January 8, 2025 20:10
@Vardominator
Copy link
Collaborator Author

Hi @longngn just wanted to check in about this again

@longngn
Copy link
Member

longngn commented Jan 10, 2025

Hi @longngn just wanted to check in about this again

sorry I'm on a vacay, will check asap when I have access to my laptop

@longngn longngn merged commit 7389fab into main Jan 12, 2025
1 check passed
@longngn longngn deleted the feat/maestro-adapter branch January 12, 2025 15:32
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