question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Very very incomplete implementation of Bittrex/and many other generic services

See original GitHub issue

As i look into the implementation of Bittrex generic services implementation, i see “BittrextAdapters” class has such an incomplete and erroneous code :

public static void adaptMetaData(List<BittrexSymbol> rawSymbols, ExchangeMetaData metaData) { BittrexAdapters.adaptCurrencyPairs(rawSymbols).forEach( currencyPair -> { metaData.getCurrencyPairs().putIfAbsent(currencyPair, null); metaData.getCurrencies().putIfAbsent(currencyPair.base, null); metaData.getCurrencies().putIfAbsent(currencyPair.counter, null); }); }

(This code belongs to @walec51 as git blame shows)

This code fills the pairs and currency only with their name and leaves other fields as null(or with default value with the lucky ones read from the static resource file). Any developer which aims to use generic interfaces gets incomplete/inconsistent currencies and/or currency pairs with null fields(wallet health, fees etc…).

Me and my colleague, as we traverse the code within the scope of generic exchange implementations, see many of these incomplete implementations. They are just seem to be implemented for “just putting some code on the method that returns something”

I am fixing this issue in a separate branch. But i want to open this issue, because such situations cause frustrations about the stability/functionality of the xchange and it is required moderate and avoid contribution of such “bad examples” to get more community interest/investment on the project.

NOTE: By the way, its interface and other design concepts of xchange is good. I appreciate the other qualities of the library( domain model-dto, adapters and API decorators)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
walec51commented, Jun 7, 2021

We are aware of the issue. And no - its not a life cycle issue.

What is your proposed solution?

Not to accept PRs if they do not implement every feature required by generic interface?

If so then you can remove 9 out of 10 modules from this repo and kill this project. No one ever provided a 100% complete implementation of a exchange in one PR and no one ever will. This is an on going effort - eventually we might get there for most big exchanges.

Every one which uses this library works only on the features they need. Every time I find some missing feature in the implementations of those generic interfaces I add it and submit a PR. If you stop accepting PRs with partial implementations then I and every one else will just stop submitting them to this project.

0reactions
aligokalppekercommented, Jun 18, 2021

Then please update the “exchange support” page to reflect the true state of the project. Also we should remove or write a warning about the “generic examples” from the introductory “readme” page though generic interface are not implemented properly.

This project should not misguide people, neither intentionally or otherwise… @walec51

Read more comments on GitHub >

github_iconTop Results From Across the Web

Potential Clinical and Economic Impact of Switching Branded ...
Switching branded to generic medications has become a common cost-containment measure. Although this is an important objective for health care systems ...
Read more >
Generic Drug Manufacturer Ranbaxy Pleads Guilty and ...
In the largest drug safety settlement to date with a generic drug manufacturer, Ranbaxy USA Inc. , a subsidiary of Indian generic ......
Read more >
Generic Drugs: Questions & Answers - FDA
A generic drug is a medication created to be the same as an already marketed brand-name drug in dosage form, safety, strength, ...
Read more >
Introduction to the Generic Drug Supply Chain and Key ...
The market dynamics of brand and generic drugs are very different, ... by more than 60 percent, while brand drug prices have continued...
Read more >
About Generics - CVS Caremark
Today, most drug classes offer several options. Some are higher-cost brand-name drugs and others are lower-cost generic options. Choosing a generic medicine ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found