
<!-- Describe the issue -->
Following commit 46004790588c24174a0bec49b540d158ce163ffd (@achow101), `decodepsbt` overstates the fee, apparently including both the `witness_utxo` and `non_witness_utxo` amounts in the inputs.

**Expected behavior**

The decoded fee should be the sum of the inputs, minus the sum of the outputs.

**Actual behavior**

The decoded fee is exactly twice the amount of the inputs, minus the sum of the outputs.

**To reproduce**

Build any PSBT using `createpsbt`, `walletprocesspsbt`, then decode it with `decodepsbt`. See the `fee` field in the JSON.

**System information**

I compiled myself from 5550fa5983ea59e7ccef6540b7ec49a1770fb3ca on Whonix 14.

Then I did `git revert 46004790588c24174a0bec49b540d158ce163ffd ` and the problem went away.

{
    RPCHelpMan{
                "getrawtransaction",
                "\nReturn the raw transaction data.\n"
                "\nBy default this function only works for mempool transactions. When called with a blockhash\n"
                "argument, getrawtransaction will return the transaction if the specified block is available and\n"
                "the transaction is found in that block. When called without a blockhash argument, getrawtransaction\n"
                "will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction\n"
                "is in a block in the blockchain.\n"
                "\nHint: Use gettransaction for wallet transactions.\n"
                "\nIf verbose is 'true', returns an Object with information about 'txid'.\n"
                "If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.\n",
                {
                    {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id"},
                    {"verbose", RPCArg::Type::BOOL,  "false", "If false, return a string, otherwise return a json object"},
                    {"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED_NAMED_ARG, "The block in which to look for the transaction"},
                },