I've been playing around with
cardano-serialization-lib and building different types of transactions with
TransactionBuilder. However, when I calculate fee and change using
add_change_if_needed(addr) for a transaction, that interacts with a plutus script (in my case - the alwayssucceeds script, deployed on Testnet), I get the
FeeTooSmallUtxo error, when submitting the transaction via
Typhon wallet. At the same time,
Nami wallet submits the tx without a problem. I am very confused as to why it is so.
Can anybody help me figure this out?
Here is a code snippet from a function that builds a transaction to send ADA to the contract address:
txBuilder.add_change_if_needed(shelleyChangeAddress); let txBody = txBuilder.build(); let txHash = CardanoWasm.hash_transaction(txBody); let witnesses = CardanoWasm.TransactionWitnessSet.new(); let transaction = CardanoWasm.Transaction.new(txBody, witnesses, undefined); let witnessCBOR = await walletconnected.signTx(buf2hex(transaction.to_bytes()), true); witnesses = CardanoWasm.TransactionWitnessSet.from_bytes(hex2buf(witnessCBOR)); transaction = CardanoWasm.Transaction.new(txBody, witnesses, undefined); let trHash = await walletconnected.submitTx(buf2hex(transaction.to_bytes()));
And here is the error I get from
transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (FeeTooSmallUTxO (Coin 174125) (Coin 169901))))])