@pioneer-platform/thorchain-client 0.14.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @pioneer-platform/thorchain-client
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - chore: feat(pioneer-sdk): Add transaction history integration
8
+
9
+ ## 0.17.0
10
+
11
+ ### Minor Changes
12
+
13
+ - feat(pioneer-sdk): Add transaction history integration
14
+
15
+ ## 0.16.0
16
+
17
+ ### Minor Changes
18
+
19
+ - chore: Merge pull request #10 from coinmastersguild/feature/fix-blockbook-websocket-subscriptions
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+ - @pioneer-platform/pioneer-caip@9.19.0
25
+
26
+ ## 0.15.0
27
+
28
+ ### Minor Changes
29
+
30
+ - Merge pull request #10 from coinmastersguild/feature/fix-blockbook-websocket-subscriptions
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies
35
+ - @pioneer-platform/pioneer-caip@9.18.0
36
+
3
37
  ## 0.14.0
4
38
 
5
39
  ### Minor Changes
package/lib/index.js CHANGED
@@ -262,7 +262,15 @@ var get_quote = function (quote) {
262
262
  if (isNaN(DECIMALS))
263
263
  throw new Error("Invalid DECIMALS value for asset: ".concat(sellAssetChain));
264
264
  BASE_UNIT = Math.pow(10, DECIMALS);
265
- sellAmountInBaseUnits = Math.round(parseFloat(quote.sellAmount) * BASE_UNIT);
265
+ sellAmountInBaseUnits = void 0;
266
+ if (quote.sellAmount.includes('.')) {
267
+ // Decimal format - multiply by base unit
268
+ sellAmountInBaseUnits = Math.round(parseFloat(quote.sellAmount) * BASE_UNIT);
269
+ }
270
+ else {
271
+ // Already in base units - use as-is
272
+ sellAmountInBaseUnits = parseInt(quote.sellAmount);
273
+ }
266
274
  URL_1 = "/thorchain/quote/swap?from_asset=".concat(quote.sellAsset, "&to_asset=").concat(quote.buyAsset, "&amount=").concat(sellAmountInBaseUnits, "&destination=").concat(quote.recipientAddress);
267
275
  log.info(tag, "URL: ", URL_1);
268
276
  return [4 /*yield*/, nodeRequest(URL_1)];
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@pioneer-platform/thorchain-client",
3
- "version": "0.14.0",
3
+ "version": "0.18.0",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "dependencies": {
7
7
  "@pioneer-platform/loggerdog": "^8.11.0",
8
- "@pioneer-platform/pioneer-caip": "^9.17.0",
8
+ "@pioneer-platform/pioneer-caip": "^9.19.0",
9
9
  "@pioneer-platform/pioneer-coins": "^9.18.0",
10
10
  "axios": "^1.6.0",
11
11
  "dotenv": "^17.2.3",