Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
97594cc
feat: add wear spark payment calls and send keys
jvsena42 Nov 28, 2026
c1a3c51
feat: add wear payments repository with self-send guard
jvsena42 Nov 28, 2026
83dc898
feat: refuse own spark invoices in the phone's self-send guard
jvsena42 Nov 28, 2026
834990f
docs: describe wear payments and the self-send guard
jvsena42 Nov 28, 2026
a700cb7
refactor: share the wear balance amount rows
jvsena42 Nov 28, 2026
5077c91
feat: add wear qr, screen awake and hold to pay components
jvsena42 Nov 28, 2026
5d4979f
feat: add wear receive, send and activity screens
jvsena42 Nov 28, 2026
c9d1ce0
docs: describe wear payments screens and their journeys
jvsena42 Nov 28, 2026
b54ce39
docs: leave the wear tile for a later pr
jvsena42 Nov 28, 2026
bf1bf73
fix: keep wear send keys across retries, fail closed on unknown
jvsena42 Nov 28, 2026
4922583
fix: fail closed in the phone's own spark invoice guard
jvsena42 Nov 28, 2026
4fa8427
fix: harden wear send, receive and activity screens
jvsena42 Nov 28, 2026
0e56c2d
docs: update wear payments docs and journeys for review fixes
jvsena42 Nov 28, 2026
74250ff
fix: tag the dropped own spark invoices log
jvsena42 Nov 28, 2026
89e8173
fix: tell a busy wear wallet from a pending send, harden receive and …
jvsena42 Nov 28, 2026
dd1b669
docs: update wear payments docs and journeys for round 2 fixes
jvsena42 Nov 28, 2026
220b91a
fix: hide the paid amount in ambient, show a stalled retry as pending
jvsena42 Nov 28, 2026
8c448ac
docs: update wear payments docs and journeys for round 3 fixes
jvsena42 Nov 28, 2026
e125cd1
docs: run the wear ambient paid journey after the activity list
jvsena42 Nov 28, 2026
569523c
docs: limit the wear payments changelog to the phone guard
jvsena42 Nov 28, 2026
29b8f0f
docs: stop the wear screen recorder before pulling the video
jvsena42 Nov 28, 2026
15608d4
feat: add a balance tile to the wear app
jvsena42 Nov 28, 2026
f6a2d0a
docs: describe the wear balance tile and its journey
jvsena42 Nov 28, 2026
2afe1bd
chore: verify the wear tile dependencies
jvsena42 Nov 28, 2026
7b9cea3
fix: accept the phone's payment link schemes on the watch
jvsena42 Nov 28, 2026
956f661
feat: show a dedicated offline error when paying offline on the watch
jvsena42 Nov 28, 2026
5fd473c
fix: show an ok edge button on wear send refusals
jvsena42 Nov 28, 2026
3c6d747
fix: keep the check drawable for wear success states
jvsena42 Nov 28, 2026
e892944
feat: import the phone's settings and quickpay on the watch
jvsena42 Nov 28, 2026
8526732
docs: add wear settings sync and quickpay docs and journeys
jvsena42 Nov 28, 2026
44793a0
fix: keep quickpay to attended sends, wait for the import, harden the…
jvsena42 Nov 28, 2026
aaa9a91
docs: update wear settings sync docs and journeys for round 1 fixes
jvsena42 Nov 28, 2026
f452cb3
fix: keep quickpay from a restored send flow, run the settings import…
jvsena42 Nov 28, 2026
8b877fe
docs: update wear settings sync docs and journeys for round 2 fixes
jvsena42 Nov 28, 2026
55701fb
fix: match the phone's quickpay rules, ignore links from recents
jvsena42 Nov 28, 2026
4a0d325
docs: update wear quickpay docs and journeys for phone parity
jvsena42 Nov 28, 2026
eab4824
docs: drop rows the wear rebase duplicated
jvsena42 Nov 28, 2026
803f4cb
fix: compile the balance tile against the wear display unit
jvsena42 Nov 28, 2026
d8f47de
fix: hold quickpay at the phone's boundary, keep its count exact
jvsena42 Nov 28, 2026
9dfbff6
docs: update wear quickpay docs for the round 4 fixes
jvsena42 Nov 28, 2026
aef28ed
fix: show the tile balance in the imported display unit
jvsena42 Nov 28, 2026
894096b
fix: end a quickpay link on the offline error, never across an offlin…
jvsena42 Nov 28, 2026
886e270
docs: describe wear quickpay with the offline error and the new link …
jvsena42 Nov 28, 2026
7e8893d
feat: pay and receive by nfc tap on the watch
jvsena42 Nov 28, 2026
bf63738
docs: describe wear nfc with its journey and manual tests
jvsena42 Nov 28, 2026
4d6830f
fix: gate nfc taps and sends per process, hold the tag to the wall clock
jvsena42 Nov 28, 2026
4f48362
docs: update wear nfc docs, journey and manual tests for the round 1 …
jvsena42 Nov 28, 2026
7f5a2cf
fix: hold the invoice timers to the wall clock, keep a popped send fl…
jvsena42 Nov 28, 2026
7ac718a
docs: update wear nfc docs and manual tests for the round 2 fixes
jvsena42 Nov 28, 2026
16602ed
docs: record the wear journeys rerun under singletask
jvsena42 Nov 28, 2026
3f1db7e
feat: report pending wear payments after 10 s and tell their outcome
jvsena42 Nov 28, 2026
9ad5fae
docs: describe wear pending payments with hold invoice journeys
jvsena42 Nov 28, 2026
ca56663
fix: mark the wear wallet locked before the lock disconnects it
jvsena42 Nov 28, 2026
0f41eac
fix: keep a wear payment's outcome until shown, never over a payment
jvsena42 Nov 28, 2026
29624fb
docs: update wear pending docs and split the hold invoice journeys
jvsena42 Nov 28, 2026
1a1a994
fix: mark the wear wallet locked again once the lock disconnected it
jvsena42 Nov 28, 2026
532b58f
fix: keep a wear outcome under the lock screen, wait for the wallet a…
jvsena42 Nov 28, 2026
e3f90c7
fix: make the wear outcome a pane and the send result one live line
jvsena42 Nov 28, 2026
496662f
docs: update wear pending docs and journeys for the round 2 fixes
jvsena42 Nov 28, 2026
2cccbb9
fix: leave a wear outcome under the lock screen to the overlay
jvsena42 Nov 28, 2026
80e7b82
docs: give the wear talkback manual test its own setup
jvsena42 Nov 28, 2026
2b07fa9
fix: keep the wear wallet offline when a sync succeeds with no network
jvsena42 Nov 28, 2026
2d7de68
fix: sync the wear balance when a watched payment resolves
jvsena42 Nov 28, 2026
bc97b19
docs: describe the wear offline rule and the outcome balance sync
jvsena42 Nov 28, 2026
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
36 changes: 36 additions & 0 deletions app/src/main/java/to/bitkit/data/CacheStore.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ import kotlin.time.Clock
*/
internal const val MAX_SPARK_SEND_HASHES = 100

/**
* How many unexpired invoices of the wallet's own are remembered; the ones that expire last are kept. Far above what
* a day of receive, contact and transfer invoices makes, as a dropped one could be paid by its own wallet.
*/
internal const val MAX_SPARK_OWN_INVOICES = 2_000

/**
* How long past its invoice's expiry a send no listing shows may still be pending: no send starts after the expiry,
* and one settles within its HTLC timeout, which LDK caps at 1008 blocks (about a week) and Spark's routes keep
Expand All @@ -51,6 +57,10 @@ class CacheStore internal constructor(
private val store: DataStore<AppCacheData>,
private val clock: Clock = Clock.System,
) {
companion object {
private const val TAG = "CacheStore"
}

@Inject
constructor(@ApplicationContext context: Context) : this(context.appCacheDataStore)

Expand Down Expand Up @@ -167,6 +177,27 @@ class CacheStore internal constructor(
}
}

/**
* Remembers the Spark invoice with [paymentHash] as one this wallet created, until [expiresAt] in epoch seconds,
* so the wallet refuses to pay it. Invoices expired at [now] are dropped, as nobody can pay them. A paired
* device's invoices are added the same way.
*/
suspend fun addSparkOwnInvoice(paymentHash: String, expiresAt: Long, now: Long) {
var dropped = 0
store.updateData { data ->
val unexpired = (data.sparkOwnInvoices + (paymentHash.lowercase() to expiresAt)).entries
.filter { it.value > now }
dropped = (unexpired.size - MAX_SPARK_OWN_INVOICES).coerceAtLeast(0)
val invoices = unexpired.sortedByDescending { it.value }.take(MAX_SPARK_OWN_INVOICES)
data.copy(sparkOwnInvoices = invoices.associate { it.key to it.value })
}
if (dropped > 0) Logger.warn("Dropped '$dropped' unexpired own Spark invoices", context = TAG)
}

/** Whether [paymentHash] is a Spark invoice of this wallet that has not expired at [now], in epoch seconds. */
suspend fun hasSparkOwnInvoice(paymentHash: String, now: Long): Boolean =
store.data.first().sparkOwnInvoices[paymentHash.lowercase()]?.let { it > now } == true

suspend fun removeSparkSendHash(paymentHash: String) {
val hash = paymentHash.lowercase()
if (hash !in store.data.first().sparkSendHashes) return
Expand Down Expand Up @@ -454,6 +485,11 @@ data class AppCacheData(
val sparkSendHashes: List<String> = listOf(),
/** Invoice expiry in epoch seconds of the [sparkSendHashes] that know it. */
val sparkSendExpiries: Map<String, Long> = mapOf(),
/**
* Payment hashes of the unexpired Spark invoices this wallet created, with their expiry in epoch seconds, which
* the wallet refuses to pay: such an invoice names only Spark's provider, so nothing in it tells whose it is.
*/
val sparkOwnInvoices: Map<String, Long> = mapOf(),
/**
* Spark's sends whose outcome it didn't report, by hash, with when they started in epoch seconds, kept across a
* restart until Spark settles them.
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/to/bitkit/repositories/LightningRepo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3023,6 +3023,10 @@ class LightningRepo @Inject constructor(
/** Whether Spark alone can pay [amountSats], which it does whenever the node cannot. */
fun canSendWithSpark(amountSats: ULong): Boolean = sparkRepo.canSend(amountSats)

/** Whether [bolt11], with [paymentHash] in hex, pays this wallet's Spark balance, see [SparkRepo.isOwnInvoice]. */
suspend fun isOwnSparkInvoice(bolt11: String, paymentHash: String): Boolean =
sparkRepo.isOwnInvoice(bolt11, paymentHash)

/** Whether Spark's whole balance covers a withdrawal debiting [debitSats], its fees included. */
fun canWithdrawWithSpark(debitSats: ULong): Boolean = sparkRepo.canWithdraw(debitSats)

Expand Down
30 changes: 29 additions & 1 deletion app/src/main/java/to/bitkit/repositories/SparkRepo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,39 @@ class SparkRepo @Inject constructor(
/** A withdrawal's debit already holds its fees, so it is weighed against the whole balance. */
fun canWithdraw(debitSats: ULong): Boolean = _state.value.isReady && _state.value.balanceSats >= debitSats

/**
* Creates a Spark invoice and remembers it as this wallet's own, which [isOwnInvoice] then recognises. An invoice
* that cannot be read or remembered is not handed out.
*/
suspend fun createInvoice(amountSats: ULong?, description: String, expirySecs: UInt): Result<String> =
withContext(bgDispatcher) {
runSuspendCatching { sparkService.receiveBolt11(amountSats, description, expirySecs) }
runSuspendCatching {
sparkService.receiveBolt11(amountSats, description, expirySecs).also { rememberOwnInvoice(it) }
}
}

private suspend fun rememberOwnInvoice(bolt11: String) {
val invoice = sparkService.invoiceDetails(bolt11) ?: throw SparkError.InvoiceUnreadable()
val expiresAt = SparkService.invoiceExpiresAt(invoice.timestamp, invoice.expiry)
cacheStore.addSparkOwnInvoice(invoice.paymentHash, expiresAt.toEpochSeconds(), clock.now().epochSeconds)
}

/**
* Whether [bolt11], with [paymentHash] in hex, pays this Spark wallet: an unexpired invoice this wallet remembers
* creating, or one that carries this wallet's Spark address. Remembered invoices that cannot be read count as
* own, so the invoice is refused instead of paid unchecked. The second check needs Spark connected and is skipped
* without it, as on a build or network without Spark. An invoice a paired watch created is known only once its
* hash was added to the cache.
*/
suspend fun isOwnInvoice(bolt11: String, paymentHash: String): Boolean = withContext(bgDispatcher) {
val isRemembered = runSuspendCatching { cacheStore.hasSparkOwnInvoice(paymentHash, clock.now().epochSeconds) }
.onFailure { Logger.warn("Failed to read the wallet's own Spark invoices", it, context = TAG) }
.getOrDefault(true)
isRemembered || runSuspendCatching { sparkService.carriesOwnSparkAddress(bolt11) }
.onFailure { Logger.debug("Skipped the Spark address check of an invoice: '${it.message}'", context = TAG) }
.getOrDefault(false)
}

/** Returns the Lightning routing fee plus Spark's 0.25% service fee for paying [bolt11]. */
suspend fun estimateFeeSats(bolt11: String, amountSats: ULong?): Result<ULong> = withContext(bgDispatcher) {
runSuspendCatching {
Expand Down
37 changes: 36 additions & 1 deletion app/src/main/java/to/bitkit/services/SparkService.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package to.bitkit.services

import breez_sdk_spark.Bolt11InvoiceDetails
import breez_sdk_spark.BreezSdk
import breez_sdk_spark.ChainApiType
import breez_sdk_spark.CheckRecoverFundsRequest
Expand Down Expand Up @@ -151,6 +152,29 @@ class SparkService @Inject constructor(
/** Whether [shortChannelIds], an invoice's route hint hops, carry a Spark address. */
internal fun hasSparkAddressHint(shortChannelIds: List<ULong>): Boolean =
SPARK_ADDRESS_HINT_SCID in shortChannelIds

private const val SCID_BLOCK_SHIFT = 40
private const val SCID_TX_SHIFT = 16
private const val SCID_TX_MASK = 0xFFFFFFuL
private const val SCID_OUTPUT_MASK = 0xFFFFuL

/** [SPARK_ADDRESS_HINT_SCID] as the SDK's parser prints a hop's: block x transaction x output. */
internal val sparkAddressHintScid: String = SPARK_ADDRESS_HINT_SCID.let {
"${it shr SCID_BLOCK_SHIFT}x${(it shr SCID_TX_SHIFT) and SCID_TX_MASK}x${it and SCID_OUTPUT_MASK}"
}

/**
* Whether [invoice] carries the Spark address of the wallet with [identityPubkey], its Spark identity in hex:
* the node of the Spark address hint is the identity of the wallet that asked for the invoice. Bitkit's own
* invoices carry no such hint, so this only recognises invoices made with the SDK's
* `preferSparkOverLightning` on.
*/
internal fun namesSparkIdentity(invoice: Bolt11InvoiceDetails, identityPubkey: String): Boolean =
invoice.routingHints.any { hint ->
hint.hops.any {
it.shortChannelId == sparkAddressHintScid && it.srcNodeId.equals(identityPubkey, ignoreCase = true)
}
}
}

private val mutex = Mutex()
Expand Down Expand Up @@ -336,7 +360,15 @@ class SparkService @Inject constructor(

/** When [bolt11] expires, in epoch seconds, read by the SDK's own parser; null when it isn't a BOLT11 invoice. */
suspend fun invoiceExpiresAt(bolt11: String): ULong? =
(requireSdk().parse(bolt11) as? InputType.Bolt11Invoice)?.v1?.let { invoiceExpiresAt(it.timestamp, it.expiry) }
invoiceDetails(bolt11)?.let { invoiceExpiresAt(it.timestamp, it.expiry) }

/** [bolt11] as the SDK's own parser reads it; null when it isn't a BOLT11 invoice. */
suspend fun invoiceDetails(bolt11: String): Bolt11InvoiceDetails? =
(requireSdk().parse(bolt11) as? InputType.Bolt11Invoice)?.v1

/** Whether [bolt11] carries this wallet's own Spark address, see [namesSparkIdentity]. */
suspend fun carriesOwnSparkAddress(bolt11: String): Boolean =
invoiceDetails(bolt11)?.let { namesSparkIdentity(it, getInfo().identityPubkey) } == true

/**
* This wallet's Lightning send of [bolt11] as the Spark operators record it, without the local history: null when
Expand Down Expand Up @@ -393,6 +425,9 @@ sealed class SparkError(message: String, cause: Throwable? = null) : AppError(me
class WipeInProgress : SparkError("Spark wallet cannot connect while the wallet is wiped")
class WipeFailed(path: String) : SparkError("Failed to delete Spark storage at '$path'")

/** An invoice Spark created that its own parser cannot read, so it cannot be remembered as the wallet's own. */
class InvoiceUnreadable : SparkError("Spark invoice cannot be read")

/** Stored exit data Spark can never import: an exit state version it doesn't support, or one it can't read. */
class ExitStateUnimportable(cause: Throwable? = null) : SparkError("Spark can't import the exit data", cause)

Expand Down
12 changes: 10 additions & 2 deletions app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3868,7 +3868,15 @@ class AppViewModel @Inject constructor(
return@takeIf canSend
}

private suspend fun LightningInvoice.isOwnInvoice(): Boolean = isPayee(lightningRepo.awaitNodeId())
/**
* Whether this wallet created the invoice: the node is its payee, or it pays the wallet's Spark balance, which
* the phone and a paired watch share.
*/
private suspend fun LightningInvoice.isOwnInvoice(): Boolean =
isPayee(lightningRepo.awaitNodeId()) || isOwnSparkInvoice()

private suspend fun LightningInvoice.isOwnSparkInvoice(): Boolean =
lightningRepo.isOwnSparkInvoice(bolt11, paymentHash.toHex())

private fun LightningInvoice.isPayee(nodeId: String?): Boolean {
val payee = payeeNodeId?.toHex() ?: return false
Expand All @@ -3879,7 +3887,7 @@ class AppViewModel @Inject constructor(
params: Map<String, String>?,
walletGeneration: Long? = connectionRecovery.currentGeneration(),
): Boolean = decodeLightningParam(params).also { requireCurrentPaymentPreparation(walletGeneration) }
?.isPayee(lightningRepo.getLastKnownNodeId()) == true
?.let { it.isPayee(lightningRepo.getLastKnownNodeId()) || it.isOwnSparkInvoice() } == true

private suspend fun decodeLightningParam(params: Map<String, String>?): LightningInvoice? =
params?.get("lightning")?.let { bolt11 ->
Expand Down
34 changes: 34 additions & 0 deletions app/src/test/java/to/bitkit/data/CacheStoreTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,40 @@ class CacheStoreTest : BaseUnitTest() {
@After
fun tearDown() = runBlocking { sut.reset() }

@Test
fun `an own spark invoice is known in either case until it expires`() = test {
sut.addSparkOwnInvoice("AB12", expiresAt = 2_000, now = 1_000)

assertTrue(sut.hasSparkOwnInvoice("ab12", now = 1_999))
assertTrue(sut.hasSparkOwnInvoice("AB12", now = 1_999))
assertFalse(sut.hasSparkOwnInvoice("ab12", now = 2_000))
assertFalse(sut.hasSparkOwnInvoice("cd34", now = 1_000))
}

@Test
fun `adding an own spark invoice drops the expired ones and keeps those that expire last`() = test {
sut.addSparkOwnInvoice("expired", expiresAt = 1_500, now = 1_000)
sut.addSparkOwnInvoice("first", expiresAt = 3_000, now = 1_600)

assertEquals(mapOf("first" to 3_000L), sut.data.first().sparkOwnInvoices)

repeat(MAX_SPARK_OWN_INVOICES) { sut.addSparkOwnInvoice("hash$it", expiresAt = 3_001L + it, now = 1_600) }

val kept = sut.data.first().sparkOwnInvoices
assertEquals(MAX_SPARK_OWN_INVOICES, kept.size)
assertFalse("first" in kept)
assertTrue("hash0" in kept)
}

@Test
fun `a wallet reset forgets the own spark invoices`() = test {
sut.addSparkOwnInvoice("ab12", expiresAt = 2_000, now = 1_000)

sut.reset()

assertFalse(sut.hasSparkOwnInvoice("ab12", now = 1_000))
}

@Test
fun `a spark send attempt drops expired ones and restores the earlier one`() = test {
sut.setSparkSendAttempt("OLD", attempt = 2, amountSats = 100uL, expiresAt = 1_500, now = 1_000)
Expand Down
87 changes: 87 additions & 0 deletions app/src/test/java/to/bitkit/models/WatchBackupContractTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
package to.bitkit.models

import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.jsonObject
import kotlinx.serialization.json.jsonPrimitive
import org.junit.Assume.assumeFalse
import org.junit.Assume.assumeTrue
import org.junit.Test
import to.bitkit.data.SettingsData
import to.bitkit.di.json
import to.bitkit.env.Env
import java.io.File
import kotlin.test.assertEquals

/**
* The Wear OS app imports the phone's settings by reading the settings backup from VSS (docs/wear.md, Settings
* sync). `wear/src/test/resources/phone-backup-contract.json` holds what it relies on: the backup's key, six
* settings as this app encodes them, and where each network's backups live. The watch's `PhoneBackupContractTest`
* reads the same file. When a test here fails, the watch stops reading the phone's settings: change the watch's
* reader and the file together with the phone.
*/
class WatchBackupContractTest {
private val contract: JsonObject by lazy {
val file = generateSequence(File("").absoluteFile) { it.parentFile }
.map { File(it, "wear/src/test/resources/phone-backup-contract.json") }
.first { it.isFile }
Json.parseToJsonElement(file.readText()).jsonObject
}

@Test
fun `the settings backup is stored under the key the watch reads`() {
assertEquals(contract.getValue("settingsKey").jsonPrimitive.content, BackupCategory.SETTINGS.name)
}

@Test
fun `the settings backup holds the six settings the watch reads, in the form it reads`() {
val expected = contract.getValue("settingsBackup").jsonObject
val expectedSettings = expected.getValue("settings").jsonObject
val settings = SettingsData(
primaryDisplay = PrimaryDisplay.FIAT,
displayUnit = BitcoinDisplayUnit.CLASSIC,
selectedCurrency = "EUR",
isQuickPayEnabled = true,
quickPayAmount = 10,
quickPayDailyLimitMultiplier = 3,
)

val written = written(settings)

assertEquals(expected.getValue("version"), written.getValue("version"))
val writtenSettings = written.getValue("settings").jsonObject
assertEquals(expectedSettings, JsonObject(writtenSettings.filterKeys { it in expectedSettings.keys }))
}

@Test
fun `default settings are written too, so the watch always finds all six`() {
val keys = contract.getValue("settingsBackup").jsonObject.getValue("settings").jsonObject.keys

val written = written(SettingsData()).getValue("settings").jsonObject

assertEquals(keys, written.keys.intersect(keys))
}

@Test
fun `this network's backups live where the watch looks for them`() {
// An E2E build may point the backups at a local server, which the watch never reads.
assumeFalse(Env.isE2eTest)
val network = contract.getValue("networks").jsonObject[Env.network.name]?.jsonObject
// The watch runs on fewer networks than the phone.
assumeTrue(network != null)

val expected = checkNotNull(network).mapValues { it.value.jsonPrimitive.content }
val actual = mapOf(
"storeIdPrefix" to Env.vssStoreIdPrefix,
"vssServerUrl" to Env.vssServerUrl,
"lnurlAuthServerUrl" to Env.lnurlAuthServerUrl,
)
assertEquals(expected, actual)
}

/** The settings backup of [settings] as this app uploads it. */
private fun written(settings: SettingsData): JsonObject {
val backup = SettingsBackupV1(createdAt = 0, settings = settings)
return json.parseToJsonElement(json.encodeToString(SettingsBackupV1.serializer(), backup)).jsonObject
}
}
Loading