diff --git a/.changelog/728.bugfix.md b/.changelog/728.bugfix.md new file mode 100644 index 000000000..94214812e --- /dev/null +++ b/.changelog/728.bugfix.md @@ -0,0 +1 @@ +Add missing 0x prefix to eth hashes in runtime events diff --git a/src/oasis-nexus/api.ts b/src/oasis-nexus/api.ts index 102c42888..d43f444bb 100644 --- a/src/oasis-nexus/api.ts +++ b/src/oasis-nexus/api.ts @@ -532,6 +532,7 @@ export const useGetRuntimeEvents: typeof generated.useGetRuntimeEvents = ( return { ...data, events: data.events.map(event => { + const adjustedHash = event.eth_tx_hash ? `0x${event.eth_tx_hash}` : undefined if ( event.type === 'accounts.transfer' || event.type === 'accounts.mint' || @@ -541,6 +542,7 @@ export const useGetRuntimeEvents: typeof generated.useGetRuntimeEvents = ( ) { return { ...event, + eth_tx_hash: adjustedHash, body: { ...event.body, amount: @@ -562,6 +564,7 @@ export const useGetRuntimeEvents: typeof generated.useGetRuntimeEvents = ( } return { ...event, + eth_tx_hash: adjustedHash, layer: runtime, network, }