-
Notifications
You must be signed in to change notification settings - Fork 24
Cannot list payments due to geolocation. (Bunq/sdk_java#46 ) #64
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cannot list payments due to geolocation. (Bunq/sdk_java#46 ) #64
Conversation
@patrickdw1991 all yours please 👀 |
@@ -29,7 +29,7 @@ public void write(JsonWriter output, BigDecimal value) throws IOException { | |||
|
|||
@Override | |||
public BigDecimal read(JsonReader input) throws IOException { | |||
if (input.peek() == JsonToken.STRING) { | |||
if (input.peek() == JsonToken.NUMBER) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just make this handle both strings and numbers?
if (type = number) {
new bigdecimal(getDoubleValue)
} else if (type = string) {
new bigdecimal(getStringValue)
} else {
null
}
JsonToken type = input.peek(); | ||
|
||
if (type == JsonToken.NUMBER) { | ||
return new BigDecimal(input.nextInt()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why nextInt instead of double? Int will not return you the fractions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂 🤦♂️
ba7d47e
to
bb02f22
Compare
@andrederoos merging! |
Closes #46