Skip to content

Commit 7d16b0a

Browse files
committed
Merge branch 'master' into feat/ldk-routing-fees
2 parents e94b70f + 0ccd550 commit 7d16b0a

File tree

7 files changed

+261
-182
lines changed

7 files changed

+261
-182
lines changed

.github/workflows/e2e.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ jobs:
6464
runs-on: ubuntu-latest
6565
needs: build
6666

67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
shard:
71+
- { name: onboarding_backup_numberpad, grep: "@onboarding|@backup|@numberpad" }
72+
- { name: onchain_receive_widgets, grep: "@onchain|@receive|@widgets" }
73+
- { name: settings, grep: "@settings" }
74+
75+
name: e2e-tests - ${{ matrix.shard.name }}
76+
6777
steps:
6878
- name: Show selected E2E branch
6979
env:
@@ -125,7 +135,7 @@ jobs:
125135
sudo bash -c "while [ ! -f docker/lnd/data/chain/bitcoin/regtest/admin.macaroon ]; do sleep 1; done"
126136
sudo chmod -R 777 docker/lnd
127137
128-
- name: Run E2E Tests
138+
- name: Run E2E Tests (${{ matrix.shard.name }})
129139
uses: reactivecircus/android-emulator-runner@v2
130140
with:
131141
profile: pixel_6
@@ -134,17 +144,17 @@ jobs:
134144
avd-name: Pixel_6
135145
force-avd-creation: false
136146
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-front none
137-
script: cd bitkit-e2e-tests && ./ci_run_android.sh
147+
script: cd bitkit-e2e-tests && ./ci_run_android.sh --mochaOpts.grep "${{ matrix.shard.grep }}"
138148
env:
139149
RECORD_VIDEO: true
140150

141-
- name: Upload E2E Artifacts
151+
- name: Upload E2E Artifacts (${{ matrix.shard.name }})
142152
if: failure()
143153
uses: actions/upload-artifact@v4
144154
with:
145-
name: e2e-artifacts_${{ github.run_number }}
155+
name: e2e-artifacts_${{ matrix.shard.name }}_${{ github.run_number }}
146156
path: bitkit-e2e-tests/artifacts/
147157

148-
- name: Dump docker logs on failure
158+
- name: Dump docker logs on failure (${{ matrix.shard.name }})
149159
if: failure()
150160
uses: jwalton/gh-docker-logs@v2

app/src/main/java/to/bitkit/data/backup/VssBackupClient.kt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,31 @@ class VssBackupClient @Inject constructor(
2929
suspend fun setup() = withContext(bgDispatcher) {
3030
try {
3131
withTimeout(30.seconds) {
32-
val vssServerUrl = Env.vssServerUrl
33-
Logger.verbose("VSS client setting up…", context = TAG)
34-
if (Env.lnurlAuthSeverUrl.isNotEmpty()) {
32+
Logger.debug("VSS client setting up…", context = TAG)
33+
val vssUrl = Env.vssServerUrl
34+
val lnurlAuthServerUrl = Env.lnurlAuthServerUrl
35+
Logger.verbose("Building VSS client with vssUrl: '$vssUrl'")
36+
Logger.verbose("Building VSS client with lnurlAuthServerUrl: '$lnurlAuthServerUrl'")
37+
if (lnurlAuthServerUrl.isNotEmpty()) {
3538
val mnemonic = keychain.loadString(Keychain.Key.BIP39_MNEMONIC.name)
3639
?: throw ServiceError.MnemonicNotFound
3740
val passphrase = keychain.loadString(Keychain.Key.BIP39_PASSPHRASE.name)
3841

3942
vssNewClientWithLnurlAuth(
40-
baseUrl = vssServerUrl,
43+
baseUrl = vssUrl,
4144
storeId = vssStoreIdProvider.getVssStoreId(),
4245
mnemonic = mnemonic,
4346
passphrase = passphrase,
44-
lnurlAuthServerUrl = Env.lnurlAuthSeverUrl,
47+
lnurlAuthServerUrl = lnurlAuthServerUrl,
4548
)
4649
} else {
4750
vssNewClient(
48-
baseUrl = vssServerUrl,
51+
baseUrl = vssUrl,
4952
storeId = vssStoreIdProvider.getVssStoreId(),
5053
)
5154
}
5255
isSetup.complete(Unit)
53-
Logger.info("VSS client setup with server: '$vssServerUrl'", context = TAG)
56+
Logger.info("VSS client setup with server: '$vssUrl'", context = TAG)
5457
}
5558
} catch (e: Throwable) {
5659
isSetup.completeExceptionally(e)

app/src/main/java/to/bitkit/env/Env.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ internal object Env {
3939

4040
val vssServerUrl
4141
get() = when (network) {
42-
Network.BITCOIN -> TODO("VSS not implemented for mainnet")
42+
Network.BITCOIN -> TODO("VSS server not implemented for mainnet")
4343
// Network.REGTEST -> "http://localhost:5050/vss"
44-
// Network.REGTEST -> "https://bitkit.stag0.blocktank.to/vss_rs_auth"
45-
else -> "https://bitkit.stag0.blocktank.to/vss_rs/"
44+
else -> "https://bitkit.stag0.blocktank.to/vss_rs_auth"
4645
}
4746

48-
val lnurlAuthSeverUrl = when (network) {
47+
val lnurlAuthServerUrl = when (network) {
48+
Network.BITCOIN -> TODO("LNURL-auth server not implemented for mainnet")
4949
// Network.REGTEST -> "http://localhost:5005/auth"
50-
else -> "" // TODO implement LNURL-auth Server for other networks
50+
else -> "https://bitkit.stag0.blocktank.to/lnurl_auth/auth"
5151
}
5252

5353
val vssStoreIdPrefix get() = "bitkit_v1_${network.name.lowercase()}"

app/src/main/java/to/bitkit/repositories/ActivityRepo.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,15 +363,15 @@ class ActivityRepo @Inject constructor(
363363
when (activity.v1.txType) {
364364
PaymentType.RECEIVED -> {
365365
// TODO Temporary solution while whe ldk-node doesn't return the address directly
366-
Logger.debug("Fetching data for txId: ${activity.v1.txId}", context = TAG)
366+
Logger.verbose("Fetching data for txId: ${activity.v1.txId}", context = TAG)
367367
runCatching {
368368
addressChecker.getTransaction(activity.v1.txId)
369369
}.onSuccess { txDetails ->
370-
Logger.debug("Tx detail fetched with success: $txDetails", context = TAG)
370+
Logger.verbose("Tx detail fetched with success: $txDetails", context = TAG)
371371
txDetails.vout.map { vOut ->
372372
async {
373373
vOut.scriptpubkey_address?.let {
374-
Logger.debug("Extracted address: $it", context = TAG)
374+
Logger.verbose("Extracted address: $it", context = TAG)
375375
db.tagMetadataDao().searchByAddress(it)
376376
}?.let { tagMetadata ->
377377
Logger.debug("Tags metadata found! $tagMetadata", context = TAG)

0 commit comments

Comments
 (0)