Stripe API client for OCaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Upgrade to ocamlformat 0.29.0; fix csvt/sexpt streaming; reformat

- Update .ocamlformat to 0.29.0 across all 591 files
- csvt: reuse single Buffer.t for field reads (no alloc per field)
- sexpt: Obj members decoded from stream into Dict, typed Variant GADT
- Reformat all source files for 0.29.0

+4 -4
+1 -1
.ocamlformat
··· 1 - version = 0.28.1 1 + version = 0.29.0
+3 -3
lib/stripe.ml
··· 418 418 | Some ts, sigs -> 419 419 let signed_payload = ts ^ "." ^ payload in 420 420 let expected = compute_hmac ~secret ~payload:signed_payload in 421 - if List.exists (fun s -> String.equal s expected) sigs then begin 422 - match int_of_string_opt ts with 421 + if List.exists (fun s -> String.equal s expected) sigs then 422 + begin match int_of_string_opt ts with 423 423 | None -> err_invalid_timestamp 424 424 | Some t -> 425 425 let now = int_of_float (Unix.gettimeofday ()) in 426 426 let age = abs (now - t) in 427 427 if age > tolerance_seconds then err_timestamp_old age 428 428 else decode event_jsont payload |> Result.ok 429 - end 429 + end 430 430 else err_signature_mismatch 431 431 end