@zyfai/sdk 0.2.29 → 0.2.31
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 +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -684,7 +684,10 @@ var isSafeDeployed = async (address, publicClient) => {
|
|
|
684
684
|
var getAccountType = async (address, publicClient) => {
|
|
685
685
|
try {
|
|
686
686
|
const code = await publicClient.getCode({ address });
|
|
687
|
-
if (!code || code === "0x" || code.length === 2
|
|
687
|
+
if (!code || code === "0x" || code.length === 2) {
|
|
688
|
+
return "EOA";
|
|
689
|
+
}
|
|
690
|
+
if (code.startsWith("0xef01")) {
|
|
688
691
|
return "EOA";
|
|
689
692
|
}
|
|
690
693
|
try {
|
|
@@ -3191,6 +3194,9 @@ var _ZyfaiSDK = class _ZyfaiSDK {
|
|
|
3191
3194
|
if (!this.walletClient?.account) {
|
|
3192
3195
|
throw new Error("Wallet not connected. Call connectAccount first.");
|
|
3193
3196
|
}
|
|
3197
|
+
if (Number(amount) <= 2) {
|
|
3198
|
+
throw new Error("Minimum deposit amount is 2.00 USDC");
|
|
3199
|
+
}
|
|
3194
3200
|
const userAddress = this.walletClient.account.address;
|
|
3195
3201
|
const chainConfig = getChainConfig(chainId, this.rpcUrls);
|
|
3196
3202
|
const tokenAddress = getDefaultTokenAddress(chainId, asset);
|
package/dist/index.mjs
CHANGED
|
@@ -660,7 +660,10 @@ var isSafeDeployed = async (address, publicClient) => {
|
|
|
660
660
|
var getAccountType = async (address, publicClient) => {
|
|
661
661
|
try {
|
|
662
662
|
const code = await publicClient.getCode({ address });
|
|
663
|
-
if (!code || code === "0x" || code.length === 2
|
|
663
|
+
if (!code || code === "0x" || code.length === 2) {
|
|
664
|
+
return "EOA";
|
|
665
|
+
}
|
|
666
|
+
if (code.startsWith("0xef01")) {
|
|
664
667
|
return "EOA";
|
|
665
668
|
}
|
|
666
669
|
try {
|
|
@@ -3167,6 +3170,9 @@ var _ZyfaiSDK = class _ZyfaiSDK {
|
|
|
3167
3170
|
if (!this.walletClient?.account) {
|
|
3168
3171
|
throw new Error("Wallet not connected. Call connectAccount first.");
|
|
3169
3172
|
}
|
|
3173
|
+
if (Number(amount) <= 2) {
|
|
3174
|
+
throw new Error("Minimum deposit amount is 2.00 USDC");
|
|
3175
|
+
}
|
|
3170
3176
|
const userAddress = this.walletClient.account.address;
|
|
3171
3177
|
const chainConfig = getChainConfig(chainId, this.rpcUrls);
|
|
3172
3178
|
const tokenAddress = getDefaultTokenAddress(chainId, asset);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zyfai/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.31",
|
|
4
4
|
"description": "TypeScript SDK for Zyfai Yield Optimization Engine - Deploy Safe smart wallets, manage session keys, and interact with DeFi protocols",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|