Skip to content

Commit

Permalink
Merge pull request #448 from Concordium/fix-transaction-details-query
Browse files Browse the repository at this point in the history
Fix useTransactionQuery error due to field names clashing
  • Loading branch information
limemloh authored Jan 30, 2025
2 parents f19b219 + 6a3be02 commit 352acf0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
## [Unreleased]

- Move query `useBlockSpecialEventsQuery` to new API.
- Rename `ContractUpgraded.from` and `ContractUpgraded.to` in query `useTransactionQuery` to avoid error of fields which cannot be merged, as these were clashing with `Transferred.from` and `Transferred.to`.

## [1.6.2] - 2025-01-19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
:contract-address-index="event.contractAddress.index"
:contract-address-sub-index="event.contractAddress.subIndex"
/>
upgraded module from <ModuleLink :module-reference="event.from" /> to module
<ModuleLink :module-reference="event.to" />.
<!-- @vue-expect-error Typescript is not aware that event.from got renamed to fromModule in the query -->
upgraded module from <ModuleLink :module-reference="event.fromModule" /> to
<!-- @vue-expect-error Typescript is not aware that event.to got renamed to toModule in the query -->
module <ModuleLink :module-reference="event.toModule" />.
</span>
</template>

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/queries/useTransactionQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ __typename
index
subIndex
}
from
to
fromModule: from # Renamed to avoid errors due to clashing with 'Transferred.from'.
toModule: to # Renamed to avoid errors due to clashing with 'Transferred.to'.
}
... on CredentialKeysUpdated {
credId
Expand Down

0 comments on commit 352acf0

Please sign in to comment.