Skip to content

Commit

Permalink
update condition
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalik88 committed Sep 3, 2024
1 parent 82171e3 commit 6e724dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/snaps-rpc-methods/src/restricted/notify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ export function getValidatedParams(params: unknown): NotifyParams {
const isNotString = !message || typeof message !== 'string';
// Set to the max message length on a Mac notification for now.
if (
isNotString ||
(type === NotificationType.Native && message.length >= 50)
type === NotificationType.Native &&
(isNotString || message.length >= 50)
) {
throw rpcErrors.invalidParams({
message:
Expand All @@ -186,8 +186,8 @@ export function getValidatedParams(params: unknown): NotifyParams {
}

if (
isNotString ||
(type === NotificationType.InApp && message.length >= 500)
type === NotificationType.InApp &&
(isNotString || message.length >= 500)
) {
throw rpcErrors.invalidParams({
message:
Expand Down

0 comments on commit 6e724dc

Please sign in to comment.