Live App: defi-dex
Status: POC
A DEX (Decentralized Exchange) UI accelerator that operates on the Hedera network. The DEX UI utilizes React primitives from the hedera-accelerator-defi-dex-ui-components UI component library.
Install dependencies with yarn.
yarn install
The Hedera DEX Accelerator utilizes the hashconnect library to pair with supported wallet extensions. Currently, the only supported wallet extension is HashPack. The HashConnect 1-click pairing feature only works in an SSL secured environment (https URLs). To enable HTTPS
in your local build:
- Create an
.env
file in the root of this project. - In the
.env
file set theHTTPS
environment variable totrue
.
/* .env */
HTTPS=true
- Create an SSL certificate. There are several tools that can be used to generate a certificate and key. An easy way to do this is to use the mkcert tool.
# The [Homebrew](https://brew.sh/) macOS package manager is used for this example
# Install mkcert tool
brew install mkcert
# Install nss (only needed if you use Firefox)
brew install nss
# Setup mkcert on your machine (creates a CA)
mkcert -install
# Create a directory to store the certificate and key
mkdir -p .cert
# Generate the certificate (ran from the root of this project)
mkcert -key-file ./.cert/key.pem -cert-file ./.cert/cert.pem "localhost"
- Set the
SSL_CRT_FILE
andSSL_CRT_FILE
environment variables to the path of the certificate and key files.
/* .env */
HTTPS=true
/* Path to certificate */
SSL_CRT_FILE=./.cert/cert.pem
/* Path to key */
SSL_KEY_FILE=./.cert/key.pem
-
Make sure to include
.env
and.cert
in your.gitignore
file so this information is not committed to version control. -
Run the application with
yarn start
. You should seehttps://
prefixed to the localhost URL.
yarn start
yarn test