Skip to content

Commit 6a3be02

Browse files
committed
Fix useTransactionQuery error due to field names clashing
1 parent dc1d2ef commit 6a3be02

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

frontend/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
55
## [Unreleased]
66

77
- Move query `useBlockSpecialEventsQuery` to new API.
8+
- 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`.
89

910
## [1.6.2] - 2025-01-19
1011

frontend/src/components/TransactionEventList/Events/ContractUpgraded.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
:contract-address-index="event.contractAddress.index"
77
:contract-address-sub-index="event.contractAddress.subIndex"
88
/>
9-
upgraded module from <ModuleLink :module-reference="event.from" /> to module
10-
<ModuleLink :module-reference="event.to" />.
9+
<!-- @vue-expect-error Typescript is not aware that event.from got renamed to fromModule in the query -->
10+
upgraded module from <ModuleLink :module-reference="event.fromModule" /> to
11+
<!-- @vue-expect-error Typescript is not aware that event.to got renamed to toModule in the query -->
12+
module <ModuleLink :module-reference="event.toModule" />.
1113
</span>
1214
</template>
1315

frontend/src/queries/useTransactionQuery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ __typename
101101
index
102102
subIndex
103103
}
104-
from
105-
to
104+
fromModule: from # Renamed to avoid errors due to clashing with 'Transferred.from'.
105+
toModule: to # Renamed to avoid errors due to clashing with 'Transferred.to'.
106106
}
107107
... on CredentialKeysUpdated {
108108
credId

0 commit comments

Comments
 (0)