Validate default exchange selection against active exchanges#150
Validate default exchange selection against active exchanges#150hwki merged 1 commit intohwki:masterfrom
Conversation
Previously getDefaultExchange() could return an exchange that had been removed from the codebase but still existed in the cached JSON file. Now it filters candidates against the Exchange enum before selecting a default, falling back to CoinGecko if no valid match is found.
|
@reddink Do you have an example of how to get this error to occur? I'm having trouble reproducing it. |
|
in my case, i was using both reddcoin and vertcoin. it is at this point the app will close for both these items ( i didnt check others) from what i could tell, there was a attempt to reuse the last created widgets exchange, COINDESK is in the available json, but it is not in the exchange enum |
|
Ok, that makes sense now. The real reason this is coming up is that when I removed exchanges like CoinDesk, I neglected to remove them from the json file as well. I'll merge this, in case it happens again but ideally it shouldn't. |
was noticing the following error when trying to setup a couple of different coins on a new device
It was preventing the addition of some coins on device
The following change should allow for fallback to CoinGecko if enum is missing.
Its going to: