Skip to content

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

Merged

Conversation

OGKevin
Copy link
Contributor

@OGKevin OGKevin commented Dec 31, 2017

Closes #46

  • Tested

@OGKevin OGKevin added this to the 0.12.5 milestone Dec 31, 2017
@OGKevin OGKevin self-assigned this Dec 31, 2017
@OGKevin
Copy link
Contributor Author

OGKevin commented Jan 2, 2018

@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) {

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());

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂 🤦‍♂️

@OGKevin OGKevin force-pushed the bunq/sdk_java#46-Cannot-list-payments-due-to-geolocation branch from ba7d47e to bb02f22 Compare January 2, 2018 13:00
@bunq bunq deleted a comment Jan 2, 2018
@patrickdw1991
Copy link

@andrederoos

@OGKevin
Copy link
Contributor Author

OGKevin commented Jan 3, 2018

@andrederoos merging!

@OGKevin OGKevin merged commit 25149ea into develop Jan 3, 2018
@OGKevin OGKevin deleted the bunq/sdk_java#46-Cannot-list-payments-due-to-geolocation branch January 3, 2018 08:12
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants