Skip to content

Commit

Permalink
arbitrum messages status update
Browse files Browse the repository at this point in the history
  • Loading branch information
isstuev committed Jun 25, 2024
1 parent 3907d7c commit df4699d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 21 additions & 3 deletions ui/shared/statusTag/ArbitrumL2MessageStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,36 @@ export interface Props {

const ArbitrumL2MessageStatus = ({ status, isLoading }: Props) => {
let type: StatusTagType;
let text: string;

switch (status) {
case 'relayed':
case 'confirmed':
case 'relayed': {
type = 'ok';
text = 'Relayed';
break;
}
case 'confirmed': {
type = 'ok';
text = 'Ready for relay';
break;
}
case 'sent': {
type = 'pending';
text = 'Waiting';
break;
}
case 'initiated': {
type = 'pending';
text = 'Pending';
break;
}
default:
type = 'pending';
text = status;
break;
}

return <StatusTag type={ type } text={ status } isLoading={ isLoading }/>;
return <StatusTag type={ type } text={ text } isLoading={ isLoading }/>;
};

export default ArbitrumL2MessageStatus;

0 comments on commit df4699d

Please sign in to comment.