- Fixed duplicated transactions by inserting new primary key yo crypto_coin_transaction
This commit is contained in:
parent
b10b385a83
commit
c2575c7ab8
3 changed files with 13 additions and 9 deletions
|
@ -72,10 +72,10 @@ public abstract class CrystalDatabase extends RoomDatabase {
|
|||
Room.databaseBuilder(context,
|
||||
CrystalDatabase.class, "CrystalWallet.db")
|
||||
.allowMainThreadQueries()
|
||||
.addMigrations(MIGRATION_2_3)
|
||||
.addMigrations(MIGRATION_3_4)
|
||||
.addMigrations(MIGRATION_4_5)
|
||||
.addMigrations(MIGRATION_5_6)
|
||||
//.addMigrations(MIGRATION_2_3)
|
||||
//.addMigrations(MIGRATION_3_4)
|
||||
//.addMigrations(MIGRATION_4_5)
|
||||
//.addMigrations(MIGRATION_5_6)
|
||||
.build();
|
||||
}
|
||||
return instance;
|
||||
|
|
|
@ -680,14 +680,14 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
|
|||
/*
|
||||
* If exists mode scurity show it and valide events in case of success or fail
|
||||
* */
|
||||
/* CrystalSecurityMonitor.getInstance(this.getActivity()).callPasswordRequest(this.getActivity(), new OnResponse() {
|
||||
CrystalSecurityMonitor.getInstance(this.getActivity()).callPasswordRequest(this.getActivity(), new OnResponse() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
|
||||
/*
|
||||
* Show loading dialog
|
||||
* */
|
||||
/* crystalDialog = new CrystalDialog((Activity) getContext());
|
||||
crystalDialog = new CrystalDialog((Activity) getContext());
|
||||
crystalDialog.setText("Sending");
|
||||
crystalDialog.progress();
|
||||
crystalDialog.show();
|
||||
|
@ -699,8 +699,8 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
|
|||
public void onFailed() {
|
||||
|
||||
}
|
||||
});*/
|
||||
CryptoNetInfoRequests.getInstance().addRequest(sendRequest);
|
||||
});
|
||||
//CryptoNetInfoRequests.getInstance().addRequest(sendRequest);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,9 +20,13 @@ import cy.agorise.crystalwallet.enums.CryptoCoin;
|
|||
*/
|
||||
@Entity(
|
||||
tableName="crypto_coin_transaction",
|
||||
primaryKeys = {
|
||||
|
||||
},
|
||||
indices={
|
||||
@Index(value={"account_id"}),
|
||||
@Index(value={"id_currency"})
|
||||
@Index(value={"id_currency"}),
|
||||
@Index(value={"date", "account_id", "id_currency", "from", "to"},unique=true)
|
||||
},
|
||||
foreignKeys = {
|
||||
@ForeignKey(
|
||||
|
|
Loading…
Reference in a new issue