finish webhooks for normal invoices with two extra columns.
This commit is contained in:
@@ -40,11 +40,7 @@ class Wallet(NamedTuple):
|
||||
hashing_key = hashlib.sha256(self.id.encode("utf-8")).digest()
|
||||
linking_key = hmac.digest(hashing_key, domain.encode("utf-8"), "sha256")
|
||||
|
||||
return SigningKey.from_string(
|
||||
linking_key,
|
||||
curve=SECP256k1,
|
||||
hashfunc=hashlib.sha256,
|
||||
)
|
||||
return SigningKey.from_string(linking_key, curve=SECP256k1, hashfunc=hashlib.sha256,)
|
||||
|
||||
async def get_payment(self, payment_hash: str) -> Optional["Payment"]:
|
||||
from .crud import get_wallet_payment
|
||||
@@ -84,6 +80,8 @@ class Payment(NamedTuple):
|
||||
payment_hash: str
|
||||
extra: Dict
|
||||
wallet_id: str
|
||||
webhook: str
|
||||
webhook_status: int
|
||||
|
||||
@classmethod
|
||||
def from_row(cls, row: Row):
|
||||
@@ -99,6 +97,8 @@ class Payment(NamedTuple):
|
||||
memo=row["memo"],
|
||||
time=row["time"],
|
||||
wallet_id=row["wallet"],
|
||||
webhook=row["webhook"],
|
||||
webhook_status=row["webhook_status"],
|
||||
)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user