penumbra-zone / web

Apache License 2.0
10 stars 7 forks source link

views: extract receiver view into transaction view #1260

Closed TalDerei closed 3 weeks ago

TalDerei commented 3 weeks ago

References #483 and https://github.com/penumbra-zone/web/issues/1251#issuecomment-2150629725

@jessepinho the asReceiverTransactionView translator from the transaction approval dialog is reused in the transaction view page. Currently, i'm displaying every transaction with an associated receiver view which obviously is not correct.

There seems to be some misdirection in the TransactionViewSwitcher component that I couldn't quite parse, mainly where the actual filtering is happening that determines if the receiver view should be present or not. Is there a simple way to propagate this filtering to the transaction view page in this PR?

changeset-bot[bot] commented 3 weeks ago

⚠️ No Changeset found

Latest commit: 98f3a5733fad117f64354e33b4721671c3959119

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

TalDerei commented 3 weeks ago

Rather than trying to generalize ViewTabs and passing in transactionClassification as a prop, there's a simpler and more direct approach. Invoking the classifyTransaction utility function found in the perspective package achieves the aforementioned filtering in the TxViewer component.