thunderbiscuit / padawan-wallet

The bitcoin wallet trainer on Android.
https://padawanwallet.com/
Apache License 2.0
117 stars 51 forks source link

Migrate bitcoindevkit dependency to v0.3.0-rc1 #105

Closed thunderbiscuit closed 3 years ago

thunderbiscuit commented 3 years ago

This will require updating the transaction history UI to make use of the new API with the confirmation_time type.

See the code in the TransactionHistory fragment of the Summer of Bitcoin wallet for an idea of how to make this work. Note that we should use the extension function defined on the ConfirmationTime type.

The extension function is

fun ConfirmationTime.timestampToString(): String {
    val calendar = Calendar.getInstance(Locale.ENGLISH)
    calendar.timeInMillis = this.timestamp * 1000
    return DateFormat.format("MMMM d yyyy HH:mm", calendar).toString()
}
thunderbiscuit commented 3 years ago

Bam! #123.