Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exmo: add deposit/withdraw flag in currencies ccxt/ccxt#11107 #11216

Merged
merged 4 commits into from
Jan 15, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions js/exmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,17 @@ module.exports = class exmo extends Exchange {
'deposit': {
'min': undefined,
'max': undefined,
'enabled': undefined,
},
'withdraw': {
'min': undefined,
'max': undefined,
'enabled': undefined,
},
};
let fee = undefined;
let depositEnabled = undefined;
let withdrawEnabled = undefined;
if (providers === undefined) {
active = true;
type = 'fiat';
Expand All @@ -355,6 +359,20 @@ module.exports = class exmo extends Exchange {
maxValue = undefined;
}
const activeProvider = this.safeValue (provider, 'enabled');
limits[type]['enabled'] = activeProvider;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not really add enabled to the limits structure in this case.

if (type === 'deposit') {
if (activeProvider && !depositEnabled) {
depositEnabled = true;
} else if (!activeProvider) {
depositEnabled = false;
}
} else if (type === 'withdraw') {
if (activeProvider && !withdrawEnabled) {
withdrawEnabled = true;
} else if (!activeProvider) {
withdrawEnabled = false;
}
}
if (activeProvider) {
active = true;
if ((limits[type]['min'] === undefined) || (minValue < limits[type]['min'])) {
Expand All @@ -375,6 +393,8 @@ module.exports = class exmo extends Exchange {
'name': name,
'type': type,
'active': active,
'deposit': depositEnabled,
'withdraw': withdrawEnabled,
'fee': fee,
'precision': 8,
'limits': limits,
Expand Down