Skip to content

Commit

Permalink
fix: lint & style (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyyconsensys authored Feb 28, 2024
1 parent 1028ebd commit 4436ec1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/starknet-snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/ConsenSys/starknet-snap.git"
},
"scripts": {
"setup": "yarn install --frozen-lockfile && yarn allow-scripts",
"setup": "yarn install --immutable && yarn allow-scripts",
"build:clean": "yarn clean && yarn build",
"build": "mm-snap build",
"serve": "mm-snap serve",
Expand Down
2 changes: 1 addition & 1 deletion packages/starknet-snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/ConsenSys/starknet-snap.git"
},
"source": {
"shasum": "P8VzY62ID99iFOTN0jz8AgMI+F+ILOQ65BfiqW8xt6w=",
"shasum": "d88FLOvd7RKjJlzRixIQMpxnYGdnSyMuNaGYJbcIy3Q=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
14 changes: 7 additions & 7 deletions packages/starknet-snap/test/src/getStarkName.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ describe('Test function: getStarkName', function () {

it('should retrieve the stark name successfully', async function () {
sandbox.stub(utils, 'getStarkNameUtil').callsFake(async () => {
return "testName.stark";
return 'testName.stark';
});
const requestObject: GetStarkNameRequestParam = {
userAddress: '0x01c744953f1d671673f46a9179a58a7e58d9299499b1e076cdb908e7abffe69f',
userAddress: '0x01c744953f1d671673f46a9179a58a7e58d9299499b1e076cdb908e7abffe69f',
};
apiParams.requestParams = requestObject;
const result = await getStarkName(apiParams);
expect(result).to.be.eq("testName.stark");
expect(result).to.be.eq('testName.stark');
});

it('should throw error if getStarkNameUtil failed', async function () {
it('should throw error if getStarkNameUtil failed', async function () {
sandbox.stub(utils, 'getStarkNameUtil').throws(new Error());
const requestObject: GetStarkNameRequestParam = {
userAddress: '0x01c744953f1d671673f46a9179a58a7e58d9299499b1e076cdb908e7abffe69f',
userAddress: '0x01c744953f1d671673f46a9179a58a7e58d9299499b1e076cdb908e7abffe69f',
};
apiParams.requestParams = requestObject;

Expand All @@ -61,7 +61,7 @@ describe('Test function: getStarkName', function () {
}
});

it('should throw error if the user address is empty', async function() {
it('should throw error if the user address is empty', async function () {
const requestObject: GetStarkNameRequestParam = {
userAddress: '',
};
Expand All @@ -77,7 +77,7 @@ describe('Test function: getStarkName', function () {
}
});

it('should throw error if the user address is invalid', async function() {
it('should throw error if the user address is invalid', async function () {
const requestObject: GetStarkNameRequestParam = {
userAddress: '0x123456',
};
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"terser": "^5.14.2"
},
"scripts": {
"setup": "yarn install --frozen-lockfile && yarn allow-scripts",
"setup": "yarn install --immutable && yarn allow-scripts",
"start:all": "yarn clean && yarn install && yarn build && yarn start",
"start": "react-scripts start",
"build": "react-scripts build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const SideBarView = ({ address }: Props) => {
setStarkName(undefined);
});
}
}, [address]);
}, [address, chainId, getStarkName]);

return (
<Wrapper>
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2033,15 +2033,15 @@ __metadata:
linkType: hard

"@consensys/starknet-snap@file:../starknet-snap::locator=wallet-ui%40workspace%3Apackages%2Fwallet-ui":
version: 2.2.0
resolution: "@consensys/starknet-snap@file:../starknet-snap#../starknet-snap::hash=ab7d53&locator=wallet-ui%40workspace%3Apackages%2Fwallet-ui"
version: 2.4.0
resolution: "@consensys/starknet-snap@file:../starknet-snap#../starknet-snap::hash=ffefb9&locator=wallet-ui%40workspace%3Apackages%2Fwallet-ui"
dependencies:
async-mutex: ^0.3.2
ethereum-unit-converter: ^0.0.17
ethers: ^5.5.1
starknet: ^5.14.0
starknet_v4.22.0: "npm:[email protected]"
checksum: 2503bcfc3279ca6e000859442f9f20ff583c65abdc33b6128a4a89e1e63413ffdf82e73c510b63ee1d26c7c7a40ffeeb25cc53f4a3cb4f36890951f0e61314cb
checksum: 7b4d61c524329726663d9a91210c1f91a03fd101b586c81835c1ba2912223c5c75403eb810e014fc2f3090d7ef34f20600e46f2873da9723bf644e48139423be
languageName: node
linkType: hard

Expand Down

0 comments on commit 4436ec1

Please sign in to comment.