File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
app/src/main/java/to/bitkit/viewmodels Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import to.bitkit.services.LdkNodeEventBus
4343import to.bitkit.services.LightningService
4444import to.bitkit.ui.shared.toast.ToastEventBus
4545import to.bitkit.utils.AddressChecker
46+ import to.bitkit.utils.Bip21Utils
4647import to.bitkit.utils.Logger
4748import javax.inject.Inject
4849
@@ -338,9 +339,16 @@ class WalletViewModel @Inject constructor(
338339 ) {
339340 viewModelScope.launch(Dispatchers .IO ) {
340341 _bolt11 = createInvoice(amountSats = amountSats, description= description)
341- }
342+ val newBip21 = Bip21Utils .buildBip21Url(
343+ bitcoinAddress = lightningService.newAddress(),
344+ amountSats = amountSats,
345+ message = description.ifBlank { " Bitkit" },
346+ lightningInvoice = _bolt11
347+ )
348+ _bip21 = newBip21
342349
343- // TODO UPDATE BIP21
350+ syncState()
351+ }
344352 }
345353
346354
You can’t perform that action at this time.
0 commit comments