mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-19 09:13:28 +00:00
Remove spaces in reovery token
This commit is contained in:
@ -75,7 +75,7 @@ const TokenInput = ({
|
||||
helperText={badToken}
|
||||
size='medium'
|
||||
onChange={(e) => {
|
||||
setInputToken(e.target.value);
|
||||
setInputToken(e.target.value.replace(/\s+/g, ''));
|
||||
}}
|
||||
onKeyPress={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
|
@ -38,7 +38,7 @@ const RobotPage = (): JSX.Element => {
|
||||
useEffect(() => {
|
||||
const token = urlToken ?? garage.currentSlot;
|
||||
if (token !== undefined && token !== null && page === 'garage') {
|
||||
setInputToken(token);
|
||||
setInputToken(token.replace(/\s+/g, ''));
|
||||
if (client !== 'mobile' || torStatus === 'ON' || !settings.useProxy) {
|
||||
setView('profile');
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ const RecoveryDialog = ({ setInputToken, setView }: Props): JSX.Element => {
|
||||
|
||||
const onClickRecover = (): void => {
|
||||
void garage.createRobot(federation, recoveryToken);
|
||||
setInputToken(recoveryToken.trim());
|
||||
setInputToken(recoveryToken);
|
||||
setView('profile');
|
||||
setOpen((open) => {
|
||||
return { ...open, recovery: false };
|
||||
|
@ -190,7 +190,7 @@ const TradeBox = ({ currentOrder, onStartAgain }: TradeBoxProps): JSX.Element =>
|
||||
mining_fee_rate,
|
||||
statement,
|
||||
rating,
|
||||
cancel_status
|
||||
cancel_status,
|
||||
}: SubmitActionProps): void {
|
||||
const slot = garage.getSlot();
|
||||
|
||||
@ -204,7 +204,7 @@ const TradeBox = ({ currentOrder, onStartAgain }: TradeBoxProps): JSX.Element =>
|
||||
mining_fee_rate,
|
||||
statement,
|
||||
rating,
|
||||
cancel_status
|
||||
cancel_status,
|
||||
})
|
||||
.then((data: Order) => {
|
||||
setOpen(closeAll);
|
||||
@ -231,8 +231,8 @@ const TradeBox = ({ currentOrder, onStartAgain }: TradeBoxProps): JSX.Element =>
|
||||
|
||||
setLoadingButtons({ ...noLoadingButtons, cancel: true });
|
||||
submitAction({
|
||||
action: 'cancel',
|
||||
cancel_status: noConfirmation ? order?.status : undefined
|
||||
action: 'cancel',
|
||||
cancel_status: noConfirmation ? order?.status : undefined,
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user