Skip to content

Commit

Permalink
wallet-ext: display version number (MystenLabs#3805)
Browse files Browse the repository at this point in the history
  • Loading branch information
666lcz authored Aug 6, 2022
1 parent 5302052 commit 97bba52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sui-wallet",
"version": "0.0.3",
"version": "0.0.5",
"description": "A wallet for Sui",
"main": "./dist/ui.js",
"scripts": {
Expand Down
11 changes: 11 additions & 0 deletions wallet/src/ui/app/components/menu/content/menu-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { Link } from 'react-router-dom';
import Browser from 'webextension-polyfill';

import Item from './item';
import { API_ENV_TO_INFO } from '_app/ApiProvider';
Expand All @@ -21,6 +22,8 @@ function MenuList() {
const shortenAddress = useMiddleEllipsis(address, 10, 7);
const apiEnv = useAppSelector((state) => state.app.apiEnv);
const networkName = API_ENV_TO_INFO[apiEnv].name;
const version = Browser.runtime.getManifest().version;

return (
<div className={st.container}>
<Link to={accountUrl} className={st.item}>
Expand Down Expand Up @@ -53,6 +56,14 @@ function MenuList() {
indicator="link-45deg"
/>
</ExternalLink>
<div className={st.item}>
<Item
// TODO: import and use the icon from Figma
icon={SuiIcons.Info}
title="Wallet version"
subtitle={'v' + version}
/>
</div>
</div>
);
}
Expand Down

0 comments on commit 97bba52

Please sign in to comment.