// Prevent duplicate setup_swap in case user is retrying
if (req.swap.status === 'seller_setup') {
res.json({ error: 'A retrieve is in progress, please retry if that retrieve failed' });
return;
}
await this.swapStorage.update(traceId, { status: 'seller_setup' });
如果 swap 记录状态更新速度过慢,客户端就能重放成功。