Skip to content

Commit

Permalink
Support copying to clipboard on addresses in non-EVM events
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Jul 5, 2023
1 parent 6e0f4df commit 29a04c6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/app/components/Transactions/LogEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,11 @@ const LogEvent: FC<{
<AccountLink
address={event.body.owner}
scope={scope}
plain={addressSwitchOption === AddressSwitchOption.ETH}
plain={addressSwitchOption !== AddressSwitchOption.Oasis}
/>
{addressSwitchOption === AddressSwitchOption.Oasis && (
<CopyToClipboard value={event.body.owner} />
)}
</dd>
<dt>{t('transactionEvent.fields.amount')}</dt>
<dd>
Expand All @@ -201,16 +204,20 @@ const LogEvent: FC<{
<AccountLink
address={event.body.from}
scope={scope}
plain={addressSwitchOption === AddressSwitchOption.ETH}
plain={addressSwitchOption !== AddressSwitchOption.Oasis}
/>
{addressSwitchOption === AddressSwitchOption.Oasis && (
<CopyToClipboard value={event.body.from} />
)}
</dd>
<dt>{t('common.to')}</dt>
<dd>
<AccountLink
address={event.body.to}
scope={scope}
plain={addressSwitchOption === AddressSwitchOption.ETH}
plain={addressSwitchOption !== AddressSwitchOption.Oasis}
/>
{addressSwitchOption === AddressSwitchOption.Oasis && <CopyToClipboard value={event.body.to} />}
</dd>
<dt>{t('transactionEvent.fields.amount')}</dt>
<dd>
Expand Down

0 comments on commit 29a04c6

Please sign in to comment.