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

[WIP] [NUTs] NUT-06 update: deprecate amount field in /split #263

Merged
merged 15 commits into from
Jul 25, 2023

Conversation

callebtc
Copy link
Collaborator

@callebtc callebtc commented Jun 24, 2023

Addresses cashubtc/nuts#34

Makes the code so much better to read.

@@ -862,9 +857,9 @@ async def check_fees(self, pr: str):
async def split(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Changing order of kwargs, safter to add the 'magic' asterisk?

async def split(
    self,
    *,
    ...
):

to force calling with kwargs?

Comment on lines 923 to 925
prom_fst, prom_snd = await self._generate_promises(
B_fst, keyset
), await self._generate_promises(B_snd, keyset)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just for readability, doesn't need to be a tuple that then gets decomposed anyway

Suggested change
prom_fst, prom_snd = await self._generate_promises(
B_fst, keyset
), await self._generate_promises(B_snd, keyset)
prom_fst = await self._generate_promises(B_fst, keyset)
prom_snd = await self._generate_promises(B_snd, keyset)

cashu/core/base.py Show resolved Hide resolved
cashu/wallet/wallet.py Outdated Show resolved Hide resolved
cashu/core/base.py Show resolved Hide resolved
@callebtc callebtc force-pushed the nut06/no_amount_in_split branch from eb0541e to 1ca9b17 Compare July 14, 2023 21:15
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Patch coverage: 42.85% and project coverage change: -0.16 ⚠️

Comparison is base (0b24689) 56.59% compared to head (3aa5888) 56.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #263      +/-   ##
==========================================
- Coverage   56.59%   56.44%   -0.16%     
==========================================
  Files          43       43              
  Lines        3963     3974      +11     
==========================================
  Hits         2243     2243              
- Misses       1720     1731      +11     
Impacted Files Coverage Δ
cashu/mint/ledger.py 28.07% <0.00%> (-0.41%) ⬇️
cashu/mint/router.py 0.00% <0.00%> (ø)
cashu/core/base.py 91.66% <100.00%> (+0.36%) ⬆️
cashu/wallet/wallet.py 80.45% <100.00%> (-0.03%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@callebtc callebtc merged commit b196c34 into main Jul 25, 2023
@callebtc callebtc deleted the nut06/no_amount_in_split branch July 25, 2023 09:13
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