Skip to content

Commit b3678b7

Browse files
committed
style: update error messages for unsupported versions
1 parent fca207d commit b3678b7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,5 @@ node_modules/
7676
!.yarn/sdks
7777
!.yarn/versions
7878

79+
# ignore intellij local files
7980
.idea/

src/utils/ERC1024.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const encrypt = (
4747
} as Eip1024EncryptedData;
4848
}
4949
default:
50-
throw new Error('Encryption type/version not supported');
50+
throw new Error(`Encryption type/version not supported ${version}`);
5151
}
5252
};
5353

@@ -88,7 +88,9 @@ const decrypt = (
8888
return bytesToUtf8(decryptedMessage);
8989
}
9090
default:
91-
throw new Error('Encryption type/version not supported.');
91+
throw new Error(
92+
`Encryption type/version not supported (${encryptedData.version}).`,
93+
);
9294
}
9395
};
9496

0 commit comments

Comments
 (0)