Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-vincent committed Aug 25, 2023
1 parent 26f1ed8 commit adc34f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uxd-protocol/uxd-client",
"version": "8.1.4-rc6",
"version": "8.1.4-rc7",
"description": "JavaScript Client for the UXD Solana Program",
"keywords": [
"solana",
Expand Down
12 changes: 2 additions & 10 deletions src/credix_lp/depository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export class CredixLpDepository {
public readonly credixWithdrawEpoch: PublicKey,
public readonly credixWithdrawRequest: PublicKey,
public readonly credixProgramId: PublicKey,
public readonly credixPoolOutstandingCredit: BN,
public readonly credixReleaseTimestamp: BN
public readonly credixPoolOutstandingCredit: BN
) {}

public static async initialize({
Expand Down Expand Up @@ -104,16 +103,11 @@ export class CredixLpDepository {
credixProgram,
credixProgramState
);
const credixPassAccountPromise = this.getCredixPassAccount(
credixProgram,
credixPass
);

// Wait until we have all the accounts deserialized data before progressing further
const credixGlobalMarketStateAccount =
await credixGlobalMarketStateAccountPromise;
const credixProgramStateAccount = await credixProgramStateAccountPromise;
const credixPassAccount = await credixPassAccountPromise;

// Then we can read all the informations needed from the onchain accounts
const credixSharesMint = credixGlobalMarketStateAccount.lpTokenMint;
Expand All @@ -130,7 +124,6 @@ export class CredixLpDepository {
credixGlobalMarketStateAccount.latestWithdrawEpochIdx;
const credixPoolOutstandingCredit =
credixGlobalMarketStateAccount.poolOutstandingCredit;
const credixReleaseTimestamp = credixPassAccount.releaseTimestamp;

// Then generate the depository token accounts
const depositoryCollateral = this.findDepositoryCollateralAddress(
Expand Down Expand Up @@ -178,8 +171,7 @@ export class CredixLpDepository {
credixWithdrawEpoch,
credixWithdrawRequest,
credixProgramId,
credixPoolOutstandingCredit,
credixReleaseTimestamp
credixPoolOutstandingCredit
);
}

Expand Down

0 comments on commit adc34f0

Please sign in to comment.