Skip to content

Commit 7ce4d49

Browse files
committed
plutus-pab: Housekeeping for WBE integration
* Add cardano-wallet to cabal.project * Move modules around in plutus-pab
1 parent 75aa0d6 commit 7ce4d49

File tree

22 files changed

+60
-41
lines changed

22 files changed

+60
-41
lines changed

cabal.project

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,24 @@ source-repository-package
120120
cardano-prelude
121121
cardano-prelude-test
122122

123+
source-repository-package
124+
type: git
125+
location: https://github.com/input-output-hk/cardano-addresses
126+
tag: d2f86caa085402a953920c6714a0de6a50b655ec
127+
subdir:
128+
core
129+
130+
source-repository-package
131+
type: git
132+
location: https://github.com/input-output-hk/cardano-wallet.git
133+
tag: ae7569293e94241ef6829139ec02bd91abd069df
134+
subdir:
135+
lib/text-class
136+
lib/strict-non-empty-containers
137+
lib/core
138+
lib/test-utils
139+
lib/numeric
140+
123141
source-repository-package
124142
type: git
125143
location: https://github.com/input-output-hk/ouroboros-network
@@ -138,6 +156,7 @@ source-repository-package
138156
io-sim
139157
io-classes
140158
network-mux
159+
ntp-client
141160

142161
source-repository-package
143162
type: git

marlowe-dashboard-client/src/API/Wallet.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module API.Wallet
99
import Prelude
1010
import API.Request (doGetRequest, doEmptyPostRequest, doPostRequest)
1111
import API.Url (toUrlPiece)
12-
import Cardano.Wallet.Types (WalletInfo)
12+
import Cardano.Wallet.Mock.Types (WalletInfo)
1313
import Control.Monad.Error.Class (class MonadError)
1414
import Data.Json.JsonTuple (JsonTuple)
1515
import Data.Map (Map)

marlowe-dashboard-client/src/Bridge.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Bridge
66
) where
77

88
import Prelude
9-
import Cardano.Wallet.Types (WalletInfo(..)) as Back
9+
import Cardano.Wallet.Mock.Types (WalletInfo(..)) as Back
1010
import Data.Bifunctor (bimap)
1111
import Data.BigInteger (BigInteger)
1212
import Data.Either (Either)

marlowe/test/Spec/PAB/Workflow.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
module Spec.PAB.Workflow where
99

10-
import Cardano.Wallet.Client (createWallet)
11-
import Cardano.Wallet.Types (wiPubKeyHash, wiWallet)
10+
import Cardano.Wallet.Mock.Client (createWallet)
11+
import Cardano.Wallet.Mock.Types (wiPubKeyHash, wiWallet)
1212
import Control.Concurrent.Async (async)
1313
import Control.Monad (guard, join, void)
1414
import qualified Data.Aeson as Aeson
@@ -39,7 +39,7 @@ import Wallet.Types (ContractInstanceId (..), E
3939

4040
import Network.Socket (withSocketsDo)
4141

42-
import qualified Cardano.Wallet.Types as Wallet.Types
42+
import qualified Cardano.Wallet.Mock.Types as Wallet.Types
4343
import Control.Concurrent (threadDelay)
4444
import Data.Aeson (decode)
4545
import Data.ByteString.Builder (toLazyByteString)

plutus-pab/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ Plutus specific wallet implementation for managing user funds on the blockchain.
188188

189189
#### Source
190190

191-
- [Cardano.Wallet.API](https://github.com/input-output-hk/plutus/blob/master/plutus-pab/src/Cardano/Wallet/API.hs)
192-
- [Cardano.Wallet.Server.main](https://github.com/input-output-hk/plutus/blob/master/plutus-pab/src/Cardano/Wallet/Server.hs#L101)
193-
- [Cardano.Wallet.Types.Config](https://github.com/input-output-hk/plutus/blob/master/plutus-pab/src/Cardano/Wallet/Types.hs#L47)
191+
- [Cardano.Wallet.Mock.API](https://github.com/input-output-hk/plutus/blob/master/plutus-pab/src/Cardano/Wallet/API.hs)
192+
- [Cardano.Wallet.Mock.Server.main](https://github.com/input-output-hk/plutus/blob/master/plutus-pab/src/Cardano/Wallet/Server.hs#L101)
193+
- [Cardano.Wallet.Mock.Types.Config](https://github.com/input-output-hk/plutus/blob/master/plutus-pab/src/Cardano/Wallet/Types.hs#L47)
194194

195195
### webserver
196196

plutus-pab/plutus-pab.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ library
7272
Cardano.Protocol.Socket.Mock.Server
7373
Cardano.Protocol.Socket.Client
7474
Cardano.Protocol.Socket.Type
75-
Cardano.Wallet.API
76-
Cardano.Wallet.Client
77-
Cardano.Wallet.Mock
78-
Cardano.Wallet.Server
79-
Cardano.Wallet.Types
75+
Cardano.Wallet.Mock.API
76+
Cardano.Wallet.Mock.Client
77+
Cardano.Wallet.Mock.Handlers
78+
Cardano.Wallet.Mock.Server
79+
Cardano.Wallet.Mock.Types
8080
Control.Concurrent.Availability
8181
Control.Concurrent.STM.Extras
8282
Control.Concurrent.STM.Extras.Stream

plutus-pab/src/Cardano/Wallet/API.hs renamed to plutus-pab/src/Cardano/Wallet/Mock/API.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{-# LANGUAGE DataKinds #-}
22
{-# LANGUAGE TypeOperators #-}
33

4-
module Cardano.Wallet.API
4+
module Cardano.Wallet.Mock.API
55
( API
66
) where
77

8-
import Cardano.Wallet.Types (WalletInfo)
8+
import Cardano.Wallet.Mock.Types (WalletInfo)
99
import Ledger (Value)
1010
import Ledger.Constraints.OffChain (UnbalancedTx)
1111
import Ledger.Tx (Tx)

plutus-pab/src/Cardano/Wallet/Client.hs renamed to plutus-pab/src/Cardano/Wallet/Mock/Client.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
{-# LANGUAGE TypeApplications #-}
77
{-# LANGUAGE TypeOperators #-}
88

9-
module Cardano.Wallet.Client where
9+
module Cardano.Wallet.Mock.Client where
1010

11-
import Cardano.Wallet.API (API)
12-
import Cardano.Wallet.Types (WalletInfo (..))
11+
import Cardano.Wallet.Mock.API (API)
12+
import Cardano.Wallet.Mock.Types (WalletInfo (..))
1313
import Control.Monad (void)
1414
import Control.Monad.Freer
1515
import Control.Monad.Freer.Error (Error, throwError)

plutus-pab/src/Cardano/Wallet/Mock.hs renamed to plutus-pab/src/Cardano/Wallet/Mock/Handlers.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{-# LANGUAGE TypeOperators #-}
99
{-# OPTIONS_GHC -fno-warn-deprecations #-}
1010

11-
module Cardano.Wallet.Mock
11+
module Cardano.Wallet.Mock.Handlers
1212
( processWalletEffects
1313
, integer2ByteString32
1414
, byteString2Integer
@@ -19,7 +19,7 @@ module Cardano.Wallet.Mock
1919
import Cardano.BM.Data.Trace (Trace)
2020
import qualified Cardano.Node.Client as NodeClient
2121
import qualified Cardano.Protocol.Socket.Mock.Client as MockClient
22-
import Cardano.Wallet.Types (MultiWalletEffect (..), WalletEffects, WalletInfo (..),
22+
import Cardano.Wallet.Mock.Types (MultiWalletEffect (..), WalletEffects, WalletInfo (..),
2323
WalletMsg (..), Wallets)
2424
import Control.Concurrent (MVar)
2525
import Control.Concurrent.MVar (putMVar, takeMVar)

plutus-pab/src/Cardano/Wallet/Server.hs renamed to plutus-pab/src/Cardano/Wallet/Mock/Server.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
{-# LANGUAGE OverloadedStrings #-}
99
{-# LANGUAGE TypeApplications #-}
1010

11-
module Cardano.Wallet.Server
11+
module Cardano.Wallet.Mock.Server
1212
( main
1313
) where
1414

1515
import Cardano.BM.Data.Trace (Trace)
1616
import Cardano.ChainIndex.Types (ChainIndexUrl (..))
1717
import Cardano.Node.Client as NodeClient
1818
import qualified Cardano.Protocol.Socket.Mock.Client as MockClient
19-
import Cardano.Wallet.API (API)
20-
import Cardano.Wallet.Mock
21-
import Cardano.Wallet.Types (Port (..), WalletConfig (..), WalletInfo (..), WalletMsg (..),
19+
import Cardano.Wallet.Mock.API (API)
20+
import Cardano.Wallet.Mock.Handlers
21+
import Cardano.Wallet.Mock.Types (Port (..), WalletConfig (..), WalletInfo (..), WalletMsg (..),
2222
WalletUrl (..), Wallets, createWallet, multiWallet)
2323
import Control.Concurrent.Availability (Availability, available)
2424
import Control.Concurrent.MVar (MVar, newMVar)

0 commit comments

Comments
 (0)