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