impermax-sdk 2.1.521 → 2.1.522
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.
|
@@ -47,6 +47,8 @@ class OnchainAccountNftlpGenericCL extends onchainAccountNftlp_1.default {
|
|
|
47
47
|
}
|
|
48
48
|
async createPositionObject(tokenId, lockStateChange = true) {
|
|
49
49
|
const { unclaimedFees0, unclaimedFees1 } = await this.getCurrentUnclaimedFees(tokenId);
|
|
50
|
+
const offchainAccountCollateral = await this.collateral.getOffchainAccountCollateral();
|
|
51
|
+
const offchainAccountNftlp = offchainAccountCollateral.getNftlp();
|
|
50
52
|
return new cl_1.default({
|
|
51
53
|
liquidity: await this.getLiquidity(tokenId),
|
|
52
54
|
unclaimedFeesX: unclaimedFees0,
|
|
@@ -62,6 +64,10 @@ class OnchainAccountNftlpGenericCL extends onchainAccountNftlp_1.default {
|
|
|
62
64
|
borrowableX: await this.getNftlp().getLendingPool().getBorrowableA().createBorrowableObject(lockStateChange),
|
|
63
65
|
borrowableY: await this.getNftlp().getLendingPool().getBorrowableB().createBorrowableObject(lockStateChange),
|
|
64
66
|
fullRangeRate: await (await this.getNftlp().getOffchainNftlp()).getFullRangeRate(await this.getTickSpacing(tokenId)),
|
|
67
|
+
cumulativeDepositX: await offchainAccountNftlp.getCumulativeDeposit0(tokenId),
|
|
68
|
+
cumulativeDepositY: await offchainAccountNftlp.getCumulativeDeposit1(tokenId),
|
|
69
|
+
cumulativeBorrowX: await offchainAccountNftlp.getLendingPool().getBorrowableA().getCumulativeBorrows(tokenId),
|
|
70
|
+
cumulativeBorrowY: await offchainAccountNftlp.getLendingPool().getBorrowableB().getCumulativeBorrows(tokenId),
|
|
65
71
|
lockStateChange,
|
|
66
72
|
});
|
|
67
73
|
}
|