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

Test against a dev node backend #21

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.bitcoinwukong.robosats_android.model.OrderType
import com.bitcoinwukong.robosats_android.model.PaymentMethod
import com.bitcoinwukong.robosats_android.model.Robot
import com.bitcoinwukong.robosats_android.network.ITorManager
import com.bitcoinwukong.robosats_android.utils.ROBOSATS_DEVNODE
import com.bitcoinwukong.robosats_android.utils.ROBOSATS_MAINNET
import com.bitcoinwukong.robosats_android.utils.ROBOSATS_TESTNET
import com.bitcoinwukong.robosats_android.utils.TOR_SOCKS_PORT
Expand Down Expand Up @@ -177,7 +178,7 @@ class TorRepository(val torManager: ITorManager) {
checkTorConnection: Boolean = true,
parseResponse: (String) -> T
): Result<T> = withContext(Dispatchers.IO) {
val host = if (testNet) ROBOSATS_TESTNET else ROBOSATS_MAINNET
val host = ROBOSATS_DEVNODE

try {
var result: T? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ const val TOR_SOCKS_PORT = 9254 // Example port, adjust accordingly

const val ROBOSATS_MAINNET = "robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion"
const val ROBOSATS_TESTNET = "robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion"
const val ROBOSATS_DEVNODE = "robodevs7ixniseezbv7uryxhamtz3hvcelzfwpx3rvoipttjomrmpqd.onion"
1 change: 1 addition & 0 deletions app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion</domain>
<domain includeSubdomains="false">robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion</domain>
<domain includeSubdomains="false">robodevs7ixniseezbv7uryxhamtz3hvcelzfwpx3rvoipttjomrmpqd.onion</domain>
</domain-config>
</network-security-config>