Fix for that pipeliner not respecting synchronicity (#551)
This commit is contained in:
parent
e0aba9b57b
commit
ecdcc40603
|
@ -272,6 +272,13 @@ export const loadAccounts = async (connection: Connection) => {
|
||||||
const updateState = makeSetter(state);
|
const updateState = makeSetter(state);
|
||||||
const forEachAccount = processingAccounts(updateState);
|
const forEachAccount = processingAccounts(updateState);
|
||||||
|
|
||||||
|
const forEach =
|
||||||
|
(fn: ProcessAccountsFunc) => async (accounts: AccountAndPubkey[]) => {
|
||||||
|
for (const account of accounts) {
|
||||||
|
await fn(account, updateState);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const loadVaults = () =>
|
const loadVaults = () =>
|
||||||
getProgramAccounts(connection, VAULT_ID).then(
|
getProgramAccounts(connection, VAULT_ID).then(
|
||||||
forEachAccount(processVaultData),
|
forEachAccount(processVaultData),
|
||||||
|
@ -291,7 +298,7 @@ export const loadAccounts = async (connection: Connection) => {
|
||||||
dataSize: MAX_WHITELISTED_CREATOR_SIZE,
|
dataSize: MAX_WHITELISTED_CREATOR_SIZE,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}).then(forEachAccount(processMetaplexAccounts));
|
}).then(forEach(processMetaplexAccounts));
|
||||||
const loadMetadata = () =>
|
const loadMetadata = () =>
|
||||||
pullMetadataByCreators(connection, state, updateState);
|
pullMetadataByCreators(connection, state, updateState);
|
||||||
const loadEditions = () => pullEditions(connection, updateState, state);
|
const loadEditions = () => pullEditions(connection, updateState, state);
|
||||||
|
|
Loading…
Reference in New Issue