@morpho-org/blue-sdk 5.2.0 → 5.2.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.
@@ -57,7 +57,8 @@ class Market {
57
57
  */
58
58
  rateAtTarget;
59
59
  constructor({ params, totalSupplyAssets, totalBorrowAssets, totalSupplyShares, totalBorrowShares, lastUpdate, fee, price, rateAtTarget, }) {
60
- this.params = new MarketParams_js_1.MarketParams(params);
60
+ this.params =
61
+ params instanceof MarketParams_js_1.MarketParams ? params : new MarketParams_js_1.MarketParams(params);
61
62
  this.totalSupplyAssets = totalSupplyAssets;
62
63
  this.totalBorrowAssets = totalBorrowAssets;
63
64
  this.totalSupplyShares = totalSupplyShares;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@morpho-org/blue-sdk",
3
3
  "description": "Framework-agnostic package that defines Morpho-related entity classes (such as `Market`, `Token`, `Vault`).",
4
- "version": "5.2.0",
4
+ "version": "5.2.1",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"