mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-21 11:04:19 +01:00
get rid of baggage
This commit is contained in:
@@ -130,7 +130,7 @@ class GetMeltResponse(BaseModel):
|
||||
class SplitRequest(BaseModel):
|
||||
proofs: List[Proof]
|
||||
amount: int
|
||||
outputs: Union[List[BlindedMessage], None] = None
|
||||
outputs: List[BlindedMessage]
|
||||
|
||||
|
||||
class PostSplitResponse(BaseModel):
|
||||
|
||||
@@ -120,14 +120,11 @@ async def split(
|
||||
Requetst a set of tokens with amount "total" to be split into two
|
||||
newly minted sets with amount "split" and "total-split".
|
||||
"""
|
||||
proofs = payload.proofs
|
||||
amount = payload.amount
|
||||
|
||||
outputs = payload.outputs or None
|
||||
|
||||
assert outputs, Exception("no outputs provided.")
|
||||
assert payload.outputs, Exception("no outputs provided.")
|
||||
try:
|
||||
split_return = await ledger.split(proofs, amount, outputs)
|
||||
split_return = await ledger.split(
|
||||
payload.proofs, payload.amount, payload.outputs
|
||||
)
|
||||
except Exception as exc:
|
||||
return CashuError(code=0, error=str(exc))
|
||||
if not split_return:
|
||||
|
||||
Reference in New Issue
Block a user