Issue with coordinates
bwisem opened this issue · comments
The Square library for Nodejs (v9.0.0) has a problem with locations API. With the coordinates when calling the Locations API to get all the locations associated with a specific account, the response is successful but the square SDK response is parsed in order to be converted to an object. In the library implementation when parsing the response the library is using json-bigint in order to parse the response and throws an error. Downgrading the SDK to version 8.1.1 is working as expected.
Cannot convert 46.77088723336634 to a BigInt at DefaultRequestBuilder._callee7$ (/I/node_modules/square/dist/square.cjs.development.js:16563:21) at tryCatch (/I/node_modules/square/dist/square.cjs.development.js:276:40) at Generator.invoke [as _invoke] (/I/node_modules/square/dist/square.cjs.development.js:506:22) at Generator.next (//node_modules/square/dist/square.cjs.development.js:331:21) at asyncGeneratorStep (/I/node_modules/square/dist/square.cjs.development.js:17:24) at _next (/I/node_modules/square/dist/square.cjs.development.js:39:9) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:93:5)
This is resolved if you upgrade to the latest version of the Nodejs SDK (currently 12.0.0). I haven't tested against v10 or v11 but it should also be fixed in those.