metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

feat: Hook in Portfolio "Spending Caps" Entry Points

Open julesat22 opened this issue 1 year ago • 7 comments

Description

  1. What is the reason for the change? Portfolio has requested to add in two spending cap entry points into the extension, so users can easily navigate to the Portfolio to view/ manage their spending caps
  2. What is the improvement/solution? This adds value for the users who would like to view/ manage their spending caps

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Connect an account
  2. Go to this the assets page in the extension
  3. Click on an asset
  4. Under "Token details", there should be a category for all native and non-native token types for "Spending caps"
  5. Next to Spending caps, check the there is a link that routes the user to the portfolio with the "spendingCaps" tab and the user's account address passed as query params
  6. Check that the link redirects to Portfolio
  7. Go to the global main menu in the extension
  8. Test all the previous steps

Note:

Currently, work is needed on the Portfolio to handle all edge cases (user navigated in an unconnected Portfolio state, user navigates and their associated accountAddress is not connected, user navigates and the associated account is not selected in the accounts sidebar, etc. This work will be a fast follow.

Screenshots/Recordings

Before

Screenshot 2024-10-03 at 10 45 22 AM Screenshot 2024-10-03 at 10 45 14 AM

After

Screenshot 2024-10-03 at 9 37 54 AM Screenshot 2024-10-15 at 9 47 46 AM Screenshot 2024-10-03 at 9 33 21 AM Screenshot 2024-10-03 at 9 32 20 AM

Pre-merge author checklist

Pre-merge reviewer checklist

  • [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

julesat22 avatar Oct 03 '24 17:10 julesat22

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.

github-actions[bot] avatar Oct 03 '24 17:10 github-actions[bot]

Builds ready [4810377]
Page Load Metrics (1725 ± 62 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31819651666334160
domContentLoaded15211926170412459
load15291979172512862
domInteractive159741209
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.88 KiB (0.03%)
  • common: 133 Bytes (0.00%)

metamaskbot avatar Oct 04 '24 14:10 metamaskbot

image The gap when the token list section is shown looks like it's less than other sections. The way folks have added padding/margins in this section looks inconsistent but adding a 6px margin top seems to make things look less cramped

jclancy93 avatar Oct 07 '24 10:10 jclancy93

Builds ready [72392f5]
Page Load Metrics (1861 ± 117 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint153624971865253122
domContentLoaded152824271828226109
load153624961861243117
domInteractive20104502311
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.88 KiB (0.02%)
  • common: 133 Bytes (0.00%)

metamaskbot avatar Oct 08 '24 04:10 metamaskbot

image The gap when the token list section is shown looks like it's less than other sections. The way folks have added padding/margins in this section looks inconsistent but adding a 6px margin top seems to make things look less cramped

Great catch, updated and a screenshot has been added to the overview that reflects the spacing changes

julesat22 avatar Oct 15 '24 16:10 julesat22

Builds ready [534d945]
Page Load Metrics (1928 ± 118 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22125021839444213
domContentLoaded16112354187420598
load165025161928246118
domInteractive16162563416
backgroundConnect6231575727
firstReactRender462791045024
getState4125192813
initialActions01000
loadScripts11281783138617282
setupStore12109362813
uiStartup185533132188382183
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.96 KiB (0.03%)
  • common: 133 Bytes (0.00%)

metamaskbot avatar Oct 16 '24 15:10 metamaskbot

Builds ready [c16b5fc]
Page Load Metrics (2046 ± 133 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint165425612047274132
domContentLoaded160524962001274132
load165025442046278133
domInteractive27171603416
backgroundConnect136940189
firstReactRender442961095326
getState65417167
initialActions01000
loadScripts115919181489224108
setupStore11102342813
uiStartup180832292285356171
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.96 KiB (0.03%)
  • common: 133 Bytes (0.00%)

metamaskbot avatar Oct 21 '24 17:10 metamaskbot

Builds ready [8a2c396]
Page Load Metrics (2106 ± 248 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint40033551888693333
domContentLoaded161432092073489235
load162233542106517248
domInteractive17137542713
backgroundConnect9176314321
firstReactRender453001265828
getState4199364622
initialActions01000
loadScripts116424771550398191
setupStore10173414120
uiStartup182442222414652313
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.96 KiB (0.03%)
  • common: 133 Bytes (0.00%)

metamaskbot avatar Oct 21 '24 23:10 metamaskbot

Builds ready [2519c64]
Page Load Metrics (2374 ± 117 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint40729492178620298
domContentLoaded192628382337239115
load198428532374243117
domInteractive2910354189
backgroundConnect10103463115
firstReactRender612811214421
getState594352813
initialActions01000
loadScripts14132002173116780
setupStore1583352512
uiStartup220733692684305147
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.96 KiB (0.03%)
  • common: 133 Bytes (0.00%)

metamaskbot avatar Oct 24 '24 18:10 metamaskbot

Builds ready [ca4c9ec]
Page Load Metrics (2077 ± 138 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32932011990476229
domContentLoaded176831852044289139
load177632022077287138
domInteractive17193673718
backgroundConnect995362613
firstReactRender472891055928
getState489282814
initialActions01000
loadScripts128923591516233112
setupStore1285322311
uiStartup196337082328353169
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 2.94 KiB (0.04%)
  • common: 179 Bytes (0.00%)

metamaskbot avatar Nov 01 '24 20:11 metamaskbot

Builds ready [84eaae8]
Page Load Metrics (2066 ± 133 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32727901993475228
domContentLoaded168827042027276133
load169627592066277133
domInteractive23190684522
backgroundConnect897432512
firstReactRender47216994321
getState593222412
initialActions00000
loadScripts123421121503245118
setupStore1177392512
uiStartup188830012332291139
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 2.94 KiB (0.04%)
  • common: 179 Bytes (0.00%)

metamaskbot avatar Nov 04 '24 17:11 metamaskbot

Builds ready [913e059]
Page Load Metrics (2835 ± 246 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27537342416982471
domContentLoaded202236702793509244
load204437362835512246
domInteractive23240824722
backgroundConnect10105432914
firstReactRender743691545928
getState870322311
initialActions01000
loadScripts150629032105408196
setupStore1684422210
uiStartup232142953197579278
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 2.94 KiB (0.04%)
  • common: 179 Bytes (0.00%)

metamaskbot avatar Nov 06 '24 15:11 metamaskbot

Builds ready [8b9e1d0]
Page Load Metrics (1809 ± 64 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint32820681743354170
domContentLoaded15772010177512862
load15902070180913464
domInteractive2599452110
backgroundConnect872362110
firstReactRender48291915124
getState572212010
initialActions00000
loadScripts11151506131011153
setupStore116426189
uiStartup17702285201215273
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 2.94 KiB (0.04%)
  • common: 179 Bytes (0.00%)

metamaskbot avatar Nov 06 '24 17:11 metamaskbot

Builds ready [4ea1623]
Page Load Metrics (1918 ± 93 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16432342191618890
domContentLoaded16022259188318086
load16432370191819393
domInteractive24175523316
backgroundConnect7117352613
firstReactRender502041003015
getState45615157
initialActions01000
loadScripts11561728138914871
setupStore1178342412
uiStartup17982625214920498
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.3 KiB (0.02%)
  • common: 85 Bytes (0.00%)

metamaskbot avatar Nov 07 '24 16:11 metamaskbot

Builds ready [4b14945]
Page Load Metrics (1768 ± 62 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15462086176912862
domContentLoaded15312002173811756
load15482085176812862
domInteractive2411149199
backgroundConnect1285332311
firstReactRender48193863215
getState54815136
initialActions01000
loadScripts11051499127910148
setupStore1189292311
uiStartup17042309196715474
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.3 KiB (0.02%)
  • common: 85 Bytes (0.00%)

metamaskbot avatar Nov 07 '24 18:11 metamaskbot

Builds ready [2a70fe6]
Page Load Metrics (1728 ± 135 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31628741671418201
domContentLoaded152628381701279134
load155028761728281135
domInteractive16222464220
backgroundConnect665292010
firstReactRender45204943015
getState4481095
initialActions01000
loadScripts109223701256272130
setupStore589152110
uiStartup169031121918300144
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.3 KiB (0.02%)
  • common: 85 Bytes (0.00%)

metamaskbot avatar Nov 07 '24 18:11 metamaskbot

Builds ready [adac4da]
Page Load Metrics (2046 ± 129 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint176230862050268128
domContentLoaded175730702018266128
load176230892046269129
domInteractive1799512311
backgroundConnect897302512
firstReactRender972991334722
getState45515136
initialActions01000
loadScripts12822093146817986
setupStore687172110
uiStartup199033162294285137
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.27 KiB (0.02%)
  • common: 85 Bytes (0.00%)

metamaskbot avatar Nov 14 '24 18:11 metamaskbot

Builds ready [a498e91]
Page Load Metrics (2364 ± 164 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint41929452179677325
domContentLoaded186828822336348167
load188929212364341164
domInteractive36169843216
backgroundConnect1186312110
firstReactRender853011314923
getState665252010
initialActions01000
loadScripts134521701739278133
setupStore76619188
uiStartup206832272647399192
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.27 KiB (0.02%)
  • common: 85 Bytes (0.00%)

metamaskbot avatar Nov 14 '24 20:11 metamaskbot

Builds ready [05d9935]
Page Load Metrics (1909 ± 219 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint89720591758216104
domContentLoaded164337581873440211
load167438581909455219
domInteractive17148604019
backgroundConnect9127332914
firstReactRender532961336732
getState482272512
initialActions01000
loadScripts117429771386371178
setupStore65110115
uiStartup184343102191519249
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.27 KiB (0.02%)
  • common: 85 Bytes (0.00%)

metamaskbot avatar Nov 14 '24 21:11 metamaskbot

Builds ready [f781e65]
Page Load Metrics (2197 ± 116 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint188228882195244117
domContentLoaded186028052144234112
load188628672197241116
domInteractive29172583718
backgroundConnect1088522612
firstReactRender53220823417
getState48210913316
initialActions01000
loadScripts13762155161019895
setupStore67912167
uiStartup217032382524296142
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.27 KiB (0.02%)
  • common: 85 Bytes (0.00%)

metamaskbot avatar Nov 19 '24 16:11 metamaskbot

Builds ready [0681cc4]
Page Load Metrics (2112 ± 84 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24224352020447214
domContentLoaded17562345207216579
load17742439211217584
domInteractive19157593316
backgroundConnect1394372713
firstReactRender6211479157
getState4811592168
initialActions01000
loadScripts12691807154914972
setupStore65110105
uiStartup204829032412208100
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.23 KiB (0.02%)
  • common: 85 Bytes (0.00%)

metamaskbot avatar Nov 19 '24 17:11 metamaskbot