forked from shihaam/thijooree
add support for fahipay images
This commit is contained in:
@@ -237,7 +237,8 @@ class FahipayLoginFlow {
|
||||
reference = e.optString("transaction").takeIf { it.isNotBlank() },
|
||||
accountNumber = accountNumber,
|
||||
accountDisplayName = accountDisplayName,
|
||||
source = "FAHIPAY"
|
||||
source = "FAHIPAY",
|
||||
iconUrl = e.optString("icon").takeIf { it.isNotBlank() }
|
||||
)
|
||||
}
|
||||
Pair(list, total)
|
||||
|
||||
@@ -82,7 +82,8 @@ data class Transaction(
|
||||
val reference: String?,
|
||||
val accountNumber: String,
|
||||
val accountDisplayName: String,
|
||||
val source: String // "MIB", "BML", "BML_CARD"
|
||||
val source: String, // "MIB", "BML", "BML_CARD", "FAHIPAY"
|
||||
val iconUrl: String? = null // merchant icon URL (Fahipay only)
|
||||
)
|
||||
|
||||
data class MibFinanceDeal(
|
||||
|
||||
@@ -22,6 +22,7 @@ object TransactionCache {
|
||||
put("accountNumber", t.accountNumber)
|
||||
put("accountDisplayName", t.accountDisplayName)
|
||||
put("source", t.source)
|
||||
if (t.iconUrl != null) put("iconUrl", t.iconUrl)
|
||||
})
|
||||
File(context.cacheDir, "tx_$key.json").writeText(CacheEncryption.encrypt(arr.toString()))
|
||||
} catch (_: Exception) {}
|
||||
@@ -46,7 +47,8 @@ object TransactionCache {
|
||||
reference = o.optString("reference").takeIf { it.isNotBlank() },
|
||||
accountNumber = o.optString("accountNumber"),
|
||||
accountDisplayName = o.optString("accountDisplayName"),
|
||||
source = o.optString("source")
|
||||
source = o.optString("source"),
|
||||
iconUrl = o.optString("iconUrl").takeIf { it.isNotBlank() }
|
||||
)
|
||||
}
|
||||
} catch (_: Exception) { emptyList() }
|
||||
|
||||
Reference in New Issue
Block a user