update hash forming

This commit is contained in:
TheJuze
2024-05-22 17:20:46 +03:00
parent cc928e47eb
commit 7c7f2f1cbf
7 changed files with 94 additions and 24 deletions

View File

@@ -265,7 +265,6 @@ class Aggregator {
const body = {
secretHash: signedLockOrder.secretHash,
user: signedLockOrder.user,
sender: signedLockOrder.sender,
expiration: signedLockOrder.expiration,
asset: signedLockOrder.asset,
@@ -530,7 +529,7 @@ class Aggregator {
const signatureHeaders = this.generateHeaders(data, method, path, timestamp, apiKey, secretKey);
const compiledHeaders = { ...headers, ...signatureHeaders.headers, };
const body = JSON.stringify(data)
;
;
const res = pmmOrderSchema.parse({});
@@ -550,7 +549,9 @@ class Aggregator {
const errorParseResult = errorSchema.safeParse(json);
if (!errorParseResult.success) { throw Error(`Unrecognized answer from aggregator: ${json}`); }
if (!errorParseResult.success) {
throw Error(`Unrecognized answer from aggregator: ${json}`);
}
throw Error(errorParseResult.data.error.reason);
}