@@ -315,9 +315,9 @@ export default class ConfirmApproveContent extends Component {
? t('functionSetApprovalForAll')
: t('functionApprove')}
- {isSetApproveForAll && setApproveForAllArg !== undefined ? (
+ {isSetApproveForAll && isApprovalOrRejection !== undefined ? (
- {`${t('parameters')}: ${setApproveForAllArg}`}
+ {`${t('parameters')}: ${isApprovalOrRejection}`}
) : null}
@@ -531,14 +531,14 @@ export default class ConfirmApproveContent extends Component {
renderTitle() {
const { t } = this.context;
- const { isSetApproveForAll, setApproveForAllArg } = this.props;
+ const { isSetApproveForAll, isApprovalOrRejection } = this.props;
const titleTokenDescription = this.getTitleTokenDescription();
let title;
if (isSetApproveForAll) {
title = t('approveAllTokensTitle', [titleTokenDescription]);
- if (setApproveForAllArg === false) {
+ if (isApprovalOrRejection === false) {
title = t('revokeAllTokensTitle', [titleTokenDescription]);
}
}
@@ -547,14 +547,15 @@ export default class ConfirmApproveContent extends Component {
renderDescription() {
const { t } = this.context;
- const { isContract, isSetApproveForAll, setApproveForAllArg } = this.props;
+ const { isContract, isSetApproveForAll, isApprovalOrRejection } =
+ this.props;
const grantee = isContract
? t('contract').toLowerCase()
: t('account').toLowerCase();
let description = t('trustSiteApprovePermission', [grantee]);
- if (isSetApproveForAll && setApproveForAllArg === false) {
+ if (isSetApproveForAll && isApprovalOrRejection === false) {
description = t('revokeApproveForAllDescription', [
grantee,
this.getTitleTokenDescription(),
diff --git a/ui/pages/confirm-approve/confirm-approve.js b/ui/pages/confirm-approve/confirm-approve.js
index d785d473d..5af747801 100644
--- a/ui/pages/confirm-approve/confirm-approve.js
+++ b/ui/pages/confirm-approve/confirm-approve.js
@@ -155,7 +155,7 @@ export default function ConfirmApprove({
const parsedTransactionData =
parseStandardTokenTransactionData(transactionData);
- const setApproveForAllArg = getTokenApprovedParam(parsedTransactionData);
+ const isApprovalOrRejection = getTokenApprovedParam(parsedTransactionData);
return tokenSymbol === undefined && assetName === undefined ? (
@@ -170,13 +170,13 @@ export default function ConfirmApprove({
customTokenAmount={String(customPermissionAmount)}
dappProposedTokenAmount={tokenAmount}
currentTokenBalance={tokenBalance}
- setApproveForAllArg={setApproveForAllArg}
+ isApprovalOrRejection={isApprovalOrRejection}
contentComponent={