Fix exchange type not being processed properly

This commit is contained in:
Tanguy Herbron 2018-08-01 13:08:16 +02:00
parent 8778290135
commit b7d10011ef
2 changed files with 3 additions and 2 deletions

View File

@ -80,6 +80,7 @@ public class AddExchangeActivity extends AppCompatActivity {
private void loadLayoutFor(int exchangeType)
{
setupExchangeLayout.removeAllViews();
exchangeSpinner.setSelection(exchangeType);
switch (exchangeType)
{

View File

@ -443,7 +443,7 @@ public class DatabaseManager extends SQLiteOpenHelper{
public List<HitBtcManager> getHitBtcAccounts(Context context)
{
String searchQuerry = "SELECT * FROM " + TABLE_EXCHANGE_KEYS + " WHERE " + KEY_EXCHANGE_TYPE + "='" + HITBTC_TYPE + "' AND " + KEY_EXCHANGE_IS_ENABLED + " = '1'";
String searchQuerry = "SELECT * FROM " + TABLE_EXCHANGE_KEYS + " WHERE " + KEY_EXCHANGE_TYPE + " = " + HITBTC_TYPE + " AND " + KEY_EXCHANGE_IS_ENABLED + " = '1'";
SQLiteDatabase db = this.getWritableDatabase();
Cursor resultList = db.rawQuery(searchQuerry, null);
@ -466,7 +466,7 @@ public class DatabaseManager extends SQLiteOpenHelper{
public List<BinanceManager> getBinanceAccounts()
{
String searchQuerry = "SELECT * FROM " + TABLE_EXCHANGE_KEYS + " WHERE " + KEY_EXCHANGE_TYPE + "='" + BINANCE_TYPE + "' AND " + KEY_EXCHANGE_IS_ENABLED + " = '1'";
String searchQuerry = "SELECT * FROM " + TABLE_EXCHANGE_KEYS + " WHERE " + KEY_EXCHANGE_TYPE + " = " + BINANCE_TYPE + " AND " + KEY_EXCHANGE_IS_ENABLED + " = '1'";
SQLiteDatabase db = this.getWritableDatabase();
Cursor resultList = db.rawQuery(searchQuerry, null);