Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dcellar-web-ui): remove TW and add error notification #396

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const DiscontinueBanner = ({
}) => {
return (
<Flex
height={`${height}px`}
minHeight={`${height}px`}
marginBottom={`${marginBottom}px`}
alignItems={'center'}
borderRadius={'4px'}
Expand All @@ -33,8 +33,8 @@ export const DiscontinueBanner = ({
fontSize={'14px'}
marginLeft={'4px'}
overflow={'hidden'}
textOverflow={'ellipsis'}
whiteSpace={'nowrap'}
// textOverflow={'ellipsis'}
// whiteSpace={'nowrap'}
>
{content}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ const config = createConfig(
/* WC 2.0 requires a project ID (get one here: https://cloud.walletconnect.com/sign-in) */
walletConnectProjectId: '89848e3205cafe0bf76c91aa1aaa71d0',
chains: [bscChain, greenFieldChain],
connectors: [trustWallet(), metaMask(), walletConnect()],
connectors: [
// trustWallet(),
metaMask(),
walletConnect(),
],
}),
);

Expand Down
9 changes: 9 additions & 0 deletions apps/dcellar-web-ui/src/modules/bucket/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import { PageTitle } from '@/components/layout/PageTitle';
import { DiscontinueBanner } from '@/components/common/DiscontinueBanner';
import { BucketOperations } from '@/modules/bucket/components/BucketOperations';
import { GAContextProvider } from '@/context/GAContext';
import { useAccount } from 'wagmi';

export const BucketPage = () => {
const dispatch = useAppDispatch();
const loginAccount = useAppSelector((root) => root.persist.loginAccount);
const hasDiscontinueBucket = useAppSelector(selectHasDiscontinueBucket(loginAccount));

const documentVisibility = useDocumentVisibility();
const { connector } = useAccount();

useUpdateEffect(() => {
if (documentVisibility !== 'visible') return;
Expand All @@ -32,6 +34,13 @@ export const BucketPage = () => {
<PageTitle title={'Buckets'} metaTitle={'Buckets'}>
<CreateBucket />
</PageTitle>
{connector?.id === 'metaMask' && (
<DiscontinueBanner
content="Greenfield and the Metamask extension are facing compatibility issues affecting functionalities like bucket creation on Dcellar. The BNB Chain team is working on a hotfix, expected to be released by September 23rd."
height={44}
marginBottom={16}
/>
)}
{hasDiscontinueBucket && (
<DiscontinueBanner
content="Some items were marked as discontinued and will be deleted by SP soon. Please backup your data in time. "
Expand Down
9 changes: 9 additions & 0 deletions apps/dcellar-web-ui/src/modules/object/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { ObjectOperations } from '@/modules/object/components/ObjectOperations';
import { BucketStatus as BucketStatusEnum } from '@bnb-chain/greenfield-js-sdk';
import { DiscontinueBanner } from '@/components/common/DiscontinueBanner';
import { MigratingBucketNoticeBanner } from './components/MigratingBucketNoticeBanner';
import { useAccount } from 'wagmi';

export const ObjectsPage = () => {
const dispatch = useAppDispatch();
Expand All @@ -43,6 +44,7 @@ export const ObjectsPage = () => {
const isBucketDiscontinue = useAppSelector((root) => root.bucket.isBucketDiscontinue);
const isBucketMigrating = useAppSelector((root) => root.bucket.isBucketMigrating);
const allSpList = useAppSelector((root) => root.sp.allSpList);
const { connector } = useAccount();

const { path } = router.query;
const items = path as string[];
Expand Down Expand Up @@ -130,6 +132,13 @@ export const ObjectsPage = () => {

<ObjectFilterItems />

{connector?.id === 'metaMask' && (
<DiscontinueBanner
content="Greenfield and the Metamask extension are facing compatibility issues affecting functionalities like bucket creation on Dcellar. The BNB Chain team is working on a hotfix, expected to be released by September 23rd."
height={44}
marginBottom={16}
/>
)}
{isBucketOwner ? (
<InsufficientBalance />
) : (
Expand Down
Loading