Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanfazakas committed Aug 30, 2023
1 parent bced42d commit 9f473b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/@shared/AssetTeaser/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('@shared/AssetTeaser', () => {
testRender(<AssetTeaser asset={asset} />)

it('renders no pricing schema available', () => {
asset.stats.price = null
asset.accessDetails.type = 'NOT_SUPPORTED'
render(<AssetTeaser asset={asset} />)
expect(screen.getByText('No pricing schema available')).toBeInTheDocument()
expect(screen.getByText('This is a test.')).toBeInTheDocument()
Expand Down
2 changes: 1 addition & 1 deletion src/components/@shared/AssetTeaser/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function AssetTeaser({
const accessType = isCompute ? 'compute' : 'access'
const { owner } = asset.nft
const { orders, allocated } = asset.stats
const price: AssetPrice = asset.stats.price.value
const price: AssetPrice = asset?.stats?.price?.value
? asset?.stats?.price
: {
value: Number(asset?.accessDetails?.price),
Expand Down

0 comments on commit 9f473b7

Please sign in to comment.