bitbox-wallet-app icon indicating copy to clipboard operation
bitbox-wallet-app copied to clipboard

frontend: add received date to coin control UTXO list

Open strmci opened this issue 11 months ago • 6 comments

Add the received date (block header timestamp) to the UTXO detail in the coin control view. This makes it easier for users to view the date, which can be helpful for various reasons, without having to open each UTXO individually in the block explorer.

strmci avatar Mar 24 '25 16:03 strmci

@benma @thisconnect @Beerosagos I updated the PR:

  • removed GetHeaderTimestamp function and getting the HeaderTimestamp in SpendableOutputs
  • created TimeStamp method in the TransactionData and refactored the TimeStamp field to HeaderTimestamp
  • I'm not sure if the formatting with RFC3339 is necessary, isn't that done automatically in time package ? https://pkg.go.dev/time#Time.MarshalJSON
  • updated the formatting of the date to use parseTimeShort

PTAL :pray:

strmci avatar Jun 06 '25 11:06 strmci

I'm not sure if the formatting with RFC3339 is necessary, isn't that done automatically in time package ? https://pkg.go.dev/time#Time.MarshalJSON

Imo it would be good to format it explicitly for consistency.

Now sure if there is a nice way to add a test for SpendableOutput.HeaderTimestamp, maybe in transactions_test.go:TestSpendableOutputs? cc @benma

It would be nice to move the logic outside of handlers.go, but since this PR has been opened for a while, I'd do it in a separate one.

Beerosagos avatar Jun 10 '25 10:06 Beerosagos

@Beerosagos

  • added RFC3339 formatting
  • removed fallback to CreatedTimestamp
  • reverted the refactor of TransactionData and removed the new Timestamp function (can be added in a separate PR if needed)
  • added a new Pending badge for unconfirmed transactions or when the blockchain is not yet synced

PTAL

strmci avatar Jun 13 '25 12:06 strmci

Backend LGTM! For the frontend, I meant just a text label, for Pending, not a badge. But I'll leave the last word to @thisconnect on this :innocent:

Beerosagos avatar Jun 18 '25 15:06 Beerosagos

Backend LGTM! For the frontend, I meant just a text label, for Pending, not a badge. But I'll leave the last word to @thisconnect on this 😇

we can always add a badge later if it makes sense.

thisconnect avatar Jun 18 '25 20:06 thisconnect

@Beerosagos @thisconnect

I removed the badge from "Pending", please check.

strmci avatar Jun 23 '25 12:06 strmci

@benma I've updated to reuse existing strings, please check.

strmci avatar Jun 30 '25 13:06 strmci