Skip to content

Commit

Permalink
do byteslike check last
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteenkamp89 committed Mar 29, 2024
1 parent da49507 commit 8bf005c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/plugins/oSnap/components/Input/MethodParameter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ function validateBytes32Input(value: string) {
throw new Error('Less than 32 bytes');
}
if (!isBytesLike(value)) {
throw new Error('Invalid bytes32');
}
if (data.length > 64) {
validationErrorMessage.value = 'Value too long';
throw new Error('More than 32 bytes');
}
if (!isBytesLike(value)) {
throw new Error('Invalid bytes32');
}
return true;
} catch {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ function resetState() {
error.value = undefined;
}
// TODO: allow multiple files at once
watch(file, async () => {
if (!file.value) return;
parseGnosisSafeFile(file.value, props.safe)
Expand Down

0 comments on commit 8bf005c

Please sign in to comment.