@xchainjs/xchain-thorchain-amm 0.8.15 → 0.8.16

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
@@ -126,10 +126,11 @@ class EvmHelper {
126
126
  return __awaiter(this, void 0, void 0, function* () {
127
127
  const contractAddress = getContractAddressFromAsset(asset);
128
128
  const router = yield this.thorchainCache.getRouterAddressForChain(asset.chain);
129
+ const decimals = yield this.thorchainCache.midgardQuery.getDecimalForAsset(asset);
129
130
  const approveParams = {
130
131
  contractAddress,
131
132
  spenderAddress: router,
132
- amount: baseAmount(amount.toString(), this.evmClient.config.gasAssetDecimals),
133
+ amount: baseAmount(amount.toString(), decimals),
133
134
  walletIndex,
134
135
  };
135
136
  return yield this.evmClient.approve(approveParams);
package/lib/index.js CHANGED
@@ -130,10 +130,11 @@ class EvmHelper {
130
130
  return __awaiter(this, void 0, void 0, function* () {
131
131
  const contractAddress = xchainUtil.getContractAddressFromAsset(asset);
132
132
  const router = yield this.thorchainCache.getRouterAddressForChain(asset.chain);
133
+ const decimals = yield this.thorchainCache.midgardQuery.getDecimalForAsset(asset);
133
134
  const approveParams = {
134
135
  contractAddress,
135
136
  spenderAddress: router,
136
- amount: xchainUtil.baseAmount(amount.toString(), this.evmClient.config.gasAssetDecimals),
137
+ amount: xchainUtil.baseAmount(amount.toString(), decimals),
137
138
  walletIndex,
138
139
  };
139
140
  return yield this.evmClient.approve(approveParams);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-thorchain-amm",
3
- "version": "0.8.15",
3
+ "version": "0.8.16",
4
4
  "description": "module that exposes estimating & swappping cryptocurrency assets on thorchain",
5
5
  "keywords": [
6
6
  "THORChain",