Skip to content

Commit

Permalink
fix: compare recipient address with no case sensitivity (#5208)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 authored Dec 16, 2024
1 parent fe8f376 commit fcc61ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
useHideReceiverWalletBanner,
useIsReceiverWalletBannerHidden,
} from 'common/state/receiverWalletBannerVisibility'
import { getIsCustomRecipient } from 'utils/orderUtils/getIsCustomRecipient'
import { getUiOrderType } from 'utils/orderUtils/getUiOrderType'

import { StatusDetails } from './StatusDetails'
Expand Down Expand Up @@ -298,7 +299,7 @@ export function ActivityDetails(props: {
outputToken = COW[chainId as SupportedChainId]
}

const isCustomRecipient = Boolean(order?.receiver && order.owner !== order.receiver)
const isCustomRecipient = !!order && getIsCustomRecipient(order)

return (
<>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Order } from 'legacy/state/orders/actions'

export function getIsCustomRecipient({ owner, receiver }: Pick<Order, 'owner' | 'receiver'>): boolean {
return Boolean(receiver && owner !== receiver)
return Boolean(receiver && owner.toLowerCase() !== receiver.toLowerCase())
}

0 comments on commit fcc61ee

Please sign in to comment.