identitySecret in this format JGhCjFThpoOCuCH4...=,time in this format is 1708401621,data about identitySecret is taken from maFille and they are correct, I checked, since trades are successfully confirmed through SDA,confKey in this format DAgRR7dVxGjC9axkJaf3M...=,offerid also match, but I don't understand why this error occurs Error: Invalid authenticator
here is part of the code that confirms trades and calls this function
async function confirmTradeOffer(community, offer, identitySecret) {
const time = SteamTotp.time();
const confKey = SteamTotp.getConfirmationKey(identitySecret, time, 'allow');
console.log(`Подтверждение трейда с следующими данными:`);
console.log(`- ID трейда: ${offer.id}`);
console.log(`- Время (Unix Timestamp): ${time}`);
console.log(`- Ключ подтверждения: ${confKey}`);
console.log(`- IdentitySecret: ${identitySecret}`);
return new Promise((resolve, reject) => {
community.acceptConfirmationForObject(offer.id, confKey, (err) => {
if (err) {
console.error(`Ошибка подтверждения трейда ID ${offer.id}: ${err}`);
reject(`Ошибка подтверждения трейда: ${err}`);
} else {
console.log(`Трейд ID ${offer.id} успешно подтвержден.`);
resolve('Трейд подтвержден успешно.');
}
});
});
}
const confirmResult = await confirmTradeOffer(community, offer, account.identitySecret);
console.log(confirmResult);
break;