The bug had been live for weeks and no one had reported it, because it only fired for people who had just paid us money.
What the product does
It's a small tool that generates wedding speeches. Nine questions, three drafts, one payment. The kind of product where the whole value is the output β the text is the thing you buy.
The bug
After checkout, the payment provider redirects the user back to /success . That page verifies the payment and then does this:
< Link href = { `/${locale}/form` } > { copy . okCta } β </ Link >
Enter fullscreen mode
Exit fullscreen mode
Back to the form. Makes sense β the drafts live on the form page.
Except the drafts were stored like this:
const [ result , setResult ] = useState ( null ) ; // ... setResult ( data ) ;
Enter fullscreen mode
Exit fullscreen mode
In memory.β¦