Added hash check to db
This commit is contained in:
parent
1a460a2ce5
commit
7cd3487bc9
2 changed files with 21 additions and 0 deletions
|
|
@ -94,3 +94,16 @@ async def m002_change_withdraw_table(db):
|
|||
),
|
||||
)
|
||||
await db.execute("DROP TABLE withdraw_links")
|
||||
|
||||
async def m003_make_hash_check(db):
|
||||
"""
|
||||
Creates a hash check table.
|
||||
"""
|
||||
await db.execute(
|
||||
"""
|
||||
CREATE TABLE IF NOT EXISTS hash_check (
|
||||
id TEXT PRIMARY KEY,
|
||||
lnurl_id TEXT
|
||||
);
|
||||
"""
|
||||
)
|
||||
|
|
@ -59,3 +59,11 @@ class WithdrawLink(NamedTuple):
|
|||
max_withdrawable=self.max_withdrawable * 1000,
|
||||
default_description=self.title,
|
||||
)
|
||||
|
||||
class HashCheck(NamedTuple):
|
||||
id: str
|
||||
lnurl_id: str
|
||||
|
||||
@classmethod
|
||||
def from_row(cls, row: Row) -> "Hash":
|
||||
return cls(**dict(row))
|
||||
Loading…
Add table
Add a link
Reference in a new issue