From 0e8e763649560c29bd96ed867cb608d968b62e77 Mon Sep 17 00:00:00 2001 From: Enzo Vezzaro Date: Fri, 3 Jun 2022 09:43:29 -0400 Subject: [PATCH] change dummy address --- .storybook/__mockdata__/index.tsx | 6 ++++-- src/components/@shared/AssetList/index.stories.tsx | 4 ++-- src/components/@shared/AssetList/index.test.tsx | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.storybook/__mockdata__/index.tsx b/.storybook/__mockdata__/index.tsx index 8e0144812..da018a1e6 100644 --- a/.storybook/__mockdata__/index.tsx +++ b/.storybook/__mockdata__/index.tsx @@ -4,6 +4,8 @@ import { AssetExtended } from 'src/@types/AssetExtended' export const locale: string = 'en-US' +export const mockWallet: string = '0x02f28391AAECE3654F4ece783d777dde4300d5ef' // dummy account for stories + export const asset: Asset = { '@context': ['https://w3id.org/did/v1'], purgatory: { @@ -25,7 +27,7 @@ export const asset: Asset = { block: 10771807, contract: '0x58390B3527A3Ac42F92bF2A12a29fFBE832206bA', datetime: '2022-05-31T11:17:52', - from: '0x491AECC4b3d690a4D7027A385499fd04fE50b796', + from: mockWallet, tx: '0xa5abd03b5804918fe5e13145ab511e536da66b73fd8123fe2a6aff47ea2a221b' }, id: 'did:op:72468f062a26f9eb668b6392a0bbdeebd33f889b2c31e2c91768eba35a31cd94', @@ -46,7 +48,7 @@ export const asset: Asset = { address: '0x58390B3527A3Ac42F92bF2A12a29fFBE832206bA', created: '2022-05-30T13:52:09', name: 'Ocean Data NFT', - owner: '0x491AECC4b3d690a4D7027A385499fd04fE50b796', + owner: mockWallet, state: 0, symbol: 'OCEAN-NFT', tokenURI: diff --git a/src/components/@shared/AssetList/index.stories.tsx b/src/components/@shared/AssetList/index.stories.tsx index 0f86d545e..936c91e8e 100644 --- a/src/components/@shared/AssetList/index.stories.tsx +++ b/src/components/@shared/AssetList/index.stories.tsx @@ -2,7 +2,7 @@ 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 } from '../../../../.storybook/__mockdata__' +import { assets, locale, mockWallet } from '../../../../.storybook/__mockdata__' import UrqlClientProvider from '@context/UrqlProvider' export default { @@ -28,5 +28,5 @@ Default.args = { assets, showPagination: false, chainIds: config.chainIds, - accountId: '0x491AECC4b3d690a4D7027A385499fd04fE50b796' + accountId: mockWallet } diff --git a/src/components/@shared/AssetList/index.test.tsx b/src/components/@shared/AssetList/index.test.tsx index 352755674..1d90f0034 100644 --- a/src/components/@shared/AssetList/index.test.tsx +++ b/src/components/@shared/AssetList/index.test.tsx @@ -1,6 +1,6 @@ import React from 'react' import { act, render } from '@testing-library/react' -import { assets, locale } from '../../../../.storybook/__mockdata__' +import { assets, locale, mockWallet } from '../../../../.storybook/__mockdata__' import * as config from '../../../../app.config' import AssetList from './' import UrqlClientProvider from '@context/UrqlProvider' @@ -11,7 +11,7 @@ test('render AssetList with arc', async () => { assets, showPagination: false, chainIds: config.chainIds, - accountId: '0x491AECC4b3d690a4D7027A385499fd04fE50b796' + accountId: mockWallet } // TODO: remove eslint rule (testing-library/no-unnecessary-act) and solve act issue // eslint-disable-next-line testing-library/no-unnecessary-act