mirror of
https://github.com/RabbyHub/Rabby.git
synced 2026-04-17 03:01:32 -04:00
fix: compatible with transactions that lack verifyContract (#2936)
This commit is contained in:
@@ -98,6 +98,8 @@ const CrossSwapToken = ({
|
||||
});
|
||||
};
|
||||
|
||||
const hasRequiredData = requireData && Object.keys(requireData).length > 0;
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
<Table>
|
||||
@@ -235,65 +237,69 @@ const CrossSwapToken = ({
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="cross-swap-token-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
{hasRequiredData && (
|
||||
<>
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="cross-swap-token-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="cross-swap-token-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.interacted')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Boolean value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="cross-swap-token-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.interacted')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Boolean value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
|
||||
<SecurityListItem
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</SubTable>
|
||||
<SecurityListItem
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
</Table>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
@@ -99,6 +99,7 @@ const Swap = ({
|
||||
ignored: processedRules.includes(id),
|
||||
});
|
||||
};
|
||||
const hasRequiredData = requireData && Object.keys(requireData).length > 0;
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
@@ -236,59 +237,63 @@ const Swap = ({
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="cross-token-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
{hasRequiredData && (
|
||||
<>
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="cross-token-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="cross-token-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="cross-token-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
|
||||
<SecurityListItem
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</SubTable>
|
||||
<SecurityListItem
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
</Table>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
@@ -94,6 +94,8 @@ const MultiSwap = ({
|
||||
return !isSameAddress(actionData.receiver || '', sender);
|
||||
}, [actionData, sender]);
|
||||
|
||||
const hasRequiredData = requireData && Object.keys(requireData).length > 0;
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
<Table>
|
||||
@@ -162,57 +164,61 @@ const MultiSwap = ({
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
...requireData,
|
||||
address: requireData.id,
|
||||
chain,
|
||||
title: t('page.signTypedData.buyNFT.listOn'),
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="multi-swap-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
{hasRequiredData && (
|
||||
<>
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
...requireData,
|
||||
address: requireData.id,
|
||||
chain,
|
||||
title: t('page.signTypedData.buyNFT.listOn'),
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="multi-swap-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="multi-swap-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.interacted')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Boolean value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="multi-swap-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.interacted')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Boolean value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</SubTable>
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
</Table>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
@@ -101,6 +101,7 @@ const Swap = ({
|
||||
ignored: processedRules.includes(id),
|
||||
});
|
||||
};
|
||||
const hasRequiredData = requireData && Object.keys(requireData).length > 0;
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
@@ -295,63 +296,67 @@ const Swap = ({
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="swap-contract"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
{hasRequiredData && (
|
||||
<>
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="swap-contract"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="swap-contract">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.hasInteraction')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Interacted value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
<SecurityListItem
|
||||
title={t('page.signTx.myMark')}
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="swap-contract">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.hasInteraction')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Interacted value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
<SecurityListItem
|
||||
title={t('page.signTx.myMark')}
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
/>
|
||||
<SecurityListItem
|
||||
title={t('page.signTx.myMark')}
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
/>
|
||||
</SubTable>
|
||||
<SecurityListItem
|
||||
title={t('page.signTx.myMark')}
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
/>
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
</Table>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
@@ -94,6 +94,7 @@ const SwapLimitPay = ({
|
||||
const hasReceiver = useMemo(() => {
|
||||
return !isSameAddress(actionData.receiver || '', sender);
|
||||
}, [actionData, sender]);
|
||||
const hasRequiredData = requireData && Object.keys(requireData).length > 0;
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
@@ -153,57 +154,61 @@ const SwapLimitPay = ({
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
...requireData,
|
||||
address: requireData.id,
|
||||
chain,
|
||||
title: t('page.signTypedData.buyNFT.listOn'),
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="swap-limit-pay-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
{hasRequiredData && (
|
||||
<>
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
...requireData,
|
||||
address: requireData.id,
|
||||
chain,
|
||||
title: t('page.signTypedData.buyNFT.listOn'),
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="swap-limit-pay-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="swap-limit-pay-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.hasInteraction')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Interacted value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="swap-limit-pay-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.hasInteraction')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Interacted value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</SubTable>
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
</Table>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
@@ -94,6 +94,8 @@ const UnWrapToken = ({
|
||||
return !isSameAddress(receiver, requireData.sender);
|
||||
}, [requireData, receiver]);
|
||||
|
||||
const hasRequiredData = requireData && Object.keys(requireData).length > 0;
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
<Table>
|
||||
@@ -175,65 +177,69 @@ const UnWrapToken = ({
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="unwrap-token-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
{hasRequiredData && (
|
||||
<>
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="unwrap-token-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="unwrap-token-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.hasInteraction')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Interacted value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="unwrap-token-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.hasInteraction')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Interacted value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
|
||||
<SecurityListItem
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</SubTable>
|
||||
<SecurityListItem
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
title={t('page.signTx.myMark')}
|
||||
/>
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
</Table>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
@@ -92,6 +92,7 @@ const WrapToken = ({
|
||||
ignored: processedRules.includes(id),
|
||||
});
|
||||
};
|
||||
const hasRequiredData = requireData && Object.keys(requireData).length > 0;
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
@@ -175,66 +176,70 @@ const WrapToken = ({
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="wrap-token-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
{hasRequiredData && (
|
||||
<>
|
||||
<Col>
|
||||
<Row isTitle itemsCenter>
|
||||
{t('page.signTx.interactContract')}
|
||||
</Row>
|
||||
<Row>
|
||||
<ViewMore
|
||||
type="contract"
|
||||
data={{
|
||||
bornAt: requireData.bornAt,
|
||||
protocol: requireData.protocol,
|
||||
rank: requireData.rank,
|
||||
address: requireData.id,
|
||||
hasInteraction: requireData.hasInteraction,
|
||||
chain,
|
||||
}}
|
||||
>
|
||||
<Values.Address
|
||||
id="wrap-token-address"
|
||||
hasHover
|
||||
address={requireData.id}
|
||||
chain={chain}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="wrap-token-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.hasInteraction')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Interacted value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
title={t('page.signTx.myMark')}
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
/>
|
||||
</ViewMore>
|
||||
</Row>
|
||||
</Col>
|
||||
<SubTable target="wrap-token-address">
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.protocol')}</SubRow>
|
||||
<SubRow>
|
||||
<ProtocolListItem protocol={requireData.protocol} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.hasInteraction')}</SubRow>
|
||||
<SubRow>
|
||||
<Values.Interacted value={requireData.hasInteraction} />
|
||||
</SubRow>
|
||||
</SubCol>
|
||||
|
||||
{isInWhitelist && (
|
||||
<SubCol>
|
||||
<SubRow isTitle>{t('page.signTx.myMark')}</SubRow>
|
||||
<SubRow>{t('page.signTx.trusted')}</SubRow>
|
||||
</SubCol>
|
||||
)}
|
||||
|
||||
<SecurityListItem
|
||||
title={t('page.signTx.myMark')}
|
||||
id="1135"
|
||||
engineResult={engineResultMap['1135']}
|
||||
forbiddenText={t('page.signTx.markAsBlock')}
|
||||
/>
|
||||
|
||||
<SecurityListItem
|
||||
title={t('page.signTx.myMark')}
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
/>
|
||||
</SubTable>
|
||||
<SecurityListItem
|
||||
title={t('page.signTx.myMark')}
|
||||
id="1137"
|
||||
engineResult={engineResultMap['1137']}
|
||||
warningText={t('page.signTx.markAsBlock')}
|
||||
/>
|
||||
</SubTable>
|
||||
</>
|
||||
)}
|
||||
</Table>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
@@ -53,7 +53,7 @@ export const BalanceChangeWrapper: React.FC<Props> = ({
|
||||
return false;
|
||||
}, [data]);
|
||||
|
||||
return notShowBalanceChange ? null : (
|
||||
return notShowBalanceChange || !balanceChange ? null : (
|
||||
<>
|
||||
<Divide />
|
||||
<BalanceChange version={preExecVersion} data={balanceChange} />
|
||||
|
||||
Reference in New Issue
Block a user