chore: don't validate Nonce in query #1341

Merged
Sainan merged 1 commits from easy-query into main 2025-03-27 03:33:28 -07:00

View File

@ -74,11 +74,8 @@ export const getAccountForRequest = async (req: Request): Promise<TAccountDocume
throw new Error("Request is missing nonce parameter"); throw new Error("Request is missing nonce parameter");
} }
const account = await Account.findOne({ const account = await Account.findById(req.query.accountId);
_id: req.query.accountId, if (!account || account.Nonce != nonce) {
Nonce: nonce
});
if (!account) {
throw new Error("Invalid accountId-nonce pair"); throw new Error("Invalid accountId-nonce pair");
} }
if (account.Dropped && req.query.ct) { if (account.Dropped && req.query.ct) {