ArcBlock / forge-js

:fire: JavaScript libraries to work with forge framework
https://forge-js.netlify.com/
Other
26 stars 2 forks source link

[bug] did-auth 还是会出现 seller duplicate setup_swap 的问题 #435

Closed wangshijun closed 3 years ago

wangshijun commented 4 years ago
      // 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 记录状态更新速度过慢,客户端就能重放成功。