@ember-finance/sdk 1.4.0 → 1.4.1

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.
@@ -29,7 +29,7 @@ class UserCalls extends onchain_calls_1.OnChainCalls {
29
29
  [split, merged] = await library_sui_1.CoinUtils.validateCoinBalance(this.suiClient, txb, (0, library_sui_1.bigNumber)(amount).toFixed(0), coinId);
30
30
  coinId = split;
31
31
  }
32
- this.txBuilder.depositAsset(vaultId, coinId, minSharesToMint, options.receiver || this.walletAddress, { ...options, txBlock: txb });
32
+ this.txBuilder.depositAsset(vaultId, coinId, minSharesToMint, options?.receiver || this.walletAddress, { ...options, txBlock: txb });
33
33
  if (merged) {
34
34
  txb.transferObjects([merged], this.walletAddress);
35
35
  }
@@ -64,7 +64,7 @@ class UserCalls extends onchain_calls_1.OnChainCalls {
64
64
  let coinId = options?.coinId;
65
65
  const txb = options?.txBlock || new library_sui_1.TransactionBlock();
66
66
  const vaultRate = await vault_1.Vault.getVaultRate(this.suiClient, vaultId);
67
- const vaultRateBN = (0, library_sui_1.bigNumber)(vaultRate).shiftedBy(library_sui_1.SUI_NATIVE_BASE);
67
+ const vaultRateBN = (0, library_sui_1.bigNumber)(vaultRate).shiftedBy(-library_sui_1.SUI_NATIVE_BASE);
68
68
  const assetAmountRequired = (0, library_sui_1.bigNumber)(numberOfShares)
69
69
  .multipliedBy(vaultRateBN)
70
70
  .toFixed(0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ember-finance/sdk",
3
3
  "description": "Ember Protocol SDK",
4
- "version": "1.4.0",
4
+ "version": "1.4.1",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",