Skip to content

Commit 90612b0

Browse files
authored
Removed transfer direction indicator (#1415)
1 parent 6785db3 commit 90612b0

File tree

2 files changed

+5
-31
lines changed

2 files changed

+5
-31
lines changed

packages/app/features/activity/ActivityAvatar.tsx

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Avatar, LinkableAvatar, type LinkableAvatarProps, Spinner, XStack } from '@my/ui'
2-
import { ArrowDown, ArrowUp, Minus, Plus } from '@tamagui/lucide-icons'
2+
import { Minus, Plus } from '@tamagui/lucide-icons'
33
import { AvatarSendEarnDeposit } from 'app/components/avatars'
44
import { AvatarSendEarnWithdraw } from 'app/components/avatars/AvatarSendEarnWithdraw'
55
import { IconUpgrade } from 'app/components/icons'
@@ -57,9 +57,7 @@ export function ActivityAvatar({
5757
onPress={(e) => {
5858
e.stopPropagation()
5959
}}
60-
position={'relative'}
6160
>
62-
<TransferDirectionIndicator activity={activity} />
6361
<LinkableAvatar size="$4.5" br="$4" gap="$2" href={`/profile/${user.send_id}`} {...props}>
6462
{(() => {
6563
switch (true) {
@@ -189,25 +187,3 @@ const TradeActivityAvatar = ({ activity }: { activity: Activity }) => {
189187
</XStack>
190188
)
191189
}
192-
193-
const TransferDirectionIndicator = ({ activity }: { activity: Activity }) => {
194-
const { to_user } = activity
195-
196-
return (
197-
<XStack
198-
position={'absolute'}
199-
top={0}
200-
right={0}
201-
transform={'translate(30%, -30%)'}
202-
bc={'$olive'}
203-
borderRadius={999}
204-
shadowColor={'#000000'}
205-
shadowOffset={{ width: 0, height: 2 }}
206-
shadowOpacity={0.7}
207-
shadowRadius={8}
208-
zIndex={1}
209-
>
210-
{to_user?.id ? <ArrowDown size={'$1'} /> : <ArrowUp size={'$1'} />}
211-
</XStack>
212-
)
213-
}

packages/app/utils/activity.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,6 @@ export function eventNameFromActivity({
333333
return 'Send Earn Deposit'
334334
case isSendEarnWithdrawEvent(activity):
335335
return 'Send Earn Withdraw'
336-
case isTemporalTransfer:
337-
return note || ''
338336
case isERC20Transfer && isAddressEqual(data.f, sendtagCheckoutAddress[baseMainnet.id]):
339337
return 'Revenue Share'
340338
case isSendTokenUpgradeEvent(activity):
@@ -349,10 +347,10 @@ export function eventNameFromActivity({
349347
return 'Trade'
350348
}
351349
return 'Deposit'
352-
case isTransferOrReceive && !!to_user?.id:
353-
return note || ''
354-
case isTransferOrReceive && !!from_user?.id:
355-
return note || ''
350+
case (isTransferOrReceive || isTemporalTransfer) && !!to_user?.id:
351+
return note || 'Received'
352+
case (isTransferOrReceive || isTemporalTransfer) && !!from_user?.id:
353+
return note || 'Sent'
356354
case isTagReceiptsEvent(activity) || isTagReceiptUSDCEvent(activity):
357355
return 'Sendtag Registered'
358356
case isReferralsEvent(activity) && !!from_user?.id:

0 commit comments

Comments
 (0)