mirror of
https://github.com/lnbits/lnbits.git
synced 2025-06-12 18:01:29 +02:00
chore: code format
This commit is contained in:
parent
38b84b32c0
commit
8a4ef4f6dd
@ -1,5 +1,5 @@
|
|||||||
import hashlib
|
|
||||||
import base64
|
import base64
|
||||||
|
import hashlib
|
||||||
from typing import List, Set
|
from typing import List, Set
|
||||||
|
|
||||||
from .core.b_dhke import verify
|
from .core.b_dhke import verify
|
||||||
@ -41,14 +41,12 @@ async def verify_proof(master_prvkey: str, proofs_used: Set[str], proof: Proof):
|
|||||||
] # Get the correct key to check against
|
] # Get the correct key to check against
|
||||||
C = PublicKey(bytes.fromhex(proof.C), raw=True)
|
C = PublicKey(bytes.fromhex(proof.C), raw=True)
|
||||||
secret = base64.standard_b64decode(proof.secret)
|
secret = base64.standard_b64decode(proof.secret)
|
||||||
print('### secret', secret)
|
print("### secret", secret)
|
||||||
validMintSig = verify(secret_key, C, secret)
|
validMintSig = verify(secret_key, C, secret)
|
||||||
if validMintSig != True:
|
if validMintSig != True:
|
||||||
raise Exception(f"tokens not valid. Secret: {proof.secret}")
|
raise Exception(f"tokens not valid. Secret: {proof.secret}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def verify_split_amount(amount: int):
|
def verify_split_amount(amount: int):
|
||||||
"""Split amount like output amount can't be negative or too big."""
|
"""Split amount like output amount can't be negative or too big."""
|
||||||
try:
|
try:
|
||||||
|
@ -1089,7 +1089,7 @@ page_container %}
|
|||||||
payload
|
payload
|
||||||
)
|
)
|
||||||
|
|
||||||
newTokens.promises = data.snd;
|
newTokens.promises = data.snd
|
||||||
// console.log('split data', JSON.stringify(data.snd))
|
// console.log('split data', JSON.stringify(data.snd))
|
||||||
// for (let i =0 ;i < newTokens.length; i++) {
|
// for (let i =0 ;i < newTokens.length; i++) {
|
||||||
// Object.assign(newTokens[i], promises)
|
// Object.assign(newTokens[i], promises)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user