Skip to content

Commit

Permalink
Merge pull request #11270 from sc0Vu/patch-vcc-11107
Browse files Browse the repository at this point in the history
vcc: add deposit/withdraw flag in currencies #11107
  • Loading branch information
kroitor committed Jan 14, 2022
2 parents 27635d3 + 0532276 commit 5c19393
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/vcc.js
Expand Up @@ -247,14 +247,18 @@ module.exports = class vcc extends Exchange {
const id = this.safeStringLower (ids, i);
const currency = this.safeValue (data, ids[i]);
const code = this.safeCurrencyCode (id);
const canDeposit = this.safeValue (currency, 'can_deposit');
const canWithdraw = this.safeValue (currency, 'can_withdraw');
const canDeposit = this.safeInteger (currency, 'can_deposit');
const canWithdraw = this.safeInteger (currency, 'can_withdraw');
const active = (canDeposit && canWithdraw);
const depositEnabled = (canDeposit === 1);
const withdrawEnabled = (canWithdraw === 1);
result[code] = {
'id': id,
'code': code,
'name': this.safeString (currency, 'name'),
'active': active,
'deposit': depositEnabled,
'withdraw': withdrawEnabled,
'fee': this.safeNumber (currency, 'withdrawal_fee'),
'precision': this.safeInteger (currency, 'decimal'),
'limits': {
Expand Down

0 comments on commit 5c19393

Please sign in to comment.