File tree Expand file tree Collapse file tree 3 files changed +9
-18
lines changed
kotlin/ldk-node-jvm/lib/src/test/kotlin/org/lightningdevkit/ldknode Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,7 @@ class LibraryTest {
6161 @Test fun fullCycle () {
6262 setup()
6363
64- val network: Network = " regtest"
65- assertEquals(network, " regtest" )
64+ val network = Network .REGTEST
6665
6766 val tmpDir1 = createTempDirectory(" ldk_node" ).toString()
6867 println (" Random dir 1: $tmpDir1 " )
Original file line number Diff line number Diff line change @@ -116,6 +116,13 @@ enum PaymentStatus {
116116 "Failed",
117117};
118118
119+ enum Network {
120+ "Bitcoin",
121+ "Testnet",
122+ "Signet",
123+ "Regtest",
124+ };
125+
119126dictionary PaymentDetails {
120127 PaymentHash hash;
121128 PaymentPreimage? preimage;
@@ -160,8 +167,5 @@ typedef string ChannelId;
160167[Custom]
161168typedef string UserChannelId;
162169
163- [Custom]
164- typedef string Network;
165-
166170[Custom]
167171typedef string Mnemonic;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ use lightning_transaction_sync::EsploraSyncClient;
2222use bitcoin:: hashes:: sha256:: Hash as Sha256 ;
2323use bitcoin:: hashes:: Hash ;
2424use bitcoin:: secp256k1:: PublicKey ;
25- use bitcoin:: { Address , Network , Txid } ;
25+ use bitcoin:: { Address , Txid } ;
2626
2727use bip39:: Mnemonic ;
2828
@@ -270,18 +270,6 @@ impl Readable for UserChannelId {
270270 }
271271}
272272
273- impl UniffiCustomTypeConverter for Network {
274- type Builtin = String ;
275-
276- fn into_custom ( val : Self :: Builtin ) -> uniffi:: Result < Self > {
277- Ok ( Network :: from_str ( & val) . map_err ( |_| Error :: InvalidNetwork ) ?)
278- }
279-
280- fn from_custom ( obj : Self ) -> Self :: Builtin {
281- obj. to_string ( )
282- }
283- }
284-
285273impl UniffiCustomTypeConverter for Txid {
286274 type Builtin = String ;
287275 fn into_custom ( val : Self :: Builtin ) -> uniffi:: Result < Self > {
You can’t perform that action at this time.
0 commit comments