Skip to content

Commit

Permalink
Merge pull request ccxt#10108 from ndubel/patch-203
Browse files Browse the repository at this point in the history
liquid networks
  • Loading branch information
kroitor authored Oct 2, 2021
2 parents 94d2997 + 9f78f4f commit 19fe1b7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions js/liquid.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ module.exports = class liquid extends Exchange {
},
'options': {
'cancelOrderException': true,
'networks': {
'ETH': 'ERC20',
'TRX': 'TRC20',
'XLM': 'Stellar',
'ALGO': 'Algorand',
},
},
});
}
Expand Down Expand Up @@ -997,6 +1003,13 @@ module.exports = class liquid extends Exchange {
throw new NotSupported (this.id + ' withdraw() only supports a tag along the address for XRP or XLM');
}
}
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.safeString (networks, network, network); // handle ERC20>ETH alias
if (network !== undefined) {
request['network'] = network;
params = this.omit (params, 'network');
}
const response = await this.privatePostCryptoWithdrawals (this.extend (request, params));
//
// {
Expand Down

0 comments on commit 19fe1b7

Please sign in to comment.