ui: remove aml withdrawal quota and hit chance from bank page preview

This commit is contained in:
ZHU MINCHAO committed 2026-11-04 10:34:06 +08:00
1 parent a5ff9418ab
commit 7ba1381cf0
3 files changed
+3 -19

No files matched your search

@@ -170,9 +170,7 @@ stable.ok,"Pegged"
stable.depeg,"Depegged" stable.depeg,"Depegged"
stable.warn,"Warning: staking subsidy pool low" stable.warn,"Warning: staking subsidy pool low"
stable.spiral,"Collapsing" stable.spiral,"Collapsing"
aml.window,"Withdrawn in the last {0} days: {1} credits (cumulative line {2})"
aml.taint,"Account taint share: {0}%" aml.taint,"Account taint share: {0}%"
aml.chance,"At this amount, estimated review chance: {0}%"
mixer.h,Mixer mixer.h,Mixer
mixer.ok,Status: operating normally mixer.ok,Status: operating normally
mixer.sanctioned,Status: sanctioned ({0} more day(s)). Coins withdrawn meanwhile are flagged. mixer.sanctioned,Status: sanctioned ({0} more day(s)). Coins withdrawn meanwhile are flagged.
1 # Probably Decentralized localization table: English (en)
170 stable.depeg
171 stable.warn
172 stable.spiral
aml.window
173 aml.taint
aml.chance
174 mixer.h
175 mixer.ok
176 mixer.sanctioned
@@ -169,9 +169,7 @@ stable.ok,"锚定正常"
stable.depeg,"脱锚" stable.depeg,"脱锚"
stable.warn,"预兆:质押补贴池告急" stable.warn,"预兆:质押补贴池告急"
stable.spiral,"崩盘中" stable.spiral,"崩盘中"
aml.window,"近 {0} 天已提取 {1} 信用点(累计线 {2})"
aml.taint,"账户污点比例:{0}%" aml.taint,"账户污点比例:{0}%"
aml.chance,"按这个数量,预计审查概率:{0}%"
mixer.h,混币器 mixer.h,混币器
mixer.ok,状态:运行正常 mixer.ok,状态:运行正常
mixer.sanctioned,状态:已被制裁(还有 {0} 天),此期间提出的币视为被标记。 mixer.sanctioned,状态:已被制裁(还有 {0} 天),此期间提出的币视为被标记。
1 # Probably Decentralized 本地化表:简体中文(zh)
169 stable.depeg
170 stable.warn
171 stable.spiral
aml.window
172 aml.taint
aml.chance
173 mixer.h
174 mixer.ok
175 mixer.sanctioned
+3 -15
View File
@@ -203,26 +203,14 @@ namespace Decentralized
}); });
} }
/// <summary>提取前的合规审查提示:本周已提取的累计、污点比例,以及按当前数量估算的审查概率。</summary> /// <summary>提取前的合规审查提示:仅保留账户污点比例(额度与命中概率按设计不公开)。</summary>
private static void AmlPreview(CustomUIBuilder b) private static void AmlPreview(CustomUIBuilder b)
{ {
var d = Session.Data; var pb = Session.Data.Poinbase;
int day = StoreStation.GetDayCounter();
double rent = Session.Rent();
double recent = d.Exchange.History.Where(h => h.Key > day - Tuning.AmlWindowDays).Sum(h => h.Value);
b.AddSeparator();
b.AddLabel(L.T("aml.window", Tuning.AmlWindowDays, Fmt.Credits(recent), Fmt.Credits(Tuning.AmlCumRents * rent)), "aml_dim");
var pb = d.Poinbase;
double total = pb.Value(Session.Price); double total = pb.Value(Session.Price);
double taintRatio = total > 0 ? pb.Taint / total : 0; double taintRatio = total > 0 ? pb.Taint / total : 0;
b.AddSeparator();
b.AddLabel(L.T("aml.taint", (int)Math.Round(taintRatio * 100)), taintRatio > 0.05 ? "aml_note" : "aml_dim"); b.AddLabel(L.T("aml.taint", (int)Math.Round(taintRatio * 100)), taintRatio > 0.05 ? "aml_note" : "aml_dim");
if (double.TryParse((_amount ?? "").Trim(), NumberStyles.Float, CultureInfo.InvariantCulture, out double v) && v > 0)
{
double value = Math.Min(v, pb.Get(Assets.CRC)) * Session.Price(Assets.CRC);
double taint = total > 0 ? pb.Taint * Math.Min(1, value / total) : 0;
double chance = Exchange.HitChance(value, taint, recent, rent, pb.Flagged);
b.AddLabel(L.T("aml.chance", (int)Math.Round(chance * 100)), chance > 0.1 ? "aml_chance_note" : "aml_chance_dim");
}
} }
private static readonly float[] StableW = { 80f, 100f, 220f }; private static readonly float[] StableW = { 80f, 100f, 220f };