Skip to content

Commit

Permalink
chore: Remove unused OpenSea key
Browse files Browse the repository at this point in the history
Remove unused OpenSea API key. This is a breaking change because of the
API/type change, but it's not a functional change since it was already
unused.
  • Loading branch information
Gudahtt committed Dec 20, 2024
1 parent f8e5f2e commit 0cbe7e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
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

0 comments on commit 0cbe7e9

Please sign in to comment.