Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-1979 committed Dec 28, 2023
1 parent a6c95d8 commit d304b12
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion packages/dapp/src/SignMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Key as KeyIcon, CheckCircle as CheckCircleIcon } from '@mui/icons-mater
import { web3FromSource } from '@polkagate/extension-dapp';
import { Divider, Grid, TextField, Typography } from '@mui/material';
import { ApiPromise } from '@polkadot/api';
import type { DeriveBalancesAll } from '@polkadot/api-derive/types';
import { SignerPayloadRaw } from '@polkadot/types/types';
import { verifySignature } from './util/verifySignature';

Expand Down
6 changes: 3 additions & 3 deletions packages/snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "git",
"url": "https://github.com/polkagate/polkamask.git"
},
"license": "(MIT-0 OR Apache-2.0)",
"license": "Apache-2.0",
"main": "./dist/bundle.js",
"files": [
"dist/",
Expand All @@ -28,7 +28,6 @@
"dependencies": {
"@metamask/key-tree": "latest",
"@metamask/snaps-sdk": "latest",
"@metamask/snaps-ui": "latest",
"@metamask/utils": "latest",
"@polkadot/api": "^10.11.1",
"@polkadot/apps-config": "latest",
Expand All @@ -48,8 +47,9 @@
"@metamask/eslint-config-jest": "^10.0.0",
"@metamask/eslint-config-nodejs": "^10.0.0",
"@metamask/eslint-config-typescript": "^10.0.0",
"@metamask/snaps-cli": "^2.0.1",
"@metamask/snaps-cli": "^4.0.0",
"@metamask/snaps-jest": "^4.0.1",
"@metamask/utils": "latest",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"eslint": "^8.21.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* eslint-disable jest/prefer-strict-equal */

import { installSnap } from '@metamask/snaps-jest';
import { copyable, divider, heading, panel, text } from '@metamask/snaps-ui';
import { copyable, divider, heading, panel, text } from '@metamask/snaps-sdk';
import { Json } from '@metamask/utils';
import { hexToU8a, isHex } from '@polkadot/util';
// import { expect } from '@jest/globals';
Expand Down
8 changes: 4 additions & 4 deletions packages/snap/src/util/getFormatted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { decodeAddress, encodeAddress } from '@polkadot/util-crypto';
import { getChain } from '../chains';

/**
* To get the formatted address of an address
* To get the formatted address of an address.
*
* @param genesisHash - the genesisHash of the chain will be used to find an endpoint to use
* @param address - the substrate format of an address
* @returns - the formatted address
* @param genesisHash - The genesisHash of the chain will be used to find an endpoint to use.
* @param address - The substrate format of an address.
* @returns The formatted address.
*/
export function getFormatted(genesisHash: string, address: string): string {
const { prefix } = getChain(genesisHash as string);
Expand Down

0 comments on commit d304b12

Please sign in to comment.