Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 1c0672c

Browse files
committed
PLT-646 Deprecated the TotalFunds effect of WalletEffect.
In short, we won't be using the wallet to query blockchain information. This is the responsability of the indexing component. See our ADRs for more details.
1 parent cf7ea96 commit 1c0672c

File tree

6 files changed

+11
-0
lines changed

6 files changed

+11
-0
lines changed

plutus-contract/src/Wallet/Effects.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
{-# LANGUAGE NamedFieldPuns #-}
1010
{-# LANGUAGE OverloadedStrings #-}
1111
{-# LANGUAGE TemplateHaskell #-}
12+
1213
module Wallet.Effects(
1314
-- * Wallet effect
1415
WalletEffect(..)
@@ -31,6 +32,8 @@ import Ledger (Address, CardanoTx, Params, Slot, Value)
3132
import Ledger.Constraints.OffChain (UnbalancedTx)
3233
import Wallet.Error (WalletAPIError)
3334

35+
{-# DEPRECATED TotalFunds "We won't use the wallet for querying blockchain information. See https://plutus-apps.readthedocs.io/en/latest/adr/0005-pab-indexing-solution-integration.html" #-}
36+
3437
data WalletEffect r where
3538
SubmitTxn :: CardanoTx -> WalletEffect ()
3639
OwnAddresses :: WalletEffect (NonEmpty Address)

plutus-contract/src/Wallet/Emulator/Wallet.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
{-# LANGUAGE ViewPatterns #-}
2020

2121
{-# OPTIONS_GHC -Wno-orphans #-}
22+
{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Remove once TotalFunds gets removed
2223

2324
module Wallet.Emulator.Wallet where
2425

plutus-pab/src/Cardano/Wallet/LocalClient.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
{-# LANGUAGE TypeApplications #-}
88
{-# LANGUAGE TypeOperators #-}
99

10+
{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Remove once TotalFunds gets removed
11+
1012
module Cardano.Wallet.LocalClient where
1113

1214
import Cardano.Api qualified

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ type API walletId -- see note [WalletID type in wallet API]
4242
:<|> Capture "walletId" walletId :> "own-payment-public-key-hash" :> Get '[JSON] PaymentPubKeyHash
4343
:<|> Capture "walletId" walletId :> "own-addresses" :> Get '[JSON] (NonEmpty Address)
4444
:<|> Capture "walletId" walletId :> "balance-tx" :> ReqBody '[JSON] UnbalancedTx :> Post '[JSON] (Either WalletAPIError CardanoTx)
45+
-- TODO: Should we removed as deprecated
4546
:<|> Capture "walletId" walletId :> "total-funds" :> Get '[JSON] Value
4647
:<|> Capture "walletId" walletId :> "sign" :> ReqBody '[JSON] CardanoTx :> Post '[JSON] CardanoTx

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
{-# LANGUAGE TypeApplications #-}
66
{-# LANGUAGE TypeOperators #-}
77

8+
{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Remove once TotalFunds gets removed
9+
810
module Cardano.Wallet.Mock.Client where
911

1012
import Cardano.Wallet.Mock.API (API)

plutus-pab/src/Cardano/Wallet/RemoteClient.hs

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

9+
{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Remove once TotalFunds gets removed
10+
911
module Cardano.Wallet.RemoteClient
1012
( handleWalletClient
1113
) where

0 commit comments

Comments
 (0)