From 7b2b30ee27a1d7296185c6cd0c7955e78a4088a4 Mon Sep 17 00:00:00 2001 From: Jyoti Puri Date: Tue, 10 Sep 2024 10:19:42 +0530 Subject: [PATCH 1/3] Fix edit button on confirmation page for send ERC-1155 token --- .../confirm-token-transaction-switch.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/pages/confirmations/confirm-transaction/confirm-token-transaction-switch.js b/ui/pages/confirmations/confirm-transaction/confirm-token-transaction-switch.js index 3596652e56ef..1bf5c8771b4f 100644 --- a/ui/pages/confirmations/confirm-transaction/confirm-token-transaction-switch.js +++ b/ui/pages/confirmations/confirm-transaction/confirm-token-transaction-switch.js @@ -148,6 +148,14 @@ export default function ConfirmTokenTransactionSwitch({ transaction }) { decimals={decimals} image={tokenImage} tokenAddress={tokenAddress} + onEdit={async ({ txData }) => { + const { id } = txData; + await dispatch( + editExistingTransaction(AssetType.NFT, id.toString()), + ); + dispatch(clearConfirmTransaction()); + history.push(SEND_ROUTE); + }} toAddress={toAddress} tokenAmount={tokenAmount} tokenId={tokenId} From 0f68d5a09837b9f16690c989d4d511b9fa8c53c5 Mon Sep 17 00:00:00 2001 From: Jyoti Puri Date: Wed, 11 Sep 2024 16:08:51 +0530 Subject: [PATCH 2/3] Update --- test/e2e/tests/tokens/nft/send-nft.spec.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/test/e2e/tests/tokens/nft/send-nft.spec.js b/test/e2e/tests/tokens/nft/send-nft.spec.js index 37b81eca6794..0343f39c7b69 100644 --- a/test/e2e/tests/tokens/nft/send-nft.spec.js +++ b/test/e2e/tests/tokens/nft/send-nft.spec.js @@ -85,7 +85,7 @@ describe('Send NFT', function () { ); }); - it('should be able to send ERC1155 NFT', async function () { + it.only('should be able to send ERC1155 NFT', async function () { await withFixtures( { dapp: true, @@ -115,13 +115,6 @@ describe('Send NFT', function () { tag: 'button', }); - // Ensure that this type of NFT is not editable for now - // https://github.com/MetaMask/metamask-extension/issues/24320 - const editButtonPresent = await driver.isElementPresent( - '[data-testid="confirm-page-back-edit-button"]', - ); - assert.equal(editButtonPresent, false); - // Confirm the send await driver.clickElement({ text: 'Confirm', tag: 'button' }); From f2b1391ace72ba36197debf52a58ae86bd8dd00f Mon Sep 17 00:00:00 2001 From: Jyoti Puri Date: Wed, 11 Sep 2024 16:13:45 +0530 Subject: [PATCH 3/3] Update --- test/e2e/tests/tokens/nft/send-nft.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/tests/tokens/nft/send-nft.spec.js b/test/e2e/tests/tokens/nft/send-nft.spec.js index 0343f39c7b69..0fe23673a769 100644 --- a/test/e2e/tests/tokens/nft/send-nft.spec.js +++ b/test/e2e/tests/tokens/nft/send-nft.spec.js @@ -85,7 +85,7 @@ describe('Send NFT', function () { ); }); - it.only('should be able to send ERC1155 NFT', async function () { + it('should be able to send ERC1155 NFT', async function () { await withFixtures( { dapp: true,