Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wallet): Incorrect Recipient Label on Transaction Confirmed Screen (uplift to 1.72.x) #26010

Open
wants to merge 1 commit into
base: 1.72.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,19 @@ export const TransactionIntent = (props: Props) => {
.formatAsAsset(6, buyToken.symbol)
: ''

const transactionFailed =
transaction.txStatus === BraveWallet.TransactionStatus.Dropped ||
transaction.txStatus === BraveWallet.TransactionStatus.Error

const transactionConfirmed =
transaction.txStatus === BraveWallet.TransactionStatus.Confirmed

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

Expand Down Expand Up @@ -152,13 +163,6 @@ export const TransactionIntent = (props: Props) => {
}`
: formattedSendAmount

const transactionFailed =
transaction.txStatus === BraveWallet.TransactionStatus.Dropped ||
transaction.txStatus === BraveWallet.TransactionStatus.Error

const transactionConfirmed =
transaction.txStatus === BraveWallet.TransactionStatus.Confirmed

const firstDuringValue = React.useMemo(() => {
if (isERC20Approval) {
return formattedApprovalAmount
Expand Down
Loading