Peatio 1.5.0 (March 20, 2018)
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
- You will need to add NGINX to your stack.
- Review NGINX configuration which can be found at
- The trick is that both Peatio and Trading UI are deployed on the same domain but are served conditionally by NGINX reverse proxy depending on the request path.
- Another trick is that both apps share the same cookies because they live on the same domain (however, trading UI doesn't do any decode/encode operations so there is not need for sharing
SECRET_KEY_BASEbetween two apps).
- Trading UI app has separate asset prefix:
/trading-ui-assets. So all requests which match
/\A\/trading-ui-assets\//must be routed to trading UI app.
- The path to page with markets has also been changes from
/trading/:market_id. All requests which satisfy
/\A\/trading\//must be routed to trading UI app.
- The trading UI app will first download variables for specified
btcusd) from Peatio by issuing
HTTP GET https://peatio.tech/markets/btcusd.json, and then render Rails views according to received variables.
- The member is kept authenticated because trading UI app sends cookies via HTTP header to
- The variable which controls Peatio root URL is called
PLATFORM_ROOT_URL. Check more trading UI configuration variables at
.travis.ymlat Peatio so it automatically deploys trading UI locally with Docker and runs Selenium specs. Study
.travis.ymlfor 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:
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
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:
- All controllers (including user & admin) which stand for specific currency (like
DuffsController) are now unified into
CoinsControllerdepending on currency type.
- The same store for models, views, locales, stylesheets and routes:
- The patch removes field
Currency#keyas it is not more needed. You must remove
- Peatio now adds much more attention to
Currency#typeand 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 (
- #698: Clear user session stored in Redis via API call
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:
- #708: Add ability to install plugins.
The patch introduces very simple plugin for Peatio:
config/plugins.ymlto 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
bin/install_pluginsto install listed plugins from
bin/uninstall_pluginsto remove all installed plugins in
Get more information about plugin installation at
Find example plugin at peatio-plugin-example.
- #689: Add development-related files to
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
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
- #700: Fix broken authentication in WS.
The patch fixes retrieving of authentication token in
This was a regression after #629.
Now access key is fetched from payload (parameter is called
jwt) instead of headers.