update signLockOrder request

This commit is contained in:
TheJuze
2024-05-21 18:45:47 +03:00
parent b1ea82e31f
commit a0c5bf400f
3 changed files with 16 additions and 4 deletions

View File

@@ -263,6 +263,18 @@ class Aggregator {
const url = new URL(`${this.apiUrl}/api/v1/cross-chain`);
const body = {
secretHash: signedLockOrder.secretHash,
user: signedLockOrder.user,
sender: signedLockOrder.sender,
expiration: signedLockOrder.expiration,
asset: signedLockOrder.asset,
amount: signedLockOrder.amount,
targetChainId: signedLockOrder.targetChainId,
sign: signedLockOrder.signature,
secret: signedLockOrder.secretHash,
}
return fetchWithValidation(
url.toString(),
z.object({
@@ -278,7 +290,7 @@ class Aggregator {
{
headers,
method: 'POST',
body: JSON.stringify({ ...signedLockOrder, sign: '' }), // TODO: remove field sign when api updated
body: JSON.stringify(body), // TODO: add field sign when api updated
},
errorSchema,
);