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

ux: don't show Transaction failed error if rejected #1181

Open
bonustrack opened this issue Feb 12, 2025 · 1 comment · May be fixed by #1234
Open

ux: don't show Transaction failed error if rejected #1181

bonustrack opened this issue Feb 12, 2025 · 1 comment · May be fixed by #1234
Assignees
Labels

Comments

@bonustrack
Copy link
Member

bonustrack commented Feb 12, 2025

When doing a transaction or signing a message, if the user reject the action in his wallet we shouldn't show an error message with "Transaction failed", this is a common flow where user cancel his tx. We should instead not show a modal but just show his previous step (showing proposal page or space edition etc).
Image

Transaction failed should only appear when indeed a tx failed.

@wa0x6e
Copy link
Contributor

wa0x6e commented Mar 2, 2025

A similar feature was added in the turbo PR:

async function wrapPromise(
promise: Promise<any>,
chainId: ChainId
): Promise<string> {
try {
const tx = await promise;
uiStore.addPendingTransaction(tx.hash, chainId);
return tx.hash;
} catch (e) {
if (e.code === 'ACTION_REJECTED') {
currentStepMessages.value = {
failTitle: 'Transaction cancelled',
failSubtitle: ' '
};
}
throw e;
}
}

@wa0x6e wa0x6e self-assigned this Mar 3, 2025
@wa0x6e wa0x6e linked a pull request Mar 4, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants