RavenProject / ravenwallet-ios

MIT License
25 stars 21 forks source link

Forced unwrap of bittrex api response causes a crash #144

Closed a2hill closed 4 years ago

a2hill commented 4 years ago

Recently the bittrex api was down for maintenance. During their maintenance, instead of returning the price of rvn in btc the json response was {"code":"SCHEDULED_MAINTENANCE"}. This caused a crash as the app was expecting to find the key lastTreadeRate in the response. The new code handles the case better and will return an error if they key is not found.