diff --git a/cashtab/src/components/Etokens/CreateTokenForm/index.tsx b/cashtab/src/components/Etokens/CreateTokenForm/index.tsx --- a/cashtab/src/components/Etokens/CreateTokenForm/index.tsx +++ b/cashtab/src/components/Etokens/CreateTokenForm/index.tsx @@ -414,8 +414,8 @@ [name]: !validTokenName ? `Token name must be a valid string between 1 and 68 characters long.` : !probablyNotScam - ? 'Token name must not conflict with existing crypto or fiat' - : false, + ? 'Token name must not conflict with existing crypto or fiat' + : false, })); break; } @@ -428,8 +428,8 @@ [name]: !validTokenTicker ? `Token ticker must be a valid string between 1 and 12 characters long` : !probablyNotScamTicker - ? 'Token ticker must not conflict with existing crypto or fiat' - : false, + ? 'Token ticker must not conflict with existing crypto or fiat' + : false, })); break; } @@ -628,35 +628,35 @@ createWithMintBaton ? 2 : undefined, ) : isNftMint - ? getNftChildGenesisTargetOutputs(genesisInfo) - : tokenTypeSwitches.slp - ? getSlpGenesisTargetOutput( - genesisInfo, - BigInt( - undecimalizeTokenAmount( - formData.genesisQty, - parseInt(formData.decimals) as SlpDecimals, - ), + ? getNftChildGenesisTargetOutputs(genesisInfo) + : tokenTypeSwitches.slp + ? getSlpGenesisTargetOutput( + genesisInfo, + BigInt( + undecimalizeTokenAmount( + formData.genesisQty, + parseInt(formData.decimals) as SlpDecimals, ), - createWithMintBaton ? 2 : undefined, - ) - : getAlpGenesisTargetOutputs( - { - ...genesisInfo, - // Set as Cashtab active wallet public key - authPubkey: toHex( - wallet.paths.get(appConfig.derivationPath).pk, - ), - // Note we are omitting the "data" key for now - }, - BigInt( - undecimalizeTokenAmount( - formData.genesisQty, - parseInt(formData.decimals) as SlpDecimals, - ), + ), + createWithMintBaton ? 2 : undefined, + ) + : getAlpGenesisTargetOutputs( + { + ...genesisInfo, + // Set as Cashtab active wallet public key + authPubkey: toHex( + wallet.paths.get(appConfig.derivationPath).pk, ), - createWithMintBaton, - ); + // Note we are omitting the "data" key for now + }, + BigInt( + undecimalizeTokenAmount( + formData.genesisQty, + parseInt(formData.decimals) as SlpDecimals, + ), + ), + createWithMintBaton, + ); const { response } = isNftMint ? await sendXec( chronik, @@ -714,8 +714,8 @@ {createNftCollection ? 'NFT Collection created!' : isNftMint - ? 'NFT Minted!' - : 'Token created!'} + ? 'NFT Minted!' + : 'Token created!'} </TokenCreatedLink>, { icon: TokenNotificationIcon, @@ -748,8 +748,8 @@ createNftCollection ? 'NFT Collection' : isNftMint - ? 'NFT' - : 'Token' + ? 'NFT' + : 'Token' }`} handleOk={createPreviewedToken} handleCancel={() => setShowConfirmCreateToken(false)} @@ -877,7 +877,7 @@ )} <Form> - {!createNftCollection && ( + {!createNftCollection && !isNftMint && ( <> <SwitchRow> <Switch @@ -928,8 +928,8 @@ createNftCollection ? 'NFT collection' : isNftMint - ? 'NFT' - : 'token' + ? 'NFT' + : 'token' }`} name="name" value={formData.name} @@ -941,8 +941,8 @@ createNftCollection ? 'NFT collection' : isNftMint - ? 'NFT' - : 'token' + ? 'NFT' + : 'token' }`} name="ticker" value={formData.ticker} @@ -982,8 +982,8 @@ createNftCollection ? 'NFT collection' : isNftMint - ? 'NFT' - : 'token' + ? 'NFT' + : 'token' }`} name="url" value={formData.url} @@ -1126,8 +1126,8 @@ {createNftCollection ? 'Create NFT Collection' : isNftMint - ? 'Mint NFT' - : 'Create eToken'} + ? 'Mint NFT' + : 'Create eToken'} </PrimaryButton> {formData.name === '' || (formData.ticker === '' && ( @@ -1135,8 +1135,8 @@ {isNftMint ? 'NFT' : createNftCollection - ? 'NFT Collection' - : 'Token'}{' '} + ? 'NFT Collection' + : 'Token'}{' '} must have a name and a ticker </ButtonDisabledMsg> ))}