mirror of
https://github.com/lnbits/lnbits.git
synced 2025-05-30 09:39:49 +02:00
fix: token validation
This commit is contained in:
parent
c0f0421f8a
commit
3f7da8a69b
@ -20,6 +20,9 @@ async function hashToCurve(secretMessage) {
|
||||
}
|
||||
|
||||
async function step1Alice(secretMessage) {
|
||||
// todo: document & validate `secretMessage` format
|
||||
secretMessage = uint8ToBase64.encode(secretMessage)
|
||||
secretMessage = new TextEncoder().encode(secretMessage);
|
||||
const Y = await hashToCurve(secretMessage)
|
||||
const rpk = nobleSecp256k1.utils.randomPrivateKey()
|
||||
const r = bytesToNumber(rpk)
|
||||
|
@ -1278,7 +1278,7 @@ page_container %}
|
||||
// }
|
||||
this.sendData.tokens = ''
|
||||
this.sendData.tokensBase64 = ''
|
||||
console.log('### sendTokens', sendTokens)
|
||||
// console.log('### sendTokens', sendTokens)
|
||||
// this.sendData.tokens = sendTokens.map((token, tokenIndex) => {
|
||||
// return this.promiseToProof(
|
||||
// token.promises[tokenIndex].amount,
|
||||
|
@ -353,7 +353,7 @@ async def split(
|
||||
keyset = ledger.keysets.keysets[cashu.keyset_id]
|
||||
split_return = await ledger.split(proofs, amount, outputs, keyset)
|
||||
except Exception as exc:
|
||||
HTTPException(
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.BAD_REQUEST,
|
||||
detail=str(exc),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user