This release is focused on:
Extraction of trading UI to separate application.
Full dynamic support of currencies from database and full removal of any currency-specific code from Peatio.
Ability to develop & install Peatio plugins.
General fixes & improvements.
#449: Extract trading UI to separate component.
The patch moves trading UI assets and views to separate component called peatio-trading-ui
. The extracted component lives at GitHub repository and is based on Rails 5.1.
Migration steps include (we assume your Peatio is deployed at peatio.tech
):
ci/nginx/server.conf
.SECRET_KEY_BASE
between two apps)./trading-ui-assets
. So all requests which match /\A\/trading-ui-assets\//
must be routed to trading UI app./markets/:id
to /trading/:market_id
. All requests which satisfy /\A\/trading\//
must be routed to trading UI app.market_id
(like btcusd
) from Peatio by issuing HTTP GET https://peatio.tech/markets/btcusd.json
, and then render Rails views according to received variables.https://peatio.tech/markets/btcusd.json
.PLATFORM_ROOT_URL
. Check more trading UI configuration variables at config/templates/application.yml.erb
..travis.yml
at Peatio so it automatically deploys trading UI locally with Docker and runs Selenium specs. Study .travis.yml
for detailed examples on how to run & use trading UI.#687: Refactor environment variables for Pusher.
The patch simplifies Pusher configuration and adds new variables for easy migration to Pusher Slanger.
The renamed variables:
PUSHER_KEY
=> PUSHER_CLIENT_KEY
.PUSHER_WS_PORT
=> PUSHER_CLIENT_WS_PORT
.PUSHER_WSS_PORT
=> PUSHER_CLIENT_WSS_PORT
.PUSHER_ENCRYPTED
=> PUSHER_CLIENT_ENCRYPTED
.The added variables:
PUSHER_SCHEME
: protocol used for publishing event from backend to Pusher.PUSHER_CLIENT_WS_HOST
: to which WebSocket host should client connect.PUSHER_CLIENT_HTTP_HOST
: alternative to WebSocket (polling).The removed variables:
PUSHER_CLUSTER
: this variable doesn't fit well in context of Pusher Slanger. You should now use PUSHER_HOST
, PUSHER_CLIENT_WS_HOST
, and PUSHER_CLIENT_HTTP_HOST
for configuration.Check config/application.yml
for more details and default values.
#694: Unify currency-specific models, controllers, routes, locales, stylesheets, and other components into type-specific.
The patch continues and fully finishes work from #488 – Move currencies.yml to database:
BitcoinsController
, DuffsController
) are now unified into FiatsController
and CoinsController
depending on currency type.Deposits::Fiat
, Deposits::Coin
, Withdraws::Fiat
, Withdraws::Coin
.Currency#key
as it is not more needed. You must remove key
from config/seed/currencies.yml
.Currency#type
and uses it smarter.These changes are the first step to multifiat feature. Now Peatio is fully ready for adding any number of currencies by just issuing query to database.
Once we will add support for ERC20 tokens to Peatio it will be possible to add 500+ token-based currencies to Peatio by just populating database! Now you can do the same trick with any Bitcoin-compatiable currency. The one requirement for dynamically adding currencies to database is presence of currency API client (CoinAPI
).
#698: Clear user session stored in Redis via API call DELETE /api/v2/sessions
.
The patch adds ability for deleting all member sessions which are stored in Redis. This feature is useful for SPA which use JWT & OAuth server for solving identity question.
To use this feature issue HTTP DELETE
request at /api/v2/sessions
and provide valid JWT.
IMPORTANT: Your session is only and only deleted if server returns status 200, in other cases assume session is not fully deleted so you may be still signed in Peatio.
IMPORTANT: This is very important security feature so it was backported at older Peatio branches: 1.1
, 1.2
, and 1.3
.
#708: Add ability to install plugins.
The patch introduces very simple plugin for Peatio:
config/plugins.yml
to list wanted plugins. Each plugin is constructed from name, Git repository URL, commit hash, and path to file which should be required (optional, defaults to index.rb
).bin/install_plugins
to install listed plugins from config/plugins.yml
to vendor/plugins
.bin/uninstall_plugins
to remove all installed plugins in vendor/plugins
.Get more information about plugin installation at config/plugins.yml
.
Find example plugin at peatio-plugin-example.
#689: Add development-related files to .dockerignore
.
The patch adds several paths to .dockerignore
which reduces time needed to build an image and it's size.
#696: Drop Account#in & Account#out fields.
The patch removes unused fields from table accounts
(put in «Enhancements» since it doesn't break anything).
#702: Update the nginx.conf
and passenger.conf
.
The patch updates NGINX & Passenger configuration files to support type of installation without Docker. Please, keep in mind: we don't support this type of Peatio installation. We support Docker-only setups. So we may remove all non-Docker docs soon.
Thanks to @shiftctrl-io.
#688: Set collation on database.yml.
The patch sets collation: utf8_general_ci
directly in config/database.yml
.