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: replace testnet 3 with testnet 4 #16426

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

karliatto
Copy link
Member

@karliatto karliatto commented Jan 16, 2025

Description

Replacing default Bitcoin Testnet account from Testnet3 to Testnet4. And adding an information banner to the message system.

TODOs:

  • Update connect core and popup tests where we use Testnet 3 to use custom backend and add a note to update it to use regtest.

Related Issue

Resolve #14951

Screenshot from 2025-01-27 18-47-47

},
"cta": {
"action": "external-link",
"link": "https://trezor.io/learn/a/what-is-trezor-suite-lite#open-chat",
Copy link
Member Author

Choose a reason for hiding this comment

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

I still need to know the knowledge base article to be here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Already modified to the right one.

"variant": "info",
"category": ["banner"],
"content": {
"en-GB": "Testnet account has been updated to new Testnet4.",
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe more information is needed or the link to the article would be enough ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder whether it is important to handle testnet update this much gracefully. Isn't testnet something that is unstable by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

Some people use Testnet for learning about self-custody Bitcoin. So they get confident before they buy some mainnet BTC.
After this change they are going to see empty balance so some message is kind of nice to let them know that it is all right. Anyway the message will appear only to users with Testnet enabled.

Copy link

github-actions bot commented Jan 16, 2025

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 23
  • More info

Learn more about 𝝠 Expo Github Action

@karliatto karliatto force-pushed the feat/replace-testnet3-with-testnet-4 branch from b5fe4b5 to 70cfb21 Compare January 16, 2025 15:48
"sequence": 74,
"actions": [
{
"conditions": [
Copy link
Member Author

Choose a reason for hiding this comment

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

It requires condition so it display only to users that have Testnet coin enabled.

"conditions": [
{
"environment": {
"desktop": ">=25.1.2",
Copy link
Member Author

Choose a reason for hiding this comment

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

This is probably going to be next release. But maybe confirm it when release come.

@karliatto karliatto force-pushed the feat/replace-testnet3-with-testnet-4 branch 2 times, most recently from eb44fd2 to 276733c Compare January 21, 2025 09:11
}
],
"message": {
"id": "2855131c-c871-4fe3-a758-ab7bd92b9934",
Copy link
Member Author

Choose a reason for hiding this comment

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

I generated this id randomly.

},
"cta": {
"action": "external-link",
"link": "https://trezor.io/learn/a/bitcoin-testnet",
Copy link
Member Author

Choose a reason for hiding this comment

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

This article is going to be updated to explain how to get back to Testnet 3.

@karliatto karliatto force-pushed the feat/replace-testnet3-with-testnet-4 branch from 276733c to e8169bb Compare January 21, 2025 09:23
@@ -1,8 +1,70 @@
{
"version": 1,
"timestamp": "2024-01-03T00:00:00+00:00",
"timestamp": "2025-01-06T00:00:00+00:00",
Copy link
Member Author

Choose a reason for hiding this comment

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

@matejkriz could you please advise if this message-system "action" is properly defined?

"action": "external-link",
"link": "https://trezor.io/learn/a/bitcoin-testnet",
"label": {
"en-GB": "Learn how to get back to Testnet 3:",
Copy link
Member

Choose a reason for hiding this comment

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

Too long, "Learn more" would fit better (on desktop it is a button label)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, thanks. Done 46c797f

Comment on lines 15 to 17
{
"tor": true,
"tbtc": true
},
{
"tor": false,
"tbtc": true
}
Copy link
Member

Choose a reason for hiding this comment

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

I think there is no need to specify tor state.

Suggested change
{
"tor": true,
"tbtc": true
},
{
"tor": false,
"tbtc": true
}
{
"tbtc": true
}

Copy link
Member

Choose a reason for hiding this comment

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

And I believe the key is test not tbtc, but not sure if there are some changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, thanks. Done 46c797f

@karliatto karliatto force-pushed the feat/replace-testnet3-with-testnet-4 branch 2 times, most recently from 9f2cfce to ac8379f Compare January 24, 2025 12:08
@karliatto
Copy link
Member Author

I just rebased it since I wanted to get latest state of suite tests and see where are those failing because of this changes.

@karliatto karliatto mentioned this pull request Jan 24, 2025
@karliatto karliatto force-pushed the feat/replace-testnet3-with-testnet-4 branch 4 times, most recently from a6a4604 to 8012fc7 Compare January 27, 2025 15:22
@karliatto karliatto marked this pull request as ready for review January 27, 2025 17:11
@karliatto karliatto changed the title WIP: Feat/replace testnet3 with testnet 4 feat/eplace testnet3 with testnet 4 Jan 27, 2025
@karliatto karliatto changed the title feat/eplace testnet3 with testnet 4 feat: replace testnet3 with testnet 4 Jan 27, 2025
@karliatto karliatto changed the title feat: replace testnet3 with testnet 4 feat: replace testnet 3 with testnet 4 Jan 27, 2025
@karliatto
Copy link
Member Author

karliatto commented Jan 27, 2025

@matejkriz I applied the changes you suggested and tested the message system locally, picture in the Pull Request description.

Tests are now passing. I think this is ready to go. The article is going to be updated to include more information about how to make Trezor Suite to get back to Testnet 3 if any user wants that.

@@ -2636,7 +2680,7 @@
{
"blockchain_link": {
"type": "blockfrost",
"url": ["wss://ada1.trezor.io", "wss://ada2.trezor.io"]
"url": ["wss://trezor-cardano-mainnet.blockfrost.io"]
Copy link
Member

Choose a reason for hiding this comment

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

We don't want these changes, seems like these were recently updated in Suite repo but not in FW repo
c6d420c

Copy link
Member Author

Choose a reason for hiding this comment

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

I see, I just talked to @tomasklim and they were modified manually. I will ignore the changes, and just add the changes I need for this. Soon trezor-common will be the source of truth trezor/trezor-firmware#4530

@karliatto karliatto force-pushed the feat/replace-testnet3-with-testnet-4 branch from e10d19e to 8fc6481 Compare January 28, 2025 08:40
@karliatto karliatto force-pushed the feat/replace-testnet3-with-testnet-4 branch from 8fc6481 to d64b444 Compare January 28, 2025 09:58
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.

Add testnet version 4 for bitcoin
4 participants