Skip to content

Commit

Permalink
linter fix
Browse files Browse the repository at this point in the history
Signed-off-by: Akintayo A. Olusegun <[email protected]>
  • Loading branch information
segun committed Jan 24, 2023
1 parent 1067705 commit 90dee4d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 48 deletions.
10 changes: 5 additions & 5 deletions shared/constants/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ import { capitalize } from 'lodash';
* A type representing any valid value for 'type' for setProviderType and other
* methods that add or manipulate networks in MetaMask state.
*/
export type NetworkType = (typeof NETWORK_TYPES)[keyof typeof NETWORK_TYPES];
export type NetworkType = typeof NETWORK_TYPES[keyof typeof NETWORK_TYPES];

/**
* A union type of all possible hard-coded chain ids. This type is not
* exhaustive and cannot be used for typing chainId in areas where the user or
* dapp may specify any chainId.
*/
export type ChainId = (typeof CHAIN_IDS)[keyof typeof CHAIN_IDS];
export type ChainId = typeof CHAIN_IDS[keyof typeof CHAIN_IDS];

/**
* A type that is a union type of all possible hardcoded currency symbols.
* This type is non-exhaustive, and cannot be used for areas where the user
* or dapp may supply their own symbol.
*/
type CurrencySymbol = (typeof CURRENCY_SYMBOLS)[keyof typeof CURRENCY_SYMBOLS];
type CurrencySymbol = typeof CURRENCY_SYMBOLS[keyof typeof CURRENCY_SYMBOLS];
/**
* A type that is a union type for the supported symbols on different onramp providers.
*/
type SupportedCurrencySymbol =
(typeof SUPPORTED_CURRENCY_SYMBOLS)[keyof typeof SUPPORTED_CURRENCY_SYMBOLS];
typeof SUPPORTED_CURRENCY_SYMBOLS[keyof typeof SUPPORTED_CURRENCY_SYMBOLS];
/**
* Test networks have special symbols that combine the network name and 'ETH'
* so that they are distinct from mainnet and other networks that use 'ETH'.
*/
export type TestNetworkCurrencySymbol =
(typeof TEST_NETWORK_TICKER_MAP)[keyof typeof TEST_NETWORK_TICKER_MAP];
typeof TEST_NETWORK_TICKER_MAP[keyof typeof TEST_NETWORK_TICKER_MAP];

/**
* MoonPay is a fiat onramp provider, and there are some special strings that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,54 +259,52 @@ export default class ConfirmPageContainer extends Component {
isBuyableChain={isBuyableChain}
/>
)}
{shouldDisplayWarning &&
errorKey === INSUFFICIENT_FUNDS_ERROR_KEY && (
<div className="confirm-approve-content__warning">
<ActionableMessage
message={
isBuyableChain ? (
<Typography variant={TYPOGRAPHY.H7} align="left">
{t('insufficientCurrencyBuyOrDeposit', [
nativeCurrency,
networkName,
<Button
type="inline"
className="confirm-page-container-content__link"
onClick={() =>
this.setState({ setShowDepositPopover: true })
}
key={`${nativeCurrency}-buy-button`}
>
{t('buyAsset', [nativeCurrency])}
</Button>,
])}
</Typography>
) : (
<Typography variant={TYPOGRAPHY.H7} align="left">
{t('insufficientCurrencyDeposit', [
nativeCurrency,
networkName,
])}
</Typography>
)
}
useIcon
iconFillColor="var(--color-error-default)"
type="danger"
/>
</div>
)}
{shouldDisplayWarning && errorKey === INSUFFICIENT_FUNDS_ERROR_KEY && (
<div className="confirm-approve-content__warning">
<ActionableMessage
message={
isBuyableChain ? (
<Typography variant={TYPOGRAPHY.H7} align="left">
{t('insufficientCurrencyBuyOrDeposit', [
nativeCurrency,
networkName,
<Button
type="inline"
className="confirm-page-container-content__link"
onClick={() =>
this.setState({ setShowDepositPopover: true })
}
key={`${nativeCurrency}-buy-button`}
>
{t('buyAsset', [nativeCurrency])}
</Button>,
])}
</Typography>
) : (
<Typography variant={TYPOGRAPHY.H7} align="left">
{t('insufficientCurrencyDeposit', [
nativeCurrency,
networkName,
])}
</Typography>
)
}
useIcon
iconFillColor="var(--color-error-default)"
type="danger"
/>
</div>
)}
{setShowDepositPopover && (
<DepositPopover
onClose={() => this.setState({ setShowDepositPopover: false })}
/>
)}
{shouldDisplayWarning &&
errorKey !== INSUFFICIENT_FUNDS_ERROR_KEY && (
<div className="confirm-approve-content__warning">
<ErrorMessage errorKey={errorKey} />
</div>
)}
{shouldDisplayWarning && errorKey !== INSUFFICIENT_FUNDS_ERROR_KEY && (
<div className="confirm-approve-content__warning">
<ErrorMessage errorKey={errorKey} />
</div>
)}
{showWarningModal && (
<SetApproveForAllWarning
collectionName={title}
Expand Down

0 comments on commit 90dee4d

Please sign in to comment.