fix: wownero P0s, fail-closed RNG, iOS scheme, dep pins

- resetToDefault omitted Wownero: the reset button null-crashed and left
  WOW wallets with an empty node list
- accountLabel was missing a return and rendered blank for WOW wallets
- sec_random now throws instead of returning empty bytes when the native
  entropy channel fails or under-delivers
- iOS builds no longer register the leftover cakewallet:// URL scheme
- WOW fee estimate now fetched from the connected daemon's
  get_fee_estimate RPC and cached; the inherited XMR constant table
  remains only as a pre-fetch fallback
- pin cake_backup, flutter_local_authentication, and bech32 git deps to
  their locked SHAs for reproducible builds
This commit is contained in:
jwinterm
2026-08-15 16:28:39 -04:00
parent 94bf0e8c41
commit 08fb925cea
7 changed files with 77 additions and 15 deletions
+9 -3
View File
@@ -14,8 +14,14 @@ Future<Uint8List> secRandom(int count) async {
final rng = Random.secure();
return Uint8List.fromList(List<int>.generate(count, (_) => rng.nextInt(byteSize)));
}
return await utils.invokeMethod<Uint8List>('sec_random', {'count': count}) ?? Uint8List.fromList([]);
} on PlatformException catch (_) {
return Uint8List.fromList([]);
final bytes = await utils.invokeMethod<Uint8List>('sec_random', {'count': count});
if (bytes == null || bytes.length != count) {
throw StateError('sec_random returned ${bytes?.length ?? 0} bytes, expected $count');
}
return bytes;
} on PlatformException catch (e) {
// Never fail open: an entropy source that cannot deliver must throw,
// not hand back an empty buffer for key material.
throw StateError('sec_random platform call failed: ${e.message}');
}
}