test: add individual event filtering test (#4465)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add a new test in `get-events.test.ts` for getting individual events with filters.

### Detailed summary
- Added a new test for getting individual events with filters in `get-events.test.ts`
- Removed a `console.log` statement in `coinbaseMobileSDK.ts`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
This commit is contained in:
joaquim-verges
2024-09-09 04:30:57 +00:00
parent f1d087e24e
commit 2b5101a56d
2 changed files with 13 additions and 1 deletions
@@ -129,4 +129,17 @@ describe.runIf(process.env.TW_SECRET_KEY)("getEvents", () => {
});
expect(events.length).toBe(38);
});
it("should get individual events with filters", async () => {
const events = await getContractEvents({
contract: DOODLES_CONTRACT,
fromBlock: FORK_BLOCK_NUMBER - 1000n,
events: [
transferEvent({
from: "0xB81965DdFdDA3923f292a47A1be83ba3A36B5133",
}),
],
});
expect(events.length).toBe(2);
});
});
@@ -53,7 +53,6 @@ async function initSmartWalletProvider(
"callbackURL is required. Set it when creating the coinbase wallet. Ex: createWallet('com.coinbase.wallet', { mobileConfig: { callbackUrl: 'https://example.com' }}",
);
}
console.log("initSmartWalletProvider", appDeeplinkUrl);
const sdk = new EIP1193Provider({
metadata: {
appName: options?.appMetadata?.name || "thirdweb powered app",