This release is focused on:
Support for ERC20 tokens.
Fixing issues at all available APIs: Events API, Management API v2 & Member API v2.
Improvements for transaction processing mechanisms.
Fixing UI issues.
The release doesn't provide lot of new feature, instead it is focused on stabilization of current codebase.
#913: All wallet addresses, transaction IDs, TIDs, RIDs are now case sensitive.
The next migration files are must-learn before doing any upgrades:
https://github.com/rubykube/peatio/pull/913/files#diff-685a1e4a0464f3358e0aaba59188992c
https://github.com/rubykube/peatio/pull/913/files#diff-4d9437ddbba478de18ee9a1d044f3be0
Please, also be sure to checkout the new variable for currencies: case_sensitive
. This variable determines if wallet addresses and transaction IDs are case sensitive or insensitive. Be sure to set the correct value for your currencies.
#1037: Replace state to action in withdraws and change behaviour of initial withdraw state (Management API v1).
Changes to POST /management_api/v1/withdraws/new
Now the behaviours for fiat and crypto withdraws are different.
Fiat: money are immediately locked, withdraw state is set to «submitted», system workers will validate withdraw later against suspected activity, and assign state to «rejected» or «accepted». The processing will not begin automatically. The processing may be initiated manually from admin panel or by PUT /management_api/v1/withdraws/action.
Coin: money are immediately locked, withdraw state is set to «submitted», system workers will validate withdraw later against suspected activity, validate withdraw address and set state to «rejected» or «accepted». Then in case state is «accepted» withdraw workers will perform interactions with blockchain. The withdraw receives new state «processing». Then withdraw receives state either «succeed» or «failed».
The parameter state
replaced with action
. The available values include:
process
: system will lock the money, check for suspected activity, validate recipient address, and initiate the processing of the withdraw. The fiat withdraws will be completed immediately while crypto withdraws will be processed by workers since they require interaction with blockchain.Migration steps:
If you depend on state: :prepared
you will need to review the logic of your app because it is now not possible to create withdraw with no money locked.
If you depend on state: :submitted
you can safely remove this parameter from payload.
Changes to PUT /management_api/v1/withdraws/state
This route changed to PUT /management_api/v1/withdraws/action
.
The parameter state
replaced with action
. The available values include:
process
: system will lock the money, check for suspected activity, validate recipient address, and initiate the processing of the withdraw. The fiat withdraws will be completed immediately while crypto withdraws will be processed by workers since they require interaction with blockchain.
cancel
: system will mark withdraw as «canceled», and unlock the money (if they were locked).
Migration steps:
state: :submitted
is no longer supported in this call. If you want to initiate the processing of withdraw pass action: :process
.
If you depend on state: :canceled
replace it with action: :cancel
.
#913: Add support for ERC20 tokens.
The patch adds support for ERC20 tokens.
Read more about how to use this feature at:
config/seed/currencies.yml.erb (find currency TRST
).
docs/peatio/erc20.md
docs/peatio/testnet/erc20.md
#980: Ability to establish cookie-based session using API.
The patch adds new Member API v2 call POST /api/v2/sessions
which allows to establish classical cookie-based session which expires along with JWT expiration time. It may be useful when Peatio is used as backend for SPA frontend along with existing Trading UI (which is cookie-based).
#915: Add ability to enable fiat deposit fee.
It is now possible to set fiat deposit fee (fixed size only).
#935: Ability to get deposit, withdraw and trading fees using Member API v2.
The patch adds public calls: GET /api/v2/fees/deposit
, GET /api/v2/fees/withdraw
, GET /api/v2/fees/trading
.
#1033: Expose account balance via Management API v1.
The patch adds new Management API v1 calls: POST /management_api/v1/accounts/balance
.
Check more info at docs/api/management_api_v1.md.
#931: Update omniauth-barong to 0.1.4.
The patch updates gem version and enabled Peatio to support newer Barong versions.
#922: Remove «Pusher not available» panel from Peatio UI.
#946: Treat Barong levels higher then or equal to three as «identity verified».
#961: Retry on all Capybara errors in tests (helps to run test on slow hardware).
#988: Remove legacy ActiveYAML stuff.
#992: Remove ability to select currency for fiat deposit, use currency code in URL instead.
#1012: Permit cryptocurrency transactions between internal recipients.
#1027: Add logging to Grape APIs.
#924: Various user interface fixes and improvements after migrating to Bootstrap 4 (for both user cabinet and admin).
#937: Various admin interface style fixes.
#994: Various UI fixes.
#918: Update documentation for Bitcoin walletnotify.
#949: Disable automatic processing for fiat withdraws and bring back ability to cancel withdraw in admin panel.
#942: Update conditions for fiat withdraw button (force manual processing, fixes sticky withdraws).
#956: Limit trading fee to 50%.
The patch adds validations & migrations which prevents user from settings trading fees over 50%.
#965: Add missing translations for withdraw states.
#958: Submit amounts as strings, update String#to_d to match Rails behaviour, add specs for extremely precise amounts.
#969: Always use legacy Bitcoin Cash addresses.
The patch converts BCH addresses from «Cash Address» format to legacy so it is compatible with most wallets & exchanges.
#976: Remove «--depth=1» from git clone in bin/install_plugins.
The patch fixes error which prevented from installing specific version of plugin (it was always master).
#989: Fix typos in docs/specs/event_api.
#984: Fix for BitGo ETH address generation.
#998: Submit withdraw after creation via API.
The patch fixes sticky withdraws created via Member API v2.
#1008: Add «deposit_confirmations» to config/seed/currencies.yml.erb.
#1014: Fix disappearing security_configuration when module reloads.
#1022: Fix «[object Object]» problem in API docs, add bin/bump for updating versions & tweak ci/bump.rb.
#1028: Tweak lib/daemons/coins.rb for stability.
The patch improves speed and stability of processing incoming transactions and fixes bug related to sticky daemon on processing ERC20 transactions.