1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Fix nft test state (#17981)

This commit is contained in:
Thomas Huang 2023-03-07 06:46:02 -08:00 committed by GitHub
parent bfbd65237e
commit 786a74dbbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 83 additions and 3 deletions

View File

@ -269,6 +269,86 @@
} }
}, },
"allNftContracts": { "allNftContracts": {
"0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc": {
"1": [
{
"address": "0xDc7382Eb0Bc9C352A4CbA23c909bDA01e0206414",
"description": null,
"name": "Munk Generator",
"logo": null,
"symbol": "MUNK",
"assetContractType": "non-fungible",
"createdDate": null,
"schemaName": "ERC721",
"externalLink": null
}
],
"137": [
{
"address": "0xDc7382Eb0Bc9C352A4CbA23c909bDA01e0206414",
"description": null,
"name": "Munk Generator",
"logo": null,
"symbol": "MUNK",
"assetContractType": "non-fungible",
"createdDate": null,
"schemaName": "ERC721",
"externalLink": null
}
],
"11155111": [
{
"address": "0xDc7382Eb0Bc9C352A4CbA23c909bDA01e0206414",
"description": null,
"name": "Munk Generator",
"logo": null,
"symbol": "MUNK",
"assetContractType": "non-fungible",
"createdDate": null,
"schemaName": "ERC721",
"externalLink": null
}
],
"5": [
{
"address": "0xDc7382Eb0Bc9C352A4CbA23c909bDA01e0206414",
"description": null,
"name": "Munk Generator",
"logo": null,
"symbol": "MUNK",
"assetContractType": "non-fungible",
"createdDate": null,
"schemaName": "ERC721",
"externalLink": null
},
{
"address": "0x495f947276749Ce646f68AC8c248420045cb7b5e",
"description": null,
"name": "Punk Generator",
"logo": null,
"symbol": "PUNK",
"assetContractType": "non-fungible",
"createdDate": null,
"schemaName": "ERC1155",
"externalLink": null
}
],
"153": [
{
"address": "0xDc7382Eb0Bc9C352A4CbA23c909bDA01e0206414",
"description": null,
"name": "Munk Generator",
"logo": null,
"symbol": "MUNK",
"assetContractType": "non-fungible",
"createdDate": null,
"schemaName": "ERC721",
"externalLink": null
}
]
}
},
"allNfts": {
"0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc": { "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc": {
"1": [ "1": [
{ {

View File

@ -20,7 +20,7 @@ exports[`NFT Details should match minimal props and state snapshot 1`] = `
<span <span
class="asset-breadcrumb__asset" class="asset-breadcrumb__asset"
> >
MUNK #1 Munk Generator
</span> </span>
</button> </button>
<div> <div>

View File

@ -43,7 +43,7 @@ describe('NFT Details', () => {
const mockStore = configureMockStore([thunk])(mockState); const mockStore = configureMockStore([thunk])(mockState);
const nfts = const nfts =
mockState.metamask.allNftContracts[mockState.metamask.selectedAddress][5]; mockState.metamask.allNfts[mockState.metamask.selectedAddress][5];
const props = { const props = {
nft: nfts[5], nft: nfts[5],

View File

@ -24,7 +24,7 @@ jest.mock('../../../store/actions.ts', () => ({
describe('NFTs Item Component', () => { describe('NFTs Item Component', () => {
const nfts = const nfts =
mockState.metamask.allNftContracts[mockState.metamask.selectedAddress][5]; mockState.metamask.allNfts[mockState.metamask.selectedAddress][5];
const props = { const props = {
collections: { collections: {
'0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc': { '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc': {