Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module API.Marlowe.Run.Wallet | ||
( getTotalFunds | ||
) where | ||
|
||
import Prologue | ||
import API.Request (doGetRequest) | ||
import API.Url (toUrlPiece) | ||
import Component.Contacts.Types (WalletId) | ||
import Control.Monad.Error.Class (class MonadError) | ||
import Effect.Aff.Class (class MonadAff) | ||
import Marlowe.Run.Wallet.V1 (GetTotalFundsResponse) as BE | ||
import Servant.PureScript (AjaxError) | ||
|
||
getTotalFunds | ||
:: forall m | ||
. MonadAff m | ||
=> MonadError AjaxError m | ||
=> WalletId | ||
-> m BE.GetTotalFundsResponse | ||
getTotalFunds wallet = | ||
doGetRequest | ||
$ "/api/wallet/v1/" | ||
<> toUrlPiece wallet | ||
<> "/total-funds" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters