Skip to content

Commit

Permalink
Merge pull request #47 from dsrvlabs/fix-sui-string-vec-parameter
Browse files Browse the repository at this point in the history
[sui] fix string vector parameter
  • Loading branch information
altpd13 authored Nov 20, 2024
2 parents 18f019d + 41cc0b8 commit f2d9c3e
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions src/components/sui/VectorArgForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -705,32 +705,36 @@ const VectorArgForm: React.FunctionComponent<Props> = ({
<label>String</label>
</div>
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<input
className={`vec-parse-type-${parentIdx}`}
id={`vec-parse-type-${parentIdx}-decimal-${indexMemo.join('-')}`}
type="radio"
name={`vec-parse-type-${parentIdx}-decimal-${indexMemo.join('-')}`}
placeholder={vectorElType}
onChange={(event) => handleParseType(event, parentIdx)}
/>
<div style={{ marginLeft: '0.5em', marginRight: '0.5em' }}>
<label>Decimal</label>
{vectorElType !== '0x1::string::String' && (
<div style={{ display: 'flex', alignItems: 'center' }}>
<input
className={`vec-parse-type-${parentIdx}`}
id={`vec-parse-type-${parentIdx}-decimal-${indexMemo.join('-')}`}
type="radio"
name={`vec-parse-type-${parentIdx}-decimal-${indexMemo.join('-')}`}
placeholder={vectorElType}
onChange={(event) => handleParseType(event, parentIdx)}
/>
<div style={{ marginLeft: '0.5em', marginRight: '0.5em' }}>
<label>Decimal</label>
</div>
</div>
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<input
className={`vec-parse-type-${parentIdx}`}
id={`vec-parse-type-${parentIdx}-hex-${indexMemo.join('-')}`}
type="radio"
name={`vec-parse-type-${parentIdx}-hex-${indexMemo.join('-')}`}
placeholder={vectorElType}
onChange={(event) => handleParseType(event, parentIdx)}
/>
<div style={{ marginLeft: '0.5em', marginRight: '0.5em' }}>
<label>Hex</label>
)}
{vectorElType !== '0x1::string::String' && (
<div style={{ display: 'flex', alignItems: 'center' }}>
<input
className={`vec-parse-type-${parentIdx}`}
id={`vec-parse-type-${parentIdx}-hex-${indexMemo.join('-')}`}
type="radio"
name={`vec-parse-type-${parentIdx}-hex-${indexMemo.join('-')}`}
placeholder={vectorElType}
onChange={(event) => handleParseType(event, parentIdx)}
/>
<div style={{ marginLeft: '0.5em', marginRight: '0.5em' }}>
<label>Hex</label>
</div>
</div>
</div>
)}
</div>
</div>
<div style={{ border: '0.1px solid', padding: '0.5em' }}>{renderWrapper()}</div>
Expand Down

0 comments on commit f2d9c3e

Please sign in to comment.