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

use sendOption type in function argument #212

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

mubarak23
Copy link

Fixes: #210

Description

Some Functions in CashuWallet take optional paramaters, they have grown overtime, this PR move the option paramaters into a type and use the type in the function argument instead of the long object with different type,

this way we can add more optional parameters in the type and still used there ever they are need in a function
...

Changes

  • Create SendOption Type with different option parameters
  • Pass SendOption as option value in function that require it.

PR Tasks

  • Open PR
  • run npm run test --> no failing unit tests
  • run npm run format

Copy link
Collaborator

@Egge21M Egge21M left a comment

Choose a reason for hiding this comment

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

Thanks so much for taking this on! I left a couple of comments :)

src/utils.ts Outdated Show resolved Hide resolved
src/CashuWallet.ts Outdated Show resolved Hide resolved
src/CashuWallet.ts Show resolved Hide resolved
@mubarak23 mubarak23 requested a review from Egge21M November 19, 2024 13:59
src/CashuWallet.ts Outdated Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@gandlafbtc gandlafbtc left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@Egge21M Egge21M left a comment

Choose a reason for hiding this comment

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

Seems like there is some duplication going on with the imports.

src/CashuWallet.ts Show resolved Hide resolved
@Egge21M Egge21M merged commit 0593ad1 into cashubtc:development Dec 17, 2024
1 check passed
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.

4 participants