mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
Previous CI step pre-wrote tool/.secrets-config.json with a curated key subset. The generator at tool/generate_secrets_config.dart has an early return when the base config exists (line 61), which ALSO skips creating the per-module configs (evm/solana/nano/tron/bitcoin). Result: dozens of secrets.xxx references in cw_bitcoin/cw_evm/cw_nano/lib/main.dart failed at compile time with 'Undefined name'. New approach (matches Cake's CI pattern): 1. Run generate_new_secrets.dart with no pre-existing config → it creates all the JSON files from the full SecretKey list with empty defaults, then writes the per-module .secrets.g.dart files 2. sed-inject Trocador values into lib/.secrets.g.dart Side effect: changenow_exchange_provider.dart's 'Map<String,dynamic> not assignable to Map<String,String>' error also resolves — that error was caused by Dart inferring 'dynamic' for the apiKey ternary because both arms referenced undefined secrets. Once secrets exist as empty strings, inference settles on String.