Skip to content

Commit

Permalink
fix ctoken mint and redeem
Browse files Browse the repository at this point in the history
  • Loading branch information
0xodia committed Jun 3, 2024
1 parent dc75860 commit 878da61
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions solend-lite/src/stores/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ export const rateLimiterAtom = atom(async (get) => {
new PublicKey(selectedPoolAddress),
);
if (pool) {
const raterLimiter = parseLendingMarket(
const rateLimiter = parseLendingMarket(
new PublicKey(selectedPoolAddress),
pool,
).info.rateLimiter;

return parseRateLimiter(raterLimiter, currentSlot);
return parseRateLimiter(rateLimiter, currentSlot);
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion solend-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solendprotocol/solend-sdk",
"version": "0.10.3",
"version": "0.10.6",
"private": true,
"main": "src/index.ts",
"module": "src/index.ts",
Expand Down
15 changes: 7 additions & 8 deletions solend-sdk/src/core/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ export class SolendActionCore {
amount: string,
publicKey: PublicKey,
environment: EnvironmentType = "production",
customObligationAddress?: PublicKey,
hostAta?: PublicKey,
lookupTableAddress?: PublicKey,
customObligationAddress?: PublicKey
lookupTableAddress?: PublicKey
) {
const axn = await SolendActionCore.initialize(
pool,
Expand Down Expand Up @@ -373,8 +373,7 @@ export class SolendActionCore {
amount: string,
publicKey: PublicKey,
environment: EnvironmentType = "production",
lookupTableAddress?: PublicKey,
customObligationAddress?: PublicKey
lookupTableAddress?: PublicKey
) {
const axn = await SolendActionCore.initialize(
pool,
Expand All @@ -384,7 +383,7 @@ export class SolendActionCore {
publicKey,
connection,
environment,
customObligationAddress,
undefined,
undefined,
undefined,
lookupTableAddress
Expand Down Expand Up @@ -490,8 +489,8 @@ export class SolendActionCore {
amount: string,
publicKey: PublicKey,
environment: EnvironmentType = "production",
ownerPublicKey?: PublicKey,
customObligationAddress?: PublicKey,
ownerPublicKey?: PublicKey,
lookupTableAddress?: PublicKey
) {
const axn = await SolendActionCore.initialize(
Expand Down Expand Up @@ -671,7 +670,7 @@ export class SolendActionCore {
this.userCollateralAccountAddress,
new PublicKey(this.reserve.address),
new PublicKey(this.reserve.liquidityAddress),
new PublicKey(this.reserve.cTokenLiquidityAddress),
new PublicKey(this.reserve.cTokenMint),
new PublicKey(this.pool.address),
new PublicKey(this.pool.authorityAddress),
this.publicKey, // transferAuthority
Expand All @@ -687,7 +686,7 @@ export class SolendActionCore {
this.userCollateralAccountAddress,
this.userTokenAccountAddress,
new PublicKey(this.reserve.address),
new PublicKey(this.reserve.cTokenLiquidityAddress),
new PublicKey(this.reserve.cTokenMint),
new PublicKey(this.reserve.liquidityAddress),
new PublicKey(this.pool.address), // pool
new PublicKey(this.pool.authorityAddress), // poolAuthority
Expand Down

0 comments on commit 878da61

Please sign in to comment.