From f1216889906a01122642381867afad6a9211cded Mon Sep 17 00:00:00 2001 From: fanghr Date: Wed, 11 May 2022 17:31:17 +0800 Subject: [PATCH] remove `withMinAda` --- agora-test/Spec/Sample/Governor.hs | 17 ++++++++--------- agora-test/Spec/Sample/Shared.hs | 4 ---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/agora-test/Spec/Sample/Governor.hs b/agora-test/Spec/Sample/Governor.hs index 9706361..ac6ec18 100644 --- a/agora-test/Spec/Sample/Governor.hs +++ b/agora-test/Spec/Sample/Governor.hs @@ -80,7 +80,6 @@ import Spec.Sample.Shared ( stake, stakeAddress, stakeAssetClass, - withMinAda, ) import Spec.Util (datumPair, toDatumHash) @@ -105,7 +104,7 @@ mintGST = governorOutput = TxOut { txOutAddress = govValidatorAddress - , txOutValue = withMinAda gst + , txOutValue = gst <> minAda , txOutDatumHash = Just $ toDatumHash governorOutputDatum } @@ -207,7 +206,7 @@ createProposal = proposalOutput = TxOut { txOutAddress = proposalValidatorAddress - , txOutValue = withMinAda pst + , txOutValue = pst <> minAda , txOutDatumHash = Just (toDatumHash proposalDatum) } @@ -239,7 +238,7 @@ createProposal = governorOutput = governorInput { txOutDatumHash = Just $ toDatumHash governorOutputDatum - , txOutValue = withMinAda gst + , txOutValue = gst <> minAda } --- @@ -257,7 +256,7 @@ createProposal = stakeOutput = stakeInput { txOutDatumHash = Just $ toDatumHash stakeOutputDatum - , txOutValue = withMinAda sst <> Value.assetClassValue (untag stake.gtClassRef) stackedGTs + , txOutValue = sst <> Value.assetClassValue (untag stake.gtClassRef) stackedGTs <> minAda } --- @@ -381,7 +380,7 @@ mintGATs = governorOutput = governorInput { txOutDatumHash = Just $ toDatumHash governorOutputDatum - , txOutValue = withMinAda gst + , txOutValue = gst <> minAda } --- @@ -394,7 +393,7 @@ mintGATs = proposalOutput = proposalInput { txOutDatumHash = Just $ toDatumHash proposalOutputDatum - , txOutValue = withMinAda pst + , txOutValue = pst <> minAda } -- @@ -404,7 +403,7 @@ mintGATs = TxOut { txOutAddress = mockEffectAddress , txOutDatumHash = Just $ toDatumHash mockEffectOutputDatum - , txOutValue = withMinAda gat + , txOutValue = gat <> minAda } -- @@ -519,7 +518,7 @@ mutateState = governorOutput = governorInput { txOutDatumHash = Just $ toDatumHash governorOutputDatum - , txOutValue = withMinAda gst + , txOutValue = gst <> minAda } -- diff --git a/agora-test/Spec/Sample/Shared.hs b/agora-test/Spec/Sample/Shared.hs index 00dc1db..1764d56 100644 --- a/agora-test/Spec/Sample/Shared.hs +++ b/agora-test/Spec/Sample/Shared.hs @@ -10,7 +10,6 @@ module Spec.Sample.Shared ( signer, signer2, minAda, - withMinAda, -- * Components @@ -167,9 +166,6 @@ defaultProposalThresholds = minAda :: Value minAda = Value.singleton "" "" 10_000_000 -withMinAda :: Value -> Value -withMinAda v = v <> minAda - authorityToken :: AuthorityToken authorityToken = authorityTokenFromGovernor governor