diff --git a/.eslintrc.js b/.eslintrc.js
index e002662..5a892a3 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -21,7 +21,7 @@ module.exports = {
},
{
- files: ['**/*.test.ts', '**/*.test.js'],
+ files: ['**/*.test.ts',"**/*.test.tsx", '**/*.test.js'],
extends: ['@metamask/eslint-config-jest'],
rules: {
'@typescript-eslint/no-shadow': [
@@ -30,8 +30,20 @@ module.exports = {
],
},
},
+ {
+ files: ["**/*.ts", "**/*.tsx"],
+ extends: ["@metamask/eslint-config-typescript"],
+ rules: {
+ // This allows importing the `Text` JSX component.
+ "@typescript-eslint/no-shadow": [
+ "error",
+ {
+ allow: ["Text"],
+ },
+ ],
+ },
+ }
],
-
ignorePatterns: [
'!.prettierrc.js',
'**/!.eslintrc.js',
diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json
index 693fc7c..7d29307 100644
--- a/packages/snap/snap.manifest.json
+++ b/packages/snap/snap.manifest.json
@@ -7,7 +7,7 @@
"url": "https://github.com/polkagate/snap.git"
},
"source": {
- "shasum": "zxO0U2wCLtUw7Sxd9PR/14lZak3rjbpZk5P/qvHPjU8=",
+ "shasum": "ilqE//lt6OosojSEjmrQJn2aUTtu7mURnBgmU3Wcc4I=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
diff --git a/packages/snap/src/index.tsx b/packages/snap/src/index.tsx
index d2b9ff1..2fa354f 100644
--- a/packages/snap/src/index.tsx
+++ b/packages/snap/src/index.tsx
@@ -1,7 +1,7 @@
// Copyright 2023-2024 @polkagate/snap authors & contributors
// SPDX-License-Identifier: Apache-2.0
-import { UserInputEventType } from '@metamask/snaps-sdk';
+import { UserInputEventType } from '@metamask/snaps-sdk';
import type {
OnHomePageHandler,
OnInstallHandler,
@@ -36,6 +36,7 @@ import { getCurrentChainTokenPrice } from './util/getCurrentChainTokenPrice';
import getChainName from './util/getChainName';
import { DEFAULT_CHAIN_NAME } from './defaults';
import { welcomeScreen } from './ui/welcomeScreen';
+import { showMore } from './ui/showMore';
export const onRpcRequest: OnRpcRequestHandler = async ({
origin,
@@ -96,7 +97,7 @@ export const onInstall: OnInstallHandler = async () => {
method: 'snap_dialog',
params: {
type: 'alert',
- content:welcomeScreen(address, genesisHash, logo)
+ content: welcomeScreen(address, genesisHash, logo)
},
});
};
@@ -118,6 +119,10 @@ export const onUserInput: OnUserInputHandler = async ({ id, event }) => {
await polkagateApps(id);
break;
+ case 'more':
+ await showMore(id);
+ break;
+
case 'stake':
await staking(id);
break;
diff --git a/packages/snap/src/ui/accountInfo.tsx b/packages/snap/src/ui/accountInfo.tsx
index 1889fe4..428ba60 100644
--- a/packages/snap/src/ui/accountInfo.tsx
+++ b/packages/snap/src/ui/accountInfo.tsx
@@ -1,10 +1,9 @@
-import { accountDemo } from './accountDemo';
-import { DEFAULT_CHAIN_NAME, CHAIN_NAMES } from '../defaults';
+import { accountDemo } from './partials/accountDemo';
import { getBalances } from '../util/getBalance';
import { getKeyPair } from '../util/getKeyPair';
import { HexString } from '@polkadot/util/types';
import { getLogo } from './image/chains/getLogo';
-import { getSnapState, setSnapState, updateSnapState } from '../rpc/stateManagement';
+import { updateSnapState } from '../rpc/stateManagement';
import { getCurrentChainTokenPrice } from '../util/getCurrentChainTokenPrice';
/**
diff --git a/packages/snap/src/ui/components/MenuBar.tsx b/packages/snap/src/ui/components/MenuBar.tsx
index 6b3543e..3d5964d 100644
--- a/packages/snap/src/ui/components/MenuBar.tsx
+++ b/packages/snap/src/ui/components/MenuBar.tsx
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import { Box, SnapComponent } from "@metamask/snaps-sdk/jsx";
-import { exportAccount, send, stake, vote, settings } from '../image/icons';
+import { send, stake, vote, more } from '../image/icons';
import { Btn } from "./Btn";
@@ -22,13 +22,9 @@ export const MenuBar: SnapComponent = () => {
label='Vote'
/>
- {/* */}
);
};
diff --git a/packages/snap/src/ui/image/icons/book.svg b/packages/snap/src/ui/image/icons/book.svg
new file mode 100644
index 0000000..9f13f92
--- /dev/null
+++ b/packages/snap/src/ui/image/icons/book.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/packages/snap/src/ui/image/icons/email.svg b/packages/snap/src/ui/image/icons/email.svg
new file mode 100644
index 0000000..13a5969
--- /dev/null
+++ b/packages/snap/src/ui/image/icons/email.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/packages/snap/src/ui/image/icons/exportAccount.svg b/packages/snap/src/ui/image/icons/exportAccount.svg
index 9d09337..ec3791d 100644
--- a/packages/snap/src/ui/image/icons/exportAccount.svg
+++ b/packages/snap/src/ui/image/icons/exportAccount.svg
@@ -1,3 +1,3 @@
-