@xchainjs/xchain-thorchain-amm 0.7.7 → 0.7.11
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 +4 -3
- package/lib/index.js +3 -2
- package/package.json +16 -16
package/lib/index.esm.js
CHANGED
|
@@ -11,7 +11,7 @@ import { Client as Client$3 } from '@xchainjs/xchain-litecoin';
|
|
|
11
11
|
import { Client as Client$7 } from '@xchainjs/xchain-mayachain';
|
|
12
12
|
import { Client as Client$4, THORChain } from '@xchainjs/xchain-thorchain';
|
|
13
13
|
import { eqAsset, getContractAddressFromAsset, baseAmount, assetFromString } from '@xchainjs/xchain-util';
|
|
14
|
-
import { abi, MAX_APPROVAL } from '@xchainjs/xchain-evm';
|
|
14
|
+
import { Protocol, abi, MAX_APPROVAL } from '@xchainjs/xchain-evm';
|
|
15
15
|
import { ethers } from 'ethers';
|
|
16
16
|
import { ThorchainQuery } from '@xchainjs/xchain-thorchain-query';
|
|
17
17
|
|
|
@@ -68,15 +68,16 @@ class EvmHelper {
|
|
|
68
68
|
throw new Error('Vault address is not defined');
|
|
69
69
|
}
|
|
70
70
|
const address = this.client.getAddress(params.walletIndex);
|
|
71
|
-
const gasPrice = yield this.evmClient.estimateGasPrices();
|
|
71
|
+
const gasPrice = yield this.evmClient.estimateGasPrices(Protocol.THORCHAIN);
|
|
72
72
|
if (eqAsset(params.asset, this.evmClient.config.gasAsset)) {
|
|
73
73
|
// simple transfer
|
|
74
|
-
return yield this.
|
|
74
|
+
return yield this.evmClient.transfer({
|
|
75
75
|
walletIndex: params.walletIndex || 0,
|
|
76
76
|
asset: params.asset,
|
|
77
77
|
amount: params.amount,
|
|
78
78
|
recipient: inboundAsgard.address,
|
|
79
79
|
memo: params.memo,
|
|
80
|
+
gasPrice: gasPrice.fast,
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
83
|
else {
|
package/lib/index.js
CHANGED
|
@@ -72,15 +72,16 @@ class EvmHelper {
|
|
|
72
72
|
throw new Error('Vault address is not defined');
|
|
73
73
|
}
|
|
74
74
|
const address = this.client.getAddress(params.walletIndex);
|
|
75
|
-
const gasPrice = yield this.evmClient.estimateGasPrices();
|
|
75
|
+
const gasPrice = yield this.evmClient.estimateGasPrices(xchainEvm.Protocol.THORCHAIN);
|
|
76
76
|
if (xchainUtil.eqAsset(params.asset, this.evmClient.config.gasAsset)) {
|
|
77
77
|
// simple transfer
|
|
78
|
-
return yield this.
|
|
78
|
+
return yield this.evmClient.transfer({
|
|
79
79
|
walletIndex: params.walletIndex || 0,
|
|
80
80
|
asset: params.asset,
|
|
81
81
|
amount: params.amount,
|
|
82
82
|
recipient: inboundAsgard.address,
|
|
83
83
|
memo: params.memo,
|
|
84
|
+
gasPrice: gasPrice.fast,
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
87
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thorchain-amm",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
4
|
"description": "module that exposes estimating & swappping cryptocurrency assets on thorchain",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"THORChain",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"@binance-chain/javascript-sdk": "^4.2.0",
|
|
40
40
|
"@cosmos-client/core": "0.46.1",
|
|
41
41
|
"@psf/bitcoincashjs-lib": "^4.0.3",
|
|
42
|
-
"@xchainjs/xchain-avax": "^0.3.
|
|
42
|
+
"@xchainjs/xchain-avax": "^0.3.4",
|
|
43
43
|
"@xchainjs/xchain-binance": "^5.7.4",
|
|
44
44
|
"@xchainjs/xchain-bitcoin": "^0.23.2",
|
|
45
45
|
"@xchainjs/xchain-bitcoincash": "^0.17.2",
|
|
46
|
-
"@xchainjs/xchain-client": "^0.15.
|
|
46
|
+
"@xchainjs/xchain-client": "^0.15.2",
|
|
47
47
|
"@xchainjs/xchain-cosmos": "^0.21.5",
|
|
48
|
-
"@xchainjs/xchain-bsc": "^0.3.
|
|
48
|
+
"@xchainjs/xchain-bsc": "^0.3.4",
|
|
49
49
|
"@xchainjs/xchain-crypto": "^0.3.0",
|
|
50
|
-
"@xchainjs/xchain-doge": "^0.7.
|
|
51
|
-
"@xchainjs/xchain-ethereum": "^0.30.
|
|
50
|
+
"@xchainjs/xchain-doge": "^0.7.3",
|
|
51
|
+
"@xchainjs/xchain-ethereum": "^0.30.5",
|
|
52
52
|
"@xchainjs/xchain-thornode": "^0.3.8",
|
|
53
|
-
"@xchainjs/xchain-thorchain-query": "^0.6.
|
|
54
|
-
"@xchainjs/xchain-evm": "^0.3.
|
|
53
|
+
"@xchainjs/xchain-thorchain-query": "^0.6.8",
|
|
54
|
+
"@xchainjs/xchain-evm": "^0.3.5",
|
|
55
55
|
"@xchainjs/xchain-litecoin": "^0.13.2",
|
|
56
56
|
"@xchainjs/xchain-mayachain": "^0.2.8",
|
|
57
57
|
"@xchainjs/xchain-midgard": "^0.5.2",
|
|
@@ -75,19 +75,19 @@
|
|
|
75
75
|
"@binance-chain/javascript-sdk": "^4.2.0",
|
|
76
76
|
"@cosmos-client/core": "0.46.1",
|
|
77
77
|
"@psf/bitcoincashjs-lib": "^4.0.3",
|
|
78
|
-
"@xchainjs/xchain-avax": "^0.3.
|
|
78
|
+
"@xchainjs/xchain-avax": "^0.3.4",
|
|
79
79
|
"@xchainjs/xchain-binance": "^5.7.4",
|
|
80
80
|
"@xchainjs/xchain-bitcoin": "^0.23.2",
|
|
81
81
|
"@xchainjs/xchain-bitcoincash": "^0.17.2",
|
|
82
|
-
"@xchainjs/xchain-client": "^0.15.
|
|
82
|
+
"@xchainjs/xchain-client": "^0.15.2",
|
|
83
83
|
"@xchainjs/xchain-cosmos": "^0.21.5",
|
|
84
|
-
"@xchainjs/xchain-bsc": "^0.3.
|
|
84
|
+
"@xchainjs/xchain-bsc": "^0.3.4",
|
|
85
85
|
"@xchainjs/xchain-crypto": "^0.3.0",
|
|
86
|
-
"@xchainjs/xchain-doge": "^0.7.
|
|
87
|
-
"@xchainjs/xchain-ethereum": "^0.30.
|
|
86
|
+
"@xchainjs/xchain-doge": "^0.7.3",
|
|
87
|
+
"@xchainjs/xchain-ethereum": "^0.30.5",
|
|
88
88
|
"@xchainjs/xchain-thornode": "^0.3.8",
|
|
89
|
-
"@xchainjs/xchain-thorchain-query": "^0.6.
|
|
90
|
-
"@xchainjs/xchain-evm": "^0.3.
|
|
89
|
+
"@xchainjs/xchain-thorchain-query": "^0.6.8",
|
|
90
|
+
"@xchainjs/xchain-evm": "^0.3.5",
|
|
91
91
|
"@xchainjs/xchain-litecoin": "^0.13.2",
|
|
92
92
|
"@xchainjs/xchain-mayachain": "^0.2.8",
|
|
93
93
|
"@xchainjs/xchain-midgard": "^0.5.2",
|
|
@@ -109,4 +109,4 @@
|
|
|
109
109
|
"publishConfig": {
|
|
110
110
|
"access": "public"
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|