summaryrefslogtreecommitdiff
path: root/postmortem/2019-06-02-wallet-wire-fees.txt
blob: be49a1853d5a4918195200e30fce2be9f804c615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## Issue Summary

Users were reporting that payments with the wallet sometimes don't work.  The
issue shows as an error message that included the "406" status code from the
merchant.

Both demo and test was affected.

## Root Cause

The merchant rejected payments because the wallet didn't include the correct
wire fee.

The wallet didn't include the wire fee in the payment, thus the merchant's
response was correct.

This misbehavior of the wallet was caused by the wallet not correctly parsing
the exchange's /wire response.  The JSON validator (checkable.ts) returned
"undefined" for maps, due to a missing return statement.

This error was introduced when switching from the old wire fee format to the
new "payto://"-based wire response format.

## Remediation and Prevention

The error was fixed in the wallet.  An updated wallet for Firefox and Chromium
is in the process of being uploaded.

In the future, headless wallet tests against the real demo/test deployment will
prevent this kind of mistake from making it to production unnoticed.

We might also switch to a more battle-tested JSON validator, or move our
current one in a separate package and test the code coverage there.  The
missing "return" would have been easily discovered by a simple unit test.