Skip to content

Commit

Permalink
chore: show switch button (DimensionDev#4436)
Browse files Browse the repository at this point in the history
* chore: show switch button

Since there's an nft airdrop card under matic tab

* chore: fix style

* chore: little fix
  • Loading branch information
zhouhanseng authored Sep 23, 2021
1 parent 59a6960 commit 4e73f8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ export function ClaimAllDialog(props: ClaimAllDialogProps) {
</div>
) : null}
{(swappedTokens && swappedTokens.length > 0) ||
(swappedTokensOld && swappedTokensOld.length > 0) ? (
(swappedTokensOld && swappedTokensOld.length > 0) ||
chainId === ChainId.Matic ? (
<div className={classes.actionButtonWrapper}>
<EthereumChainBoundary
chainId={chainId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ function ClaimItem(props: ClaimItemProps) {
</div>
<div>
<EthereumWalletConnectedBoundary
ableToSendTx={!unClaimable}
hideRiskWarningConfirmed={true}
classes={{
connectWallet: classNames(classes.actionButton, classes.connectWallet),
gasFeeButton: classNames(classes.actionButton, classes.connectWallet),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export interface EthereumWalletConnectedBoundaryProps
extends withClasses<'connectWallet' | 'unlockMetaMask' | 'gasFeeButton' | 'invalidButton'> {
offChain?: boolean
children?: React.ReactNode
ableToSendTx?: boolean
hideRiskWarningConfirmed?: boolean
}

export function EthereumWalletConnectedBoundary(props: EthereumWalletConnectedBoundaryProps) {
const { children = null, offChain = false, ableToSendTx = true } = props
const { children = null, offChain = false, hideRiskWarningConfirmed = false } = props

const { t } = useI18N()
const classes = useStylesExtends(useStyles(), props)
Expand Down Expand Up @@ -55,7 +55,7 @@ export function EthereumWalletConnectedBoundary(props: EthereumWalletConnectedBo
</Grid>
)

if (!isRiskWarningConfirmed && ableToSendTx)
if (!isRiskWarningConfirmed && !hideRiskWarningConfirmed)
return (
<Grid container>
<ActionButton
Expand Down

0 comments on commit 4e73f8a

Please sign in to comment.