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

do not show account mismatch alert on details #8678

Merged
merged 1 commit into from
May 28, 2020
Merged
Show file tree
Hide file tree
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 @@ -216,6 +216,7 @@ export default class TransactionListItemDetails extends PureComponent {
<div className="transaction-list-item-details__body">
<div className="transaction-list-item-details__sender-to-recipient-container">
<SenderToRecipient
warnUserOnAccountMismatch={false}
variant={FLAT_VARIANT}
addressOnly
recipientEns={recipientEns}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function SenderAddress ({
senderName,
onSenderClick,
senderAddress,
warnUserOnAccountMismatch,
}) {
const t = useI18nContext()
const [addressCopied, setAddressCopied] = useState(false)
Expand Down Expand Up @@ -70,7 +71,7 @@ function SenderAddress ({
}
</div>
</Tooltip>
<AccountMismatchWarning address={senderAddress} />
{warnUserOnAccountMismatch && <AccountMismatchWarning address={senderAddress} />}
</div>
)
}
Expand All @@ -81,6 +82,7 @@ SenderAddress.propTypes = {
addressOnly: PropTypes.bool,
senderAddress: PropTypes.string,
onSenderClick: PropTypes.func,
warnUserOnAccountMismatch: PropTypes.bool,
}

function RecipientWithAddress ({
Expand Down Expand Up @@ -197,7 +199,8 @@ export default function SenderToRecipient ({
onRecipientClick,
onSenderClick,
recipientAddress,
variant = DEFAULT_VARIANT,
variant,
warnUserOnAccountMismatch,
}) {
const t = useI18nContext()
const checksummedSenderAddress = checksumAddress(senderAddress)
Expand All @@ -211,6 +214,7 @@ export default function SenderToRecipient ({
senderName={senderName}
onSenderClick={onSenderClick}
senderAddress={senderAddress}
warnUserOnAccountMismatch={warnUserOnAccountMismatch}
/>
<Arrow variant={variant} />
{recipientAddress
Expand Down Expand Up @@ -238,6 +242,11 @@ export default function SenderToRecipient ({
)
}

SenderToRecipient.defaultProps = {
variant: DEFAULT_VARIANT,
warnUserOnAccountMismatch: true,
}

SenderToRecipient.propTypes = {
senderName: PropTypes.string,
senderAddress: PropTypes.string,
Expand All @@ -250,4 +259,5 @@ SenderToRecipient.propTypes = {
assetImage: PropTypes.string,
onRecipientClick: PropTypes.func,
onSenderClick: PropTypes.func,
warnUserOnAccountMismatch: PropTypes.bool,
}