Skip to content

Commit

Permalink
fix(wallet): 0x Recipient Label on Transaction Confirmed Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglashdaniel committed Oct 16, 2024
1 parent b3602aa commit cfcd158
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,19 @@ export const TransactionIntent = (props: Props) => {
const transactionConfirmed =
transaction.txStatus === BraveWallet.TransactionStatus.Confirmed

// Currently we only get transaction.swapInfo.receiver info
// for lifi swaps. Core should also return this value
// for all other providers.
const swapOrBridgeRecipient =
transaction.swapInfo?.provider === 'lifi'
? transaction.swapInfo?.receiver ?? ''
: transaction.fromAddress ?? ''

const recipientLabel = getAddressLabel(
isERC20Approval
? txApprovalTarget
: isSwapOrBridge && transactionConfirmed
? transaction.swapInfo?.receiver ?? ''
? swapOrBridgeRecipient
: txToAddress,
accountInfosRegistry
)
Expand Down

0 comments on commit cfcd158

Please sign in to comment.