@pioneer-platform/pioneer-router 8.4.101 → 8.4.103

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.
Files changed (2) hide show
  1. package/lib/index.js +9 -3
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -192,15 +192,21 @@ function get_quote_from_integration(integration, quote) {
192
192
  throw Error('invalid quote! missing senderAddress');
193
193
  if (!quote.recipientAddress)
194
194
  throw Error('invalid quote! missing recipientAddress');
195
- thorchainNameSellAsset = caipToThorchain(quote.sellAsset.caip, quote.sellAsset.ticker, null);
196
- thorchainBuyAsset = caipToThorchain(quote.buyAsset.caip, quote.buyAsset.ticker, null);
195
+ thorchainNameSellAsset = caipToThorchain(quote.sellAsset.caip, quote.sellAsset.ticker || quote.sellAsset.symbol, null);
196
+ thorchainBuyAsset = caipToThorchain(quote.buyAsset.caip, quote.buyAsset.ticker || quote.buyAsset.symbol, null);
197
+ log.info(tag, "thorchainBuyAsset: ", thorchainBuyAsset);
198
+ log.info(tag, "thorchainNameSellAsset: ", thorchainNameSellAsset);
199
+ if (thorchainBuyAsset === 'THOR.THOR')
200
+ thorchainBuyAsset = 'THOR.RUNE';
201
+ if (thorchainNameSellAsset === 'THOR.THOR')
202
+ thorchainNameSellAsset = 'THOR.RUNE';
197
203
  if (!thorchainNameSellAsset)
198
204
  throw Error('invalid thorchainNameSellAsset');
199
205
  if (!thorchainBuyAsset)
200
206
  throw Error('invalid thorchainBuyAsset');
201
207
  payloadThorchain = {
202
208
  sellAsset: thorchainNameSellAsset,
203
- sellAmount: '30',
209
+ sellAmount: quote.sellAmount,
204
210
  buyAsset: thorchainBuyAsset,
205
211
  senderAddress: quote.senderAddress,
206
212
  recipientAddress: quote.recipientAddress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer-router",
3
- "version": "8.4.101",
3
+ "version": "8.4.103",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {
@@ -27,7 +27,7 @@
27
27
  "@pioneer-platform/pioneer-caip": "^9.2.34",
28
28
  "@pioneer-platform/pro-token": "^0.0.3",
29
29
  "@pioneer-platform/rango-client": "^8.3.23",
30
- "@pioneer-platform/thorchain-client": "^0.0.31",
30
+ "@pioneer-platform/thorchain-client": "^0.0.32",
31
31
  "@pioneer-platform/uniswap-client": "^0.0.29",
32
32
  "@uniswap/sdk-core": "^4.2.0",
33
33
  "@uniswap/universal-router-sdk": "^1.9.0",