From 5b053007d45a1406bcd578606f3e1c6d918e6b78 Mon Sep 17 00:00:00 2001 From: Gerhard Steenkamp Date: Thu, 11 Apr 2024 17:56:40 +0200 Subject: [PATCH] shorter tuple type label --- src/plugins/oSnap/components/Input/MethodParameter.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/oSnap/components/Input/MethodParameter.vue b/src/plugins/oSnap/components/Input/MethodParameter.vue index c74205bb..1b987edb 100644 --- a/src/plugins/oSnap/components/Input/MethodParameter.vue +++ b/src/plugins/oSnap/components/Input/MethodParameter.vue @@ -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' @@ -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;