To add to nc50lc's reply:
You paid 169 sat as transaction fee for your first transaction and you replaced it with a transaction with the (virtual) size of 171 vB.
For the replacement transaction to be accepted by the nodes, you had to pay the minimum fee of 338 sat for that. Any transaction with lower fees would be rejected by the nodes.
Here is where the 338 sat came from:
169 + 171 = 338 sat.
169 sat was the fee paid for the replaced transaction.
171 sat was the fee required for the replacement transaction's own bandwidth.
For more information on RBF requirements, read BIP125 rules.
With the updated electrum wallet pattern of calculating fees, you need a workaround to do it.
No, nothing has changed with how electrum calculates the fees.
OP had to make the transaction with that fees due to nodes standard rules.
The time you wouldn't spend more with the current update is when the mempool is near empty, or you manually construct a raw transaction.
Wrong. OP's problem had nothing to with the mempool's status. The mempools were almost empty when OP broadcasted those transactions.
The only possible way around this now is using electrum console to manually create a raw transaction which will give you more control over the inputs, outputs and fees rate. This is a more advanced feature though
Again wrong.
Even if OP had created a transaction with lower fees, it would be rejected by the nodes.
To make such
a transaction, you have to send it directly to mining pools and ask them to include it in the blockchain.
To add to nc50lc's reply:
You paid 169 sat as transaction fee for your first transaction and you replaced it with a transaction with the (virtual) size of 171 vB.
For the replacement transaction to be accepted by the nodes, you had to pay the minimum fee of 340 sat for that. Any transaction with lower fees would be rejected by the nodes.
Here is where the 340 sat came from:
169 + 171 = 340 sat.
169 sat was the fee paid for the replaced transaction.
171 sat was the fee required for the replacement transaction's own bandwidth.
For more information on RBF requirements, read BIP125 rules.