Backport note: `Amount` is not a typedef, so I moved it above the `Register typedefs` comment, and I removed the `IMPORTANT` TODO comment which has already been address (line 65: `Q_DECLARE_METATYPE(Amount)`)
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19104 | core#19104]]