-
Notifications
You must be signed in to change notification settings - Fork 12
fix(apps): align txn types #1138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: fix_renterd-e2e_flaky_wallet_tests
Are you sure you want to change the base?
fix(apps): align txn types #1138
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
🦋 Changeset detectedLatest commit: f817712 The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
84544ca
to
76c9487
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR standardizes contract resolution types across V1 and V2 transactions, introduces a new contractRefresh case when a renewal doesn’t change the contract, and updates related type definitions and explorer components to use the new patterns.
- Refactor and split
getTransactionType
intogetV1TransactionType
andgetV2TransactionType
, addingcontractRefresh
logic. - Rename resolution kinds from
"storage proof"
to"storageProof"
and adjust type definitions in@siafoundation/types
. - Update
Transaction.arbitraryData
shapes and propagate changes into explorer converters and components.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
libs/units/src/transactionTypes.ts | Introduced getV1TransactionType /getV2TransactionType , added contractRefresh , updated mappings |
libs/types/src/v2.ts | Renamed and consolidated V2FileContractResolution types, standardized storageProof naming |
libs/types/src/core.ts | Changed Transaction.arbitraryData from string[] to string[][] |
libs/explored-types/src/types.ts | Adjusted ExplorerTransaction.arbitraryData from string[][] to string[] |
apps/explorer/lib/tx.ts | Added helper to convert ExplorerV2Transaction into parameters for getV2TransactionType |
apps/explorer/components/Transaction/index.tsx | Swapped title prop for txType on Transaction component |
apps/explorer/components/Transaction/TransactionHeader.tsx | Added a badge showing txType and updated header layout |
apps/explorer/components/Entity/EntityListItem.tsx | Replaced getTransactionType with getV1TransactionType and new V2 conversion helper |
apps/explorer/components/ContractView/index.tsx | Pass txType instead of hardcoded title for formation transactions |
apps/explorer/app/(main)/tx/[id]/page.tsx | Imported and used getV1TransactionType /getV2TransactionType to set txType prop |
.changeset/quick-avocados-accept.md | Documented a patch for @siafoundation/types fixing resolution types |
.changeset/old-gorillas-shout.md | Announced support for the new contractRefresh event |
Comments suppressed due to low confidence (2)
libs/units/src/transactionTypes.ts:118
- [nitpick] The new
contractRefresh
path ingetV2TransactionType
should have dedicated unit tests for both equal and non-equal height scenarios to prevent regressions.
: 'contractRenewal'
libs/types/src/core.ts:152
- Changing
arbitraryData
fromstring[]
tostring[][]
is a breaking change; ensure all consumers (including V1 handlers) are updated to handle the new shape.
arbitraryData?: string[][]
76c9487
to
abb26b1
Compare
abb26b1
to
e717f7b
Compare
e717f7b
to
062d9ce
Compare
062d9ce
to
f817712
Compare
Changes
renterd / hostd / walletd
explorer