@defisaver/sdk 0.1.15 → 0.1.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "0.1.15",
3
+ "version": "0.1.18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,7 +13,7 @@
13
13
  "repository": "https://github.com/DecenterApps/defisaver-sdk",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "@defisaver/tokens": "^1.3.64",
16
+ "@defisaver/tokens": "^1.4.2",
17
17
  "@ethersproject/address": "^5.0.10",
18
18
  "@ethersproject/solidity": "^5.0.9",
19
19
  "axios": "^0.21.1",
@@ -19,6 +19,7 @@ class CompoundPaybackAction extends Action {
19
19
  async getAssetsToApprove() {
20
20
  const asset = getAssetInfoByAddress(this.args[0]);
21
21
  if (asset.symbol !== 'cETH') return [{asset: getAssetInfo(asset.symbol.substr(1)).address, owner: this.args[2]}];
22
+ else return [{asset: getAssetInfo('WETH').address, owner: this.args[2]}]
22
23
  return [];
23
24
  }
24
25
  }
@@ -19,6 +19,7 @@ class CompoundSupplyAction extends Action {
19
19
  async getAssetsToApprove() {
20
20
  const asset = getAssetInfoByAddress(this.args[0]);
21
21
  if (asset.symbol !== 'cETH') return [{asset: getAssetInfo(asset.symbol.substr(1)).address, owner: this.args[2]}];
22
+ else return [{asset: getAssetInfo('WETH').address, owner: this.args[2]}]
22
23
  return [];
23
24
  }
24
25
  }
@@ -43,7 +43,7 @@ describe('Action: CompoundPaybackAction', () => {
43
43
  it('encodeForRecipe', () => encodeForRecipe(action));
44
44
  it('getAssetsToApprove', async () => {
45
45
  const assetOwnerPairs = await action.getAssetsToApprove();
46
- assert.lengthOf(assetOwnerPairs, 0);
46
+ assert.lengthOf(assetOwnerPairs, 1);
47
47
  })
48
48
  it('getEthValue', async () => {
49
49
  const ethValue = await action.getEthValue();
@@ -21,7 +21,7 @@ describe('Action: CompoundSupplyAction', () => {
21
21
  it('encodeForRecipe', () => encodeForRecipe(action));
22
22
  it('getAssetsToApprove', async () => {
23
23
  const assetOwnerPairs = await action.getAssetsToApprove();
24
- assert.lengthOf(assetOwnerPairs, 0);
24
+ assert.lengthOf(assetOwnerPairs, 1);
25
25
  })
26
26
  it('getEthValue', async () => {
27
27
  const ethValue = await action.getEthValue();