From 4fe335f3b624205dcc224c40c49f24fd397fedd8 Mon Sep 17 00:00:00 2001 From: Joseph Chalabi Date: Tue, 7 Jan 2025 16:53:01 -0700 Subject: [PATCH 1/9] chore: add 'u' to subdenom programatically --- components/factory/forms/ConfirmationForm.tsx | 4 ++-- components/factory/forms/CreateDenom.tsx | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/components/factory/forms/ConfirmationForm.tsx b/components/factory/forms/ConfirmationForm.tsx index 0f9c068..9e650b2 100644 --- a/components/factory/forms/ConfirmationForm.tsx +++ b/components/factory/forms/ConfirmationForm.tsx @@ -44,7 +44,7 @@ export default function ConfirmationForm({ value: MsgCreateDenom.encode( createDenom({ sender: formData.groupPolicyAddress || '', - subdenom: formData.subdenom, + subdenom: 'u' + formData.subdenom, }).value ).finish(), }), @@ -99,7 +99,7 @@ export default function ConfirmationForm({ // First, create the denom const createDenomMsg = createDenom({ sender: address, - subdenom: formData.subdenom, + subdenom: 'u' + formData.subdenom, }); const createDenomFee = await estimateFee(address, [createDenomMsg]); diff --git a/components/factory/forms/CreateDenom.tsx b/components/factory/forms/CreateDenom.tsx index d8f2b41..dad2160 100644 --- a/components/factory/forms/CreateDenom.tsx +++ b/components/factory/forms/CreateDenom.tsx @@ -21,7 +21,6 @@ export default function CreateDenom({ const DenomSchema = Yup.object().shape({ subdenom: Yup.string() .required('Subdenom is required') - .matches(/^[u][a-zA-Z0-9]+$/, 'Subdenom must start with the letter u') .min(4, 'Subdenom must be at least 4 characters') .max(44, 'Subdenom must not exceed 44 characters') .noProfanity('Profanity is not allowed') @@ -57,8 +56,7 @@ export default function CreateDenom({ ) => { dispatch({ From 84e4cf1c6bedc8341031a507e7ff88b6a5c05850 Mon Sep 17 00:00:00 2001 From: Joseph Chalabi Date: Tue, 7 Jan 2025 17:00:02 -0700 Subject: [PATCH 2/9] fix: fix factory creation metadata issue --- components/factory/forms/ConfirmationForm.tsx | 16 ++++++++-------- components/factory/forms/CreateDenom.tsx | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/factory/forms/ConfirmationForm.tsx b/components/factory/forms/ConfirmationForm.tsx index 9e650b2..9e3e657 100644 --- a/components/factory/forms/ConfirmationForm.tsx +++ b/components/factory/forms/ConfirmationForm.tsx @@ -59,12 +59,12 @@ export default function ConfirmationForm({ { denom: fullDenom, exponent: 0, - aliases: [symbol], + aliases: [], }, { - denom: symbol, + denom: formData.display, exponent: 6, - aliases: [fullDenom], + aliases: [], }, ], base: fullDenom, @@ -72,7 +72,7 @@ export default function ConfirmationForm({ name: formData.name, symbol: formData.display, uri: formData.uri, - uriHash: formData.uriHash, + uriHash: '', }, }).value ).finish(), @@ -123,12 +123,12 @@ export default function ConfirmationForm({ { denom: fullDenom, exponent: 0, - aliases: [symbol], + aliases: [], }, { - denom: symbol, + denom: formData.display, exponent: 6, - aliases: [fullDenom], + aliases: [], }, ], base: fullDenom, @@ -136,7 +136,7 @@ export default function ConfirmationForm({ name: formData.name, symbol: formData.display, uri: formData.uri, - uriHash: formData.uriHash, + uriHash: '', }, }); diff --git a/components/factory/forms/CreateDenom.tsx b/components/factory/forms/CreateDenom.tsx index dad2160..26c89b2 100644 --- a/components/factory/forms/CreateDenom.tsx +++ b/components/factory/forms/CreateDenom.tsx @@ -124,6 +124,7 @@ export default function CreateDenom({