-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version v11.15.0 remove unecessary pollings when mm closed #24219
Merged
danjm
merged 2 commits into
Version-v11.15.0
from
Version-v11.15.0-remove-unecessary-pollings-when-mm-closed
Apr 30, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
.yarn/patches/@metamask-assets-controllers-patch-0f46262fea.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git a/dist/NftDetectionController.js b/dist/NftDetectionController.js | ||
index 24373e328d3600d1168914a3dc0bbbd905b19ebe..3877bebee24d1ad5cd2183b50547e8cef1846558 100644 | ||
--- a/dist/NftDetectionController.js | ||
+++ b/dist/NftDetectionController.js | ||
@@ -36,7 +36,7 @@ class NftDetectionController extends polling_controller_1.StaticIntervalPollingC | ||
* @param config - Initial options used to configure this controller. | ||
* @param state - Initial state to set on this controller. | ||
*/ | ||
- constructor({ chainId: initialChainId, getNetworkClientById, onPreferencesStateChange, onNetworkStateChange, getOpenSeaApiKey, addNft, getNftApi, getNftState, }, config, state) { | ||
+ constructor({ chainId: initialChainId, getNetworkClientById, onPreferencesStateChange, onNetworkStateChange, getOpenSeaApiKey, addNft, getNftApi, getNftState, disabled: initialDisabled, selectedAddress: initialSelectedAddress }, config, state) { | ||
super(config, state); | ||
/** | ||
* Name of this controller used during composition | ||
@@ -54,8 +54,8 @@ class NftDetectionController extends polling_controller_1.StaticIntervalPollingC | ||
this.defaultConfig = { | ||
interval: DEFAULT_INTERVAL, | ||
chainId: initialChainId, | ||
- selectedAddress: '', | ||
- disabled: true, | ||
+ selectedAddress: initialSelectedAddress, | ||
+ disabled: initialDisabled, | ||
}; | ||
this.initialize(); | ||
this.getNftState = getNftState; | ||
diff --git a/dist/Standards/NftStandards/ERC721/ERC721Standard.js b/dist/Standards/NftStandards/ERC721/ERC721Standard.js | ||
index d9286b0c0e607d2857f3ee7dad40d13a6c11d7d7..4e12e4b590b1f34a66602d63035f1905917f8c93 100644 | ||
--- a/dist/Standards/NftStandards/ERC721/ERC721Standard.js | ||
+++ b/dist/Standards/NftStandards/ERC721/ERC721Standard.js | ||
@@ -66,7 +66,10 @@ class ERC721Standard { | ||
const contract = new contracts_1.Contract(address, metamask_eth_abis_1.abiERC721, this.provider); | ||
const supportsMetadata = yield this.contractSupportsMetadataInterface(address); | ||
if (!supportsMetadata) { | ||
- throw new Error('Contract does not support ERC721 metadata interface.'); | ||
+ // Do not throw error here, supporting Metadata interface is optional even though majority of ERC721 nfts do support it. | ||
+ // This change is made because of instances of NFTs that are ERC404( mixed ERC20 / ERC721 implementation). | ||
+ // As of today, ERC404 is unofficial but some people use it, the contract does not support Metadata interface, but it has the tokenURI() fct. | ||
+ console.error('Contract does not support ERC721 metadata interface.'); | ||
} | ||
return contract.tokenURI(tokenId); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sahar-fehri I noticed this was not included in the original PR. Can you explain why it was needed in the cherry-pick?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch file was created in a previous PR that was already on develop but was not on the release branch yet. We decided to just include both parts of the patch in the release