-
Notifications
You must be signed in to change notification settings - Fork 129
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
Feature: Relay getTxBySafeTxHash via interface, use client gateway #180
Conversation
…ature/getBySafeTxHash-new-endpoint
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Depends on 5afe/safe-react#2361 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just some minor comments.
Is there any way to not show the dist files in PRs? Committing the dist after the review maybe?
import { SafeInfo } from './sdk'; | ||
import { GatewayTransactionDetails, SafeBalances } from './gateway'; | ||
|
||
export type Methods = keyof typeof METHODS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to the PR directly but... you wouldn't need this if METHODS was an enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general types for this SDK are messy and there's room for big improvement I believe. The main thing I don't understand how to do properly is to have a connection between method/params/responses in both public and private methods. This is the reason for cumbersome constructions such as:
public send = <M extends Methods, P, R>(method: M, params: P): Promise<Response<R>> => {
If you want/have time to look at it and see if you have an idea, would really appreciate it 🙂
This PR: