Skip to content

Commit

Permalink
Merge pull request #503 from nervina-labs/refactor/old-format-addr
Browse files Browse the repository at this point in the history
refactor: all unipass/metamask api use old address
  • Loading branch information
yuche authored Mar 25, 2022
2 parents 764d802 + e829e00 commit e02001d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
12 changes: 6 additions & 6 deletions craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ module.exports = {
configure: (webpackConfig) => {
if (process.env.NODE_ENV === 'production') {
// remove console in production
// const TerserPlugin = webpackConfig.optimization.minimizer.find(
// (i) => i.constructor.name === 'TerserPlugin'
// )
// if (TerserPlugin) {
// TerserPlugin.options.terserOptions.compress.drop_console = true
// }
const TerserPlugin = webpackConfig.optimization.minimizer.find(
(i) => i.constructor.name === 'TerserPlugin'
)
if (TerserPlugin) {
TerserPlugin.options.terserOptions.compress.drop_console = true
}
if (process.env.ANALYZE_BUNDLE) {
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"short_name": "秘宝账户",
"name": "秘宝账户",
"version": "2.2.0",
"version": "2.2.1",
"icons": [
{
"src": "icons/16.png",
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function useAccount() {
const account = useAtomValue(accountAtom)

const address = useMemo(() => {
return account?.address ?? ''
return generateOldAddress(account?.address || '')
}, [account?.address])

const pubkey = useMemo(() => {
Expand Down
3 changes: 2 additions & 1 deletion src/service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ clientsClaim()
// This variable must be present somewhere in your service worker file,
// even if you decide not to use precaching. See https://cra.link/PWA
precacheAndRoute(self.__WB_MANIFEST)
console.log('Verion: v2.2.0')
const log = console.log
log('Verion: v2.2.1')

// Set up App Shell-style routing, so that all navigation requests
// are fulfilled with your index.html shell. Learn more at
Expand Down
6 changes: 5 additions & 1 deletion src/views/Profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ export const Profile: React.FC = () => {
<TakePhoto />
) : (
<Container>
<Appbar title={t('profile.title')} right={<div />} />
<Appbar
title={t('profile.title')}
right={<div />}
onLeftClick={() => history.replace(RoutePath.NFTs)}
/>
<section className="main">
<Center flexDirection="column" my="24px">
<Avatar
Expand Down

1 comment on commit e02001d

@vercel
Copy link

@vercel vercel bot commented on e02001d Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.