Skip to content

Commit

Permalink
refactor: wallet db (#10594)
Browse files Browse the repository at this point in the history
* fix: one time pwd

* fix(ui): height of settings

* refactor: icon & texture

* fix: add contract icon
  • Loading branch information
guanbinrui committed Aug 23, 2023
1 parent fa140e7 commit f9f922a
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/icons/general/WalletSetting.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/icons/icon-generated-as-jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,7 @@ export const WalletSetting = /*#__PURE__*/ __createIcon('WalletSetting', [
j: () =>
/*#__PURE__*/ _jsx('svg', {
xmlns: 'http://www.w3.org/2000/svg',
viewBox: '0 0 24 24',
viewBox: '0 0 20 20',
children: /*#__PURE__*/ _jsxs('g', {
fill: 'currentColor',
children: [
Expand Down
4 changes: 2 additions & 2 deletions packages/mask/shared-ui/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,8 @@
"popups_create_wallet": "Create Wallet",
"popups_back_up_the_wallet": "Back up the wallet",
"popups_recovery_wallet": "Wallet Recovered",
"popups_wallet_setting": "Wallet settings",
"popups_wallet_settings_change_network": "Change network",
"popups_wallet_setting": "Wallet Settings",
"popups_wallet_settings_change_network": "Change Network",
"popups_wallet_settings_auto_unlock_time": "Auto-lock Time",
"popups_wallet_settings_auto_unlock_time_mins": "{{time}} Mins",
"popups_wallet_settings_auto_unlock_time_title": "Auto-lock",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { memo, useCallback, useContext, useEffect, useMemo, useState } from 'react'
import { useAsyncFn, useUnmount } from 'react-use'
import { useAsyncFn } from 'react-use'
import { useNavigate } from 'react-router-dom'
import {
type EnhanceableSite,
Expand Down Expand Up @@ -200,12 +200,9 @@ const AccountDetail = memo(() => {
/>
),
)
return () => setExtension(undefined)
}, [selectedAccount, handleDetachProfile, currentPersona, handleConfirmReleaseBind])

useUnmount(() => {
setExtension(null)
})

useUpdateEffect(() => {
setPendingUnlistedConfig(unlistedAddressConfig)
}, [JSON.stringify(unlistedAddressConfig)])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { PopupRoutes } from '@masknet/shared-base'
import { useUpdateEffect } from '@react-hookz/web'
import { memo, useContext } from 'react'
import { useUpdateEffect } from '@react-hookz/web'
import { PopupRoutes } from '@masknet/shared-base'
import { PersonaContext } from '@masknet/shared'
import { useLocation, useMatch } from 'react-router-dom'
import { NormalHeader } from '../../../../components/index.js'
import { PageTitleContext } from '../../../../context.js'
import { PersonaContext } from '@masknet/shared'
import { PersonaHeaderUI } from './UI.js'

export const PersonaHeader = memo(function PersonaHeader() {
Expand All @@ -15,6 +15,7 @@ export const PersonaHeader = memo(function PersonaHeader() {
const matchWalletConnect = useMatch(PopupRoutes.WalletConnect)
const matchProfilePhoto = useMatch(PopupRoutes.PersonaAvatarSetting)
const matchSignRequest = useMatch(PopupRoutes.PersonaSignRequest)

useUpdateEffect(() => {
setExtension(undefined)
}, [location.pathname, setExtension])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ const ContactListUI = memo(function ContactListUI() {
useEffect(() => {
if (!isManage) return
setExtension(<Icons.Add color={theme.palette.maskColor.main} sx={{ cursor: 'pointer' }} onClick={addContact} />)
return () => setExtension(undefined)
}, [isManage])

useTitle(isManage ? t('contacts') : t('popups_send'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const SwitchWallet = memo(function SwitchWallet() {
const wallet = useWallet(NetworkPluginID.PLUGIN_EVM)
const wallets = useWallets()
const { chainId } = useChainContext<NetworkPluginID.PLUGIN_EVM>()

const handleClickCreate = useCallback(async () => {
if (!wallets.filter((x) => x.hasDerivationPath).length) {
const hasPaymentPassword = await Services.Wallet.hasPassword()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const useStyles = makeStyles()((theme) => ({
},
list: {
padding: '12px 16px 0px 16px',
height: 400,
minHeight: 400,
overflow: 'auto',
'::-webkit-scrollbar': {
display: 'none',
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/Avatar/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"set_avatar_title": "Set NFT Avatar",
"set_up_title$pfp": "Set NFT PFP",
"set_up_title$background": "Set NFT NFT Background",
"wallet_settings": "Wallet settings",
"wallet_settings": "Wallet Settings",
"persona_hint": "Customize NFT experience by connecting social accounts. Enjoy Web2 with a whole new Web3 vibe.",
"copy_success_of_wallet_address": "Copy wallet address successfully!",
"copied": "Copied",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"edit": "Edit",
"connect_your_wallet": "Connect your wallet",
"connected_wallet_settings": "Connected wallets settings",
"wallet_settings": "Wallet settings",
"wallet_settings": "Wallet Settings",
"pending": "Pending...",
"gas_settings_title": "Advanced Settings",
"gas_settings_gas_settings_basic": "Baisc",
Expand Down

0 comments on commit f9f922a

Please sign in to comment.