File tree 3 files changed +9
-18
lines changed
kotlin/ldk-node-jvm/lib/src/test/kotlin/org/lightningdevkit/ldknode
3 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,7 @@ class LibraryTest {
61
61
@Test fun fullCycle () {
62
62
setup()
63
63
64
- val network: Network = " regtest"
65
- assertEquals(network, " regtest" )
64
+ val network = Network .REGTEST
66
65
67
66
val tmpDir1 = createTempDirectory(" ldk_node" ).toString()
68
67
println (" Random dir 1: $tmpDir1 " )
Original file line number Diff line number Diff line change @@ -116,6 +116,13 @@ enum PaymentStatus {
116
116
"Failed",
117
117
};
118
118
119
+ enum Network {
120
+ "Bitcoin",
121
+ "Testnet",
122
+ "Signet",
123
+ "Regtest",
124
+ };
125
+
119
126
dictionary PaymentDetails {
120
127
PaymentHash hash;
121
128
PaymentPreimage? preimage;
@@ -160,8 +167,5 @@ typedef string ChannelId;
160
167
[Custom]
161
168
typedef string UserChannelId;
162
169
163
- [Custom]
164
- typedef string Network;
165
-
166
170
[Custom]
167
171
typedef string Mnemonic;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ use lightning_transaction_sync::EsploraSyncClient;
22
22
use bitcoin:: hashes:: sha256:: Hash as Sha256 ;
23
23
use bitcoin:: hashes:: Hash ;
24
24
use bitcoin:: secp256k1:: PublicKey ;
25
- use bitcoin:: { Address , Network , Txid } ;
25
+ use bitcoin:: { Address , Txid } ;
26
26
27
27
use bip39:: Mnemonic ;
28
28
@@ -270,18 +270,6 @@ impl Readable for UserChannelId {
270
270
}
271
271
}
272
272
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
-
285
273
impl UniffiCustomTypeConverter for Txid {
286
274
type Builtin = String ;
287
275
fn into_custom ( val : Self :: Builtin ) -> uniffi:: Result < Self > {
You can’t perform that action at this time.
0 commit comments