Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/basic/RobotPage/TokenInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/basic/RobotPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Dialogs/Recovery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/TradeBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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);
Expand All @@ -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,
});
};

Expand Down