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

feat: disable taproot custom receive addresses in swapper #7781

Merged
merged 2 commits into from
Sep 22, 2024

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Sep 20, 2024

Description

Does what it says on the box

Issue (if applicable)

closes #7779

Risk

High Risk PRs Require 2 approvals

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

Low to none

Testing

  • BTC taproot (bc1p-prefix addresses) custom receive addresses are disabled for THOR Swapper
  • Other custom receive addresses (e.g SegWit native bc1q-prefixed addies) are happy

Engineering

  • ^

Operations

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

Screenshots (if applicable)

  • bc1p
Screenshot 2024-09-20 at 23 03 25
  • bc1q
Screenshot 2024-09-20 at 23 04 49

@gomesalexandre gomesalexandre requested a review from a team as a code owner September 20, 2024 21:06
@@ -938,6 +938,7 @@
"receiveAddress": "Receive Address",
"receiveAddressDescription": "No %{chainName} address found from connected wallet. Manually enter an address",
"disableThorNativeSmartContractReceive": "We've detected that you're sending to a smart contract address on %{chainName}. Due to THORChain limitations, receiving %{nativeAssetSymbol} to a smart contract address is not supported. Please enter another address",
"disableThorTaprootReceive": "We've detected that you're sending to a taproot Bitcoin address. Due to THORChain limitations, receiving BTC to a taproot address is not supported. Please enter another address",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not parameterized because dis only for BTC and going away soon so

variant='ghost'
onClick={handleEditRecipientAddressClick}
/>
<>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disable whitespaces when reviewing this

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.

Looking good!

Trades to Taproot addresses on THORChain are prevented with some very nice UI:

Screenshot 2024-09-23 at 08 40 40

Trades to non-Taproot addresses are happy:

Screenshot 2024-09-23 at 08 42 06

src/assets/translations/en/main.json Outdated Show resolved Hide resolved
@0xApotheosis 0xApotheosis merged commit c026b52 into develop Sep 22, 2024
1 check passed
@0xApotheosis 0xApotheosis deleted the feat_disable_taproot_swapper branch September 22, 2024 22:44
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.

Prevent trades to Taproot addresses
2 participants