Skip to content

Commit 6ff6731

Browse files
committed
Fix transaction autobalancing tests
1 parent 1c46afa commit 6ff6731

File tree

1 file changed

+7
-4
lines changed
  • cardano-api/test/cardano-api-test/Test/Cardano/Api/Transaction

1 file changed

+7
-4
lines changed

cardano-api/test/cardano-api-test/Test/Cardano/Api/Transaction/Autobalance.hs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ prop_make_transaction_body_autobalance_no_change = H.propertyOnce $ do
162162
LedgerProtocolParameters
163163
<$> H.readJsonFileOk "test/cardano-api-test/files/input/protocol-parameters/conway.json"
164164

165-
let expectedFee = 171_617
165+
let expectedFee = 170_077
166166
utxoValue = 5_000_000
167167

168168
let address =
@@ -357,11 +357,14 @@ prop_make_transaction_body_autobalance_when_deregistering_certs = H.propertyOnce
357357
deregDeposit = L.Coin 20_000_000
358358
txOutCoin = L.Coin 20_800_000
359359

360-
stakeCred <- forAll genStakeCredential
360+
-- that's the same stake credential as in UTXO
361+
lStakeCred@(L.KeyHashObj kh) <-
362+
pure $ mkCredential "keyHash-ebe9de78a37f84cc819c0669791aa0474d4f0a764e54b9f90cfe2137"
363+
let stakeCred = StakeCredentialByKey $ StakeKeyHash kh
361364
let certs =
362365
[
363366
( ConwayCertificate ceo $
364-
L.ConwayTxCertDeleg (L.ConwayUnRegCert (toShelleyStakeCredential stakeCred) (L.SJust deregDeposit))
367+
L.ConwayTxCertDeleg (L.ConwayUnRegCert lStakeCred (L.SJust deregDeposit))
365368
, Nothing
366369
)
367370
]
@@ -394,7 +397,7 @@ prop_make_transaction_body_autobalance_when_deregistering_certs = H.propertyOnce
394397
H.note_ "Sanity check: inputs == outputs"
395398
mconcat [deregDeposit, txInputsTotalCoin] === mconcat [txOutCoin, fee, changeCoin]
396399

397-
182_441 === fee
400+
176_457 === fee
398401

399402
prop_make_transaction_body_autobalance_multi_asset_collateral :: Property
400403
prop_make_transaction_body_autobalance_multi_asset_collateral = H.propertyOnce $ do

0 commit comments

Comments
 (0)