@dripfi/drip-sdk 1.4.28-silo-sdk-4 → 1.4.28-silo-sdk-5

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.
@@ -36,10 +36,8 @@ class SiloVaultOperations {
36
36
  if (!this.perqSdk.siloPackage) {
37
37
  throw new Error('Silo package not initialized. Please provide a signer.');
38
38
  }
39
- const amountToApprove = await this.perqSdk.tokenUtils.parseAmountWithDecimals(amount, sourceTokenAddress);
40
- console.log('🚀 ~ amountToApprove:', amountToApprove.toString());
41
39
  // For Silo, we use the standard ERC20 approval
42
- return await this.perqSdk.tokenUtils.approveAllowance(sourceTokenAddress, amountToApprove.toString(), vaultAddress);
40
+ return await this.perqSdk.tokenUtils.approveAllowance(sourceTokenAddress, amount, vaultAddress);
43
41
  }
44
42
  async deposit(params) {
45
43
  const { amount, vaultAddress, sourceTokenAddress } = params;
@@ -61,15 +61,13 @@ class YelayVaultOperations {
61
61
  throw new Error('OnChainProjectId is required for Yelay vaults');
62
62
  }
63
63
  const depositType = this.determineDepositType(params);
64
- const parsedAmount = await this.perqSdk.tokenUtils.parseAmountWithDecimals(amount, sourceTokenAddress);
65
- console.log('🚀 ~ parsedAmount:', parsedAmount.toString());
66
64
  switch (depositType) {
67
65
  case 'direct':
68
- return await this.perqSdk.tokenUtils.approveAllowance(sourceTokenAddress, parsedAmount.toString(), vaultAddress);
66
+ return await this.perqSdk.tokenUtils.approveAllowance(sourceTokenAddress, amount, vaultAddress);
69
67
  case 'wrap':
70
68
  throw new Error("Can't approve a native token");
71
69
  case 'swap':
72
- return await this.perqSdk.lite.approveSwapAndDeposit(sourceTokenAddress, parsedAmount.toString());
70
+ return await this.perqSdk.lite.approveSwapAndDeposit(sourceTokenAddress, amount);
73
71
  default:
74
72
  throw new Error(`Unsupported deposit type: ${depositType}`);
75
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dripfi/drip-sdk",
3
- "version": "1.4.28-silo-sdk-4",
3
+ "version": "1.4.28-silo-sdk-5",
4
4
  "description": "Drip SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",