Skip to content

Commit

Permalink
Merge pull request #806 from near/SQC-541/filter-out-instant-link-wal…
Browse files Browse the repository at this point in the history
…lets

chore: Filter out "instant link" wallet types
  • Loading branch information
DamirSQA committed May 11, 2023
2 parents 9be60c3 + d5fa451 commit b308494
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/modal-ui-js/src/lib/components/GetAWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export async function renderGetAWallet() {
`;

const filterByType = (item: { type: string }) => {
return item.type !== "bridge" && item.type !== "hardware";
return (
item.type !== "bridge" &&
item.type !== "hardware" &&
item.type !== "instant-link"
);
};

const filteredModules = modalState.modules.filter(filterByType);
Expand Down
7 changes: 6 additions & 1 deletion packages/modal-ui/src/lib/components/WalletHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ export const WalletHome: React.FC<WalletHomeProps> = ({
useEffect(() => {
const subscription = selector.store.observable.subscribe((state) => {
const filterByType = (item: { type: string }) => {
return item.type !== "bridge" && item.type !== "hardware";
return (
item.type !== "bridge" &&
item.type !== "hardware" &&
item.type !== "instant-link"
);
};

const filteredModules = state.modules.filter(filterByType);
Expand Down Expand Up @@ -113,6 +117,7 @@ export const WalletHome: React.FC<WalletHomeProps> = ({
})}
</div>
)}

{route === "WalletInfo" && (
<>
<div className="wallet-info-wrapper what-wallet-hide">
Expand Down

0 comments on commit b308494

Please sign in to comment.