diff --git a/packages/web-client/src/lib/components/wallet/TransactionItem.svelte b/packages/web-client/src/lib/components/wallet/TransactionItem.svelte index 91f54f07c..23a3d07dc 100644 --- a/packages/web-client/src/lib/components/wallet/TransactionItem.svelte +++ b/packages/web-client/src/lib/components/wallet/TransactionItem.svelte @@ -22,7 +22,7 @@ function getEventName() { $: deducted = item.type === 'Burn' || item.type === 'Stake' || item.type === 'Transfer' -$: eventName = getEventName() +$: eventName = item.type === 'Transfer' ? 'Transfer' : getEventName() $: timeDiff = getTimeDifference(Number(item.timestamp.secs_since_epoch) * 1000) const labels: Record<any, string> = { diff --git a/packages/web-client/src/lib/helpers/profile.ts b/packages/web-client/src/lib/helpers/profile.ts index f61ad9cbb..c8a62443c 100644 --- a/packages/web-client/src/lib/helpers/profile.ts +++ b/packages/web-client/src/lib/helpers/profile.ts @@ -503,21 +503,20 @@ function transformHistoryRecords( const history: TransactionHistory[] = [] res.forEach((o) => { - console.log({ o }) const event = o[1] - console.log({ event }) + const type = Object.keys(event)[0] as UnionKeyOf<TokenEvent> - console.log({ type }) - const subType = Object.keys(event[type].details)[0] as WalletEventType - console.log({ subType }) - const details = (event[type] as WalletEvent)?.[subType] as + + const subType = + (Object.keys(event?.[type]?.details || {})?.[0] as WalletEventType) || '' + const details = ((event[type] as WalletEvent) || {})?.[subType] as | WalletEventSubDetails | undefined - console.log({ details }) + const eventOutcome = Object.keys(details?.['event_outcome'] || {})[0] as | EventOutcome | undefined - console.log({ eventOutcome }) + history.push({ id: o[0], type,