Skip to content

Commit

Permalink
Merge pull request ccxt#10125 from ndubel/patch-204
Browse files Browse the repository at this point in the history
stex networks
  • Loading branch information
kroitor authored Oct 4, 2021
2 parents b9e6246 + 04abbc2 commit 85f0a0f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions js/stex.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,17 @@ module.exports = class stex extends Exchange {
},
'options': {
'parseOrderToPrecision': false,
'networks': {
'ERC20': 5,
'ETH': 5,
'OMNI': 10,
'XLM': 20,
'BEP2': 22,
'TRC20': 24,
'TRX': 24,
'SOL': 25,
'BEP20': 501,
},
},
'exceptions': {
'exact': {
Expand Down Expand Up @@ -1704,6 +1715,13 @@ module.exports = class stex extends Exchange {
if (tag !== undefined) {
request['additional_address_parameter'] = tag;
}
const networks = this.safeValue (this.options, 'networks', {});
let network = this.safeStringUpper (params, 'network'); // this line allows the user to specify either ERC20 or ETH
network = this.safeInteger (networks, network, network); // handle ERC20>ETH alias
if (network !== undefined) {
request['protocol_id'] = network;
params = this.omit (params, 'network');
}
const response = await this.profilePostWithdraw (this.extend (request, params));
//
// {
Expand Down

0 comments on commit 85f0a0f

Please sign in to comment.