File tree Expand file tree Collapse file tree 5 files changed +11
-8
lines changed
androidTest/java/to/bitkit/services Expand file tree Collapse file tree 5 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class BlocktankTest {
3838 Env .initAppStoragePath(testDbPath)
3939 initDb(testDbPath)
4040 runBlocking {
41- updateBlocktankUrl(Env .blocktankClientServer )
41+ updateBlocktankUrl(Env .blocktankApiUrl )
4242 }
4343 }
4444
Original file line number Diff line number Diff line change @@ -63,13 +63,16 @@ internal object Env {
6363 get() = when (network) {
6464 Network .REGTEST -> " https://api.stag0.blocktank.to"
6565 Network .TESTNET -> " https://api.stag0.blocktank.to"
66+ Network .BITCOIN -> " https://api1.blocktank.to/"
6667 else -> TODO (" ${network.name} network not implemented" )
6768 }
69+ val blocktankApiUrl get() = " $blocktankBaseUrl /blocktank/api/v2"
70+ val blocktankNotificationApiUrl
71+ get() = when (network) {
72+ Network .BITCOIN -> " $blocktankBaseUrl /api/notifications"
73+ else -> " $blocktankBaseUrl /notifications/api"
74+ }
6875
69- val blocktankClientServer get() = " $blocktankBaseUrl /blocktank/api/v2"
70- val blocktankPushNotificationServer get() = " $blocktankBaseUrl /notifications/api"
71-
72- // const val btcRatesServer = "https://blocktank.synonym.to/fx/rates/btc/"
7376 const val btcRatesServer = " https://api1.blocktank.to/api/fx/rates/btc"
7477 const val geoCheckUrl = " https://api1.blocktank.to/api/geocheck"
7578 const val chatwootUrl = " https://synonym.to/api/chatwoot"
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ class CoreService @Inject constructor(
103103 }
104104
105105 try {
106- val blocktankUrl = Env .blocktankClientServer
106+ val blocktankUrl = Env .blocktankApiUrl
107107 updateBlocktankUrl(newUrl = blocktankUrl)
108108 Logger .info(" Blocktank URL updated to: $blocktankUrl " )
109109 } catch (e: Exception ) {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class LspNotificationsService @Inject constructor(
5151 nodeId = nodeId,
5252 isoTimestamp = " $timestamp " ,
5353 signature = signature,
54- customUrl = Env .blocktankPushNotificationServer ,
54+ customUrl = Env .blocktankNotificationApiUrl ,
5555 isProduction = null ,
5656 )
5757 }
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class DevSettingsViewModel @Inject constructor(
7676 deviceToken = firebaseMessaging.token.await(),
7777 secretMessage = " hello" ,
7878 notificationType = " incomingHtlc" ,
79- customUrl = Env .blocktankPushNotificationServer ,
79+ customUrl = Env .blocktankNotificationApiUrl ,
8080 )
8181 ToastEventBus .send(type = Toast .ToastType .INFO , title = " LSP notification sent to this device" )
8282 }.onFailure {
You can’t perform that action at this time.
0 commit comments