Skip to content

Commit

Permalink
Merge pull request #291 from p-maguire/SP-934
Browse files Browse the repository at this point in the history
SP-934: Change satoshisPerByte to Double, update tests, and bump version
  • Loading branch information
bobbrodie committed May 9, 2024
2 parents 376671e + 6b7fb49 commit 0d65b60
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/bitpay/sdk/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/bitpay/sdk/model/invoice/MinerFeesItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class MinerFeesItem {

protected Integer satoshisPerByte;
protected Double satoshisPerByte;
protected Integer totalFee;
protected Double fiatAmount;

Expand All @@ -33,7 +33,7 @@ public MinerFeesItem() {
* @return the satoshis per byte
*/
@JsonIgnore
public Integer getSatoshisPerByte() {
public Double getSatoshisPerByte() {
return this.satoshisPerByte;
}

Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/bitpay/sdk/ConfigTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class MinerFeesItemTest {
@Test
public void it_should_manipulate_satoshisPerByte() {
// given
Integer expected = 765;
Double expected = 765.1;
MinerFeesItem testedClass = this.getTestedClass();

// when
Expand Down

0 comments on commit 0d65b60

Please sign in to comment.