Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
neodiX committed Jun 19, 2024
2 parents a37b38a + 8e960b0 commit f0cc364
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
6 changes: 1 addition & 5 deletions address/src/main/java/org/ton/java/address/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ public Address(String address) {

String hex = arr[1];
if (hex.length() != 64) {
if (hex.length() == 63) {
hex = "0" + hex;
} else {
throw new Error("Invalid address hex " + address);
}
throw new Error("Invalid address hex " + address);
}

isUserFriendly = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,42 @@ public void testAddress10() {
log.info("input parameters:");
log.info(" address: {}", address.toBounceable());
}

@Test(expected = Error.class)
public void testAddress11() {

TonSdkTestCases tonSdkTestCases = gson.fromJson(fileContentWithUseCases, TonSdkTestCases.class);

String testId = "address-11";
TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId);

String description = testCase.getDescription();

log.info("testId: {}", testId);
log.info("description: {}", description);

Address address = Address.of((String) testCase.getInput().get("bounceableUrlSafe"));

log.info("input parameters:");
log.info(" address: {}", address.toBounceable());
}

@Test(expected = Error.class)
public void testAddress12() {

TonSdkTestCases tonSdkTestCases = gson.fromJson(fileContentWithUseCases, TonSdkTestCases.class);

String testId = "address-12";
TonSdkTestCases.TestCase testCase = tonSdkTestCases.getTestCases().get(testId);

String description = testCase.getDescription();

log.info("testId: {}", testId);
log.info("description: {}", description);

Address address = Address.of((String) testCase.getInput().get("bounceableUrlSafe"));

log.info("input parameters:");
log.info(" address: {}", address.toBounceable());
}
}

0 comments on commit f0cc364

Please sign in to comment.