Make bid and ask accounts public on Market

This commit is contained in:
Nathaniel Parke 2020-09-07 17:32:41 +08:00
parent cfe53022af
commit b246231c51
1 changed files with 8 additions and 0 deletions

View File

@ -144,6 +144,14 @@ export class Market {
return this._decoded.quoteMint;
}
get bidsAddress(): PublicKey {
return this._decoded.bids;
}
get asksAddress(): PublicKey {
return this._decoded.asks;
}
async loadBids(connection: Connection): Promise<Orderbook> {
const { data } = throwIfNull(
await connection.getAccountInfo(this._decoded.bids),