You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 3, 2025. It is now read-only.
let serialized = serde_json::to_string(&storage).unwrap();
441
+
let deserialized:TokenStorage = serde_json::from_str(&serialized).unwrap();
442
+
443
+
assert_eq!(storage, deserialized);
444
+
445
+
// test backwards compatibility
446
+
let string = "{\"map\":{\"1-1\":1},\"tokens\":[{\"counter\":1,\"service_id\":1,\"plan_id\":1,\"blinded_message\":\"c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\"blind_sig\":\"c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\"spent\":false}],\"version\":0}";
447
+
let deserialized:TokenStorage = serde_json::from_str(string).unwrap();
0 commit comments