Skip to content

Commit a2d154b

Browse files
committed
Fix Blockfrost tests
- `returnFunds` transactions failed with the fee-too-small error due to missing required signers for staking keys
1 parent e553b51 commit a2d154b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Internal/Test/KeyDir.purs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ import Contract.Wallet
3535
( getWalletAddresses
3636
, getWalletBalance
3737
, ownPaymentPubKeyHashes
38+
, ownStakePubKeyHashes
3839
, privateKeysToKeyWallet
3940
, withKeyWallet
4041
)
41-
import Contract.Wallet.Key
42-
( getPrivatePaymentKey
43-
, getPrivateStakeKey
44-
)
42+
import Contract.Wallet.Key (getPrivatePaymentKey, getPrivateStakeKey)
4543
import Contract.Wallet.KeyFile
4644
( privatePaymentKeyFromTextEnvelope
4745
, privatePaymentKeyToFile
@@ -386,9 +384,13 @@ returnFunds backup env allWalletsArray mbFundTotal hasRun =
386384
pkhs <- fold <$> for nonEmptyWallets
387385
(snd >>> flip withKeyWallet ownPaymentPubKeyHashes)
388386

387+
skhs <- catMaybes <<< fold <$> for nonEmptyWallets
388+
(snd >>> flip withKeyWallet ownStakePubKeyHashes)
389+
389390
let
390391
constraints = flip foldMap (Map.keys utxos) mustSpendPubKeyOutput
391392
<> foldMap mustBeSignedBy pkhs
393+
<> foldMap (mustBeSignedBy <<< wrap <<< unwrap) skhs
392394
lookups = unspentOutputs utxos
393395

394396
unbalancedTx /\ usedUtxos <- liftedE $ mkUnbalancedTxImpl lookups

0 commit comments

Comments
 (0)