Skip to content

Commit 3c366a7

Browse files
committed
apply code review
1 parent 3314fcd commit 3c366a7

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

packages/examples/packages/notifications/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"baseUrl": "./",
5-
"jsx": "react-jsxdev",
65
"composite": false
76
},
87
"include": ["src", "snap.config.ts"]

packages/snaps-jest/src/matchers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type {
1313
} from '@metamask/snaps-sdk';
1414
import type { JSXElement, SnapNode } from '@metamask/snaps-sdk/jsx';
1515
import { isJSXElementUnsafe, JSXElementStruct } from '@metamask/snaps-sdk/jsx';
16-
import type { SnapInterface, SnapResponse } from '@metamask/snaps-simulation';
16+
import type { SnapResponse } from '@metamask/snaps-simulation';
1717
import {
1818
InterfaceStruct,
1919
SnapResponseStruct,
@@ -186,8 +186,8 @@ export const toSendNotification: MatcherFunction<
186186
const { notifications } = actual;
187187
let jsxContent: JSXElement | undefined;
188188

189-
if (hasProperty(actual, 'getInterface')) {
190-
jsxContent = (actual.getInterface as () => SnapInterface)().content;
189+
if ('getInterface' in actual) {
190+
jsxContent = actual.getInterface().content;
191191
}
192192

193193
const notificationValidator = (

packages/snaps-simulation/src/interface.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ describe('getInterfaceResponse', () => {
386386
});
387387
});
388388

389-
it('returns the interface actions and content for a Notification', () => {
389+
it('returns the interface actions and content for a notification', () => {
390390
const { runSaga } = createStore(getMockOptions());
391391
const response = getInterfaceResponse(
392392
runSaga,

packages/snaps-simulation/src/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export async function getInterfaceApi(
213213
controllerMessenger,
214214
);
215215

216-
const id = interfaceId || contentId;
216+
const id = interfaceId ?? contentId;
217217

218218
if (id) {
219219
return () => {

0 commit comments

Comments
 (0)