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: update types #2

Merged
merged 2 commits into from
Aug 22, 2023
Merged

feat: update types #2

merged 2 commits into from
Aug 22, 2023

Conversation

DiRaiks
Copy link
Contributor

@DiRaiks DiRaiks commented Aug 22, 2023

  • Add union types for:
    • sdk core init
    • tx callback
  • Update getFeeHistory

@@ -76,31 +81,31 @@ export class LidoSDKStake {

@ErrorHandler("Call:")
@Logger("Call:")
public async stake(props: StakeProps): Promise<void> {
public async stake(props: StakeProps): Promise<StakeResult> {
Copy link
Contributor

Choose a reason for hiding this comment

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

StakeResult is okay, but I bet for external user the most convenient would be having transaction result as same generic type, because txs results share most properties but in the generic part we can include more method specific payload, like how much was staked, how much steth recieved and so on.

@DiRaiks DiRaiks merged commit ae38e45 into main Aug 22, 2023
@DiRaiks DiRaiks deleted the feat/types branch August 22, 2023 11:55
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