From 0aae072ae99ebbcbf2fec79409223534640ce2f7 Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Thu, 18 Apr 2024 13:13:06 -0700 Subject: [PATCH] [skip ci] push notification changes --- android/app/src/main/AndroidManifestBase.xml | 19 +++++++++++++++++++ cw_lightning/lib/lightning_wallet.dart | 9 +++++++++ 2 files changed, 28 insertions(+) diff --git a/android/app/src/main/AndroidManifestBase.xml b/android/app/src/main/AndroidManifestBase.xml index 91bf93dbd..e554e3d52 100644 --- a/android/app/src/main/AndroidManifestBase.xml +++ b/android/app/src/main/AndroidManifestBase.xml @@ -9,6 +9,8 @@ + + + + + + + + + + + + + diff --git a/cw_lightning/lib/lightning_wallet.dart b/cw_lightning/lib/lightning_wallet.dart index e621f53c5..3d4aeb059 100644 --- a/cw_lightning/lib/lightning_wallet.dart +++ b/cw_lightning/lib/lightning_wallet.dart @@ -211,6 +211,15 @@ abstract class LightningWalletBase extends ElectrumWallet with Store { _isTransactionUpdating = false; }); + // TODO: get actual nds service url: + if (Platform.isAndroid || Platform.isIOS) { + String platform = Platform.isAndroid ? "android" : "ios"; + String token = "TODO"; + await sdk.registerWebhook( + webhookUrl: "https://your-nds-service.com/notify?platform=$platform&token=$token", + ); + } + print("initialized breez: ${(await sdk.isInitialized())}"); }