mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-09 08:14:43 +00:00
fix tests with derivation paths matching other networks
This commit is contained in:
+1
-1
@@ -160,7 +160,7 @@ processResources {
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
jvmArgs '--add-opens=java.base/java.io=ALL-UNNAMED'
|
||||
jvmArgs = ["--add-opens=java.base/java.io=ALL-UNNAMED", "--add-opens=java.base/java.io=com.google.gson"]
|
||||
}
|
||||
|
||||
application {
|
||||
|
||||
+1
-1
Submodule drongo updated: 6868b026fb...987aadd4a6
@@ -7,6 +7,7 @@ import com.sparrowwallet.drongo.protocol.ScriptType;
|
||||
import com.sparrowwallet.drongo.wallet.Keystore;
|
||||
import com.sparrowwallet.drongo.wallet.MnemonicException;
|
||||
import com.sparrowwallet.drongo.wallet.Wallet;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -15,6 +16,7 @@ import java.io.*;
|
||||
public class StorageTest extends IoTest {
|
||||
@Test
|
||||
public void loadWallet() throws IOException, MnemonicException, StorageException {
|
||||
System.setProperty(Wallet.ALLOW_DERIVATIONS_MATCHING_OTHER_NETWORKS_PROPERTY, "true");
|
||||
Storage storage = new Storage(getFile("sparrow-single-wallet"));
|
||||
Wallet wallet = storage.loadEncryptedWallet("pass").getWallet();
|
||||
Assertions.assertTrue(wallet.isValid());
|
||||
@@ -64,6 +66,7 @@ public class StorageTest extends IoTest {
|
||||
|
||||
@Test
|
||||
public void saveWallet() throws IOException, MnemonicException, StorageException {
|
||||
System.setProperty(Wallet.ALLOW_DERIVATIONS_MATCHING_OTHER_NETWORKS_PROPERTY, "true");
|
||||
Storage storage = new Storage(getFile("sparrow-single-wallet"));
|
||||
Wallet wallet = storage.loadEncryptedWallet("pass").getWallet();
|
||||
Assertions.assertTrue(wallet.isValid());
|
||||
@@ -80,4 +83,9 @@ public class StorageTest extends IoTest {
|
||||
wallet = temp2Storage.loadEncryptedWallet("pass").getWallet();
|
||||
Assertions.assertTrue(wallet.isValid());
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void tearDown() {
|
||||
System.setProperty(Wallet.ALLOW_DERIVATIONS_MATCHING_OTHER_NETWORKS_PROPERTY, "false");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
Name: CC-2-of-4
|
||||
Policy: 2 of 4
|
||||
Derivation: m/48'/1'/0'/2'
|
||||
Derivation: m/48'/0'/0'/2'
|
||||
Format: P2WSH
|
||||
|
||||
0F056943: xpub6EfEGa5isJbQFSswM5Uptw5BSq2Td1ZDJr3QUNUcMySpC7itZ3ccypVHtLPnvMzKQ2qxrAgH49vhVxRcaQLFbixAVRR8RACrYTp88Uv9h8Z
|
||||
|
||||
Reference in New Issue
Block a user