@xchainjs/xchain-thorchain-amm 0.3.23 → 0.3.24
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 +3 -1
- package/lib/index.js +3 -1
- package/package.json +3 -3
package/lib/index.esm.js
CHANGED
|
@@ -1003,7 +1003,7 @@ class ThorchainAMM {
|
|
|
1003
1003
|
const addEstimate = yield this.thorchainQuery.estimateAddSaver(addAssetAmount);
|
|
1004
1004
|
if (!addEstimate.canAddSaver)
|
|
1005
1005
|
throw Error(`Cannot add to savers`);
|
|
1006
|
-
return yield wallet.addSavers(
|
|
1006
|
+
return yield wallet.addSavers(addAssetAmount, addEstimate.memo, addEstimate.toAddress, addEstimate.estimatedWaitTime);
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
1009
|
/**
|
|
@@ -1015,6 +1015,8 @@ class ThorchainAMM {
|
|
|
1015
1015
|
withdrawSaver(wallet, withdrawParams) {
|
|
1016
1016
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1017
1017
|
const withdrawEstimate = yield this.thorchainQuery.estimateWithdrawSaver(withdrawParams);
|
|
1018
|
+
if (withdrawEstimate.errors.length > 0)
|
|
1019
|
+
throw Error(`${withdrawEstimate.errors}`);
|
|
1018
1020
|
return yield wallet.withdrawSavers(withdrawEstimate.dustAmount, withdrawEstimate.memo, withdrawEstimate.toAddress, withdrawEstimate.estimatedWaitTime);
|
|
1019
1021
|
});
|
|
1020
1022
|
}
|
package/lib/index.js
CHANGED
|
@@ -1007,7 +1007,7 @@ class ThorchainAMM {
|
|
|
1007
1007
|
const addEstimate = yield this.thorchainQuery.estimateAddSaver(addAssetAmount);
|
|
1008
1008
|
if (!addEstimate.canAddSaver)
|
|
1009
1009
|
throw Error(`Cannot add to savers`);
|
|
1010
|
-
return yield wallet.addSavers(
|
|
1010
|
+
return yield wallet.addSavers(addAssetAmount, addEstimate.memo, addEstimate.toAddress, addEstimate.estimatedWaitTime);
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
1013
|
/**
|
|
@@ -1019,6 +1019,8 @@ class ThorchainAMM {
|
|
|
1019
1019
|
withdrawSaver(wallet, withdrawParams) {
|
|
1020
1020
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1021
1021
|
const withdrawEstimate = yield this.thorchainQuery.estimateWithdrawSaver(withdrawParams);
|
|
1022
|
+
if (withdrawEstimate.errors.length > 0)
|
|
1023
|
+
throw Error(`${withdrawEstimate.errors}`);
|
|
1022
1024
|
return yield wallet.withdrawSavers(withdrawEstimate.dustAmount, withdrawEstimate.memo, withdrawEstimate.toAddress, withdrawEstimate.estimatedWaitTime);
|
|
1023
1025
|
});
|
|
1024
1026
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-thorchain-amm",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.24",
|
|
4
4
|
"description": "module that exposes estimating & swappping cryptocurrency assets on thorchain",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"THORChain",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@xchainjs/xchain-litecoin": "^0.11.4",
|
|
54
54
|
"@xchainjs/xchain-midgard": "0.4.3",
|
|
55
55
|
"@xchainjs/xchain-thorchain": "^0.27.9",
|
|
56
|
-
"@xchainjs/xchain-thorchain-query": "^0.2.
|
|
56
|
+
"@xchainjs/xchain-thorchain-query": "^0.2.5",
|
|
57
57
|
"@xchainjs/xchain-thornode": "^0.2.2",
|
|
58
58
|
"@xchainjs/xchain-util": "^0.12.0",
|
|
59
59
|
"@xchainjs/xchain-utxo-providers": "^0.1.2",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@xchainjs/xchain-litecoin": "^0.11.4",
|
|
89
89
|
"@xchainjs/xchain-midgard": "0.4.3",
|
|
90
90
|
"@xchainjs/xchain-thorchain": "^0.27.9",
|
|
91
|
-
"@xchainjs/xchain-thorchain-query": "^0.2.
|
|
91
|
+
"@xchainjs/xchain-thorchain-query": "^0.2.5",
|
|
92
92
|
"@xchainjs/xchain-thornode": "^0.2.2",
|
|
93
93
|
"@xchainjs/xchain-util": "^0.12.0",
|
|
94
94
|
"@xchainjs/xchain-utxo-providers": "^0.1.2",
|