Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,11 @@ The p2p-onramp server on this repository was written using the [Atlas](https://a
### p2p-onramp client

The p2p-onramp frontend can be found [here](https://github.com/zkFold/p2p-onramp-client).

## Test suite

A comprehensive test suite for the *P2P-onramp* smart contract can be found in directory [./tests](./tests). To run the tests, execute:
```
cabal test
```

24 changes: 12 additions & 12 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module Main where

import Data.Aeson (eitherDecodeFileStrict)
import GeniusYield.GYConfig (coreConfigIO, withCfgProviders)
import Network.Wai.Handler.Warp
import System.Directory (createDirectoryIfMissing)
import System.Environment (getArgs)
import System.FilePath ((</>))
import Prelude

import P2POnRamp.Api (app)
import P2POnRamp.Api.Context (Ctx (..), OnRampConfig (..), dbFile)
import P2POnRamp.OrdersDB
import Data.Aeson (eitherDecodeFileStrict)
import GeniusYield.GYConfig (coreConfigIO, withCfgProviders)
import Network.Wai.Handler.Warp
import Prelude
import System.Directory (createDirectoryIfMissing)
import System.Environment (getArgs)
import System.FilePath ((</>))

import P2POnRamp.Api (app)
import P2POnRamp.Api.Context (Ctx (..), OnRampConfig (..), dbFile)
import P2POnRamp.OrdersDB

-- | Getting path for our core configuration.
parseArgs :: IO (FilePath, FilePath)
Expand All @@ -37,7 +37,7 @@ main = do
putStrLn "parsing OnRamp config..."
orConfigE <- eitherDecodeFileStrict onrampCfgPath
let orConfig = case orConfigE of
Left err -> error $ "Error decoding JSON: " ++ err
Left err -> error $ "Error decoding JSON: " ++ err
Right cfg -> cfg

putStrLn "Loading Proviers ..."
Expand Down