Skip to content

Commit

Permalink
Merge branch '02/10/25-Add-getTransaction-wasm-fn' into 02/13/25-bran…
Browse files Browse the repository at this point in the history
…ched-add-order-rush-function
  • Loading branch information
hardingjam committed Feb 14, 2025
2 parents 20057f9 + 44057c9 commit edadd36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 9 additions & 1 deletion packages/ui-components/src/__tests__/transactionStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,12 @@ describe('transactionStore', () => {

(getTransaction as Mock).mockResolvedValue({ id: mockTxHash });

vi.useFakeTimers({ shouldAdvanceTime: true });

await awaitTransactionIndexing(mockSubgraphUrl, mockTxHash, mockSuccessMessage);

vi.runOnlyPendingTimers();

await waitFor(() => {
expect(get(transactionStore).status).toBe(TransactionStatus.SUCCESS);
expect(get(transactionStore).message).toBe(mockSuccessMessage);
Expand All @@ -264,7 +268,11 @@ describe('transactionStore', () => {

(getTransaction as Mock).mockResolvedValue(null);

const indexingPromise = awaitTransactionIndexing(mockSubgraphUrl, mockTxHash, mockSuccessMessage);
const indexingPromise = awaitTransactionIndexing(
mockSubgraphUrl,
mockTxHash,
mockSuccessMessage
);

expect(get(transactionStore).status).toBe(TransactionStatus.PENDING_SUBGRAPH);
expect(get(transactionStore).message).toBe('Checking for transaction indexing...');
Expand Down
1 change: 0 additions & 1 deletion packages/ui-components/src/lib/stores/transactionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ const transactionStore = () => {
if (newTx) {
clearInterval(interval);
transactionSuccess(txHash, successMessage);

} else if (attempts >= 10) {
update((state) => ({
...state,
Expand Down

0 comments on commit edadd36

Please sign in to comment.