diff --git a/frontend/src/components/MakerPage.js b/frontend/src/components/MakerPage.js
index 0a28e6bb..f7c23415 100644
--- a/frontend/src/components/MakerPage.js
+++ b/frontend/src/components/MakerPage.js
@@ -445,9 +445,11 @@ class MakerPage extends Component {
disabled={this.state.enableAmountRange}
variant={this.state.enableAmountRange ? 'filled' : 'outlined'}
error={
- !!((this.state.amount < this.getMinAmount() ||
- this.state.amount > this.getMaxAmount()) &
- (this.state.amount != ''))
+ !!(
+ (this.state.amount < this.getMinAmount() ||
+ this.state.amount > this.getMaxAmount()) &
+ (this.state.amount != '')
+ )
}
helperText={
(this.state.amount < this.getMinAmount()) & (this.state.amount != '')
@@ -615,8 +617,8 @@ class MakerPage extends Component {
handleChangePublicDuration = (date) => {
const d = new Date(date);
- const hours = d.getHours();
- const minutes = d.getMinutes();
+ const hours = d.getHours();
+ const minutes = d.getMinutes();
const total_secs = hours * 60 * 60 + minutes * 60;
@@ -628,8 +630,8 @@ class MakerPage extends Component {
handleChangeEscrowDuration = (date) => {
const d = new Date(date);
- const hours = d.getHours();
- const minutes = d.getMinutes();
+ const hours = d.getHours();
+ const minutes = d.getMinutes();
const total_secs = hours * 60 * 60 + minutes * 60;
diff --git a/frontend/src/components/UserGenPage.js b/frontend/src/components/UserGenPage.js
index 069e770d..2a19c8ad 100644
--- a/frontend/src/components/UserGenPage.js
+++ b/frontend/src/components/UserGenPage.js
@@ -202,7 +202,7 @@ class UserGenPage extends Component {
align='center'
sx={{ width: 370 * fontSizeFactor, height: 260 * fontSizeFactor }}
>
- {!this.state.loadingRobot && this.state.avatarUrl ? (
+ {this.props.avatarLoaded && this.state.avatarUrl ? (
diff --git a/frontend/src/utils/match.ts b/frontend/src/utils/match.ts
index 679142b6..230db93b 100644
--- a/frontend/src/utils/match.ts
+++ b/frontend/src/utils/match.ts
@@ -1,6 +1,6 @@
export const median = (arr: number[]) => {
const mid = Math.floor(arr.length / 2);
- const nums = [...arr].sort((a, b) => a - b);
+ const nums = [...arr].sort((a, b) => a - b);
return arr.length % 2 !== 0 ? nums[mid] : (nums[mid - 1] + nums[mid]) / 2;
};
diff --git a/frontend/src/utils/prettyNumbers.test.ts b/frontend/src/utils/prettyNumbers.test.ts
index 1f05b8f6..a35615fe 100644
--- a/frontend/src/utils/prettyNumbers.test.ts
+++ b/frontend/src/utils/prettyNumbers.test.ts
@@ -1,45 +1,45 @@
-import { pn, amountToString } from "./prettyNumbers";
+import { pn, amountToString } from './prettyNumbers';
-describe("prettyNumbers", () => {
- test("pn()", () => {
+describe('prettyNumbers', () => {
+ test('pn()', () => {
[
- {input: null, output: undefined},
- {input: undefined, output: undefined},
- {input: 0, output: "0"},
- {input: 1, output: "1"},
- {input: 2, output: "2"},
- {input: 10, output: "10"},
- {input: 11, output: "11"},
- {input: 11.0, output: "11"},
- {input: 12.0, output: "12"},
- {input: 100.50, output: "100.5"},
- {input: 224.56, output: "224.56"},
- {input: 1567, output: "1,567"},
- {input: 15678, output: "15,678"},
- {input: 2984.99, output: "2,984.99"},
- {input: 100000.00, output: "100,000"},
+ { input: null, output: undefined },
+ { input: undefined, output: undefined },
+ { input: 0, output: '0' },
+ { input: 1, output: '1' },
+ { input: 2, output: '2' },
+ { input: 10, output: '10' },
+ { input: 11, output: '11' },
+ { input: 11.0, output: '11' },
+ { input: 12.0, output: '12' },
+ { input: 100.5, output: '100.5' },
+ { input: 224.56, output: '224.56' },
+ { input: 1567, output: '1,567' },
+ { input: 15678, output: '15,678' },
+ { input: 2984.99, output: '2,984.99' },
+ { input: 100000.0, output: '100,000' },
].forEach((it) => {
const response = pn(it.input);
expect(response).toBe(it.output);
});
});
-})
+});
-describe("amountToString", () => {
- test("pn()", () => {
+describe('amountToString', () => {
+ test('pn()', () => {
[
- {input: null, output: "NaN"},
- {input: undefined, output: "NaN"},
- {input: ["", false, 50, 150] , output: "0"},
- {input: ["100.00", false, 50, 150] , output: "100"},
- {input: ["100.00", true, undefined, undefined] , output: "NaN-NaN"},
- {input: ["100.00", true, undefined, 150] , output: "NaN-150"},
- {input: ["100.00", true, 50, undefined] , output: "50-NaN"},
- {input: ["100.00", true, 50, 150] , output: "50-150"},
+ { input: null, output: 'NaN' },
+ { input: undefined, output: 'NaN' },
+ { input: ['', false, 50, 150], output: '0' },
+ { input: ['100.00', false, 50, 150], output: '100' },
+ { input: ['100.00', true, undefined, undefined], output: 'NaN-NaN' },
+ { input: ['100.00', true, undefined, 150], output: 'NaN-150' },
+ { input: ['100.00', true, 50, undefined], output: '50-NaN' },
+ { input: ['100.00', true, 50, 150], output: '50-150' },
].forEach((it) => {
- const params: any[] = it.input || []
- const response = amountToString(params[0],params[1],params[2],params[3]);
+ const params: any[] = it.input || [];
+ const response = amountToString(params[0], params[1], params[2], params[3]);
expect(response).toBe(it.output);
});
});
-})
\ No newline at end of file
+});