Skip to content

Commit

Permalink
Remove unused functions from wallet API
Browse files Browse the repository at this point in the history
  • Loading branch information
florentc committed Feb 6, 2023
1 parent 7b61f55 commit 9555e2d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions cooked-validators/src/Cooked/Wallet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import Data.Default
import Data.Function (on)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Maybe (fromMaybe)
import qualified Ledger as Pl
import qualified Ledger.Ada as Pl
import qualified Ledger.CardanoWallet as Pl
Expand Down Expand Up @@ -104,9 +103,6 @@ walletStakingSK = fmap hackUnMockPrivateKey . Pl.mwStakeKey
hackUnMockPrivateKey :: a -> Cardano.XPrv
hackUnMockPrivateKey = unHACK . unsafeCoerce

toPKHMap :: [Wallet] -> Map Pl.PubKeyHash Wallet
toPKHMap ws = Map.fromList [(walletPKHash w, w) | w <- ws]

-- | Signs a transaction
txAddSignature :: Wallet -> Pl.Tx -> Pl.Tx
txAddSignature w = Pl.addSignature' (walletSK w)
Expand Down Expand Up @@ -198,6 +194,3 @@ initialTxFor initDist =

theNetworkId :: Cardano.NetworkId
theNetworkId = Cardano.Testnet $ Cardano.NetworkMagic 42 -- TODO PORT what's magic?

valuesForWallet :: InitialDistribution -> Wallet -> [Pl.Value]
valuesForWallet d w = fromMaybe [] $ w `Map.lookup` distribution d

0 comments on commit 9555e2d

Please sign in to comment.