mirror of https://github.com/certusone/oyster.git
fix: account caching
This commit is contained in:
parent
179e4352bc
commit
2cefc186de
|
@ -311,7 +311,8 @@ export function AccountsProvider({ children = null as any }) {
|
||||||
if (info.accountInfo.data.length === AccountLayout.span) {
|
if (info.accountInfo.data.length === AccountLayout.span) {
|
||||||
const data = deserializeAccount(info.accountInfo.data);
|
const data = deserializeAccount(info.accountInfo.data);
|
||||||
|
|
||||||
if (PRECACHED_OWNERS.has(data.owner.toBase58()) || !cache.get(id)) {
|
if (PRECACHED_OWNERS.has(data.owner.toBase58()) || cache.get(id)) {
|
||||||
|
console.log(id);
|
||||||
cache.add(id, info.accountInfo, TokenAccountParser);
|
cache.add(id, info.accountInfo, TokenAccountParser);
|
||||||
setTokenAccounts(selectUserAccounts());
|
setTokenAccounts(selectUserAccounts());
|
||||||
accountEmitter.raiseAccountUpdated(id);
|
accountEmitter.raiseAccountUpdated(id);
|
||||||
|
|
Loading…
Reference in New Issue