实测修正:交易对行去掉交易所名、互换损耗两位小数、读档时 DEX 侧池按新深度重设

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Opus 5.5 committed 2026-11-07 23:28:41 +08:00
1 parent fe82395d32
commit 709339b00c
5 files changed
+13 -10

No files matched your search

+3 -2
View File
@@ -388,7 +388,7 @@ namespace Decentralized
LiveLabel(b, () =>
{
var q = ParseAmount(out double v) ? m.Quote(_swapFrom, _swapTo, v) : null;
return q == null ? "" : L.T("swap.preview", Fmt.Num(q.Out), _swapTo, q.Hops, (q.Impact * 100).ToString("0.0", CultureInfo.InvariantCulture));
return q == null ? "" : L.T("swap.preview", Fmt.Num(q.Out), _swapTo, q.Hops, (q.Impact * 100).ToString("0.00", CultureInfo.InvariantCulture));
}, "swap_preview_dim");
b.AddButton(L.T("swap.go"), () => Swap());
}
@@ -426,7 +426,8 @@ namespace Decentralized
{
{
var p = pool;
b.AddLabel(L.T("trade.pair", p.Base, p.Quote, L.T("venue." + p.Venue)) + " " + L.T("trade.price", Fmt.Num(p.Price)) + " " + L.T("trade.fee", (p.Fee * 100).ToString("0.0#", CultureInfo.InvariantCulture)));
// 在 Poinbase 页里,交易所名不用再写一遍(行太长会被截断)
b.AddLabel(p.Base + "/" + p.Quote + " " + L.T("trade.price", Fmt.Num(p.Price)) + " " + L.T("trade.fee", (p.Fee * 100).ToString("0.0#", CultureInfo.InvariantCulture)));
LiveLabel(b, () => SpotPreview(p, true), "trade_preview_dim");
LiveLabel(b, () => SpotPreview(p, false), "trade_preview_dim");
b.BeginRow(4f);