@xchainjs/xchain-thorchain-amm 0.3.4 → 0.3.6

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/lib/index.esm.js CHANGED
@@ -2,7 +2,7 @@ import { Client as Client$8, defaultAvaxParams } from '@xchainjs/xchain-avax';
2
2
  import { Client as Client$6 } from '@xchainjs/xchain-binance';
3
3
  import { Client as Client$1 } from '@xchainjs/xchain-bitcoin';
4
4
  import { Client } from '@xchainjs/xchain-bitcoincash';
5
- import { Network, FeeOption } from '@xchainjs/xchain-client';
5
+ import { FeeOption } from '@xchainjs/xchain-client';
6
6
  import { Client as Client$7 } from '@xchainjs/xchain-cosmos';
7
7
  import { Client as Client$2 } from '@xchainjs/xchain-doge';
8
8
  import { MAX_APPROVAL, ETH_DECIMAL, Client as Client$3 } from '@xchainjs/xchain-ethereum';
@@ -590,25 +590,6 @@ class EvmHelper {
590
590
  }
591
591
  }
592
592
 
593
- const chainIds = {
594
- [Network.Mainnet]: 'thorchain-mainnet-v1',
595
- [Network.Stagenet]: 'chain-id-stagenet',
596
- [Network.Testnet]: 'deprecated',
597
- };
598
- const clientUrl = {
599
- [Network.Stagenet]: {
600
- node: 'https://stagenet-thornode.ninerealms.com',
601
- rpc: 'https://stagenet-rpc.ninerealms.com',
602
- },
603
- [Network.Mainnet]: {
604
- node: 'https://thornode.ninerealms.com',
605
- rpc: 'https://rpc.ninerealms.com',
606
- },
607
- [Network.Testnet]: {
608
- node: 'deprecated',
609
- rpc: 'deprecated',
610
- },
611
- };
612
593
  /**
613
594
  * Wallet Class for managing all xchain-* wallets with a mnemonic seed.
614
595
  */
@@ -628,7 +609,7 @@ class Wallet {
628
609
  BTC: new Client$1(settings),
629
610
  DOGE: new Client$2(settings),
630
611
  ETH: new Client$3(settings),
631
- THOR: new Client$4(Object.assign(Object.assign({}, settings), { chainIds, clientUrl })),
612
+ THOR: new Client$4(settings),
632
613
  LTC: new Client$5(settings),
633
614
  BNB: new Client$6(settings),
634
615
  GAIA: new Client$7(settings),
@@ -1100,8 +1081,8 @@ class ThorchainAMM {
1100
1081
  // Caution Dust Limits: BTC,BCH,LTC chains 10k sats; DOGE 1m Sats; ETH 0 wei; THOR 0 RUNE.
1101
1082
  const withdrawParams = yield this.thorchainQuery.estimateWithdrawLP(params);
1102
1083
  return wallet.withdrawLiquidity({
1103
- assetFee: withdrawParams.transactionFee.assetFee,
1104
- runeFee: withdrawParams.transactionFee.runeFee,
1084
+ assetFee: withdrawParams.inbound.fees.asset,
1085
+ runeFee: withdrawParams.inbound.fees.rune,
1105
1086
  waitTimeSeconds: withdrawParams.estimatedWaitSeconds,
1106
1087
  percentage: params.percentage,
1107
1088
  assetPool: withdrawParams.assetPool,
package/lib/index.js CHANGED
@@ -594,25 +594,6 @@ class EvmHelper {
594
594
  }
595
595
  }
596
596
 
597
- const chainIds = {
598
- [xchainClient.Network.Mainnet]: 'thorchain-mainnet-v1',
599
- [xchainClient.Network.Stagenet]: 'chain-id-stagenet',
600
- [xchainClient.Network.Testnet]: 'deprecated',
601
- };
602
- const clientUrl = {
603
- [xchainClient.Network.Stagenet]: {
604
- node: 'https://stagenet-thornode.ninerealms.com',
605
- rpc: 'https://stagenet-rpc.ninerealms.com',
606
- },
607
- [xchainClient.Network.Mainnet]: {
608
- node: 'https://thornode.ninerealms.com',
609
- rpc: 'https://rpc.ninerealms.com',
610
- },
611
- [xchainClient.Network.Testnet]: {
612
- node: 'deprecated',
613
- rpc: 'deprecated',
614
- },
615
- };
616
597
  /**
617
598
  * Wallet Class for managing all xchain-* wallets with a mnemonic seed.
618
599
  */
@@ -632,7 +613,7 @@ class Wallet {
632
613
  BTC: new xchainBitcoin.Client(settings),
633
614
  DOGE: new xchainDoge.Client(settings),
634
615
  ETH: new xchainEthereum.Client(settings),
635
- THOR: new xchainThorchain.Client(Object.assign(Object.assign({}, settings), { chainIds, clientUrl })),
616
+ THOR: new xchainThorchain.Client(settings),
636
617
  LTC: new xchainLitecoin.Client(settings),
637
618
  BNB: new xchainBinance.Client(settings),
638
619
  GAIA: new xchainCosmos.Client(settings),
@@ -1104,8 +1085,8 @@ class ThorchainAMM {
1104
1085
  // Caution Dust Limits: BTC,BCH,LTC chains 10k sats; DOGE 1m Sats; ETH 0 wei; THOR 0 RUNE.
1105
1086
  const withdrawParams = yield this.thorchainQuery.estimateWithdrawLP(params);
1106
1087
  return wallet.withdrawLiquidity({
1107
- assetFee: withdrawParams.transactionFee.assetFee,
1108
- runeFee: withdrawParams.transactionFee.runeFee,
1088
+ assetFee: withdrawParams.inbound.fees.asset,
1089
+ runeFee: withdrawParams.inbound.fees.rune,
1109
1090
  waitTimeSeconds: withdrawParams.estimatedWaitSeconds,
1110
1091
  percentage: params.percentage,
1111
1092
  assetPool: withdrawParams.assetPool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thorchain-amm",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "module that exposes estimating & swappping cryptocurrency assets on thorchain",
5
5
  "keywords": [
6
6
  "THORChain",
@@ -50,10 +50,10 @@
50
50
  "@xchainjs/xchain-ethereum": "^0.27.0",
51
51
  "@xchainjs/xchain-evm": "^0.1.0",
52
52
  "@xchainjs/xchain-avax": "^0.1.0",
53
- "@xchainjs/xchain-litecoin": "^0.10.3",
53
+ "@xchainjs/xchain-litecoin": "^0.10.5",
54
54
  "@xchainjs/xchain-midgard": "0.2.0",
55
- "@xchainjs/xchain-thorchain": "^0.27.0",
56
- "@xchainjs/xchain-thorchain-query": "^0.1.5",
55
+ "@xchainjs/xchain-thorchain": "^0.27.2",
56
+ "@xchainjs/xchain-thorchain-query": "^0.1.6",
57
57
  "@xchainjs/xchain-thornode": "^0.1.1",
58
58
  "@xchainjs/xchain-util": "^0.11.0",
59
59
  "axios": "^0.25.0",