Skip to content

v0.2.26

@albertogferrario albertogferrario tagged this 12 May 01:19
WalletConfig::from_env_optional() previously only returned Ok(None) when
std::env::var returned Err (var missing). Empty Ok("") values fell through
and the builder constructor failed loudly at startup.

This was load-bearing for the .env.example scaffolder pattern: if the
example listed APPLE_WALLET_* / GOOGLE_WALLET_* keys with empty values
(matching the convention of every other section in .env.example), any
operator copying example → .env without filling wallet credentials would
hit 'invalid PEM' / 'invalid pass_type_id' errors at process init —
defeating the whole point of D-02 permissive semantics.

Extracted a private non_empty_env(name) helper that returns Some(v) only
when env::var returns Ok AND v.is_empty() is false. All 8 from_env_optional
call sites switched to it. Existing test suite passes unchanged (the new
behaviour is a strict superset — every previously-None case is still None;
the addition is also-None-on-empty).

Workspace version bumped to 0.2.26 (0.2.25 is published).
Assets 2
Loading