@myx-trade/sdk 0.1.24 → 0.1.25
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/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1827,7 +1827,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
|
|
|
1827
1827
|
// package.json
|
|
1828
1828
|
var package_default = {
|
|
1829
1829
|
name: "@myx-trade/sdk",
|
|
1830
|
-
version: "0.1.
|
|
1830
|
+
version: "0.1.25",
|
|
1831
1831
|
private: false,
|
|
1832
1832
|
publishConfig: {
|
|
1833
1833
|
access: "public"
|
|
@@ -18186,6 +18186,8 @@ var Account = class {
|
|
|
18186
18186
|
}
|
|
18187
18187
|
async deposit({ poolId, amount, tokenAddress }) {
|
|
18188
18188
|
const config = this.configManager.getConfig();
|
|
18189
|
+
const account = await config.signer?.getAddress() ?? "";
|
|
18190
|
+
console.log("deposit", account, poolId, amount);
|
|
18189
18191
|
const contractAddress = getContractAddressByChainId(config.chainId);
|
|
18190
18192
|
const accountContract = new import_ethers27.ethers.Contract(
|
|
18191
18193
|
contractAddress.Account,
|
|
@@ -18201,15 +18203,13 @@ var Account = class {
|
|
|
18201
18203
|
if (needApproval) {
|
|
18202
18204
|
const approvalResult = await this.utils.approveAuthorization({
|
|
18203
18205
|
quoteAddress: tokenAddress,
|
|
18204
|
-
amount,
|
|
18206
|
+
amount: import_ethers27.ethers.MaxUint256.toString(),
|
|
18205
18207
|
spenderAddress: contractAddress.Account
|
|
18206
18208
|
});
|
|
18207
18209
|
if (approvalResult.code !== 0) {
|
|
18208
18210
|
throw new Error(approvalResult.message);
|
|
18209
18211
|
}
|
|
18210
18212
|
}
|
|
18211
|
-
const account = await config.signer?.getAddress() ?? "";
|
|
18212
|
-
console.log("deposit", account, poolId, amount);
|
|
18213
18213
|
const rs = await accountContract.deposit(account, poolId, amount);
|
|
18214
18214
|
const receipt = await rs?.wait(1);
|
|
18215
18215
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -1742,7 +1742,7 @@ var RotationProvider = class extends BaseProvider {
|
|
|
1742
1742
|
// package.json
|
|
1743
1743
|
var package_default = {
|
|
1744
1744
|
name: "@myx-trade/sdk",
|
|
1745
|
-
version: "0.1.
|
|
1745
|
+
version: "0.1.25",
|
|
1746
1746
|
private: false,
|
|
1747
1747
|
publishConfig: {
|
|
1748
1748
|
access: "public"
|
|
@@ -18101,6 +18101,8 @@ var Account = class {
|
|
|
18101
18101
|
}
|
|
18102
18102
|
async deposit({ poolId, amount, tokenAddress }) {
|
|
18103
18103
|
const config = this.configManager.getConfig();
|
|
18104
|
+
const account = await config.signer?.getAddress() ?? "";
|
|
18105
|
+
console.log("deposit", account, poolId, amount);
|
|
18104
18106
|
const contractAddress = getContractAddressByChainId(config.chainId);
|
|
18105
18107
|
const accountContract = new ethers8.Contract(
|
|
18106
18108
|
contractAddress.Account,
|
|
@@ -18116,15 +18118,13 @@ var Account = class {
|
|
|
18116
18118
|
if (needApproval) {
|
|
18117
18119
|
const approvalResult = await this.utils.approveAuthorization({
|
|
18118
18120
|
quoteAddress: tokenAddress,
|
|
18119
|
-
amount,
|
|
18121
|
+
amount: ethers8.MaxUint256.toString(),
|
|
18120
18122
|
spenderAddress: contractAddress.Account
|
|
18121
18123
|
});
|
|
18122
18124
|
if (approvalResult.code !== 0) {
|
|
18123
18125
|
throw new Error(approvalResult.message);
|
|
18124
18126
|
}
|
|
18125
18127
|
}
|
|
18126
|
-
const account = await config.signer?.getAddress() ?? "";
|
|
18127
|
-
console.log("deposit", account, poolId, amount);
|
|
18128
18128
|
const rs = await accountContract.deposit(account, poolId, amount);
|
|
18129
18129
|
const receipt = await rs?.wait(1);
|
|
18130
18130
|
return {
|