A discriminated union rather than a flat paymentReceipt: string: a
settlement can fail, and SettlePermissionsResult.success already says
so, but the flat shape let { success: false } with no receipt typecheck
— a state the seller middleware then had no way to reject at compile time
even though it could not safely attach a receipt header for it.
A discriminated union rather than a flat
paymentReceipt: string: a settlement can fail, andSettlePermissionsResult.successalready says so, but the flat shape let{ success: false }with no receipt typecheck — a state the seller middleware then had no way to reject at compile time even though it could not safely attach a receipt header for it.