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
@@ -170,9 +170,7 @@ stable.ok,"Pegged"
|
||||
stable.depeg,"Depegged"
|
||||
stable.warn,"Warning: staking subsidy pool low"
|
||||
stable.spiral,"Collapsing"
|
||||
aml.window,"Withdrawn in the last {0} days: {1} credits (cumulative line {2})"
|
||||
aml.taint,"Account taint share: {0}%"
|
||||
aml.chance,"At this amount, estimated review chance: {0}%"
|
||||
mixer.h,Mixer
|
||||
mixer.ok,Status: operating normally
|
||||
mixer.sanctioned,Status: sanctioned ({0} more day(s)). Coins withdrawn meanwhile are flagged.
|
||||
|
||||
|
@@ -169,9 +169,7 @@ stable.ok,"锚定正常"
|
||||
stable.depeg,"脱锚"
|
||||
stable.warn,"预兆:质押补贴池告急"
|
||||
stable.spiral,"崩盘中"
|
||||
aml.window,"近 {0} 天已提取 {1} 信用点(累计线 {2})"
|
||||
aml.taint,"账户污点比例:{0}%"
|
||||
aml.chance,"按这个数量,预计审查概率:{0}%"
|
||||
mixer.h,混币器
|
||||
mixer.ok,状态:运行正常
|
||||
mixer.sanctioned,状态:已被制裁(还有 {0} 天),此期间提出的币视为被标记。
|
||||
|
||||
|
@@ -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