Hardware wallet window: invoices paid from PLEDGER, checksummed addresses, DEX signing, block confirmation animation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Opus 5.5 committed 2026-11-03 22:29:42 +08:00
1 parent 5b7013f240
commit add61a6b5e
16 files changed
+768 -63

No files matched your search

+5 -1
View File
@@ -35,9 +35,11 @@ namespace Decentralized
public string Address(string key)
{
if (!Addresses.TryGetValue(key, out var a)) { a = "0x" + Rng.NextUInt().ToString("x8").Substring(0, 6); Addresses[key] = a; }
if (!Addresses.TryGetValue(key, out var a) || !ChainAddress.Valid(a)) { a = ChainAddress.Make(Rng.NextUInt()); Addresses[key] = a; }
return a;
}
/// <summary>链上的区块高度:每签一笔交易往上走几块。</summary>
public long Block = 1204331;
/// <summary>当天用币付款的成交额(信用点),夜间清零。</summary>
public double CoinSalesToday;
}
@@ -64,6 +66,8 @@ namespace Decentralized
catch (Exception ex) { Log.Error($"读取存档数据失败,重新开始:{ex.Message}"); }
if (Data == null) Data = new SaveData();
if (Data.Market == null) Data.Market = Market.CreateDefault(StoreStation.GetDayCounter());
// 旧存档里的商家地址没有校验位:换成合法地址
foreach (var s in Data.Black.Sellers) if (!ChainAddress.Valid(s.Name)) s.Name = ChainAddress.Make(Data.Rng.NextUInt());
Log.Info($"状态已载入(第 {Data.Day} 天,PSC {Data.Market.Price:0.00})");
}