Skip to content
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

chore: Remove unused OpenSea key #5088

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/assets-controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Bump `@metamask/base-controller` from `^7.0.0` to `^7.1.0` ([#5079](https://github.com/MetaMask/core/pull/5079))

### Removed

- **BREAKING:** Remove `NftController` property `openSeaApiKey` and method `setApiKey` ([#5088](https://github.com/MetaMask/core/pull/5088))
- This key was not actively used. No functional changes.

## [45.1.2]

### Changed
Expand Down
7 changes: 0 additions & 7 deletions packages/assets-controllers/src/NftController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,6 @@ describe('NftController', () => {
});
});

it('should set api key', async () => {
const { nftController } = setupController();

nftController.setApiKey('testkey');
expect(nftController.openSeaApiKey).toBe('testkey');
});

describe('watchNft', function () {
const ERC721_NFT = {
address: ERC721_NFT_ADDRESS,
Expand Down
14 changes: 0 additions & 14 deletions packages/assets-controllers/src/NftController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,6 @@ export class NftController extends BaseController<
> {
readonly #mutex = new Mutex();

/**
* Optional API key to use with opensea
*/
openSeaApiKey?: string;

#selectedAccountId: string;

#chainId: Hex;
Expand Down Expand Up @@ -1374,15 +1369,6 @@ export class NftController extends BaseController<
});
}

/**
* Sets an OpenSea API key to retrieve NFT information.
*
* @param openSeaApiKey - OpenSea API key.
*/
setApiKey(openSeaApiKey: string) {
this.openSeaApiKey = openSeaApiKey;
}

/**
* Checks the ownership of a ERC-721 or ERC-1155 NFT for a given address.
*
Expand Down
Loading