MCPcopy Create free account
hub / github.com/cowprotocol/services / extracts_app_code

Function extracts_app_code

crates/app-data/src/app_data.rs:676–684  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

674
675 #[test]
676 fn extracts_app_code() {
677 assert_eq!(
678 app_code(br#"{"appCode": "CoW Swap", "version": "0.9.0"}"#),
679 Some("CoW Swap".to_string()),
680 );
681 assert_eq!(app_code(EMPTY.as_bytes()), None);
682 assert_eq!(app_code(br#"{"version": "0.9.0"}"#), None);
683 assert_eq!(app_code(b"not json"), None);
684 }
685
686 #[test]
687 fn examples() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected