From e5db5c0b812d5142b9a328159565ff3549e7a07c Mon Sep 17 00:00:00 2001 From: Melisa Anabella Rossi Date: Wed, 27 Mar 2024 14:59:42 -0300 Subject: [PATCH] feat: add notifications (#344) --- jest.config.ts | 2 +- package-lock.json | 216 ++++++++++++++---- package.json | 10 +- .../AccountCard/AccountCard.container.ts | 5 +- src/components/Navbar/Navbar.container.ts | 18 +- src/components/Navbar/Navbar.tsx | 23 +- src/components/Navbar/Navbar.types.ts | 2 + src/modules/mana/selectors.ts | 5 + 8 files changed, 217 insertions(+), 64 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 4b7714b2..00a8890e 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -26,6 +26,6 @@ export default async (): Promise => { moduleNameMapper: { '\\.(css|less)$': 'identity-obj-proxy' }, - transformIgnorePatterns: ['node_modules/(?!(multiformats|uint8arrays|@dcl/single-sign-on-client|decentraland-connect|uuid)/)'] + transformIgnorePatterns: ['node_modules/(?!(multiformats|uint8arrays|@dcl/single-sign-on-client|decentraland-connect|uuid|decentraland-dapps)/)'] } } diff --git a/package-lock.json b/package-lock.json index c98fc560..2c61a811 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,8 @@ "name": "@dcl/account-site", "version": "0.0.0-development", "dependencies": { - "@dcl/schemas": "^9.10.0", + "@dcl/schemas": "^11.2.0", + "@dcl/single-sign-on-client": "^0.1.0", "@dcl/ui-env": "^1.4.1", "@ethersproject/abi": "^5.7.0", "@ethersproject/providers": "^5.7.2", @@ -17,9 +18,9 @@ "@sentry/react": "^7.64.0", "@typechain/ethers-v5": "^10.0.0", "connected-react-router": "^6.9.1", - "decentraland-dapps": "^17.6.0", + "decentraland-dapps": "^19.3.2", "decentraland-transactions": "^1.46.0", - "decentraland-ui": "^5.6.0", + "decentraland-ui": "^5.14.0", "dotenv": "8.2.0", "dotenv-expand": "5.1.0", "ethers": "^5.7.2", @@ -1290,13 +1291,14 @@ } }, "node_modules/@dcl/schemas": { - "version": "9.12.0", - "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-9.12.0.tgz", - "integrity": "sha512-CQjajLNZZCHdL8+c0wujbQ1DEmg4WBfwtQTAHgWEQenujQv4FLaEwFeZ5HOlBU6g7K0OU0qfotl8ArbtiTpfgw==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/@dcl/schemas/-/schemas-11.2.0.tgz", + "integrity": "sha512-XgxDqV/xD2r8ojJDd7jYknc+UgpbPuV25rehWzcte0vPiTja90L1cgnhdMEV5j2Yms5CDjyW9HQiq7IPTg42LA==", "dependencies": { "ajv": "^8.11.0", "ajv-errors": "^3.0.0", - "ajv-keywords": "^5.1.0" + "ajv-keywords": "^5.1.0", + "mitt": "^3.0.1" } }, "node_modules/@dcl/single-sign-on-client": { @@ -1309,9 +1311,9 @@ } }, "node_modules/@dcl/ui-env": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@dcl/ui-env/-/ui-env-1.4.1.tgz", - "integrity": "sha512-3xq1jFhM7yxEsvaEW2AB7uGOa7KdPQwoG6j6l9u10dOFmNgEFNPBv4ilsjtUIszqV2HwzyPa/7fYpERouurZBg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@dcl/ui-env/-/ui-env-1.5.0.tgz", + "integrity": "sha512-XxUznNb56JWpYWj8ZmuoS+RsXr2HanqMeKdPvqxkFvttjaec8N9BCg0jrfDxw2Q9T4hxYprjQfPzV5hQTqceNw==" }, "node_modules/@esbuild-plugins/node-globals-polyfill": { "version": "0.2.3", @@ -6178,11 +6180,6 @@ "@types/react-router": "*" } }, - "node_modules/@types/react-router/node_modules/@types/history": { - "version": "4.7.11", - "dev": true, - "license": "MIT" - }, "node_modules/@types/redux-logger": { "version": "3.0.9", "dev": true, @@ -6202,6 +6199,11 @@ "@types/node": "*" } }, + "node_modules/@types/segment-analytics": { + "version": "0.0.38", + "resolved": "https://registry.npmjs.org/@types/segment-analytics/-/segment-analytics-0.0.38.tgz", + "integrity": "sha512-0clAuA7t6HxtpyXl4veE/oNVdcQFhlxnxgYlk0LeEYSoW3s3zZV5xa6DVHcOtozUO4u15Ipet5TdP88GbwKHvg==" + }, "node_modules/@types/sinon": { "version": "7.5.2", "license": "MIT" @@ -8521,15 +8523,6 @@ "form-data": "^4.0.0" } }, - "node_modules/dcl-catalyst-client/node_modules/@dcl/schemas": { - "version": "8.2.0", - "license": "Apache-2.0", - "dependencies": { - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-keywords": "^5.1.0" - } - }, "node_modules/dcl-catalyst-client/node_modules/form-data": { "version": "4.0.0", "license": "MIT", @@ -8565,11 +8558,11 @@ } }, "node_modules/decentraland-connect": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/decentraland-connect/-/decentraland-connect-5.5.0.tgz", - "integrity": "sha512-p2QKgUD7+ykrw4OrUnJ9az1SJ4PLkgfrJ6tPbVszURtIBtNg9ZzIqcHUUf4Y42OFFxCm7Pb1NQLzCVEHxRh2+w==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/decentraland-connect/-/decentraland-connect-6.3.0.tgz", + "integrity": "sha512-nlZEi/0XrtmX6C9B0N7suEf/vvahl0YfPpcKR4eFcr1sfvSS3FhJDJPdwJ4koimw0cnHpYwpWgQAwndlx70L5Q==", "dependencies": { - "@dcl/schemas": "^9.8.0", + "@dcl/schemas": "^11.2.0", "@dcl/single-sign-on-client": "^0.1.0", "@magic-ext/oauth": "^15.5.0", "@walletconnect/ethereum-provider": "^2.9.2", @@ -8580,7 +8573,8 @@ "@web3-react/walletlink-connector": "^6.2.13", "ethers": "^6.9.1", "magic-sdk": "^21.4.1", - "socket.io-client": "^4.7.2" + "socket.io-client": "^4.7.2", + "tslib": "^2.6.2" } }, "node_modules/decentraland-connect/node_modules/@noble/curves": { @@ -8642,11 +8636,16 @@ "node": ">=14.0.0" } }, - "node_modules/decentraland-connect/node_modules/tslib": { + "node_modules/decentraland-connect/node_modules/ethers/node_modules/tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, + "node_modules/decentraland-connect/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/decentraland-connect/node_modules/ws": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", @@ -8680,27 +8679,28 @@ } }, "node_modules/decentraland-dapps": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-17.6.0.tgz", - "integrity": "sha512-ZDZxqsVH9U/MPItJva2BaVY3z2+HKG+N9ZrFbkuQUXOZyR7ondLylt/BWZnnCFzmmQ7q0cx+dZhx79Wu2O6YOQ==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-19.3.2.tgz", + "integrity": "sha512-0F1e6iuKDO4Jkw7zsLKaKGmkucsr9onnlRmFYBb3tNBD9KlQtyugGr+cVuv2gH2k/n38HRTGl+aoiXj9/7mhwA==", "dependencies": { "@0xsequence/multicall": "^0.25.1", "@0xsequence/relayer": "^0.25.1", "@dcl/crypto": "^3.3.1", - "@dcl/schemas": "^9.10.0", + "@dcl/schemas": "^10.2.0", "@dcl/single-sign-on-client": "^0.1.0", - "@dcl/ui-env": "^1.4.0", + "@dcl/ui-env": "^1.5.0", "@transak/transak-sdk": "^1.0.31", "@types/flat": "0.0.28", + "@types/segment-analytics": "^0.0.38", "@well-known-components/fetch-component": "^2.0.1", "@wert-io/widget-initializer": "^5.2.0", "axios": "^0.21.1", "date-fns": "^1.29.0", "dcl-catalyst-client": "^21.1.0", - "decentraland-connect": "^5.5.0", + "decentraland-connect": "^6.2.0", "decentraland-crypto-fetch": "^2.0.1", - "decentraland-transactions": "^1.50.2", - "decentraland-ui": "^5.5.0", + "decentraland-transactions": "^2.3.2", + "decentraland-ui": "^5.14.0", "ethers": "^5.6.8", "events": "^3.3.0", "flat": "^5.0.2", @@ -8713,7 +8713,7 @@ "uuid": "^9.0.1" }, "engines": { - "npm": "^8.0.0" + "npm": "^8.0.0 || ^9.0.0" }, "peerDependencies": { "connected-react-router": "^6.9.1", @@ -8747,6 +8747,20 @@ } } }, + "node_modules/decentraland-dapps/node_modules/decentraland-transactions": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-2.3.2.tgz", + "integrity": "sha512-VsYCQaJLO1tGcB94wW9yZcHCoAyznpV7gzK4bRQzSs9+oMC+MUhppNKpO8KZMHtYU/vvb88kDh9PDBbjb7RiAw==", + "dependencies": { + "@0xsquid/sdk": "^2.8.9", + "@0xsquid/squid-types": "^0.1.51", + "decentraland-connect": "^6.2.0", + "tslib": "^2.6.2" + }, + "peerDependencies": { + "@dcl/schemas": ">=1.1.1" + } + }, "node_modules/decentraland-dapps/node_modules/react-intl": { "version": "5.25.1", "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-5.25.1.tgz", @@ -8823,12 +8837,120 @@ "@dcl/schemas": ">=1.1.1" } }, + "node_modules/decentraland-transactions/node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" + }, + "node_modules/decentraland-transactions/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/decentraland-transactions/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/decentraland-transactions/node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" + }, + "node_modules/decentraland-transactions/node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + }, + "node_modules/decentraland-transactions/node_modules/decentraland-connect": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/decentraland-connect/-/decentraland-connect-5.5.0.tgz", + "integrity": "sha512-p2QKgUD7+ykrw4OrUnJ9az1SJ4PLkgfrJ6tPbVszURtIBtNg9ZzIqcHUUf4Y42OFFxCm7Pb1NQLzCVEHxRh2+w==", + "dependencies": { + "@dcl/schemas": "^9.8.0", + "@dcl/single-sign-on-client": "^0.1.0", + "@magic-ext/oauth": "^15.5.0", + "@walletconnect/ethereum-provider": "^2.9.2", + "@walletconnect/modal": "^2.6.1", + "@web3-react/fortmatic-connector": "^6.1.6", + "@web3-react/injected-connector": "^6.0.7", + "@web3-react/network-connector": "^6.1.3", + "@web3-react/walletlink-connector": "^6.2.13", + "ethers": "^6.9.1", + "magic-sdk": "^21.4.1", + "socket.io-client": "^4.7.2" + } + }, + "node_modules/decentraland-transactions/node_modules/ethers": { + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.11.1.tgz", + "integrity": "sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/decentraland-transactions/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + }, + "node_modules/decentraland-transactions/node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/decentraland-ui": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/decentraland-ui/-/decentraland-ui-5.6.0.tgz", - "integrity": "sha512-MH59imZAAn00DG4RmzQseZGYypn48+7Ud1hlcr2RWAdW4Lns1LmeUt5VnjE582OztSa5U4yg6NuLAOcCoDaj1Q==", + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/decentraland-ui/-/decentraland-ui-5.14.0.tgz", + "integrity": "sha512-+8UVamZOPteLe4BfharVecb48IrWAH4ff/PPm6dlmv7rcQqWFx7ALm1kcNrwWxE1Skeg2uUxWz8o0UsOLRePhg==", "dependencies": { - "@dcl/schemas": "^9.12.0", + "@dcl/schemas": "^10.2.0", "@dcl/ui-env": "^1.4.0", "balloon-css": "^0.5.0", "classnames": "^2.3.2", @@ -8848,6 +8970,9 @@ "semantic-ui-react": "^2.0.3", "uuid": "^9.0.1" }, + "engines": { + "node": "18" + }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0", "react-dom": "^16.8.0 || ^17.0.0" @@ -15514,6 +15639,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" + }, "node_modules/mixin-deep": { "version": "1.3.2", "license": "MIT", diff --git a/package.json b/package.json index 00b1f417..48bd5ddb 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "version": "0.0.0-development", "type": "module", "dependencies": { - "@dcl/schemas": "^9.10.0", + "@dcl/schemas": "^11.2.0", + "@dcl/single-sign-on-client": "^0.1.0", "@dcl/ui-env": "^1.4.1", "@ethersproject/abi": "^5.7.0", "@ethersproject/providers": "^5.7.2", @@ -12,9 +13,9 @@ "@sentry/react": "^7.64.0", "@typechain/ethers-v5": "^10.0.0", "connected-react-router": "^6.9.1", - "decentraland-dapps": "^17.6.0", + "decentraland-dapps": "^19.3.2", "decentraland-transactions": "^1.46.0", - "decentraland-ui": "^5.6.0", + "decentraland-ui": "^5.14.0", "dotenv": "8.2.0", "dotenv-expand": "5.1.0", "ethers": "^5.7.2", @@ -74,6 +75,9 @@ "engines": { "node": "^18" }, + "overrides": { + "@dcl/schemas": "^11.2.0" + }, "repository": { "type": "git", "url": "https://github.com/decentraland/account.git" diff --git a/src/components/HomePage/AccountCard/AccountCard.container.ts b/src/components/HomePage/AccountCard/AccountCard.container.ts index 33760fcd..42e59a05 100644 --- a/src/components/HomePage/AccountCard/AccountCard.container.ts +++ b/src/components/HomePage/AccountCard/AccountCard.container.ts @@ -1,4 +1,6 @@ import { getNetworks } from 'decentraland-dapps/dist/modules/wallet/selectors' +import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' +import { Networks } from 'decentraland-dapps/dist/modules/wallet' import { connect } from 'react-redux' import { RootState } from '../../../modules/reducer' import AccountCard from './AccountCard' @@ -8,11 +10,10 @@ import { MapStateProps, OwnProps, } from './AccountCard.types' -import { openModal } from 'decentraland-dapps/dist/modules/modal/actions' const mapState = (state: RootState, ownProps: OwnProps): MapStateProps => { const networks = getNetworks(state) - const amount = networks ? networks[ownProps.network].mana : 0 + const amount = networks ? (networks[ownProps.network as keyof Networks]).mana : 0 return { amount, } diff --git a/src/components/Navbar/Navbar.container.ts b/src/components/Navbar/Navbar.container.ts index 53ad761b..51d6920f 100644 --- a/src/components/Navbar/Navbar.container.ts +++ b/src/components/Navbar/Navbar.container.ts @@ -1,13 +1,8 @@ import { connect } from 'react-redux' import { push, getLocation } from 'connected-react-router' import { getPendingTransactions } from 'decentraland-dapps/dist/modules/transaction/selectors' -import { - getAddress, - isConnected, -} from 'decentraland-dapps/dist/modules/wallet/selectors' -import { - getIsAuthDappEnabled, -} from '../../modules/features/selectors' +import { getAddress, isConnected } from 'decentraland-dapps/dist/modules/wallet/selectors' +import { getIsAuthDappEnabled } from '../../modules/features/selectors' import { RootState } from '../../modules/reducer' import { MapStateProps, MapDispatch, MapDispatchProps } from './Navbar.types' import Navbar from './Navbar' @@ -16,17 +11,16 @@ const mapState = (state: RootState): MapStateProps => { const address = getAddress(state) return { - hasActivity: address - ? getPendingTransactions(state, address).length > 0 - : false, + hasActivity: address ? getPendingTransactions(state, address).length > 0 : false, isConnected: isConnected(state), pathname: getLocation(state).pathname, - isAuthDappEnabled: !!getIsAuthDappEnabled(state) + isAuthDappEnabled: !!getIsAuthDappEnabled(state), + address } } const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ - onNavigate: (path) => dispatch(push(path)), + onNavigate: path => dispatch(push(path)) }) export default connect(mapState, mapDispatch)(Navbar) diff --git a/src/components/Navbar/Navbar.tsx b/src/components/Navbar/Navbar.tsx index 32e55120..dff67a19 100644 --- a/src/components/Navbar/Navbar.tsx +++ b/src/components/Navbar/Navbar.tsx @@ -1,5 +1,6 @@ -import React, { useCallback } from 'react' +import React, { useCallback, useMemo } from 'react' import { Navbar as BaseNavbar } from 'decentraland-dapps/dist/containers' +import { localStorageGetIdentity } from '@dcl/single-sign-on-client' import { locations } from '../../modules/locations' import { config } from '../../config' @@ -7,7 +8,7 @@ import { Props } from './Navbar.types' import './Navbar.css' const Navbar = (props: Props) => { - const { pathname, onNavigate, isAuthDappEnabled } = props + const { pathname, onNavigate, isAuthDappEnabled, address } = props const handleOnSignIn = useCallback(() => { if (isAuthDappEnabled) { @@ -17,7 +18,23 @@ const Navbar = (props: Props) => { onNavigate(locations.signIn()) }, [isAuthDappEnabled, onNavigate]) - return + const identity = useMemo(() => { + if (address) { + return localStorageGetIdentity(address) + } + + return undefined + }, [address]) + + return ( + + ) } export default React.memo(Navbar) diff --git a/src/components/Navbar/Navbar.types.ts b/src/components/Navbar/Navbar.types.ts index 15bae5d2..5aa9f926 100644 --- a/src/components/Navbar/Navbar.types.ts +++ b/src/components/Navbar/Navbar.types.ts @@ -7,6 +7,7 @@ export type Props = Partial & { pathname: string isConnected: boolean isAuthDappEnabled: boolean + address?: string onNavigate: (path: string) => void } @@ -16,6 +17,7 @@ export type MapStateProps = Pick< | 'hasActivity' | 'isConnected' | 'isAuthDappEnabled' + | 'address' > export type MapDispatchProps = Pick export type MapDispatch = Dispatch diff --git a/src/modules/mana/selectors.ts b/src/modules/mana/selectors.ts index 5a4e7479..4ed228c7 100644 --- a/src/modules/mana/selectors.ts +++ b/src/modules/mana/selectors.ts @@ -132,6 +132,11 @@ export const getTransactionByNetwork = createSelector< const result: Record = { ETHEREUM: [], MATIC: [], + "BINANCE SMART CHAIN": [], + ARBITRUM: [], + AVALANCHE: [], + FANTOM: [], + OPTIMISM: [] } for (const tx of transactions.filter( (tx) => tx.from.toLowerCase() === walletAddress?.toLowerCase()