From 70d5e3d4d22593390b0f8720a8f5198331ac6da9 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Fri, 30 Aug 2019 19:52:23 -0500 Subject: [PATCH] Remove a couple of not needed TODOs. --- .../database/entities/Balance.kt | 2 +- .../database/entities/Transfer.kt | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/database/entities/Balance.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/database/entities/Balance.kt index b0ae9ad..ced80eb 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/database/entities/Balance.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/database/entities/Balance.kt @@ -7,7 +7,7 @@ import androidx.room.PrimaryKey @Entity(tableName = "balances") data class Balance( @PrimaryKey - @ColumnInfo(name = "asset_id") val assetId: String, // TODO should be foreign key? + @ColumnInfo(name = "asset_id") val assetId: String, @ColumnInfo(name = "asset_amount") val assetAmount: Long, @ColumnInfo(name = "last_update") val lastUpdate: Long ) \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/database/entities/Transfer.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/database/entities/Transfer.kt index 1505a16..bc13707 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/database/entities/Transfer.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/database/entities/Transfer.kt @@ -11,13 +11,13 @@ data class Transfer ( @ColumnInfo(name = "block_number") val blockNumber: Long, @ColumnInfo(name = "timestamp") val timestamp: Long, @ColumnInfo(name = "fee_amount") val feeAmount: Long, - @ColumnInfo(name = "fee_asset_id") val feeAssetId: String, // TODO should be foreign key to Asset - @ColumnInfo(name = "source") val source: String, // TODO should be foreign key to UserAccount - @ColumnInfo(name = "destination") val destination: String, // TODO should be foreign key to UserAccount + @ColumnInfo(name = "fee_asset_id") val feeAssetId: String, + @ColumnInfo(name = "source") val source: String, + @ColumnInfo(name = "destination") val destination: String, @ColumnInfo(name = "transfer_amount") val transferAmount: Long, - @ColumnInfo(name = "transfer_asset_id") val transferAssetId: String, // TODO should be foreign key to Asset + @ColumnInfo(name = "transfer_asset_id") val transferAssetId: String, @ColumnInfo(name = "memo") val memo: String, - @ColumnInfo(name = "bts_value") var btsValue: Long? = Transfer.NOT_CALCULATED + @ColumnInfo(name = "bts_value") var btsValue: Long? = NOT_CALCULATED ){ companion object { // Constant used to specify an uninitialized BTS equivalent value @@ -26,7 +26,7 @@ data class Transfer ( val ERROR: Long? = -2L } init { - if(transferAssetId.equals("1.3.0")){ + if(transferAssetId == "1.3.0"){ // If the transferred asset is BTS, we can fill the btsValue field immediately btsValue = transferAmount }