Skip to content

Commit

Permalink
[coinex] Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bigscoop committed May 25, 2024
1 parent e27a063 commit 1395a5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${version.slf4j}</version>
</dependency>

<!-- javax APIs -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class CoinexResponse<T> {

public void setCode(Integer code) {
if (code != 0) {
throw new ExceptionalReturnContentException(null);
throw new ExceptionalReturnContentException(String.valueOf(code));
}
this.code = code;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CoinexV2DigestTest {

@Test
void signature() {
CoinexV2Digest coinexV2Digest = CoinexV2Digest.createInstance("44F7E70A2952C1006E0446044F7757AA60D2F9246D269356");
CoinexV2Digest coinexV2Digest = CoinexV2Digest.createInstance("a");

when(restInvocation.getHttpMethod()).thenReturn("GET");
when(restInvocation.getPath()).thenReturn("v2/assets/spot/balance");
Expand All @@ -30,8 +30,7 @@ void signature() {
when(restInvocation.getHttpHeadersFromParams()).thenReturn(headers);

String actual = coinexV2Digest.digestParams(restInvocation);
String expected =
"1e1dd41be7988975295931013c05505a5ed67a591d8e625d10ed137b3fe9592a";
String expected = "3d47a904753df7d52fa6c37213bff7db8363249f8f0fed22bf41137805b57a56";

assertThat(actual).isEqualTo(expected);
}
Expand Down

0 comments on commit 1395a5d

Please sign in to comment.