diff --git a/js/packages/cli/src/fair-launch-cli.ts b/js/packages/cli/src/fair-launch-cli.ts index 31452b040f5..71951af48f9 100755 --- a/js/packages/cli/src/fair-launch-cli.ts +++ b/js/packages/cli/src/fair-launch-cli.ts @@ -2402,9 +2402,9 @@ program console.log('Lottery results', sorted); await Promise.all( - // each 8 entries is 1 byte, we want to send up 1000 bytes at a time. + // each 8 entries is 1 byte, we want to send up 10 bytes at a time. // be specific here. - chunks(Array.from(Array(sorted.length).keys()), 8 * 1000).map( + chunks(Array.from(Array(sorted.length).keys()), 8 * 10).map( async allIndexesInSlice => { const bytes = []; const correspondingArrayOfBits = []; diff --git a/js/packages/common/src/contexts/meta/meta.tsx b/js/packages/common/src/contexts/meta/meta.tsx index 5b6a930d2bc..0b869322a51 100644 --- a/js/packages/common/src/contexts/meta/meta.tsx +++ b/js/packages/common/src/contexts/meta/meta.tsx @@ -119,6 +119,27 @@ export function MetaProvider({ children = null as any }) { return nextState; } + async function pullAllSiteData() { + if (isLoading) return state; + if (!storeAddress) { + if (isReady) { + setIsLoading(false); + } + return state; + } else if (!state.store) { + setIsLoading(true); + } + console.log('------->Query started'); + + const nextState = await loadAccounts(connection); + + console.log('------->Query finished'); + + setState(nextState); + await updateMints(nextState.metadataByMint); + return; + } + async function update( auctionAddress?: any, bidderAddress?: any, @@ -314,6 +335,7 @@ export function MetaProvider({ children = null as any }) { pullAuctionPage, pullAllMetadata, pullBillingPage, + pullAllSiteData, isLoading, }} > diff --git a/js/packages/common/src/contexts/meta/types.ts b/js/packages/common/src/contexts/meta/types.ts index 31b5a96fd03..cd94b7a6daa 100644 --- a/js/packages/common/src/contexts/meta/types.ts +++ b/js/packages/common/src/contexts/meta/types.ts @@ -93,7 +93,7 @@ export interface MetaContextState extends MetaState { ]; pullAuctionPage: (auctionAddress: StringPublicKey) => Promise; pullBillingPage: (auctionAddress: StringPublicKey) => void; - + pullAllSiteData: () => void; pullAllMetadata: () => void; } diff --git a/js/packages/web/src/components/Notifications/index.tsx b/js/packages/web/src/components/Notifications/index.tsx index fcbc32d8983..177531b37c5 100644 --- a/js/packages/web/src/components/Notifications/index.tsx +++ b/js/packages/web/src/components/Notifications/index.tsx @@ -320,7 +320,7 @@ export function useSettlementAuctions({ metadataByAuction, undefined, ); - if (completeAuctionView) { + if(completeAuctionView) { await settle( connection, wallet, @@ -352,6 +352,7 @@ export function Notifications() { store, vaults, safetyDepositBoxesByVaultAndIndex, + pullAllSiteData, } = useMeta(); const possiblyBrokenAuctionManagerSetups = useAuctions( AuctionViewState.Defective, @@ -408,6 +409,26 @@ export function Notifications() { }); }); + notifications.push({ + id: 'none', + title: 'Search for other auctions.', + description: ( + + Load all auctions (including defectives) by pressing here. Then you can + close them. + + ), + action: async () => { + try { + await pullAllSiteData(); + } catch (e) { + console.error(e); + return false; + } + return true; + }, + }); + possiblyBrokenAuctionManagerSetups .filter(v => v.auctionManager.authority === walletPubkey) .forEach(v => {