Skip to content

Commit

Permalink
fix: improve error message and status in transaction list
Browse files Browse the repository at this point in the history
  • Loading branch information
chmanie committed Aug 6, 2024
1 parent 2129738 commit e19eabd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const GroupedTransactionContent: FC<GroupedTransactionContentProps> = ({
isShowingCancelConfirmation,
toggleCancelConfirmation,
handleCancelTransaction,
canBeSigned,
} = useGroupedTransactionContent({
id,
status,
Expand All @@ -93,15 +92,7 @@ const GroupedTransactionContent: FC<GroupedTransactionContentProps> = ({
{`${(group?.index || idx) + 1}. `} {titleText}
</div>

{isCancelable && canBeSigned ? (
<CancelTransaction
isShowingCancelConfirmation={isShowingCancelConfirmation}
handleCancelTransaction={handleCancelTransaction}
toggleCancelConfirmation={toggleCancelConfirmation}
/>
) : (
<TransactionStatus status={status} hasError={!!error} />
)}
<TransactionStatus status={status} hasError={!!error} />
</div>
{failed && error && retryable && (
<div className="mt-2 md:mr-2">
Expand Down
16 changes: 0 additions & 16 deletions src/redux/sagas/transactions/transactionChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,6 @@ const channelStart = async ({
try {
const sentTx = await channelSendTransaction(tx, txPromise, emit);
if (!sentTx) {
emit(
transactionUnsuccessfulError(
tx.id,
new Error('The transaction was unsuccessful'),
),
);
return null;
}

Expand All @@ -192,16 +186,6 @@ const channelStart = async ({
client,
emit,
});
} else {
/**
* @todo Use revert reason strings (once supported) in transactions.
*/
emit(
transactionUnsuccessfulError(
tx.id,
new Error('The transaction was unsuccessful'),
),
);
}

return null;
Expand Down

0 comments on commit e19eabd

Please sign in to comment.