Skip to content

Commit

Permalink
temp+fix: fix check token balance is zero (#11172)
Browse files Browse the repository at this point in the history
## **Description**

When the setting to hide tokens when is zero is ON, we should not be
able to see zero balances on tokens tab.

## **Related issues**

Fixes:
#11072
https://github.com/MetaMask/mobile-planning/issues/1869

## **Manual testing steps**

1. Click on setting => General and enable setting: Hide tokens without
balance
2. Go to tokens tab and import any token that you do not have balance
for
3. Check that you do not see the imported token on the main page

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**


https://github.com/user-attachments/assets/1d18de27-90ca-4e10-9ca6-9b834d94a323




### **After**



https://github.com/user-attachments/assets/1c58346b-45a6-4b31-ab26-f82795d6aeda



## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.

Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
  • Loading branch information
runway-github[bot] and tommasini authored Sep 12, 2024
1 parent 0b39b1f commit 373d426
Show file tree
Hide file tree
Showing 184 changed files with 29,707 additions and 38,379 deletions.
29 changes: 6 additions & 23 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
// eslint-disable-next-line import/no-commonjs
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
parser: 'babel-eslint',
extends: [
'@react-native',
// @react-native-community
// - Depends on babel-eslint parser
// - Migrated to @react-native/eslint-config after v3.2.0
'@react-native-community',
'eslint:recommended',
// '@metamask/eslint-config', // TODO: Enable when ready
'plugin:import/warnings',
'plugin:react/recommended',
],
plugins: ['@typescript-eslint', '@metamask/design-tokens'],
plugins: ['@metamask/design-tokens'],
overrides: [
{
files: ['*.{ts,tsx}'],
Expand All @@ -35,22 +34,6 @@ module.exports = {
},
],
'@typescript-eslint/no-explicit-any': 'error',
// Under discussion
'@typescript-eslint/no-duplicate-enum-values': 'off',
},
},
{
files: ['*.js', '*.jsx'],
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-env'],
},
},
rules: {
// under discussion
'no-unused-vars': 'off',
},
},
{
Expand Down
3 changes: 0 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,3 @@ patches/react-native+0.*.patch @MetaMask/supply-chain
# Snaps Team
**/snaps/** @MetaMask/snaps-devs
**/Snaps/** @MetaMask/snaps-devs

# Staking Team
app/components/UI/Stake @MetaMask/metamask-staking
27 changes: 3 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,20 +210,16 @@ jobs:
git update-index --no-assume-unchanged "$path"
done
sonar-cloud-quality-gate-status:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: sonar-cloud
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: SonarCloud Quality Gate Status
id: sonar-status
run: |
# Skip step if event is a PR
if [[ "${{ github.event_name }}" != "pull_request" ]]; then
echo "This job only runs for pull requests."
exit 0
fi
sleep 30
PROJECT_KEY="metamask-mobile"
Expand Down Expand Up @@ -276,22 +272,5 @@ jobs:
js-bundle-size-check,
sonar-cloud-quality-gate-status,
]
outputs:
ALL_JOBS_PASSED: ${{ steps.jobs-passed-status.outputs.ALL_JOBS_PASSED }}
steps:
- name: Set jobs passed status
id: jobs-passed-status
run: echo "ALL_JOBS_PASSED=true" >> "$GITHUB_OUTPUT"
check-all-jobs-pass:
name: Check all jobs pass
runs-on: ubuntu-20.04
needs: all-jobs-pass
if: always()
steps:
- run: |
if [[ "${{ needs.all-jobs-pass.outputs.ALL_JOBS_PASSED }}" == "true" ]]; then
echo "All jobs passed. Unblock PR."
else
echo "All jobs passed step skipped. Block PR."
exit 1
fi
- run: echo "Great success!"
99 changes: 99 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,105 @@

## Current Main Branch

## 7.31.0 - Sep 6, 2024
### Added
- [#10747](https://github.com/MetaMask/metamask-mobile/pull/10747): feat: 2805 grant permission to network with missmatching rpc url (#10747)
- [#10715](https://github.com/MetaMask/metamask-mobile/pull/10715): feat: 2795 disconnect all account permission multichain edit account screen (#10715)
- [#10347](https://github.com/MetaMask/metamask-mobile/pull/10347): feat: refactor WalletConnect v2 and add unit tests (#10347)
- [#10695](https://github.com/MetaMask/metamask-mobile/pull/10695): feat: sdk async key exchange (#10695)
- [#10562](https://github.com/MetaMask/metamask-mobile/pull/10562): feat: New token detail view (#10562)
- [#10876](https://github.com/MetaMask/metamask-mobile/pull/10876): feat: js bundle size ci gate (#10876)
- [#10847](https://github.com/MetaMask/metamask-mobile/pull/10847): feat: add pooled staking feature flag (#10847)
- [#2796](https://github.com/MetaMask/metamask-mobile/pull/2796): feat(2796): permission settings for multichain
- [#10727](https://github.com/MetaMask/metamask-mobile/pull/10727): feat: add ledger live deviation path support (#10727)

### Changed
- [#10749](https://github.com/MetaMask/metamask-mobile/pull/10749): chore(deps): bump rexml from 3.3.3 to 3.3.6 in the bundler group across 1 directory (#10749)
- [#10794](https://github.com/MetaMask/metamask-mobile/pull/10794): Release-update-BS-URL (#10794)
- [#11088](https://github.com/MetaMask/metamask-mobile/pull/11088): chore: add new track events for enabling/disabling basic functionality (#11088)
- [#10781](https://github.com/MetaMask/metamask-mobile/pull/10781): chore: update gitignore (#10781)
- [#11080](https://github.com/MetaMask/metamask-mobile/pull/11080): chore: fix flipper pod compilation with pika 15.3 toolchain (#11080)
- [#11077](https://github.com/MetaMask/metamask-mobile/pull/11077): chore: disable api spec pipeline (#11077)
- [#11075](https://github.com/MetaMask/metamask-mobile/pull/11075): test: disable flakey accounts test (#11075)
- [#11074](https://github.com/MetaMask/metamask-mobile/pull/11074): test: set baseline for app launch times (#11074)
- [#11039](https://github.com/MetaMask/metamask-mobile/pull/11039): test: Update swap test to handle the details modal (#11039)
- [#11070](https://github.com/MetaMask/metamask-mobile/pull/11070): test: remove duplicate push_branch in trigger map (#11070)
- [#11037](https://github.com/MetaMask/metamask-mobile/pull/11037): test: enable launch times pipeline on main (#11037)
- [#10983](https://github.com/MetaMask/metamask-mobile/pull/10983): chore: Metrics on download logs on login screen (#10983)
- [#11012](https://github.com/MetaMask/metamask-mobile/pull/11012): chore: revert splash screen PR (#11012)
- [#11003](https://github.com/MetaMask/metamask-mobile/pull/11003): chore: update swaps controller to 9.0.12 (#11003)
- [#11000](https://github.com/MetaMask/metamask-mobile/pull/11000): chore: merge release 7.29.1 into main (#11000)
- [#10937](https://github.com/MetaMask/metamask-mobile/pull/10937): chore: remove prefer default export eslint rule (#10937)
- [#10958](https://github.com/MetaMask/metamask-mobile/pull/10958): test: Increase cold start bench marks (#10958)
- [#10908](https://github.com/MetaMask/metamask-mobile/pull/10908): chore: Cherry pick reCaptcha fix (#10908)
- [#10016](https://github.com/MetaMask/metamask-mobile/pull/10016): chore: Update Keystone and NGRAVE dependencies (#10016)
- [#10866](https://github.com/MetaMask/metamask-mobile/pull/10866): chore: update typescript version to v~5.4.5 (#10866)
- [#10745](https://github.com/MetaMask/metamask-mobile/pull/10745): chore: Enable typescript coverage for all the files (#10745)
- [#10830](https://github.com/MetaMask/metamask-mobile/pull/10830): chore: Bump old pod checksums (#10830)
- [#10835](https://github.com/MetaMask/metamask-mobile/pull/10835): test: Remove Redundant Steps in WDIO to Fix Upgrade Test Failures (#10835)
- [#10813](https://github.com/MetaMask/metamask-mobile/pull/10813): chore: Remove react-native-splash-screen from Android (#10813)
- [#10828](https://github.com/MetaMask/metamask-mobile/pull/10828): chore: Add troubleshoot for missing simulators (#10828)
- [#10736](https://github.com/MetaMask/metamask-mobile/pull/10736): chore: Update permission controller to v^11 & utils to v^9 (#10736)
- [#10814](https://github.com/MetaMask/metamask-mobile/pull/10814): test:update-bs-url-to-correct-url (#10814)
- [#10744](https://github.com/MetaMask/metamask-mobile/pull/10744): chore: typescript coverage (#10744)
- [#10785](https://github.com/MetaMask/metamask-mobile/pull/10785): test: Refactor swaps page object files (#10785)
- [#10723](https://github.com/MetaMask/metamask-mobile/pull/10723): docs: Clean up testing readme (#10723)
- [#10751](https://github.com/MetaMask/metamask-mobile/pull/10751): chore: chore/7.30.0-Changelog (#10751)
- [#11017](https://github.com/MetaMask/metamask-mobile/pull/11017): refactor: updated button primary to use light theme colors (#11017)
- [#11018](https://github.com/MetaMask/metamask-mobile/pull/11018): refactor: updated wallet action icons to be light themed (#11018)
- [#10325](https://github.com/MetaMask/metamask-mobile/pull/10325): chore: updated avatargroup to take in all avatars (#10325)
- [#10616](https://github.com/MetaMask/metamask-mobile/pull/10616): chore: upgrade network controller to version 19.0.0 (#10616)
- [#11001](https://github.com/MetaMask/metamask-mobile/pull/11001): test: Fix swap smoke tests (#11001)
- [#10953](https://github.com/MetaMask/metamask-mobile/pull/10953): test: replaced TestHelpers function call with equivalent from Assertions (#10953)
- [#10897](https://github.com/MetaMask/metamask-mobile/pull/10897): test: Fix Swap e2e test failure (#10897)
- [#10874](https://github.com/MetaMask/metamask-mobile/pull/10874): chore: add new `keyring-snaps` code fence (#10874)
- [#10913](https://github.com/MetaMask/metamask-mobile/pull/10913): test: e2e srp reveal regression update (#10913)
- [#10879](https://github.com/MetaMask/metamask-mobile/pull/10879): test: e2e to reveal private key (#10879)
- [#10754](https://github.com/MetaMask/metamask-mobile/pull/10754): test: complete quiz to reveal SRP (#10754)
- [#10871](https://github.com/MetaMask/metamask-mobile/pull/10871): chore: enable merge queues gh action test run (#10871)
- [#10714](https://github.com/MetaMask/metamask-mobile/pull/10714): test: Refactor AccountListView Page object (#10714)

### Fixed
- [#10518](https://github.com/MetaMask/metamask-mobile/pull/10518): fix: refactor blockaid utils sync functions to async (#10518)
- [#11020](https://github.com/MetaMask/metamask-mobile/pull/11020): fix: Fix broken unit test in `Sendflow` tests (#11020)
- [#10385](https://github.com/MetaMask/metamask-mobile/pull/10385): fix: no insufficient funds warning (#10385)
- [#10826](https://github.com/MetaMask/metamask-mobile/pull/10826): fix: Upgrading Appium test failing (#10826)
- [#9910](https://github.com/MetaMask/metamask-mobile/pull/9910): fix: refactor saga xhr injection and add unit tests (#9910)
- [#10850](https://github.com/MetaMask/metamask-mobile/pull/10850): fix: remove exclusion of micromatch advisory and bump it (#10850)
- [#10673](https://github.com/MetaMask/metamask-mobile/pull/10673): fix: camera permission alert with settings access (#10673)
- [#10851](https://github.com/MetaMask/metamask-mobile/pull/10851): fix(2795): remove duplicate description in account connect multiselect screen (#10851)
- [#10894](https://github.com/MetaMask/metamask-mobile/pull/10894): fix: browser tab url type (#10894)
- [#10963](https://github.com/MetaMask/metamask-mobile/pull/10963): fix: Update PRODUCTION_APP_URL value (#10963)
- [#10903](https://github.com/MetaMask/metamask-mobile/pull/10903): fix(bug report): the description of bug report issue wasn't up-to-date anymore (#10903)
- [#10886](https://github.com/MetaMask/metamask-mobile/pull/10886): fix: recaptcha on in app browser (#10886)
- [#10540](https://github.com/MetaMask/metamask-mobile/pull/10540): fix: Browser dialog prompts in app (#10540)
- [#10844](https://github.com/MetaMask/metamask-mobile/pull/10844): fix: Refactor `yarn setup` in CI to generate terms of use content while retaining performance optimization (#10844)
- [#10845](https://github.com/MetaMask/metamask-mobile/pull/10845): fix: Add missing react-native-slider to pod lock file (#10845)
- [#10843](https://github.com/MetaMask/metamask-mobile/pull/10843): "revert: ""fix: Fixed 17 High Priority Issues - SonarCloud"" (#10843)"
- [#10635](https://github.com/MetaMask/metamask-mobile/pull/10635): fix: Fixed 17 High Priority Issues - SonarCloud (#10635)
- [#10827](https://github.com/MetaMask/metamask-mobile/pull/10827): fix: Fix/disable flipper for release (#10827)
- [#10820](https://github.com/MetaMask/metamask-mobile/pull/10820): fix: Set NO_FLIPPER to true on ios release (#10820)
- [#10545](https://github.com/MetaMask/metamask-mobile/pull/10545): fix: update metrics logic (#10545)
- [#10761](https://github.com/MetaMask/metamask-mobile/pull/10761): fix: typescript vs code default version (#10761)
- [#10753](https://github.com/MetaMask/metamask-mobile/pull/10753): fix: Fix coachmark error (#10753)
- [#10979](https://github.com/MetaMask/metamask-mobile/pull/10979): fix: wallet connect invalid hostname (#10979)
- [#10701](https://github.com/MetaMask/metamask-mobile/pull/10701): fix: wrong or missing analytics request source (#10701)
- [#10863](https://github.com/MetaMask/metamask-mobile/pull/10863): fixes: connectWith sdk (#10863)
- [#10729](https://github.com/MetaMask/metamask-mobile/pull/10729): fix: support set custom nonce to zero (#10729)
- [#11002](https://github.com/MetaMask/metamask-mobile/pull/11002): fix: infinite gas fee loading during send (#11002)
- [#10936](https://github.com/MetaMask/metamask-mobile/pull/10936): fix: Add missing allowedAction NetworkController:findNetworkClientIdByChainId to transactionController (#10936)
- [#10965](https://github.com/MetaMask/metamask-mobile/pull/10965): fix: gas never loading during send + high gas fee after deep link (#10965)
- [#10662](https://github.com/MetaMask/metamask-mobile/pull/10662): fix: blockaid loader on confirmation pages (#10662)
- [#10286](https://github.com/MetaMask/metamask-mobile/pull/10286): fix: Add dark mode to storybook (#10286)
- [#9962](https://github.com/MetaMask/metamask-mobile/pull/9962): fix: updated Text to use proper font styles (#9962)
- [#10476](https://github.com/MetaMask/metamask-mobile/pull/10476): fix: fix sentry error (#10476)
- [#10687](https://github.com/MetaMask/metamask-mobile/pull/10687): fix: Optimism quotes failing (#10687)
- [#10900](https://github.com/MetaMask/metamask-mobile/pull/10900): fix(notifications): hide profile sync toggle (#10900)
- [#10791](https://github.com/MetaMask/metamask-mobile/pull/10791): fix: Fix the QR code account unable to sign any message and transaction issue in 7.30.0 (#10791)
- [#10982](https://github.com/MetaMask/metamask-mobile/pull/10982): fix: UI notifications details bugs (#10982)
- [#10795](https://github.com/MetaMask/metamask-mobile/pull/10795): fix: small UI polishings (#10795)
- [#10792](https://github.com/MetaMask/metamask-mobile/pull/10792): fix: refactor notifications utils (#10792)

## 7.30.0 - Sep 6, 2024
### Added
- [#10748](https://github.com/MetaMask/metamask-mobile/pull/10748): feat: Add yarn flipper script (#10748)
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1410
versionName "7.30.0"
versionCode 1415
versionName "7.31.0"
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy 'react-native-camera', 'general'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified android/libs/nativesdk.aar
Binary file not shown.
30 changes: 1 addition & 29 deletions android/link-assets-manifest.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
{
"migIndex": 1,
"data": [
{
"path": "app/fonts/CentraNo1-Bold.otf",
"sha1": "1b26ab89462645088b88fab8e07d16a93cb648e4"
},
{
"path": "app/fonts/CentraNo1-BoldItalic.otf",
"sha1": "481aeb0f274cc53bfd10bf3d14a234ed0ed18ac5"
},
{
"path": "app/fonts/CentraNo1-Book.otf",
"sha1": "d49acfcbd516e824e7fd3e843ead5de73bcca276"
},
{
"path": "app/fonts/CentraNo1-BookItalic.otf",
"sha1": "c161b047be337f3deb86c863487118851eeaeb27"
},
{
"path": "app/fonts/CentraNo1-Medium.otf",
"sha1": "28459fca973e639679f5bfba2b37016da86f1688"
},
{
"path": "app/fonts/CentraNo1-MediumItalic.otf",
"sha1": "c129a146979b642a446574e109b7bcdd8516d5d7"
},
{
"path": "app/fonts/EuclidCircularB-Bold.otf",
"sha1": "7c2a5137fdc62618d404ac0cb54f8e732cc43161"
Expand Down Expand Up @@ -65,10 +41,6 @@
"path": "app/fonts/EuclidCircularB-SemiboldItalic.otf",
"sha1": "77f2e0212711cc8e043acabdc4bd4a264dfeeeb7"
},
{
"path": "app/fonts/MMSans-Regular.otf",
"sha1": "db0290dd245c9a6496fe9b1a0b3b544f976af2d9"
},
{
"path": "app/fonts/Metamask.ttf",
"sha1": "d274323055489d231d009cb3aa7ccfba3620e340"
Expand Down Expand Up @@ -123,7 +95,7 @@
},
{
"path": "app/fonts/config.json",
"sha1": "47efd6cacd9d899349b5b491425b288619ba712d"
"sha1": "9ad512ba0915182af59afac54cea1b1cc550b71f"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports[`TagColored should render TagColored 1`] = `
style={
{
"color": "#6a737d",
"fontFamily": "EuclidCircularB-Bold",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 10,
"fontWeight": "bold",
"letterSpacing": 0.25,
Expand Down
Loading

0 comments on commit 373d426

Please sign in to comment.