Skip to content

Commit

Permalink
fix: logger undefine if not init (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyyconsensys authored Oct 2, 2024
1 parent a0a80c8 commit 6117509
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/starknet-snap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ import {
} from './utils/starknetUtils';

declare const snap;
logger.logLevel = parseInt(Config.logLevel, 10);

export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => {
const requestParams = request?.params as unknown as ApiRequestParams;

logger.logLevel = parseInt(Config.logLevel, 10);

logger.log(`${request.method}:\nrequestParams: ${toJson(requestParams)}`);

try {
Expand Down

0 comments on commit 6117509

Please sign in to comment.