From 14db10f287177637c83a77179cc91373aea12085 Mon Sep 17 00:00:00 2001 From: Melisa Anabella Rossi Date: Thu, 11 Apr 2024 15:10:56 -0300 Subject: [PATCH 1/2] feat: use amoy instead of mumbai --- webapp/package-lock.json | 8 +++---- webapp/package.json | 2 +- .../components/AssetCard/AssetCard.spec.tsx | 2 +- .../Modals/BuyWithCryptoModal/utils.ts | 4 ++-- .../SuccessPage/SuccessPage.container.ts | 2 +- webapp/src/modules/contract/reducer.spec.ts | 4 ++-- webapp/src/modules/contract/sagas.spec.ts | 16 +++++++------- webapp/src/modules/contract/utils.spec.ts | 22 +++++++++---------- webapp/src/modules/nft/sagas.spec.ts | 2 +- .../modules/vendor/decentraland/contracts.ts | 18 +++++++-------- .../vendor/decentraland/marketplace/api.ts | 2 +- 11 files changed, 41 insertions(+), 41 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 3fa5a5c313..530f1da276 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -28,7 +28,7 @@ "decentraland-connect": "^6.3.1", "decentraland-crypto-fetch": "^1.0.3", "decentraland-dapps": "^19.5.2", - "decentraland-transactions": "^2.3.2", + "decentraland-transactions": "^2.5.0", "decentraland-ui": "^5.17.1", "ethers": "^5.6.8", "graphql": "^14.7.0", @@ -9377,9 +9377,9 @@ } }, "node_modules/decentraland-transactions": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-2.3.2.tgz", - "integrity": "sha512-VsYCQaJLO1tGcB94wW9yZcHCoAyznpV7gzK4bRQzSs9+oMC+MUhppNKpO8KZMHtYU/vvb88kDh9PDBbjb7RiAw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-2.5.0.tgz", + "integrity": "sha512-CL7///qK+YJ3Z0XPPGnj/gfi64EKttYkG42hamVdrTAOg57B7IGlL4zWgmXECW1oS8C9i+WEfiwB0ov2y0zGFg==", "dependencies": { "@0xsquid/sdk": "^2.8.9", "@0xsquid/squid-types": "^0.1.51", diff --git a/webapp/package.json b/webapp/package.json index b52b82cdfd..8a4f0ee1a2 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -23,7 +23,7 @@ "decentraland-connect": "^6.3.1", "decentraland-crypto-fetch": "^1.0.3", "decentraland-dapps": "^19.5.2", - "decentraland-transactions": "^2.3.2", + "decentraland-transactions": "^2.5.0", "decentraland-ui": "^5.17.1", "ethers": "^5.6.8", "graphql": "^14.7.0", diff --git a/webapp/src/components/AssetCard/AssetCard.spec.tsx b/webapp/src/components/AssetCard/AssetCard.spec.tsx index db31c44097..4c01d4ed97 100644 --- a/webapp/src/components/AssetCard/AssetCard.spec.tsx +++ b/webapp/src/components/AssetCard/AssetCard.spec.tsx @@ -69,7 +69,7 @@ describe('AssetCard', () => { } as Asset['data']['wearable'] }, network: Network.MATIC, - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, firstListedAt: null } }) diff --git a/webapp/src/components/Modals/BuyWithCryptoModal/utils.ts b/webapp/src/components/Modals/BuyWithCryptoModal/utils.ts index 5b9285aae5..6ec655fc89 100644 --- a/webapp/src/components/Modals/BuyWithCryptoModal/utils.ts +++ b/webapp/src/components/Modals/BuyWithCryptoModal/utils.ts @@ -156,8 +156,8 @@ export const DEFAULT_CHAINS = [ export const TESTNET_DEFAULT_CHAINS = [ { - chainId: ChainId.MATIC_MUMBAI.toString(), - networkName: 'Polygon Mumbai', + chainId: ChainId.MATIC_AMOY.toString(), + networkName: 'Polygon Amoy', nativeCurrency: { name: 'MATIC', symbol: 'MATIC', diff --git a/webapp/src/components/SuccessPage/SuccessPage.container.ts b/webapp/src/components/SuccessPage/SuccessPage.container.ts index 09202e2df6..342b85596b 100644 --- a/webapp/src/components/SuccessPage/SuccessPage.container.ts +++ b/webapp/src/components/SuccessPage/SuccessPage.container.ts @@ -19,7 +19,7 @@ const mapState = (state: RootState): MapStateProps => { const isLoadingTx = Boolean(transaction && transaction.status !== TransactionStatus.CONFIRMED) return { isLoading: isLoadingTx, - mintedTokenId: getTokenIdFromLogs(ChainId.MATIC_MUMBAI, transaction?.receipt?.logs), + mintedTokenId: getTokenIdFromLogs(ChainId.MATIC_AMOY, transaction?.receipt?.logs), profile: address ? getProfileOfAddress(state, address) : undefined } } diff --git a/webapp/src/modules/contract/reducer.spec.ts b/webapp/src/modules/contract/reducer.spec.ts index 57eb0ed763..a371a2f1b2 100644 --- a/webapp/src/modules/contract/reducer.spec.ts +++ b/webapp/src/modules/contract/reducer.spec.ts @@ -67,7 +67,7 @@ describe('when upsert contracts action is received', () => { const contract = { address: 'address', name: 'some name', - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY } as Contract const newContract = { @@ -93,7 +93,7 @@ describe('when upsert contracts action is received', () => { it('should insert it into the store', () => { const newContract = { address: 'address', - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, name: 'some other name' } as Contract diff --git a/webapp/src/modules/contract/sagas.spec.ts b/webapp/src/modules/contract/sagas.spec.ts index b5b5590af4..e70f3517c1 100644 --- a/webapp/src/modules/contract/sagas.spec.ts +++ b/webapp/src/modules/contract/sagas.spec.ts @@ -54,7 +54,7 @@ describe('when handling the fetch contracts request', () => { const marketplaceMatic: Contract = { address: 'marketplaceMaticAddress', category: null, - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, name: contractNames.MARKETPLACE, network: Network.MATIC, vendor: VendorName.DECENTRALAND @@ -81,7 +81,7 @@ describe('when handling the fetch contracts request', () => { const bidsMatic: Contract = { address: 'bidsEthereumAddress', category: null, - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, name: contractNames.BIDS, network: Network.MATIC, vendor: VendorName.DECENTRALAND @@ -99,7 +99,7 @@ describe('when handling the fetch contracts request', () => { const manaMatic: Contract = { address: 'manaMaticAddress', category: null, - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, name: contractNames.MANA, network: Network.MATIC, vendor: VendorName.DECENTRALAND @@ -108,7 +108,7 @@ describe('when handling the fetch contracts request', () => { const collectionStore: Contract = { address: 'collectionStoreAddress', category: null, - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, name: contractNames.COLLECTION_STORE, network: Network.MATIC, vendor: VendorName.DECENTRALAND @@ -221,7 +221,7 @@ describe('when handling the fetch contracts request', () => { authorizedAddress: marketplaceMatic.address, contractAddress: manaMatic.address, contractName: ContractName.MANAToken, - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, type: AuthorizationType.ALLOWANCE }, { @@ -229,7 +229,7 @@ describe('when handling the fetch contracts request', () => { authorizedAddress: legacyMarketplace.address, contractAddress: manaMatic.address, contractName: ContractName.MANAToken, - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, type: AuthorizationType.ALLOWANCE }, { @@ -245,7 +245,7 @@ describe('when handling the fetch contracts request', () => { authorizedAddress: bidsEthereum.address, contractAddress: manaMatic.address, contractName: ContractName.MANAToken, - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, type: AuthorizationType.ALLOWANCE }, { @@ -253,7 +253,7 @@ describe('when handling the fetch contracts request', () => { authorizedAddress: collectionStore.address, contractAddress: manaMatic.address, contractName: ContractName.MANAToken, - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, type: AuthorizationType.ALLOWANCE } ]) diff --git a/webapp/src/modules/contract/utils.spec.ts b/webapp/src/modules/contract/utils.spec.ts index b77d85b9fd..28894241e0 100644 --- a/webapp/src/modules/contract/utils.spec.ts +++ b/webapp/src/modules/contract/utils.spec.ts @@ -38,7 +38,7 @@ describe('when calling upsertContracts', () => { describe('and newContracts has a contract', () => { describe('and that contract has an upper cased address', () => { beforeEach(() => { - newContracts = [{ address: 'ADDRESS', chainId: ChainId.MATIC_MUMBAI } as Contract] + newContracts = [{ address: 'ADDRESS', chainId: ChainId.MATIC_AMOY } as Contract] }) it('should return an array with the new contract with its address lower cased', () => { @@ -58,7 +58,7 @@ describe('when calling upsertContracts', () => { storedContracts = [ { address: 'address', - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, name: 'name' } as Contract ] @@ -79,7 +79,7 @@ describe('when calling upsertContracts', () => { newContracts = [ { address: 'ADDRESS', - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, name: 'name' } as Contract ] @@ -95,7 +95,7 @@ describe('when calling upsertContracts', () => { newContracts = [ { address: 'other address', - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, name: 'name' } as Contract ] @@ -127,7 +127,7 @@ describe('when calling upsertContracts', () => { newContracts = [ { address: 'ADDRESS', - chainId: ChainId.MATIC_MUMBAI, + chainId: ChainId.MATIC_AMOY, name: 'different name' } as Contract ] @@ -145,9 +145,9 @@ describe('when calling getContractKey', () => { expect( getContractKey({ address: 'address', - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY } as Contract) - ).toEqual('address-80001') + ).toEqual('address-80002') }) }) @@ -156,9 +156,9 @@ describe('when calling getContractKeyFromNFT', () => { expect( getContractKeyFromNFT({ contractAddress: 'address', - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY } as NFT) - ).toEqual('address-80001') + ).toEqual('address-80002') }) }) @@ -169,9 +169,9 @@ describe('when calling getAuthorizationKey', () => { address: 'address', authorizedAddress: 'authorizedAddress', contractAddress: 'contractAddress', - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY } as Authorization) - ).toEqual('address-authorizedAddress-contractAddress-80001') + ).toEqual('address-authorizedAddress-contractAddress-80002') }) }) diff --git a/webapp/src/modules/nft/sagas.spec.ts b/webapp/src/modules/nft/sagas.spec.ts index ddfb9b8b64..d89c20efd0 100644 --- a/webapp/src/modules/nft/sagas.spec.ts +++ b/webapp/src/modules/nft/sagas.spec.ts @@ -117,7 +117,7 @@ describe('when handling the fetch NFTs request action', () => { { id: 'anID', contractAddress: 'aContractAddress', - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY } ] as NFT[] const accounts = [{ address: 'someAddress' }] as Account[] diff --git a/webapp/src/modules/vendor/decentraland/contracts.ts b/webapp/src/modules/vendor/decentraland/contracts.ts index e5b186b0f0..09b812dc04 100644 --- a/webapp/src/modules/vendor/decentraland/contracts.ts +++ b/webapp/src/modules/vendor/decentraland/contracts.ts @@ -484,20 +484,20 @@ const localContracts = { }, { name: ContractName.MANA, - address: getContract(CN.MANAToken, ChainId.MATIC_MUMBAI).address, + address: getContract(CN.MANAToken, ChainId.MATIC_AMOY).address, vendor: 'decentraland', category: null, network: Network.MATIC, - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY }, { name: ContractName.MARKETPLACE, - address: getContract(CN.MarketplaceV2, ChainId.MATIC_MUMBAI).address, + address: getContract(CN.MarketplaceV2, ChainId.MATIC_AMOY).address, label: 'MarketplaceV2', vendor: 'decentraland', category: null, network: Network.MATIC, - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY }, { name: ContractName.LEGACY_MARKETPLACE, @@ -506,23 +506,23 @@ const localContracts = { vendor: 'decentraland', category: null, network: Network.MATIC, - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY }, { name: CN.CollectionStore, - address: getContract(CN.CollectionStore, ChainId.MATIC_MUMBAI).address, + address: getContract(CN.CollectionStore, ChainId.MATIC_AMOY).address, vendor: 'decentraland', category: null, network: Network.MATIC, - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY }, { name: ContractName.BIDS, - address: getContract(CN.BidV2, ChainId.MATIC_MUMBAI).address, + address: getContract(CN.BidV2, ChainId.MATIC_AMOY).address, vendor: 'decentraland', category: null, network: Network.MATIC, - chainId: ChainId.MATIC_MUMBAI + chainId: ChainId.MATIC_AMOY } ], [AppNetwork.GOERLI]: [ diff --git a/webapp/src/modules/vendor/decentraland/marketplace/api.ts b/webapp/src/modules/vendor/decentraland/marketplace/api.ts index 8d25f4a911..20a970853a 100644 --- a/webapp/src/modules/vendor/decentraland/marketplace/api.ts +++ b/webapp/src/modules/vendor/decentraland/marketplace/api.ts @@ -12,7 +12,7 @@ export class MarketplaceAPI extends BaseAPI { [ChainId.ETHEREUM_MAINNET]: 'eth-mainnet', [ChainId.ETHEREUM_SEPOLIA]: 'eth-sepolia', [ChainId.MATIC_MAINNET]: 'matic-mainnet', - [ChainId.MATIC_MUMBAI]: 'matic-mumbai', + [ChainId.MATIC_AMOY]: 'matic-amoy', [ChainId.BSC_MAINNET]: 'bsc-mainnet', [ChainId.AVALANCHE_MAINNET]: 'avalanche-mainnet', [ChainId.OPTIMISM_MAINNET]: 'optimism-mainnet', From 449e925453861a2a313f018941e9dd0b0c8e3c34 Mon Sep 17 00:00:00 2001 From: Melisa Anabella Rossi Date: Fri, 12 Apr 2024 10:46:03 -0300 Subject: [PATCH 2/2] update dependencies --- webapp/package-lock.json | 31 +++++++++++++++++++++---------- webapp/package.json | 4 ++-- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/webapp/package-lock.json b/webapp/package-lock.json index 530f1da276..02f370a13d 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -27,8 +27,8 @@ "dcl-catalyst-commons": "^9.0.1", "decentraland-connect": "^6.3.1", "decentraland-crypto-fetch": "^1.0.3", - "decentraland-dapps": "^19.5.2", - "decentraland-transactions": "^2.5.0", + "decentraland-dapps": "^19.5.3", + "decentraland-transactions": "^2.6.0", "decentraland-ui": "^5.17.1", "ethers": "^5.6.8", "graphql": "^14.7.0", @@ -9234,14 +9234,14 @@ } }, "node_modules/decentraland-dapps": { - "version": "19.5.2", - "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-19.5.2.tgz", - "integrity": "sha512-CuMRtUgtc/LaZVtOAXFkIuRIeBx6IeBuCRSN/LOQdNT2A2MT9fZELu54Fx8T3RGc4al6HHiKqyYlXUoshuitAQ==", + "version": "19.5.3", + "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-19.5.3.tgz", + "integrity": "sha512-FPje1IKjWb1pY3FXMX6DjlWoF2sazEpUmKP1jefrlTq8CF/oIj2qaw/CjCYo1MpJZoirKBOYmfRR0fIDRpdEUA==", "dependencies": { "@0xsequence/multicall": "^0.25.1", "@0xsequence/relayer": "^0.25.1", "@dcl/crypto": "^3.3.1", - "@dcl/schemas": "^11.4.0", + "@dcl/schemas": "^11.4.1-20240412130706.commit-0f2e689", "@dcl/single-sign-on-client": "^0.1.0", "@dcl/ui-env": "^1.5.0", "@transak/transak-sdk": "^1.0.31", @@ -9254,7 +9254,7 @@ "dcl-catalyst-client": "^21.1.0", "decentraland-connect": "^6.3.1", "decentraland-crypto-fetch": "^2.0.1", - "decentraland-transactions": "^2.3.2", + "decentraland-transactions": "^2.6.0", "decentraland-ui": "^5.17.1", "ethers": "^5.6.8", "events": "^3.3.0", @@ -9280,6 +9280,17 @@ "redux-saga": "^1.1.3" } }, + "node_modules/decentraland-dapps/node_modules/@dcl/schemas": { + "version": "11.4.1-20240412130706.commit-0f2e689", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-11.4.1-20240412130706.commit-0f2e689.tgz", + "integrity": "sha512-na9H/+oFTysiy9YppOu+sXu44o+Mn6KRlADINJchd+2yeWCvhNYQLfLtzchAF+ydiBC72xNu90QNkMx4rlv83Q==", + "dependencies": { + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-keywords": "^5.1.0", + "mitt": "^3.0.1" + } + }, "node_modules/decentraland-dapps/node_modules/@formatjs/intl": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@formatjs/intl/-/intl-2.2.1.tgz", @@ -9377,9 +9388,9 @@ } }, "node_modules/decentraland-transactions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-2.5.0.tgz", - "integrity": "sha512-CL7///qK+YJ3Z0XPPGnj/gfi64EKttYkG42hamVdrTAOg57B7IGlL4zWgmXECW1oS8C9i+WEfiwB0ov2y0zGFg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-2.6.0.tgz", + "integrity": "sha512-xo5Z7u5K+Ki+soNcK0pfXBVFqrk4OpH+WwxSQX/SoApcAwg94V0oIN5G1Hu/IlRlgMOXOcOj/QIC/abBEwgwOg==", "dependencies": { "@0xsquid/sdk": "^2.8.9", "@0xsquid/squid-types": "^0.1.51", diff --git a/webapp/package.json b/webapp/package.json index 8a4f0ee1a2..3f21868b95 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -22,8 +22,8 @@ "dcl-catalyst-commons": "^9.0.1", "decentraland-connect": "^6.3.1", "decentraland-crypto-fetch": "^1.0.3", - "decentraland-dapps": "^19.5.2", - "decentraland-transactions": "^2.5.0", + "decentraland-dapps": "^19.5.3", + "decentraland-transactions": "^2.6.0", "decentraland-ui": "^5.17.1", "ethers": "^5.6.8", "graphql": "^14.7.0",