Skip to content

Add CollectiblesController & CollectibleDetectionController - #12443

Merged
adonesky1 merged 7 commits into
developfrom
feat/add-collectibles-controller
Nov 19, 2021
Merged

adonesky1 merged 7 commits into
developfrom
feat/add-collectibles-controller

Conversation

@adonesky1

@adonesky1 adonesky1 commented Oct 22, 2021 •

Copy link
Copy Markdown
Contributor

Explanation:

  • Adds CollectiblesController (and its dependency, AssetsContractController) to the extension. Adds bridge methods in action.js to interface with CollectiblesController.
  • Adds CollectibleDetectionController

Next Steps:

  • Determine when detection polling should start and stop.

@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@adonesky1
adonesky1 force-pushed the feat/add-collectibles-controller branch 2 times, most recently from 699779a to 90c47bc Compare October 22, 2021 18:13
@adonesky1
adonesky1 marked this pull request as ready for review October 22, 2021 18:14
@adonesky1
adonesky1 requested a review from a team as a code owner October 22, 2021 18:14
@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [90c47bc]
Page Load Metrics (407 ± 53 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint28561640611153
domContentLoaded27561939711254
load28462440711153
domInteractive27561939711254

highlights:

storybook

@adonesky1 adonesky1 changed the title [WIP] Add CollectiblesController to Extension Add CollectiblesController to Extension Oct 22, 2021
@Gudahtt

Gudahtt commented Oct 25, 2021

Copy link
Copy Markdown
Member

This will make the extension reliant upon OpenSea. Have you investigated what it would take for us to support NFTs without relying upon the OpenSea API? That was suggested as an acceptance criteria for this task in some of our earlier discussions.

@Gudahtt

Gudahtt commented Oct 25, 2021

Copy link
Copy Markdown
Member

Need to figure out if we're going to use the AssetsDetectionController and how to negotiate that with the extension base tokenDetectionController. Perhaps we split the AssetsDetectionController up into TokenDetectionController and CollectiblesDetectionController like we did with AssetsController -> TokensController & CollectiblesController?

That would make sense to me! At a glance, it looks like the code for detecting tokens v.s. NFTs is already distinct.

@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [4a90e5b]
Page Load Metrics (697 ± 32 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint5988726936531
domContentLoaded6008766956632
load6008776976632
domInteractive6008766956632

highlights:

storybook

Comment thread ui/store/actions.js Resolved
@adonesky1
adonesky1 requested a review from darkwing November 5, 2021 21:02
@adonesky1 adonesky1 changed the title Add CollectiblesController to Extension Add CollectiblesDetectionController to Extension Nov 5, 2021
@adonesky1 adonesky1 changed the title Add CollectiblesDetectionController to Extension Add CollectiblesController & CollectiblesDetectionController to Extension Nov 5, 2021
@adonesky1 adonesky1 changed the title Add CollectiblesController & CollectiblesDetectionController to Extension Add CollectiblesController & CollectiblesDetectionController Nov 5, 2021
@adonesky1 adonesky1 changed the title Add CollectiblesController & CollectiblesDetectionController Add CollectiblesController & CollectibleDetectionController Nov 5, 2021
@adonesky1
adonesky1 force-pushed the feat/add-collectibles-controller branch from 4a90e5b to 38d2179 Compare November 16, 2021 16:59
@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [4a663f9]
Page Load Metrics (757 ± 19 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint28678535313665
domContentLoaded6988667554019
load7008677574019
domInteractive6988667554019

highlights:

storybook

ryanml
ryanml previously approved these changes Nov 17, 2021

@ryanml ryanml left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks for the changes here

danjm
danjm previously approved these changes Nov 18, 2021

@danjm danjm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adonesky1

Copy link
Copy Markdown
Contributor Author

@danjm I've realized that there are still some ways that the OpenSea API will get hit (we attempt to detect collectibles when a user changes accounts) unless we put this behind a feature flag.

@adonesky1
adonesky1 dismissed stale reviews from danjm and ryanml via 9e00d75 November 18, 2021 17:42
@adonesky1
adonesky1 requested review from danjm and ryanml November 18, 2021 17:42
@adonesky1
adonesky1 force-pushed the feat/add-collectibles-controller branch from 9e00d75 to 649cd9c Compare November 18, 2021 17:51
@adonesky1
adonesky1 force-pushed the feat/add-collectibles-controller branch from 649cd9c to 656037c Compare November 18, 2021 17:56
@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [656037c]
Page Load Metrics (718 ± 21 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27676236115976
domContentLoaded6718727174321
load6728737184321
domInteractive6718727174321

highlights:

storybook

@adonesky1
adonesky1 merged commit b119b77 into develop Nov 19, 2021
@adonesky1
adonesky1 deleted the feat/add-collectibles-controller branch November 19, 2021 16:16
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants