mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-01-06 18:34:20 +01:00
Add fees (#503)
* wip * wip * model * refactor wallet transactions * refactor wallet * sending with fees works and outputs fill up the wallet * wip work * ok * comments * receive with amount=0 * correctly import postmeltrequest * fix melt amount * tests working * remove mint_loaded decorator in deprecated wallet api * wallet works with units * refactor: melt_quote * fix fees * add file * fees for melt inputs * set default input fee for internal quotes to 0 * fix coinselect * coin selection working * yo * fix all tests * clean up * last commit added fees for inputs for melt transactions - this commit adds a blanace too low exception * fix fee return and melt quote max allowed amount check during creation of melt quote * clean up code * add tests for fees * add melt tests * update wallet fee information
This commit is contained in:
@@ -35,12 +35,18 @@ class TokenAlreadySpentError(TransactionError):
|
||||
super().__init__(self.detail, code=self.code)
|
||||
|
||||
|
||||
class TransactionNotBalancedError(TransactionError):
|
||||
code = 11002
|
||||
|
||||
def __init__(self, detail):
|
||||
super().__init__(detail, code=self.code)
|
||||
|
||||
|
||||
class SecretTooLongError(TransactionError):
|
||||
detail = "secret too long"
|
||||
code = 11003
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(self.detail, code=self.code)
|
||||
def __init__(self, detail="secret too long"):
|
||||
super().__init__(detail, code=self.code)
|
||||
|
||||
|
||||
class NoSecretInProofsError(TransactionError):
|
||||
@@ -51,6 +57,13 @@ class NoSecretInProofsError(TransactionError):
|
||||
super().__init__(self.detail, code=self.code)
|
||||
|
||||
|
||||
class TransactionUnitError(TransactionError):
|
||||
code = 11005
|
||||
|
||||
def __init__(self, detail):
|
||||
super().__init__(detail, code=self.code)
|
||||
|
||||
|
||||
class KeysetError(CashuError):
|
||||
detail = "keyset error"
|
||||
code = 12000
|
||||
|
||||
Reference in New Issue
Block a user