mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-01-19 05:33:47 +01:00
Don't Multiply Sat Price by 100 for NIP-5 Verification
This commit is contained in:
parent
bdf5980a1d
commit
61c9a22fe1
@ -173,12 +173,17 @@ async def create_address_internal(domain_id: str, data: CreateAddressData) -> Ad
|
||||
async def create_domain_internal(wallet_id: str, data: CreateDomainData) -> Domain:
|
||||
domain_id = urlsafe_short_hash()
|
||||
|
||||
if data.currency != "Satoshis":
|
||||
amount = data.amount * 100
|
||||
else:
|
||||
amount = data.amount
|
||||
|
||||
await db.execute(
|
||||
"""
|
||||
INSERT INTO nostrnip5.domains (id, wallet, currency, amount, domain)
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
""",
|
||||
(domain_id, wallet_id, data.currency, int(data.amount * 100), data.domain),
|
||||
(domain_id, wallet_id, data.currency, int(amount), data.domain),
|
||||
)
|
||||
|
||||
domain = await get_domain(domain_id)
|
||||
|
Loading…
Reference in New Issue
Block a user