Skip to content

Commit

Permalink
shorter tuple type label
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteenkamp89 committed Apr 11, 2024
1 parent 025412a commit 5b05300
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/plugins/oSnap/components/Input/MethodParameter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const isDirty = ref(false);
const placeholders = {
string: 'a string of text',
address: '0x123...abc',
int: '123456',
int: '123',
bytes: '0x123abc',
bytes32: '0x123abc',
bool: 'true'
Expand Down Expand Up @@ -88,7 +88,12 @@ const paramType = computed(() => {
if (inputType.value.input === 'single') {
return `(${inputType.value.type})`;
}
return `( ${inputType.value.type}[ ] )`;
if (inputType.value.input === 'array') {
return `(${inputType.value.type}[])`;
}
return inputType.value.type.length > 2
? `( ${inputType.value.type.slice(0, 2)}...[ ] )`
: inputType.value.type;
});
const label = paramName + paramType.value;
Expand Down

0 comments on commit 5b05300

Please sign in to comment.