ui: remove aml withdrawal quota and hit chance from bank page preview
This commit is contained in:
1 parent
a5ff9418ab
commit
7ba1381cf0
3 files changed
+3
-19
No files matched your search
@@ -203,26 +203,14 @@ namespace Decentralized
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>提取前的合规审查提示:本周已提取的累计、污点比例,以及按当前数量估算的审查概率。</summary>
|
||||
/// <summary>提取前的合规审查提示:仅保留账户污点比例(额度与命中概率按设计不公开)。</summary>
|
||||
private static void AmlPreview(CustomUIBuilder b)
|
||||
{
|
||||
var d = Session.Data;
|
||||
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;
|
||||
var pb = Session.Data.Poinbase;
|
||||
double total = pb.Value(Session.Price);
|
||||
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");
|
||||
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 };
|
||||
|
||||
Reference in new issue
Block a user