Skip to content

Commit

Permalink
improve withdraw
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmiei committed May 16, 2023
1 parent 9d6430f commit b267b4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ts/src/bitget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1396,16 +1396,18 @@ export default class bitget extends Exchange {
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
*/
this.checkAddress (address);
const chain = this.safeString (params, 'chain');
const chain = this.safeString2 (params, 'chain', 'network');
params = this.omit (params, [ 'network' ]);
if (chain === undefined) {
throw new ArgumentsRequired (this.id + ' withdraw() requires a chain parameter');
}
await this.loadMarkets ();
const currency = this.currency (code);
const networkId = this.networkCodeToId (chain);
const request = {
'coin': currency['code'],
'address': address,
'chain': chain,
'chain': networkId,
'amount': amount,
};
if (tag !== undefined) {
Expand Down

0 comments on commit b267b4e

Please sign in to comment.