Skip to content

Commit d39dd2a

Browse files
committed
chore(web): sonar-cloud-review
1 parent 8aa0e69 commit d39dd2a

File tree

2 files changed

+30
-32
lines changed

2 files changed

+30
-32
lines changed

web/src/pages/Resolver/Landing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const Landing: React.FC = () => {
113113
label="Duplicate an exiting case."
114114
type="number"
115115
onInput={(e) => {
116-
const value = e.currentTarget.value.replace(/[^0-9]/g, "");
116+
const value = e.currentTarget.value.replace(/\D/g, "");
117117

118118
e.currentTarget.value = value;
119119
return e;

web/src/pages/Resolver/NavigationButtons/SubmitBatchDisputesButton.tsx

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -82,37 +82,35 @@ const SubmitBatchDisputesButton: React.FC = () => {
8282
}, [error, insufficientBalance]);
8383

8484
return (
85-
<>
86-
<EnsureChain>
87-
<div>
88-
<StyledButton
89-
text="Submit cases"
90-
disabled={isButtonDisabled}
91-
isLoading={(isSubmittingCase || isBalanceLoading || isLoadingConfig) && !insufficientBalance}
92-
onClick={() => {
93-
if (batchConfig && publicClient) {
94-
setIsSubmittingCase(true);
95-
wrapWithToast(async () => await executeBatch(batchConfig), publicClient)
96-
.then((res) => {
97-
if (res.status && !isUndefined(res.result)) {
98-
resetDisputeData();
99-
navigate("/cases/display/1/desc/all");
100-
}
101-
})
102-
.finally(() => {
103-
setIsSubmittingCase(false);
104-
});
105-
}
106-
}}
107-
/>
108-
{errorMsg && (
109-
<ErrorButtonMessage>
110-
<ClosedCircleIcon /> {errorMsg}
111-
</ErrorButtonMessage>
112-
)}
113-
</div>
114-
</EnsureChain>
115-
</>
85+
<EnsureChain>
86+
<div>
87+
<StyledButton
88+
text="Submit cases"
89+
disabled={isButtonDisabled}
90+
isLoading={(isSubmittingCase || isBalanceLoading || isLoadingConfig) && !insufficientBalance}
91+
onClick={() => {
92+
if (batchConfig && publicClient) {
93+
setIsSubmittingCase(true);
94+
wrapWithToast(async () => await executeBatch(batchConfig), publicClient)
95+
.then((res) => {
96+
if (res.status && !isUndefined(res.result)) {
97+
resetDisputeData();
98+
navigate("/cases/display/1/desc/all");
99+
}
100+
})
101+
.finally(() => {
102+
setIsSubmittingCase(false);
103+
});
104+
}
105+
}}
106+
/>
107+
{errorMsg && (
108+
<ErrorButtonMessage>
109+
<ClosedCircleIcon /> {errorMsg}
110+
</ErrorButtonMessage>
111+
)}
112+
</div>
113+
</EnsureChain>
116114
);
117115
};
118116

0 commit comments

Comments
 (0)