Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 1ce9786

Browse files
committed
[RCD-40] Fixup: generate payee with network magic
Both changes (new tests for fees sanity check and network magic validation) were introduced in parallel and merged concomitanttly. As a result, CI accepted both changes whereas the newly introduced tests should also be fixed.
1 parent 930f044 commit 1ce9786

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

wallet-new/test/unit/Test/Spec/GetTransactions.hs

+5-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ import Cardano.Wallet.WalletLayer.Kernel.Transactions (toTransaction)
7272

7373
import qualified Test.Spec.Addresses as Addresses
7474
import Test.Spec.CoinSelection.Generators (InitialBalance (..),
75-
Pay (..), genPayee, genUtxoWithAtLeast)
75+
Pay (..), genPayeeWithNM, genUtxoWithAtLeast)
7676
import qualified Test.Spec.Fixture as Fixture
7777
import qualified Test.Spec.NewPayment as NewPayment
7878
import TxMetaStorageSpecs (Isomorphic (..), genMeta)
@@ -297,8 +297,9 @@ spec = do
297297
prop "pay works normally for coin selection with additional utxos and changes" $ withMaxSuccess 10 $
298298
monadicIO $ do
299299
pm <- pick arbitrary
300+
let nm = makeNetworkMagic pm
300301
distr <- fmap (\(TxOut addr coin) -> V1.PaymentDistribution (V1.V1 addr) (V1.V1 coin))
301-
<$> pick (genPayee mempty (PayLovelace 100))
302+
<$> pick (genPayeeWithNM nm mempty (PayLovelace 100))
302303
withUtxosFixture @IO pm [300, 400, 500, 600, 5000000] $ \_keystore _activeLayer aw f@Fix{..} -> do
303304
let pw = Kernel.walletPassive aw
304305
-- get the balance before the payment
@@ -320,8 +321,9 @@ spec = do
320321
prop "estimateFees looks sane for coin selection with additional utxos and changes" $ withMaxSuccess 10 $
321322
monadicIO $ do
322323
pm <- pick arbitrary
324+
let nm = makeNetworkMagic pm
323325
distr <- fmap (\(TxOut addr coin) -> V1.PaymentDistribution (V1.V1 addr) (V1.V1 coin))
324-
<$> pick (genPayee mempty (PayLovelace 100))
326+
<$> pick (genPayeeWithNM nm mempty (PayLovelace 100))
325327
withUtxosFixture @IO pm [300, 400, 500, 600, 5000000] $ \_keystore _activeLayer aw Fix{..} -> do
326328
let pw = Kernel.walletPassive aw
327329
-- do the payment

0 commit comments

Comments
 (0)