diff --git a/frontend/src/basic/Main.tsx b/frontend/src/basic/Main.tsx index 8893c135..104f8d36 100644 --- a/frontend/src/basic/Main.tsx +++ b/frontend/src/basic/Main.tsx @@ -112,7 +112,7 @@ const Main = ({ settings, setSettings }: MainProps): JSX.Element => { coordinatorVersion: versionInfo.coordinatorVersion, clientVersion: versionInfo.clientVersion, }); - if (!robot.nickname && data.nickname) { + if (!robot.nickname && data.nickname && !robot.loading) { setRobot({ ...robot, nickname: data.nickname, diff --git a/frontend/src/basic/UserGenPage.js b/frontend/src/basic/UserGenPage.js index c68141fc..dc1fe428 100644 --- a/frontend/src/basic/UserGenPage.js +++ b/frontend/src/basic/UserGenPage.js @@ -44,7 +44,9 @@ class UserGenPage extends Component { componentDidMount() { // Checks in parent HomePage if there is already a nick and token // Displays the existing one - if (this.props.robot.token) { + if (this.props.robot.nickname != null) { + this.setState({ inputToken: this.props.robot.token }); + } else if (this.props.robot.token) { this.setState({ inputToken: this.props.robot.token }); this.getGeneratedUser(this.props.robot.token); } else { @@ -80,6 +82,7 @@ class UserGenPage extends Component { ? this.props.setRobot({ ...this.props.robot, avatarLoaded: true, + loading: false, nickname: data.nickname ?? this.props.robot.nickname, activeOrderId: data.active_order_id ?? null, referralCode: data.referral_code ?? this.props.referralCode, @@ -91,6 +94,7 @@ class UserGenPage extends Component { ...this.props.robot, nickname: data.nickname, token: token, + loading: false, activeOrderId: data.active_order_id ? data.active_order_id : null, lastOrderId: data.last_order_id ? data.last_order_id : null, referralCode: data.referral_code, diff --git a/frontend/src/components/UnsafeAlert.js b/frontend/src/components/UnsafeAlert.js index 73ddea2f..13133ba2 100644 --- a/frontend/src/components/UnsafeAlert.js +++ b/frontend/src/components/UnsafeAlert.js @@ -110,18 +110,18 @@ class UnsafeAlert extends Component { {t('You are not using RoboSats privately')} - You will not be able to complete a trade. Use{' '} + You will not be able to complete a trade. Use Tor Browser - {' '} - and visit the{' '} + + and visit the Onion {' '} - site. + site.
diff --git a/frontend/src/models/Robot.model.ts b/frontend/src/models/Robot.model.ts index 1789809d..c9e28ae5 100644 --- a/frontend/src/models/Robot.model.ts +++ b/frontend/src/models/Robot.model.ts @@ -41,7 +41,7 @@ export const defaultRobot: Robot = { tgEnabled: false, tgBotName: 'unknown', tgToken: 'unknown', - loading: true, + loading: false, avatarLoaded: false, copiedToken: false, };