Permalink
Browse files

Fill placeholders by missing handlers for EOS-wallets.

  • Loading branch information...
denisshevchenko committed Feb 11, 2019
1 parent 809246c commit e9044318a3d9bb9f6ed41570b75e13dc59e417bd
Showing with 29 additions and 3 deletions.
  1. +19 −0 src/Cardano/Wallet/Client.hs
  2. +10 −3 src/Cardano/Wallet/Client/Http.hs
@@ -165,6 +165,19 @@ data WalletClient m
, getEosWallet
:: WalletId
-> Resp m EosWallet
, updateEosWallet
:: WalletId
-> UpdateEosWallet
-> Resp m EosWallet
, deleteEosWallet
:: WalletId
-> m (Either ClientError ())
, getEosWalletIndexFilterSorts
:: Maybe Page
-> Maybe PerPage
-> FilterOperations '[WalletId, Core.Coin] EosWallet
-> SortOperations EosWallet
-> Resp m [EosWallet]
} deriving Generic


@@ -305,6 +318,12 @@ natMapClient phi f wc = WalletClient
f . phi . postEosWallet wc
, getEosWallet =
f . phi . getEosWallet wc
, updateEosWallet =
\x -> f . phi . updateEosWallet wc x
, deleteEosWallet =
f . phi . deleteEosWallet wc
, getEosWalletIndexFilterSorts =
\x y p -> f . phi . getEosWalletIndexFilterSorts wc x y p
}

-- | Run the given natural transformation over the 'WalletClient'.
@@ -118,6 +118,13 @@ mkHttpClient baseUrl manager = WalletClient
= run . postEosWalletR
, getEosWallet
= run. getEosWalletR
, updateEosWallet
= \x -> run . updateEosWalletR x
, deleteEosWallet
= unNoContent . run . deleteEosWalletR
, getEosWalletIndexFilterSorts
= \mp mpp filters sorts -> run $
getEosWalletIndexFilterSortsR mp mpp filters sorts
}
where

@@ -144,9 +151,9 @@ mkHttpClient baseUrl manager = WalletClient

postEosWalletR
:<|> getEosWalletR
:<|> _
:<|> _
:<|> _
:<|> updateEosWalletR
:<|> deleteEosWalletR
:<|> getEosWalletIndexFilterSortsR
= eosWalletsAPI

postWalletR

0 comments on commit e904431

Please sign in to comment.