@xchainjs/xchain-thorchain-query 1.0.7 → 1.0.8
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 +1 -18
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +0 -18
- package/lib/index.js.map +1 -1
- package/lib/utils/const.d.ts +0 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -68,10 +68,6 @@ const DefaultChainAttributes = {
|
|
|
68
68
|
blockReward: 0,
|
|
69
69
|
avgBlockTimeInSecs: 6, // Average block time for Gaia in seconds
|
|
70
70
|
},
|
|
71
|
-
BNB: {
|
|
72
|
-
blockReward: 0,
|
|
73
|
-
avgBlockTimeInSecs: 6, // Average block time for Binance Coin in seconds
|
|
74
|
-
},
|
|
75
71
|
THOR: {
|
|
76
72
|
blockReward: 0,
|
|
77
73
|
avgBlockTimeInSecs: 6, // Average block time for THORChain in seconds
|
|
@@ -113,7 +109,6 @@ class LiquidityPool {
|
|
|
113
109
|
}
|
|
114
110
|
}
|
|
115
111
|
|
|
116
|
-
const AssetBNB = assetFromStringEx('BNB.BNB');
|
|
117
112
|
const AssetAVAX = assetFromStringEx('AVAX.AVAX');
|
|
118
113
|
const AssetBTC = assetFromStringEx('BTC.BTC');
|
|
119
114
|
const AssetBCH = assetFromStringEx('BCH.BCH');
|
|
@@ -158,8 +153,6 @@ const getCryptoAmountWithNotation = (amount, notation) => {
|
|
|
158
153
|
*/
|
|
159
154
|
const getChainAsset = (chain) => {
|
|
160
155
|
switch (chain) {
|
|
161
|
-
case BNBChain:
|
|
162
|
-
return AssetBNB;
|
|
163
156
|
case BTCChain:
|
|
164
157
|
return AssetBTC;
|
|
165
158
|
case ETHChain:
|
|
@@ -209,8 +202,6 @@ const calcNetworkFee = (asset, inbound) => {
|
|
|
209
202
|
case DOGEChain:
|
|
210
203
|
// NOTE: UTXO chains estimate fees with a 250 byte size
|
|
211
204
|
return new AssetCryptoAmount(baseAmount(inbound.gasRate.multipliedBy(inbound.outboundTxSize)), AssetDOGE);
|
|
212
|
-
case BNBChain:
|
|
213
|
-
return new AssetCryptoAmount(baseAmount(inbound.gasRate), AssetBNB);
|
|
214
205
|
case ETHChain:
|
|
215
206
|
const gasRateinETHGwei = inbound.gasRate;
|
|
216
207
|
const gasRateinETHWei = baseAmount(gasRateinETHGwei.multipliedBy(Math.pow(10, 9)), 18);
|
|
@@ -262,9 +253,6 @@ const calcOutboundFee = (asset, inbound) => {
|
|
|
262
253
|
case DOGEChain:
|
|
263
254
|
// NOTE: UTXO chains estimate fees with a 250 byte size
|
|
264
255
|
return new AssetCryptoAmount(baseAmount(inbound.outboundFee), AssetDOGE);
|
|
265
|
-
case BNBChain:
|
|
266
|
-
//flat fee
|
|
267
|
-
return new AssetCryptoAmount(baseAmount(inbound.outboundFee), AssetBNB);
|
|
268
256
|
case ETHChain:
|
|
269
257
|
return new AssetCryptoAmount(baseAmount(inbound.outboundFee.multipliedBy(Math.pow(10, 9)), 18), AssetETH);
|
|
270
258
|
case AVAXChain:
|
|
@@ -1692,11 +1680,6 @@ class ThorchainQuery {
|
|
|
1692
1680
|
const assetDecimals = yield this.thorchainCache.midgardQuery.getDecimalForAsset(asset);
|
|
1693
1681
|
// Determine the dust values based on the asset's chain
|
|
1694
1682
|
switch (asset.chain) {
|
|
1695
|
-
case 'BNB':
|
|
1696
|
-
return {
|
|
1697
|
-
asset: new AssetCryptoAmount(assetToBase(assetAmount(0.000001, assetDecimals)), AssetBNB),
|
|
1698
|
-
rune: new AssetCryptoAmount(assetToBase(assetAmount(0)), AssetRuneNative),
|
|
1699
|
-
};
|
|
1700
1683
|
case 'BTC':
|
|
1701
1684
|
case `BCH`:
|
|
1702
1685
|
case `LTC`:
|
|
@@ -3155,5 +3138,5 @@ class TransactionStage {
|
|
|
3155
3138
|
}
|
|
3156
3139
|
}
|
|
3157
3140
|
|
|
3158
|
-
export { AVAXChain, AddLpStatus, AddSaverStatus, AssetATOM, AssetAVAX, AssetBCH,
|
|
3141
|
+
export { AVAXChain, AddLpStatus, AddSaverStatus, AssetATOM, AssetAVAX, AssetBCH, AssetBSC, AssetBTC, AssetDOGE, AssetETH, AssetLTC, AssetMAYA, AssetRuneNative, BCHChain, BNBChain, BSCChain, BTCChain, DOGEChain, DefaultChainAttributes, ETHChain, GAIAChain, InboundStatus, LTCChain, LiquidityPool, MAYAChain, RefundStatus, SwapStatus, THORCHAIN_DECIMAL, THORChain, ThorchainCache, ThorchainQuery, Thornode, TransactionStage, TxType, WithdrawStatus, assetUSDC, calcNetworkFee, getCryptoAmountWithNotation, getLiquidityProtectionData, getLiquidityUnits, getPoolShare, getSlipOnLiquidity, isAssetRuneNative };
|
|
3159
3142
|
//# sourceMappingURL=index.esm.js.map
|