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

feat: activate portfolio view #12507

Merged
merged 127 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
3a51189
feat: cherry picking from multichain list experimental branch
vinnyhoward Nov 25, 2024
9857f4c
Merge branch 'main' of github.com:MetaMask/metamask-mobile into feat-…
vinnyhoward Nov 26, 2024
9354e71
feat: add multichain tokens autodetection feature
salimtb Nov 24, 2024
b55ee59
fix: fix hide token
salimtb Nov 25, 2024
a3fb53a
fix: fix linter
salimtb Nov 25, 2024
25e4d9f
fix: add unit test
salimtb Nov 26, 2024
bb938c9
fix: fix hide token case
salimtb Nov 26, 2024
55b163e
Merge branch 'main' of github.com:MetaMask/metamask-mobile into feat-…
vinnyhoward Nov 26, 2024
bd8fcc8
fix: add unit tests
salimtb Nov 26, 2024
c22734c
fix: clean up
salimtb Nov 26, 2024
febb235
fix: fixed tests for feature flag off and all except one for feature …
vinnyhoward Nov 27, 2024
b1205f5
fix: linting issues
vinnyhoward Nov 27, 2024
0bbc069
fix: updating tests to increase coverage
vinnyhoward Nov 27, 2024
60a2121
merged token detection branch and updated tests
vinnyhoward Nov 27, 2024
5b8756b
Merge branch 'main' into salim/multichain-detect-tokens-feat
salimtb Nov 28, 2024
b6ea346
Merge branch 'salim/multichain-detect-tokens-feat' into feat-multicha…
salimtb Nov 28, 2024
e7e4217
fix: fix linter
salimtb Nov 28, 2024
7fca372
fix: fix hide token
salimtb Nov 28, 2024
576d910
fix: increase test coverage
salimtb Nov 28, 2024
5f81279
fix: increase test coverage
salimtb Nov 28, 2024
f0db4e5
fix: add test for staking chain hook
salimtb Nov 28, 2024
32ce6a0
fix: increase test coverage
salimtb Nov 28, 2024
83dfe6c
fix: increase test coverage
salimtb Nov 28, 2024
cc24739
fix: fix snapshot
salimtb Nov 28, 2024
5f57e94
fix: increase coverage
salimtb Nov 28, 2024
16e1d24
fix: increase test coverage
salimtb Nov 28, 2024
c15d95e
fix: increase test coverage
salimtb Nov 28, 2024
3d5cf83
fix: fix block explorer
salimtb Nov 29, 2024
767f1c2
fix: fix bugs
salimtb Nov 29, 2024
71d004a
fix: clean up
salimtb Nov 29, 2024
9b8fc02
fix: clean up feature flag
salimtb Nov 29, 2024
59e1fc2
fix: fix unit test
salimtb Nov 29, 2024
98b5fb5
fix: fix PR comments
salimtb Dec 1, 2024
02cc393
Merge branch 'main' into salim/multichain-detect-tokens-feat
salimtb Dec 1, 2024
ea8ee34
fix: fix selected network
salimtb Dec 1, 2024
8183136
Merge branch 'main' into salim/multichain-detect-tokens-feat
salimtb Dec 2, 2024
593a2cc
Merge branch 'salim/multichain-detect-tokens-feat' into feat-multicha…
salimtb Dec 2, 2024
32db30a
Merge branch 'salim/multichain-detect-tokens-feat' into feat-multicha…
vinnyhoward Dec 2, 2024
38c0b87
fix: resolve memory leaks and mock function for feature flag causing …
vinnyhoward Dec 3, 2024
6e0ad0a
Merge branch 'main' into salim/multichain-detect-tokens-feat
salimtb Dec 3, 2024
1fa9ed2
fix: fix snapshot
salimtb Dec 3, 2024
b8776b9
fix: fix snapshot
salimtb Dec 3, 2024
6f26ee6
fix: use allTokens
salimtb Dec 3, 2024
4932fb2
Merge branch 'salim/multichain-detect-tokens-feat' into feat-multicha…
salimtb Dec 3, 2024
74b8e1d
fix: fix after conflicts
salimtb Dec 3, 2024
156924f
feat: aggregated balance cross chains for portfolio view
sahar-fehri Dec 3, 2024
58c95e6
Merge branch 'main' of github.com:MetaMask/metamask-mobile into feat-…
vinnyhoward Dec 3, 2024
a7641c8
fix: lint
vinnyhoward Dec 3, 2024
7f825dd
fix: increase test coverage and fix asset details page not showing ba…
vinnyhoward Dec 3, 2024
b102439
fix: e2e with feature flag off is fixed and added more test coverage
vinnyhoward Dec 4, 2024
47d4570
fix: fixed tests
vinnyhoward Dec 4, 2024
9d1d81c
Merge branch 'feat/cross-chain-aggregated-balance-feature' into feat-…
sahar-fehri Dec 4, 2024
ec13b66
feat: fix lint
sahar-fehri Dec 4, 2024
a616c41
fix: fix native token balance display when zero
sahar-fehri Dec 4, 2024
c36f9f8
fix: filter system files
salimtb Dec 4, 2024
b0513fc
fix: use swap vertical icon
salimtb Dec 4, 2024
e51bb0b
feat: activate portfolio view
salimtb Dec 4, 2024
9345091
fix: fix swaps button display
sahar-fehri Dec 4, 2024
72cccc5
fix: feedback
sahar-fehri Dec 4, 2024
e2b34d8
fix: added more test coverage, cleaned up todos, reverted unnecessary…
vinnyhoward Dec 4, 2024
8f8fc79
Merge branch 'feat/cross-chain-aggregated-balance-feature' of github.…
vinnyhoward Dec 4, 2024
1ace57e
test: increase test coverage for multichain file and fixed incorrect …
vinnyhoward Dec 5, 2024
4035ed4
fix: fix error when showConversion is not enabled for testnet
sahar-fehri Dec 5, 2024
16abd59
fix: fix send flow testnet
salimtb Dec 5, 2024
613a431
fix(12550): adding popular network no longer switches network filter …
vinnyhoward Dec 5, 2024
95e9f50
Merge branch 'main' of github.com:MetaMask/metamask-mobile into feat-…
vinnyhoward Dec 5, 2024
339cb5b
Merge branch 'feat-multichain-list' into salim/PORTFOLIO_VIEW-on
sahar-fehri Dec 5, 2024
f9dcdfe
fix: removed dup import
vinnyhoward Dec 5, 2024
ef3878e
fix: Remove portfolio view modal from network switch check, e2e needs it
gambinish Dec 5, 2024
4be8853
Merge branch 'salim/PORTFOLIO_VIEW-on' of github.com:MetaMask/metamas…
gambinish Dec 5, 2024
7e0e257
fix: Lint
gambinish Dec 5, 2024
f02854c
Merge branch 'feat-multichain-list' into salim/PORTFOLIO_VIEW-on
gambinish Dec 5, 2024
7917cda
fix: send-ERC-token-spec
gambinish Dec 5, 2024
ff93bce
Merge branch 'salim/PORTFOLIO_VIEW-on' of github.com:MetaMask/metamas…
gambinish Dec 5, 2024
f6563b4
fix: add missing symbol in main balance
vinnyhoward Dec 5, 2024
f6e0737
Merge branch 'feat-multichain-list' into salim/PORTFOLIO_VIEW-on
gambinish Dec 5, 2024
0613e3b
fix: optimized multichain list so that it re-renders less
vinnyhoward Dec 6, 2024
08149c9
Merge branch 'main' into feat-multichain-list
vinnyhoward Dec 6, 2024
9fc34a6
test: update multichain test
vinnyhoward Dec 6, 2024
b7092e9
fix: lint
vinnyhoward Dec 6, 2024
a112133
fix: fix balance
sahar-fehri Dec 6, 2024
53213e9
Merge branch 'main' into feat-multichain-list
salimtb Dec 6, 2024
5a24e5f
fix: fix showing fiat balance on testnet when conversion rate is off
sahar-fehri Dec 6, 2024
8dc0e77
fix: fix merge conflicts
sahar-fehri Dec 6, 2024
b78f25c
fix: refactored multichain list to be faster and simpler
vinnyhoward Dec 7, 2024
f4b88cd
Merge branch 'feat-multichain-list' of github.com:MetaMask/metamask-m…
vinnyhoward Dec 7, 2024
5c948c8
fix: fix balance
salimtb Dec 7, 2024
f3c49ba
fix: fix linter
salimtb Dec 7, 2024
926a344
fix: fix linter
salimtb Dec 7, 2024
cd0d012
fix: fix native/fiat toggle
salimtb Dec 7, 2024
d182921
fix: clean up
salimtb Dec 8, 2024
de30cd5
fix: clean up and reduce review scope
salimtb Dec 8, 2024
381cb77
fix: fix balance + detection
salimtb Dec 8, 2024
53b55b2
fix: fix unit tests
salimtb Dec 8, 2024
181f057
Merge branch 'main' into feat-multichain-list
vinnyhoward Dec 9, 2024
bfaf402
fix: added fallbacks if there is missing markets, token balances
vinnyhoward Dec 9, 2024
c17e91d
fix: remove conf file from diff
salimtb Dec 9, 2024
16bf9d5
fix: fix conversions for testnets
sahar-fehri Dec 9, 2024
c8a3cb5
Merge branch 'main' into feat-multichain-list
salimtb Dec 9, 2024
f7b40d1
fix: fix after conflicts
salimtb Dec 9, 2024
5c6e35f
fix: fix after conflicts
salimtb Dec 9, 2024
4467c9a
fix: native balance address
vinnyhoward Dec 9, 2024
c69c5fa
fix: token balances render again for non-native tokens in asset overv…
vinnyhoward Dec 9, 2024
3a92dff
fix: bnb and polygon returning network names and not token names
vinnyhoward Dec 9, 2024
e332409
fix: fixed issue where POL and BNB wasn't showing balance in asset ov…
vinnyhoward Dec 9, 2024
146257a
fix: fixed balance issues relating to non-ethereum native tokens
vinnyhoward Dec 9, 2024
17366e3
fix: unit test
sahar-fehri Dec 9, 2024
8822f78
fix: update snap
vinnyhoward Dec 9, 2024
a59f2e4
Merge branch 'main' into feat-multichain-list
sahar-fehri Dec 9, 2024
69ca3e1
Merge branch 'feat-multichain-list' into salim/PORTFOLIO_VIEW-on
sahar-fehri Dec 9, 2024
22ad818
fix: tests no longer skip due to feature flags but run conditionally
vinnyhoward Dec 10, 2024
7921acd
fix: update snapshot
vinnyhoward Dec 10, 2024
67f6589
Merge branch 'feat-multichain-list' into salim/PORTFOLIO_VIEW-on
gambinish Dec 10, 2024
9e80e4c
fix: Update snapshot
gambinish Dec 10, 2024
136bd9f
fix: reduce code owners
salimtb Dec 10, 2024
a04930a
fix: fix getDefaultNetworkByChainId any
sahar-fehri Dec 10, 2024
c161315
fix: add TS doc
salimtb Dec 10, 2024
3cc327d
fix: address refresh mutex
salimtb Dec 10, 2024
b6a631b
fix: clean up
salimtb Dec 10, 2024
53f5c05
fix: rm new locales
sahar-fehri Dec 10, 2024
4d480f7
fix: fix
sahar-fehri Dec 10, 2024
d1d239e
Merge branch 'main' into feat-multichain-list
sahar-fehri Dec 10, 2024
9d91baa
Merge branch 'feat-multichain-list' into salim/PORTFOLIO_VIEW-on
salimtb Dec 10, 2024
9bb539f
Merge branch 'main' into salim/PORTFOLIO_VIEW-on
sahar-fehri Dec 10, 2024
be6c827
fix: fix isPortfolioViewEnabled fct
sahar-fehri Dec 10, 2024
4d5d4a9
fix: fix unit tests
salimtb Dec 10, 2024
dc9a8d7
Merge branch 'main' into salim/PORTFOLIO_VIEW-on
salimtb Dec 10, 2024
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
14 changes: 9 additions & 5 deletions .js.env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Sign up and generate your own keys at pubnub.com
# Then rename this file to ".js.env" and rebuild the app
#
#
# In order for this feature to work properly, you need to
# build metamask-extension from source (https://github.com/MetaMask/metamask-extension)
# and set your the same values there.
#
#
# For more info take a look at https://github.com/MetaMask/metamask-extension/pull/5955

export MM_PUBNUB_SUB_KEY=""
Expand Down Expand Up @@ -70,6 +70,10 @@ export SEGMENT_FLUSH_EVENT_LIMIT="1"
# URL of security alerts API used to validate dApp requests.
export SECURITY_ALERTS_API_URL="https://security-alerts.api.cx.metamask.io"

# Enable Portfolio View
export PORTFOLIO_VIEW="true"


# Temporary mechanism to enable security alerts API prior to release.
export MM_SECURITY_ALERTS_API_ENABLED="true"
# Firebase
Expand All @@ -81,7 +85,7 @@ export FCM_CONFIG_MESSAGING_SENDER_ID=""
export FCM_CONFIG_APP_ID=""
export GOOGLE_SERVICES_B64_ANDROID=""
export GOOGLE_SERVICES_B64_IOS=""
#Notifications Feature Announcements
# Notifications Feature Announcements
export FEATURES_ANNOUNCEMENTS_ACCESS_TOKEN=
export FEATURES_ANNOUNCEMENTS_SPACE_ID=

Expand All @@ -96,8 +100,8 @@ export MM_PER_DAPP_SELECTED_NETWORK=""

export MM_CHAIN_PERMISSIONS=""

#Multichain feature flag specific to UI changes
# Multichain feature flag specific to UI changes
export MM_MULTICHAIN_V1_ENABLED=""

#Permissions Settings feature flag specific to UI changes
# Permissions Settings feature flag specific to UI changes
export MM_PERMISSIONS_SETTINGS_V1_ENABLED=""
13 changes: 13 additions & 0 deletions app/components/UI/AccountSelectorList/AccountSelector.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import { mockNetworkState } from '../../../util/test/network';
import { CHAIN_IDS } from '@metamask/transaction-controller';
import { AccountSelectorListProps } from './AccountSelectorList.types';

// eslint-disable-next-line import/no-namespace
import * as Utils from '../../hooks/useAccounts/utils';

const BUSINESS_ACCOUNT = '0xC4955C0d639D99699Bfd7Ec54d9FaFEe40e4D272';
const PERSONAL_ACCOUNT = '0xd018538C87232FF95acbCe4870629b75640a78E7';

Expand Down Expand Up @@ -125,6 +128,16 @@ const renderComponent = (

describe('AccountSelectorList', () => {
beforeEach(() => {
jest.spyOn(Utils, 'getAccountBalances').mockReturnValueOnce({
balanceETH: '1',
balanceFiat: '$3200.00',
balanceWeiHex: '',
});
jest.spyOn(Utils, 'getAccountBalances').mockReturnValueOnce({
balanceETH: '2',
balanceFiat: '$6400.00',
balanceWeiHex: '',
});
onSelectAccount.mockClear();
onRemoveImportedAccount.mockClear();
});
Expand Down
Loading
Loading