feat: update to lnbits 1.0.0 (#27)
* feat: update to lnbits 1.0.0 * fix select wallet * fix splits * fix: types, postgres errors with cache --------- Co-authored-by: Tiago Vasconcelos <talvasconcelos@gmail.com>
This commit is contained in:
parent
32bf4ae1d6
commit
5042d40af6
11 changed files with 1300 additions and 1218 deletions
12
models.py
12
models.py
|
|
@ -1,19 +1,15 @@
|
|||
from sqlite3 import Row
|
||||
from typing import List, Optional
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import Query
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Target(BaseModel):
|
||||
id: str
|
||||
wallet: str
|
||||
source: str
|
||||
percent: float
|
||||
alias: Optional[str]
|
||||
|
||||
@classmethod
|
||||
def from_row(cls, row: Row):
|
||||
return cls(**dict(row))
|
||||
alias: Optional[str] = None
|
||||
|
||||
|
||||
class TargetPut(BaseModel):
|
||||
|
|
@ -23,4 +19,4 @@ class TargetPut(BaseModel):
|
|||
|
||||
|
||||
class TargetPutList(BaseModel):
|
||||
targets: List[TargetPut]
|
||||
targets: list[TargetPut]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue