Closed bdhobare closed 2 years ago
@mschneider Simplified MangoAccount
to a struct that will have the other methods added. Also replaced the explicit initialization methods with normal constructors. Updated the tests to validate the accountInfo instead of the type.
MangoAccountInfo
and createdMangoAccount
that will hold more methods like account health, liquidation status, etc that can be implemented and tested in subsequent PRs.MangoAccount
: using prefetchedAccountInfo
or by fetching it directly from RPC during construction.// option 2 : Use prefetched AccountInfo const auto& mangoAccountInfo = connection.getAccountInfo(pubKey);
const auto& mangoAccount = mango_v3::MangoAccount(mangoAccountInfo);