-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Parameterize NftController.addNft
by networkClientId
#1698
Merged
Merged
Conversation
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
adonesky1
force-pushed
the
nftcontroller-multichain
branch
5 times, most recently
from
September 25, 2023 20:57
9189fba
to
a9977b8
Compare
adonesky1
force-pushed
the
nftcontroller-multichain
branch
from
September 26, 2023 15:28
a9977b8
to
819fcb1
Compare
adonesky1
force-pushed
the
nftcontroller-multichain
branch
from
September 26, 2023 16:13
819fcb1
to
8c5d459
Compare
jiexi
reviewed
Sep 26, 2023
jiexi
reviewed
Sep 26, 2023
jiexi
reviewed
Sep 26, 2023
jiexi
reviewed
Sep 26, 2023
jiexi
reviewed
Sep 26, 2023
jiexi
reviewed
Sep 26, 2023
jiexi
reviewed
Sep 26, 2023
adonesky1
force-pushed
the
nftcontroller-multichain
branch
from
September 26, 2023 17:33
c3e8e8e
to
4d82178
Compare
jiexi
approved these changes
Sep 27, 2023
shanejonas
approved these changes
Sep 29, 2023
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
Fixes: MetaMask/MetaMask-planning#1022 # Changelog ## @metamask/assets-controllers - **BREAKING:** `NFTController` now expects `getNetworkClientById` in constructor options - **BREAKING:** `NftController. addNft()` function signature has changed: - Previously ``` address: string, tokenId: string, nftMetadata?: NftMetadata, accountParams?: { userAddress: string; chainId: Hex; }, source = Source.Custom, ``` now: ``` tokenAddress: string, tokenId: string, { nftMetadata?: NftMetadata; chainId?: Hex; // extracts from AccountParams userAddress?: string // extracted from AccountParams source?: Source; networkClientId?: NetworkClientId; // new }, ``` - CHANGED: `NftController.addNftVerifyOwnership`: now accepts optional `networkClientId` which is used to fetch NFT metadata and determine by which chainId the added NFT should be stored in state. - CHANGED: `NftController.isNftOwner`: now accepts optional `networkClientId` which is used to instantiate the provider for the correct chain and call the NFT contract to verify ownership. - CHANGED: `NftController. addNft()` will use the chainId value derived from `networkClientId` if provided - CHANGED: `NftController. watchNft()` options now accepts optional `networkClientId` which is used to fetch NFT metadata and determine by which chainId the added NFT should be stored in state.
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
Fixes: MetaMask/MetaMask-planning#1022 # Changelog ## @metamask/assets-controllers - **BREAKING:** `NFTController` now expects `getNetworkClientById` in constructor options - **BREAKING:** `NftController. addNft()` function signature has changed: - Previously ``` address: string, tokenId: string, nftMetadata?: NftMetadata, accountParams?: { userAddress: string; chainId: Hex; }, source = Source.Custom, ``` now: ``` tokenAddress: string, tokenId: string, { nftMetadata?: NftMetadata; chainId?: Hex; // extracts from AccountParams userAddress?: string // extracted from AccountParams source?: Source; networkClientId?: NetworkClientId; // new }, ``` - CHANGED: `NftController.addNftVerifyOwnership`: now accepts optional `networkClientId` which is used to fetch NFT metadata and determine by which chainId the added NFT should be stored in state. - CHANGED: `NftController.isNftOwner`: now accepts optional `networkClientId` which is used to instantiate the provider for the correct chain and call the NFT contract to verify ownership. - CHANGED: `NftController. addNft()` will use the chainId value derived from `networkClientId` if provided - CHANGED: `NftController. watchNft()` options now accepts optional `networkClientId` which is used to fetch NFT metadata and determine by which chainId the added NFT should be stored in state.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/1022
Changelog
@metamask/assets-controllers
BREAKING:
NFTController
now expectsgetNetworkClientById
in constructor optionsBREAKING:
NftController. addNft()
function signature has changed:now:
CHANGED:
NftController.addNftVerifyOwnership
: now accepts optionalnetworkClientId
which is used to fetch NFT metadata and determine by which chainId the added NFT should be stored in state.CHANGED:
NftController.isNftOwner
: now accepts optionalnetworkClientId
which is used to instantiate the provider for the correct chain and call the NFT contract to verify ownership.CHANGED:
NftController. addNft()
will use the chainId value derived fromnetworkClientId
if providedCHANGED:
NftController. watchNft()
options now accepts optionalnetworkClientId
which is used to fetch NFT metadata and determine by which chainId the added NFT should be stored in state.