Changeset View
Changeset View
Standalone View
Standalone View
cashtab/src/components/Alias/Alias.js
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | const { | ||||
aliasServerError, | aliasServerError, | ||||
aliasPrices, | aliasPrices, | ||||
setAliasPrices, | setAliasPrices, | ||||
cashtabState, | cashtabState, | ||||
} = ContextValue; | } = ContextValue; | ||||
const { settings, wallets } = cashtabState; | const { settings, wallets } = cashtabState; | ||||
const wallet = wallets.length > 0 ? wallets[0] : false; | const wallet = wallets.length > 0 ? wallets[0] : false; | ||||
const defaultAddress = | const defaultAddress = | ||||
wallet !== false | wallet !== false ? wallet.paths.get(1899).address : ''; | ||||
? wallet.paths.find(pathInfo => pathInfo.path === 1899).address | |||||
: ''; | |||||
const walletState = getWalletState(wallet); | const walletState = getWalletState(wallet); | ||||
const { balanceSats, tokens } = walletState; | const { balanceSats, tokens } = walletState; | ||||
const [formData, setFormData] = useState({ | const [formData, setFormData] = useState({ | ||||
aliasName: '', | aliasName: '', | ||||
aliasAddress: '', | aliasAddress: '', | ||||
}); | }); | ||||
const [useThisAddressChecked, setUseThisAddressChecked] = useState(false); | const [useThisAddressChecked, setUseThisAddressChecked] = useState(false); | ||||
const [isValidAliasInput, setIsValidAliasInput] = useState(false); // tracks whether to activate the registration button | const [isValidAliasInput, setIsValidAliasInput] = useState(false); // tracks whether to activate the registration button | ||||
▲ Show 20 Lines • Show All 638 Lines • Show Last 20 Lines |