Skip to content

Conversation

Linhead
Copy link
Collaborator

@Linhead Linhead commented Sep 1, 2025

Fixes illustration of status for BTC and BTC based coins transactions which are rejected due to dust amount on chat page

@Linhead Linhead requested a review from a team as a code owner September 1, 2025 15:53
Copy link

vercel bot commented Sep 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
adamant-im Ready Ready Preview Comment Sep 12, 2025 1:19pm

Copy link

github-actions bot commented Sep 1, 2025

Deployed to https://msg-adamant-pr-857.surge.sh 🚀

@Linhead Linhead force-pushed the bug/reject-by-dust-amount-not-working branch from 1c54c5f to 12a439b Compare September 1, 2025 16:00
@Linhead
Copy link
Collaborator Author

Linhead commented Sep 1, 2025

Copy link
Collaborator

@S-FrontendDev S-FrontendDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add release notes please

return (failureCount: number): boolean => {
return (failureCount: number, error: any): boolean => {
// Don't retry BTC transactions on 404 (dust amount rejections)
if (crypto === 'BTC' && error?.response?.status === 404) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

404 status is normal. Is it possible to check dust response?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And i think we need to do it in src/hooks/queries/transaction/useBtcTransactionQuery.ts file

retry: (failureCount: number): boolean => {
// Don't retry dust amount BTC transactions
const dustedIds = store.state.btc.dustedTransactionsIds || []
if (dustedIds.length > 0 && dustedIds.includes(unref(transactionId))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dustedIds.length > 0 is excessive

)
context.commit('dustedTransactionsIds', signedTransaction.txid)
}
context.commit('transactions', [{ hash: signedTransaction.txid, status: 'REJECTED' }])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be it's better not to use dustedTransactionsIds but something like

context.commit('transactions', [{ hash: signedTransaction.txid, status: 'REJECTED', isDust: true }])

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was my first idea. But I paid attention that transactions from store show only on wallet page. On chat page list of transactions are fetching by API call. That's why I need to check each transaction from API response if it was rejected by dust amount.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks.
@S-FrontendDev Please check if it's the optimal solution.

Copy link
Member

@adamantmm adamantmm Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On chat page list of transactions are fetching by API call

Do we still store transaction info locally?
May be we can mark this tx as isDust and amend this checking function accordingly.

@Linhead

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamantmm
We discussed with @S-FrontendDev and decided to do this fix as part of task that already implements a proper transaction status synchronization system without workarounds - https://trello.com/c/S29m39O1/759-coin-tx-status-chore-fix-verify-update-coin-tx-sending-algorithm

I've created a new PR for this fix - #866

Copy link

Successfully tore down https://msg-adamant-pr-857.surge.sh 🥲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants