From 29a08d913c071fa6c4263575391575d6fef60652 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 8 May 2024 10:40:00 -0400 Subject: [PATCH 1/3] SP-934: update satoshisPerByte to Double and bump version --- src/main/java/com/bitpay/sdk/Config.java | 2 +- .../java/com/bitpay/sdk/model/invoice/MinerFeesItem.java | 6 +++--- src/test/java/com/bitpay/sdk/ConfigTest.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/bitpay/sdk/Config.java b/src/main/java/com/bitpay/sdk/Config.java index 8951b250..2a0b19cf 100644 --- a/src/main/java/com/bitpay/sdk/Config.java +++ b/src/main/java/com/bitpay/sdk/Config.java @@ -34,7 +34,7 @@ public class Config { /** * BitPay Plugin Info Version. */ - public static final String BITPAY_PLUGIN_INFO = "BitPay_Java_Client_v10.0.1"; + public static final String BITPAY_PLUGIN_INFO = "BitPay_Java_Client_v10.0.2"; /** * BitPay Api Frame. */ diff --git a/src/main/java/com/bitpay/sdk/model/invoice/MinerFeesItem.java b/src/main/java/com/bitpay/sdk/model/invoice/MinerFeesItem.java index 0e9e319c..de402007 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/MinerFeesItem.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/MinerFeesItem.java @@ -17,7 +17,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class MinerFeesItem { - protected Integer satoshisPerByte; + protected Double satoshisPerByte; protected Integer totalFee; protected Double fiatAmount; @@ -33,7 +33,7 @@ public MinerFeesItem() { * @return the satoshis per byte */ @JsonIgnore - public Integer getSatoshisPerByte() { + public Double getSatoshisPerByte() { return this.satoshisPerByte; } @@ -43,7 +43,7 @@ public Integer getSatoshisPerByte() { * @param satoshisPerByte the satoshis per byte */ @JsonProperty("satoshisPerByte") - public void setSatoshisPerByte(Integer satoshisPerByte) { + public void setSatoshisPerByte(Double satoshisPerByte) { this.satoshisPerByte = satoshisPerByte; } diff --git a/src/test/java/com/bitpay/sdk/ConfigTest.java b/src/test/java/com/bitpay/sdk/ConfigTest.java index c0c44a95..ed81f5b9 100644 --- a/src/test/java/com/bitpay/sdk/ConfigTest.java +++ b/src/test/java/com/bitpay/sdk/ConfigTest.java @@ -58,7 +58,7 @@ public void it_should_returns_bitpay_api_version() { @Test public void it_should_returns_bitpay_plugin_info() { - Assertions.assertTrue(Config.BITPAY_PLUGIN_INFO.contains("BitPay_Java_Client_v10.0.1")); + Assertions.assertTrue(Config.BITPAY_PLUGIN_INFO.contains("BitPay_Java_Client_v10.0.2")); } @Test From f36e00be5398c9c4343a427f8462f7231a7fb7bf Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 8 May 2024 10:57:56 -0400 Subject: [PATCH 2/3] SP-934: Fix type in tests --- .../java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java b/src/test/java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java index ace9809e..c9df4090 100644 --- a/src/test/java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java +++ b/src/test/java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java @@ -13,7 +13,7 @@ public class MinerFeesItemTest { @Test public void it_should_manipulate_satoshisPerByte() { // given - Integer expected = 765; + Double expected = 765; MinerFeesItem testedClass = this.getTestedClass(); // when From 6b7fb497855b65b75713a281e86bc47f6a93be04 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 8 May 2024 11:45:37 -0400 Subject: [PATCH 3/3] SP-934: Change expected val to Double --- .../java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java b/src/test/java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java index c9df4090..a7c0b056 100644 --- a/src/test/java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java +++ b/src/test/java/com/bitpay/sdk/model/invoice/MinerFeesItemTest.java @@ -13,7 +13,7 @@ public class MinerFeesItemTest { @Test public void it_should_manipulate_satoshisPerByte() { // given - Double expected = 765; + Double expected = 765.1; MinerFeesItem testedClass = this.getTestedClass(); // when