mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
adding missing args
This commit is contained in:
parent
3a3feda675
commit
fa6534a4bb
@ -5,7 +5,8 @@ import AssetComputeList, {
|
||||
} from '@shared/AssetList/AssetComputeList'
|
||||
import {
|
||||
assetSelectionAsset,
|
||||
locale
|
||||
locale,
|
||||
prices
|
||||
} from '../../../../../.storybook/__mockdata__'
|
||||
|
||||
export default {
|
||||
@ -24,5 +25,7 @@ interface Props {
|
||||
export const Default: Props = Template.bind({})
|
||||
Default.args = {
|
||||
assets: assetSelectionAsset,
|
||||
locale: locale
|
||||
locale,
|
||||
currency: 'OCEAN',
|
||||
prices
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ export default function AssetListTitle({
|
||||
const [assetTitle, setAssetTitle] = useState<string>(title)
|
||||
|
||||
useEffect(() => {
|
||||
if (title || !appConfig || !appConfig.metadataCacheUri) return
|
||||
if (title || !appConfig?.metadataCacheUri) return
|
||||
if (asset) {
|
||||
setAssetTitle(asset.metadata.name)
|
||||
return
|
||||
|
@ -2,7 +2,12 @@ import React from 'react'
|
||||
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
||||
import AssetList, { AssetListProps } from '@shared/AssetList'
|
||||
import * as config from '../../../../app.config'
|
||||
import { assets, locale, mockWallet } from '../../../../.storybook/__mockdata__'
|
||||
import {
|
||||
assets,
|
||||
locale,
|
||||
mockWallet,
|
||||
prices
|
||||
} from '../../../../.storybook/__mockdata__'
|
||||
import UrqlClientProvider from '@context/UrqlProvider'
|
||||
|
||||
export default {
|
||||
@ -28,5 +33,7 @@ Default.args = {
|
||||
assets,
|
||||
showPagination: false,
|
||||
chainIds: config.chainIds,
|
||||
accountId: mockWallet
|
||||
accountId: mockWallet,
|
||||
currency: 'OCEAN',
|
||||
prices
|
||||
}
|
||||
|
@ -1,6 +1,11 @@
|
||||
import React from 'react'
|
||||
import { act, render } from '@testing-library/react'
|
||||
import { assets, locale, mockWallet } from '../../../../.storybook/__mockdata__'
|
||||
import {
|
||||
assets,
|
||||
locale,
|
||||
mockWallet,
|
||||
prices
|
||||
} from '../../../../.storybook/__mockdata__'
|
||||
import * as config from '../../../../app.config'
|
||||
import AssetList from './'
|
||||
import UrqlClientProvider from '@context/UrqlProvider'
|
||||
@ -11,7 +16,9 @@ test('render AssetList with arc', async () => {
|
||||
assets,
|
||||
showPagination: false,
|
||||
chainIds: config.chainIds,
|
||||
accountId: mockWallet
|
||||
accountId: mockWallet,
|
||||
currency: 'OCEAN',
|
||||
prices
|
||||
}
|
||||
// TODO: remove eslint rule (testing-library/no-unnecessary-act) and solve act issue
|
||||
// eslint-disable-next-line testing-library/no-unnecessary-act
|
||||
|
@ -3,7 +3,11 @@ import { ComponentStory, ComponentMeta } from '@storybook/react'
|
||||
import AssetSelection, {
|
||||
AssetSelectionProps
|
||||
} from '@shared/FormFields/AssetSelection'
|
||||
import { assetSelectionAsset } from '../../../../../.storybook/__mockdata__'
|
||||
import {
|
||||
assetSelectionAsset,
|
||||
locale,
|
||||
prices
|
||||
} from '../../../../../.storybook/__mockdata__'
|
||||
|
||||
export default {
|
||||
title: 'Component/@shared/FormFields/AssetSelection',
|
||||
@ -20,17 +24,26 @@ interface Props {
|
||||
|
||||
export const Default: Props = Template.bind({})
|
||||
Default.args = {
|
||||
assets: assetSelectionAsset
|
||||
assets: assetSelectionAsset,
|
||||
currency: 'OCEAN',
|
||||
locale,
|
||||
prices
|
||||
}
|
||||
|
||||
export const Multiple: Props = Template.bind({})
|
||||
Multiple.args = {
|
||||
assets: assetSelectionAsset,
|
||||
multiple: true
|
||||
multiple: true,
|
||||
currency: 'OCEAN',
|
||||
locale,
|
||||
prices
|
||||
}
|
||||
|
||||
export const Disabled: Props = Template.bind({})
|
||||
Disabled.args = {
|
||||
assets: assetSelectionAsset,
|
||||
disabled: true
|
||||
disabled: true,
|
||||
currency: 'OCEAN',
|
||||
locale,
|
||||
prices
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export default function MarketStats(): ReactElement {
|
||||
// Set the main chain ids we want to display stats for
|
||||
//
|
||||
useEffect(() => {
|
||||
if (!networksList || !appConfig || !appConfig?.chainIdsSupported) return
|
||||
if (!networksList || !appConfig?.chainIdsSupported) return
|
||||
|
||||
const mainChainIdsList = filterNetworksByType(
|
||||
'mainnet',
|
||||
|
Loading…
x
Reference in New Issue
Block a user