From 0f26d88c03f182160cad510d6081d4f4e5327bbd Mon Sep 17 00:00:00 2001 From: ZHU MINCHAO <48154958+MinchaoZhu@users.noreply.github.com> Date: Sun, 8 Nov 2026 17:57:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E8=90=A5=E6=B7=B7=E5=B8=81=E5=99=A8?= =?UTF-8?q?=E5=8F=96=E5=9B=9E=EF=BC=9A=E7=85=A7=E9=A1=B5=E9=9D=A2=E4=B8=8A?= =?UTF-8?q?=E5=9B=9B=E8=88=8D=E4=BA=94=E5=85=A5=E7=9A=84=E5=8F=AF=E5=8F=96?= =?UTF-8?q?=E5=9B=9E=E6=95=B0=E9=87=8F=E5=A1=AB=E5=86=99=E6=97=B6=E6=8C=89?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=8F=96=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实测发现:可取回显示 25.75,实际 25.749…,照填被判超出。 Co-Authored-By: Claude Opus 5.5 --- src/Decentralized/TerminalWindow.OwnMix.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Decentralized/TerminalWindow.OwnMix.cs b/src/Decentralized/TerminalWindow.OwnMix.cs index e79348a..149093f 100644 --- a/src/Decentralized/TerminalWindow.OwnMix.cs +++ b/src/Decentralized/TerminalWindow.OwnMix.cs @@ -86,7 +86,10 @@ namespace Decentralized { if (!ReadAmount(out double v)) return; string asset = _ownAsset; - if (v > m.Free(asset) + 1e-9) { _message = L.T("ownmix.err"); Open(); return; } + // 页面上的可取回数量是四舍五入后的,照着填会比实际多一点点:差在显示精度以内就按全部取回 + double free = m.Free(asset); + if (v > free && v - free < 0.01) v = free; + if (v > free + 1e-9) { _message = L.T("ownmix.err"); Open(); return; } _message = L.T("hw.wait"); Open(); WalletWindow.OpenForBill(new WalletWindow.Bill