Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ballot-rejected): fixed error message and scrollbar in overflow #555

Merged
merged 1 commit into from
Dec 16, 2024
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
14 changes: 11 additions & 3 deletions packages/interface/src/contexts/Maci.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,17 @@ export const MaciProvider: React.FC<MaciProviderProps> = ({ children }: MaciProv
signer,
})
.then(() => onSuccess())
.catch((err: Error) => {
setError(err.message);
return onError(err.message);
.catch((err: unknown) => {
if ((err as { code: string }).code === "ACTION_REJECTED") {
setError("Transaction rejected");
return onError("Transaction rejected");
}
if (err instanceof Error) {
setError(err.message);
return onError(err.message);
}
setError(String(err));
return onError(String(err));
})
.finally(() => {
setIsLoading(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const RoundItem = ({ round }: IRoundItemProps): JSX.Element => {
{round.roundId}
</Heading>

<div className="my-4 h-16 overflow-scroll text-gray-400">{round.description}</div>
<div className="my-4 h-16 overflow-hidden text-gray-400">{round.description}</div>

<RoundTag state={roundState} />
</div>
Expand Down
Loading