Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dark-ravens-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix hiddenWallets prop not applying to all wallets screen
9 changes: 6 additions & 3 deletions packages/thirdweb/src/event/actions/get-events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ describe.runIf(process.env.TW_SECRET_KEY)("getEvents", () => {
expect(events.length).toBe(14);
});

it("should get individual events with extension no filter using indexer", async () => {
// TODO: re-enable this test once indexer is fixed
it.skip("should get individual events with extension no filter using indexer", async () => {
const events = await getContractEvents({
contract: DOODLES_CONTRACT,
events: [transferEvent()],
Expand All @@ -182,7 +183,8 @@ describe.runIf(process.env.TW_SECRET_KEY)("getEvents", () => {
expect(events.length).toBe(38);
});

it("should get events for signature using indexer", async () => {
// TODO: re-enable this test once indexer is fixed
it.skip("should get events for signature using indexer", async () => {
const events = await getContractEvents({
contract: DOODLES_CONTRACT,
events: [
Expand All @@ -198,7 +200,8 @@ describe.runIf(process.env.TW_SECRET_KEY)("getEvents", () => {
expect(events.length).toBe(2);
});

it("should get specified events using indexer", async () => {
// TODO: re-enable this test once indexer is fixed
it.skip("should get specified events using indexer", async () => {
const events = await getContractEvents({
contract: USDT_CONTRACT,
events: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ export function ConnectModal(
const inAppWallet = wallets.find((wallet) => wallet.id === "inApp") as
| Wallet<"inApp">
| undefined;
const externalWallets = wallets.filter((wallet) => wallet.id !== "inApp");
const externalWallets = wallets
.filter((wallet) => wallet.id !== "inApp")
.filter((wallet) => !props.hiddenWallets?.includes(wallet.id));
const showBranding = props.connectModal?.showThirdwebBranding !== false;
const connectionManager = useConnectionManager();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import walletInfos from "../../../../../wallets/__generated__/wallet-infos.js";
import { NON_SEARCHABLE_WALLETS } from "../../../../../wallets/constants.js";
import { createWallet } from "../../../../../wallets/create-wallet.js";
import type { Wallet } from "../../../../../wallets/interfaces/wallet.js";
import type { WalletId } from "../../../../../wallets/wallet-types.js";
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
import { iconSize, spacing } from "../../../../core/design-system/index.js";
import { useSetSelectionData } from "../../../providers/wallet-ui-states-provider.js";
Expand All @@ -34,15 +35,16 @@ function AllWalletsUI(props: {
recommendedWallets: Wallet[] | undefined;
connectLocale: ConnectLocale;
disableSelectionDataReset?: boolean;
walletIdsToHide?: WalletId[];
}) {
const { itemsToShow, lastItemRef } = useShowMore<HTMLLIElement>(10, 10);
const setSelectionData = useSetSelectionData();

const walletList = useMemo(() => {
return walletInfos.filter(
(info) => !NON_SEARCHABLE_WALLETS.includes(info.id),
);
}, []);
return walletInfos
.filter((info) => !NON_SEARCHABLE_WALLETS.includes(info.id))
.filter((info) => !props.walletIdsToHide?.includes(info.id));
}, [props.walletIdsToHide]);

const fuseInstance = useMemo(() => {
return new Fuse(walletList, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export const ConnectModalContent = (props: {
onBack={handleBack}
onSelect={setScreen}
recommendedWallets={props.recommendedWallets}
walletIdsToHide={props.walletIdsToHide}
size={props.size}
/>
</Suspense>
Expand Down
Loading