Skip to content

Commit 0704dc6

Browse files
committed
Fix linting problems
1 parent 0c8292d commit 0704dc6

7 files changed

Lines changed: 10 additions & 8 deletions

File tree

packages/gator-permissions-snap/snap.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/MetaMask/snap-7715-permissions.git"
88
},
99
"source": {
10-
"shasum": "XDcGZnYr0a6A4hetFQCedoaA2UtG7jT+EWFO/+MwiFY=",
10+
"shasum": "1mOwUEe4BnuKgE56t4n6IZ+JsjeggZ1/RZsQYvgityo=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/gator-permissions-snap/src/clients/blockchainMetadataClient.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,11 @@ export class BlockchainTokenMetadataClient implements TokenMetadataClient {
229229
symbol,
230230
};
231231
} catch (error) {
232-
const message = `Failed to fetch token balance and metadata: ${error}.`;
232+
console.error(
233+
`Failed to fetch token balance and metadata: ${(error as Error).message}.`,
234+
);
233235

234-
console.error(message);
235-
throw new Error(message);
236+
throw error;
236237
}
237238
}
238239
}

packages/gator-permissions-snap/src/core/permissionHandlerFactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type { PermissionRequest } from '@metamask/7715-permissions-shared/types'
22
import { extractPermissionName } from '@metamask/7715-permissions-shared/utils';
33

44
import type { AccountController } from '../accountController';
5+
import { erc20TokenStreamPermissionDefinition } from '../permissions/erc20TokenStream';
56
import { nativeTokenPeriodicPermissionDefinition } from '../permissions/nativeTokenPeriodic';
67
import { nativeTokenStreamPermissionDefinition } from '../permissions/nativeTokenStream';
7-
import { erc20TokenStreamPermissionDefinition } from '../permissions/erc20TokenStream';
88
import type { TokenPricesService } from '../services/tokenPricesService';
99
import type { UserEventDispatcher } from '../userEventDispatcher';
1010
import { PermissionHandler } from './permissionHandler';

packages/gator-permissions-snap/src/permissions/erc20TokenStream/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export async function buildContext({
107107
accountController: AccountController;
108108
}): Promise<Erc20TokenStreamContext> {
109109
const chainId = Number(permissionRequest.chainId);
110-
const tokenAddress = permissionRequest.permission.data.tokenAddress;
110+
const { tokenAddress } = permissionRequest.permission.data;
111111

112112
const address = await accountController.getAccountAddress({
113113
chainId,

packages/gator-permissions-snap/src/services/tokenPricesService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export class TokenPricesService {
6969
*
7070
* @param tokenCaip19Type - The token CAIP-19 asset type to fetch spot prices for.
7171
* @param balance - The token balance.
72+
* @param decimals - The number of decimals the token uses.
7273
* @returns The value of the token balance in the user's preferred currency in human-readable format.
7374
*/
7475
async getCryptoToFiatConversion(

packages/gator-permissions-snap/test/core/permissionRequestLifecycleOrchestrator.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ describe('PermissionRequestLifecycleOrchestrator', () => {
251251
};
252252

253253
expect(delegation).toStrictEqual(expectedDelegation);
254-
expect(delegation.salt).not.toStrictEqual(0n);
254+
expect(delegation.salt).not.toBe(0n);
255255
});
256256

257257
it('should correctly setup the onConfirmationCreated hook to update the context', async () => {

packages/permissions-kernel-snap/snap.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/MetaMask/snap-7715-permissions.git"
88
},
99
"source": {
10-
"shasum": "VvmzRf0CQohjyCGxQipja9d4Ghoq1q9w5kAJryTTw/8=",
10+
"shasum": "S0ov2EamT+yz9yJnmK+pFZ5q8knPzSppoKBYMKfHSX8=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

0 commit comments

Comments
 (0)