impermax-sdk 1.2.9 → 1.2.10

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.
@@ -5,10 +5,12 @@ import OffchainAccountLendingVault from './offchainAccountLendingVault';
5
5
  import { LendingVaultPosition, UserData } from '../offchainTypes';
6
6
  export default class OffchainAccount {
7
7
  private readonly offchain;
8
- private readonly account;
8
+ private readonly accountAddress;
9
9
  private lendingPools;
10
10
  private lendingVaults;
11
11
  constructor(offchain: Offchain, account: Address);
12
+ getOnchain: () => Offchain;
13
+ getAccountAddress: () => string;
12
14
  private initializeLendingPool;
13
15
  getLendingPool(factory: Factory, pair: Address): Promise<OffchainAccountLendingPool>;
14
16
  private initializeLendingVault;
@@ -16,8 +16,10 @@ const lendingPool_1 = __importDefault(require("./lendingPool"));
16
16
  const offchainAccountLendingVault_1 = __importDefault(require("./offchainAccountLendingVault"));
17
17
  class OffchainAccount {
18
18
  constructor(offchain, account) {
19
+ this.getOnchain = () => this.offchain;
20
+ this.getAccountAddress = () => this.accountAddress;
19
21
  this.offchain = offchain;
20
- this.account = account;
22
+ this.accountAddress = account;
21
23
  this.lendingPools = {};
22
24
  this.lendingVaults = {};
23
25
  }
@@ -52,12 +54,12 @@ class OffchainAccount {
52
54
  }
53
55
  getUserData() {
54
56
  return __awaiter(this, void 0, void 0, function* () {
55
- return this.offchain.getUserData(this.account);
57
+ return this.offchain.getUserData(this.accountAddress);
56
58
  });
57
59
  }
58
60
  getLendingVaultsUserData() {
59
61
  return __awaiter(this, void 0, void 0, function* () {
60
- return this.offchain.getLendingVaultsUserData(this.account);
62
+ return this.offchain.getLendingVaultsUserData(this.accountAddress);
61
63
  });
62
64
  }
63
65
  getBorrowPositions() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",