Skip to content

Commit 12f6683

Browse files
committed
use selected type for dynamic value field
1 parent de96719 commit 12f6683

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export const DecodedInput: React.FC<DecodedInputProps> = ({
4040
const updated = !isCustomAddress;
4141

4242
const path = `constructorParams.${param.name ? param.name : "*"}.dynamicValue.decodedBytes.${setIndex}.${paramIndex}`;
43-
if (!updated) {
44-
form.setValue(`${path}.dynamicValue.type`, "address");
43+
if (updated) {
44+
form.setValue(`${path}.dynamicValue.type`, selectedType);
4545
form.resetField(`${path}.defaultValue`);
4646
} else {
4747
form.setValue(`${path}.dynamicValue.type`, "");

packages/thirdweb/src/extensions/prebuilts/deploy-published.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,7 @@ async function processRefDeployments(
238238
client,
239239
account,
240240
chain,
241-
paramValue: {
242-
...v,
243-
dynamicValue: {
244-
...v.dynamicValue,
245-
type: "address",
246-
},
247-
},
241+
paramValue: v,
248242
}),
249243
);
250244
}
@@ -283,13 +277,7 @@ async function processRefDeployments(
283277
client,
284278
account,
285279
chain,
286-
paramValue: {
287-
...v,
288-
dynamicValue: {
289-
...v.dynamicValue,
290-
type: "address",
291-
},
292-
},
280+
paramValue: v,
293281
}),
294282
);
295283
}

0 commit comments

Comments
 (0)