Skip to content

Commit

Permalink
published
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-vincent committed Aug 23, 2023
1 parent 3f11024 commit a2a4e2d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 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-rc5",
"version": "8.1.4-rc6",
"description": "JavaScript Client for the UXD Solana Program",
"keywords": [
"solana",
Expand Down
2 changes: 1 addition & 1 deletion src/credix_lp/credixIdl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9901,7 +9901,7 @@ export type Credix = {
}
];
};
export const IDL = {
export const IDL: Credix = {
version: '3.11.0',
name: 'credix',
instructions: [
Expand Down
12 changes: 6 additions & 6 deletions src/credix_lp/depository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export class CredixLpDepository {
);
if (!credixGlobalMarketStateAccount) {
throw new Error(
'Could not read credixGlobalMarketState account:' +
'Could not read credixGlobalMarketState account: ' +
credixGlobalMarketState.toString()
);
}
Expand All @@ -346,7 +346,7 @@ export class CredixLpDepository {
);
if (!credixProgramStateAccount) {
throw new Error(
'Could not read credixProgramState account:' +
'Could not read credixProgramState account: ' +
credixProgramState.toString()
);
}
Expand All @@ -361,7 +361,7 @@ export class CredixLpDepository {
await credixProgram.account.credixPass.fetchNullable(credixPass);
if (!credixPassAccount) {
throw new Error(
'Could not read credixPass account:' + credixPass.toString()
'Could not read credixPass account: ' + credixPass.toString()
);
}
return credixPassAccount;
Expand All @@ -377,7 +377,7 @@ export class CredixLpDepository {
);
if (!credixWithdrawEpochAccount) {
throw new Error(
'Could not read credixWithdrawEpoch account:' +
'Could not read credixWithdrawEpoch account: ' +
credixWithdrawEpoch.toString()
);
}
Expand All @@ -394,7 +394,7 @@ export class CredixLpDepository {
);
if (!credixWithdrawRequestAccount) {
throw new Error(
'Could not read credixWithdrawRequest account:' +
'Could not read credixWithdrawRequest account: ' +
credixWithdrawRequest.toString()
);
}
Expand All @@ -408,7 +408,7 @@ export class CredixLpDepository {
const collateralMintData = await getMint(connection, collateralMint);
if (!collateralMintData) {
throw new Error(
'Could not read collateralMint account:' + collateralMint.toString()
'Could not read collateralMint account: ' + collateralMint.toString()
);
}
return collateralMintData.decimals;
Expand Down
3 changes: 3 additions & 0 deletions src/mercurial/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export function getAmountByShare(
withdrawableAmount: BN,
totalSupply: BN
): BN {
if (totalSupply.isZero()) {
return new BN(0);
}
return share.mul(withdrawableAmount).div(totalSupply);
}

Expand Down

0 comments on commit a2a4e2d

Please sign in to comment.