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

chore: minor changes to thorchain swapper tx status during swaps #7830

Closed
wants to merge 2 commits into from

Conversation

woodenfurniture
Copy link
Member

Description

Investigation of #7371 led to some improvements to copy and a fix to swap status logic. Huzzah.

Issue (if applicable)

Stemmed from investigation of #7371

Risk

High Risk PRs Require 2 approvals

Low risk.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

Test thorchain swaps complete as expected with better copy.

Engineering

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

image

image

@woodenfurniture woodenfurniture requested a review from a team as a code owner September 28, 2024 08:26
@@ -373,7 +373,7 @@ export const thorchainApi: SwapperApi = {
}

const latestOutTx = data.out_txs?.[data.out_txs.length - 1]
const hasOutboundTx = latestOutTx?.chain !== 'THOR'
const hasOutboundTx = latestOutTx !== undefined && latestOutTx.chain !== 'THOR'
Copy link
Member Author

Choose a reason for hiding this comment

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

So turns out, if there is no latestOutTx it means it doesn't actually have an outbound tx 😅

@woodenfurniture
Copy link
Member Author

Closed in favor of #7831

Copy link
Contributor

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

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

gm

Small streaming swap with appropriate messages:

Screenshot 2024-09-30 at 13 33 43 Screenshot 2024-09-30 at 13 34 01 Screenshot 2024-09-30 at 13 34 24

@@ -61,15 +61,18 @@ export const getLatestThorTxStatusMessage = (
}
}

return { message: obj.pending ? 'Swap pending' : 'Swap complete', status: TxStatus.Pending }
return {
message: obj.pending ? 'Swap pending' : 'Swap complete, awaiting finalization',
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR at all, but it occurred to me whilst reading this that all of these probably need actual translations!

@0xApotheosis
Copy link
Contributor

The ruggiest of rugs 😂

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.

2 participants