@dripfi/drip-sdk 1.4.6 → 1.4.7

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/CHANGELOG.md CHANGED
@@ -90,3 +90,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
90
90
  ### Changed
91
91
 
92
92
  - Upgraded version of `SpoolSDK` to `2.0.53` in order to fix potential issues with the generation of the redeem bag structure
93
+
94
+ ## [1.4.7] - 2025-02-13
95
+
96
+ ### Added
97
+
98
+ - Added method `getSwapAndDepositTokenAllowanceForCurrency` to the `PerqSdk`
package/dist/PerqSdk.d.ts CHANGED
@@ -20,6 +20,7 @@ export default class PerqSdk {
20
20
  deposit(tokenAddress: string, vaultAddress: string, amount: string): Promise<string>;
21
21
  private doDeposit;
22
22
  getTokenAllowanceForCurrency(tokenAddress: string): Promise<string>;
23
+ getSwapAndDepositTokenAllowanceForCurrency(tokenAddress: string): Promise<string>;
23
24
  getTokenAllowanceForRecycler(tokenAddress: string): Promise<BigNumber>;
24
25
  getTokenAllowanceForSwapAndRecycler(tokenAddress: string): Promise<BigNumber>;
25
26
  getExpectedSwapResult(fromTokenAddress: string, toTokenAddress: string, amount: string, decimals: number): Promise<string>;
package/dist/PerqSdk.js CHANGED
@@ -91,6 +91,13 @@ class PerqSdk {
91
91
  const currentTokenAllowance = await this.getTokenAllowanceForDeposit(tokenAddress);
92
92
  return currentTokenAllowance.toString();
93
93
  }
94
+ async getSwapAndDepositTokenAllowanceForCurrency(tokenAddress) {
95
+ if (!this.signer) {
96
+ throw Error('No signer provided');
97
+ }
98
+ const currentTokenAllowance = await this.getTokenAllowanceForSwapAndDeposit(tokenAddress);
99
+ return currentTokenAllowance.toString();
100
+ }
94
101
  async getTokenAllowanceForRecycler(tokenAddress) {
95
102
  if (!this.signer) {
96
103
  throw Error('No signer provided');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dripfi/drip-sdk",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "Drip SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",