Skip to content

Commit 44fd4a0

Browse files
committed
Fix develop merge
1 parent 9aeeb04 commit 44fd4a0

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/Internal/Testnet/Contract.purs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import Cardano.Types.Credential (Credential(PubKeyHashCredential))
1818
import Cardano.Types.PaymentCredential (PaymentCredential(PaymentCredential))
1919
import Cardano.Types.StakeCredential (StakeCredential(StakeCredential))
2020
import Cardano.Types.StakePubKeyHash (StakePubKeyHash(StakePubKeyHash))
21+
import Cardano.Wallet.Key (KeyWallet)
2122
import Contract.Address (getNetworkId)
2223
import Contract.Log (logInfo')
2324
import Contract.Monad
@@ -74,7 +75,6 @@ import Ctl.Internal.Testnet.Utils
7475
, runCleanup
7576
, whenError
7677
)
77-
import Ctl.Internal.Wallet.Key (KeyWallet)
7878
import Data.Array (concat, fromFoldable, zip) as Array
7979
import Data.Map (values) as Map
8080
import Effect.Aff (bracket) as Aff
@@ -295,15 +295,16 @@ execDistrFundsPlan withCardanoCliUtxos rounds = do
295295
genesisAddr <- liftedM "Could not get genesis address"
296296
getWalletAddress
297297
withCardanoCliUtxos genesisAddr do
298+
constraintList <- liftAff $ traverse
299+
( \{ wallet, amount } -> do
300+
addrs <- (unwrap wallet).address network
301+
pure $ mustPayToAddress addrs $ Value.lovelaceValueOf
302+
amount
303+
)
304+
utxos
298305
let
299306
constraints :: TxConstraints
300-
constraints =
301-
foldMap
302-
( \{ wallet, amount } ->
303-
mustPayToAddress ((unwrap wallet).address network) $
304-
Value.lovelaceValueOf amount
305-
)
306-
utxos
307+
constraints = fold constraintList
307308

308309
unbalancedTx <- mkUnbalancedTx mempty constraints
309310
balancedTx <- balanceTx unbalancedTx

test/Testnet/Staking.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Cardano.Types.Credential
1212
)
1313
import Cardano.Types.NativeScript as NativeScript
1414
import Cardano.Types.PlutusScript as PlutusScript
15+
import Cardano.Wallet.Key (PrivateStakeKey)
1516
import Contract.Address (getNetworkId)
1617
import Contract.Backend.Ogmios (getPoolParameters)
1718
import Contract.Hashing (publicKeyHash)
@@ -72,7 +73,6 @@ import Ctl.Internal.Test.UtxoDistribution
7273
, InitialUTxOsWithStakeKey(InitialUTxOsWithStakeKey)
7374
)
7475
import Ctl.Internal.Testnet.Contract (runTestnetContract)
75-
import Ctl.Internal.Wallet.Key (PrivateStakeKey)
7676
import Data.Array (head)
7777
import Data.Array as Array
7878
import Data.Foldable (for_)

0 commit comments

Comments
 (0)