mirror of https://github.com/certusone/oyster.git
version changes
This commit is contained in:
parent
315d9304e8
commit
55784109e1
|
@ -4,7 +4,7 @@ import * as Layout from "./../../utils/layout";
|
|||
|
||||
export const LendingMarketLayout: typeof BufferLayout.Structure = BufferLayout.struct(
|
||||
[
|
||||
BufferLayout.u8("isInitialized"),
|
||||
BufferLayout.u8("version"),
|
||||
Layout.publicKey("quoteMint"),
|
||||
Layout.publicKey("tokenProgramId")
|
||||
],
|
||||
|
@ -17,7 +17,7 @@ export interface LendingMarket {
|
|||
}
|
||||
|
||||
export const isLendingMarket = (info: AccountInfo<Buffer>) => {
|
||||
return info.data.length === LendingMarketLayout.span;
|
||||
return info.data.length === LendingMarketLayout.span + 62;
|
||||
};
|
||||
|
||||
export const LendingMarketParser = (
|
||||
|
|
|
@ -5,6 +5,7 @@ import * as Layout from "./../../utils/layout";
|
|||
|
||||
export const LendingObligationLayout: typeof BufferLayout.Structure = BufferLayout.struct(
|
||||
[
|
||||
BufferLayout.u8("version"),
|
||||
/// Slot when obligation was updated. Used for calculating interest.
|
||||
Layout.uint64("lastUpdateSlot"),
|
||||
/// Amount of collateral tokens deposited for this obligation
|
||||
|
@ -23,7 +24,7 @@ export const LendingObligationLayout: typeof BufferLayout.Structure = BufferLayo
|
|||
);
|
||||
|
||||
export const isLendingObligation = (info: AccountInfo<Buffer>) => {
|
||||
return info.data.length === LendingObligationLayout.span;
|
||||
return info.data.length === LendingObligationLayout.span + 300;
|
||||
};
|
||||
|
||||
export interface LendingObligation {
|
||||
|
|
|
@ -13,6 +13,7 @@ import * as Layout from './../../utils/layout';
|
|||
import { LendingInstruction } from './lending';
|
||||
|
||||
export const LendingReserveLayout: typeof BufferLayout.Structure = BufferLayout.struct([
|
||||
BufferLayout.u8('version'),
|
||||
Layout.uint64('lastUpdateSlot'),
|
||||
|
||||
Layout.publicKey('lendingMarket'),
|
||||
|
@ -76,7 +77,7 @@ export const LendingReserveLayout: typeof BufferLayout.Structure = BufferLayout.
|
|||
]);
|
||||
|
||||
export const isLendingReserve = (info: AccountInfo<Buffer>) => {
|
||||
return info.data.length === LendingReserveLayout.span;
|
||||
return info.data.length === LendingReserveLayout.span + 300;
|
||||
};
|
||||
|
||||
export interface LendingReserve {
|
||||
|
|
Loading…
Reference in New Issue