From 9507eb327e9749315f3e443da5a3913df22e3ba2 Mon Sep 17 00:00:00 2001
From: devinxl <94832688+devinxl@users.noreply.github.com>
Date: Fri, 20 Sep 2024 15:58:38 +0800
Subject: [PATCH] fix(dcellar-web-ui): compatiable with metamask eip-712
signature (#397)
* fix(dcellar-web-ui): compatiable with metamask eip-712 signature
* docs(dcellar-web-ui): update changelog
---
apps/dcellar-web-ui/CHANGELOG.json | 12 ++++++++
apps/dcellar-web-ui/CHANGELOG.md | 9 +++++-
apps/dcellar-web-ui/package.json | 4 +--
.../src/modules/bucket/index.tsx | 9 ------
.../src/modules/object/index.tsx | 9 ------
common/config/rush/pnpm-lock.yaml | 30 ++++++++++---------
6 files changed, 38 insertions(+), 35 deletions(-)
diff --git a/apps/dcellar-web-ui/CHANGELOG.json b/apps/dcellar-web-ui/CHANGELOG.json
index 43a32533..d0c66f1c 100644
--- a/apps/dcellar-web-ui/CHANGELOG.json
+++ b/apps/dcellar-web-ui/CHANGELOG.json
@@ -1,6 +1,18 @@
{
"name": "dcellar-web-ui",
"entries": [
+ {
+ "version": "1.7.5",
+ "tag": "dcellar-web-ui_v1.7.5",
+ "date": "Thu, 19 Sep 2024 08:01:12 GMT",
+ "comments": {
+ "patch": [
+ {
+ "comment": "Compatiable with metamask eip-712 signature"
+ }
+ ]
+ }
+ },
{
"version": "1.7.4",
"tag": "dcellar-web-ui_v1.7.4",
diff --git a/apps/dcellar-web-ui/CHANGELOG.md b/apps/dcellar-web-ui/CHANGELOG.md
index cee244ca..50b1fb50 100644
--- a/apps/dcellar-web-ui/CHANGELOG.md
+++ b/apps/dcellar-web-ui/CHANGELOG.md
@@ -1,6 +1,13 @@
# Change Log - dcellar-web-ui
-This log was last generated on Thu, 19 Sep 2024 07:13:05 GMT and should not be manually modified.
+This log was last generated on Thu, 19 Sep 2024 08:01:12 GMT and should not be manually modified.
+
+## 1.7.5
+Thu, 19 Sep 2024 08:01:12 GMT
+
+### Patches
+
+- Compatible with metamask eip-712 signature
## 1.7.4
Thu, 19 Sep 2024 07:13:05 GMT
diff --git a/apps/dcellar-web-ui/package.json b/apps/dcellar-web-ui/package.json
index 0f81b8bc..2cae6799 100644
--- a/apps/dcellar-web-ui/package.json
+++ b/apps/dcellar-web-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "dcellar-web-ui",
- "version": "1.7.4",
+ "version": "1.7.5",
"private": false,
"scripts": {
"dev": "node ./scripts/dev.js -p 3200",
@@ -19,7 +19,7 @@
"antd": "5.11.0",
"ahooks": "3.7.7",
"hash-wasm": "4.10.0",
- "@bnb-chain/greenfield-js-sdk": "2.1.0-alpha.2",
+ "@bnb-chain/greenfield-js-sdk": "2.2.0-alpha.0",
"@bnb-chain/greenfield-cosmos-types": "0.4.0-alpha.32",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
diff --git a/apps/dcellar-web-ui/src/modules/bucket/index.tsx b/apps/dcellar-web-ui/src/modules/bucket/index.tsx
index fdf0a903..59d4dd99 100644
--- a/apps/dcellar-web-ui/src/modules/bucket/index.tsx
+++ b/apps/dcellar-web-ui/src/modules/bucket/index.tsx
@@ -7,7 +7,6 @@ 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();
@@ -15,7 +14,6 @@ export const BucketPage = () => {
const hasDiscontinueBucket = useAppSelector(selectHasDiscontinueBucket(loginAccount));
const documentVisibility = useDocumentVisibility();
- const { connector } = useAccount();
useUpdateEffect(() => {
if (documentVisibility !== 'visible') return;
@@ -34,13 +32,6 @@ export const BucketPage = () => {
- {connector?.id === 'metaMask' && (
-
- )}
{hasDiscontinueBucket && (
{
const dispatch = useAppDispatch();
@@ -44,7 +43,6 @@ 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[];
@@ -132,13 +130,6 @@ export const ObjectsPage = () => {
- {connector?.id === 'metaMask' && (
-
- )}
{isBucketOwner ? (
) : (
diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index 0ddd270b..ced8e24f 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -8,7 +8,7 @@ importers:
../../apps/dcellar-web-ui:
specifiers:
'@bnb-chain/greenfield-cosmos-types': 0.4.0-alpha.32
- '@bnb-chain/greenfield-js-sdk': 2.1.0-alpha.2
+ '@bnb-chain/greenfield-js-sdk': 2.2.0-alpha.0
'@commitlint/cli': ^17.4.3
'@commitlint/config-conventional': ^17.4.3
'@emotion/react': ^11.10.5
@@ -75,7 +75,7 @@ importers:
wagmi: ~1.4.10
dependencies:
'@bnb-chain/greenfield-cosmos-types': 0.4.0-alpha.32
- '@bnb-chain/greenfield-js-sdk': 2.1.0-alpha.2
+ '@bnb-chain/greenfield-js-sdk': 2.2.0-alpha.0
'@emotion/react': 11.11.3_mj3jo2baq3jslihcop7oivercy
'@emotion/styled': 11.11.0_44o7ug6fvmx5wru7ifqtcwoy2i
'@next/bundle-analyzer': 13.5.6
@@ -1497,8 +1497,8 @@ packages:
protobufjs: 6.11.4
dev: false
- /@bnb-chain/greenfield-js-sdk/2.1.0-alpha.2:
- resolution: {integrity: sha512-frYyzOPLGqTC1NPDhSaYrCdLvNxVwB+C1aJFdl00sqShIMA1FfXrChbDcD1Iw2XWRrFwblVzDdzATWSAYxZ2aA==}
+ /@bnb-chain/greenfield-js-sdk/2.2.0-alpha.0:
+ resolution: {integrity: sha512-Xac+qWl7FeCwQRclbMvWnv7+r4yrXNDjBiJ+8HC7V+IYyMuC1h69zrt7bDztalV1phvsDKFsf+3Dbz/8Z4t9uQ==}
dependencies:
'@bnb-chain/greenfield-cosmos-types': 0.4.0-alpha.32
'@cosmjs/proto-signing': 0.32.2
@@ -1511,6 +1511,7 @@ packages:
'@ethersproject/units': 5.7.0
'@metamask/eth-sig-util': 5.1.0
'@noble/curves': 1.3.0
+ browser-or-node: 3.0.0
cross-fetch: 4.0.0
dayjs: 1.11.10
ethereum-cryptography: 2.1.3
@@ -1523,7 +1524,7 @@ packages:
long: 5.2.3
mime-types: 2.1.35
reflect-metadata: 0.1.14
- superagent: 8.1.2
+ superagent: 9.0.2
tsyringe: 4.8.0
transitivePeerDependencies:
- bufferutil
@@ -5103,6 +5104,10 @@ packages:
resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==}
dev: false
+ /browser-or-node/3.0.0:
+ resolution: {integrity: sha512-iczIdVJzGEYhP5DqQxYM9Hh7Ztpqqi+CXZpSmX8ALFs9ecXkQIeqRyM6TfxEfMVpwhl3dSuDvxdzzo9sUOIVBQ==}
+ dev: false
+
/browserslist/4.23.0:
resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
@@ -6505,13 +6510,12 @@ packages:
mime-types: 2.1.35
dev: false
- /formidable/2.1.2:
- resolution: {integrity: sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==}
+ /formidable/3.5.1:
+ resolution: {integrity: sha512-WJWKelbRHN41m5dumb0/k8TeAx7Id/y3a+Z7QfhxP/htI9Js5zYaEDtG8uMgG0vM0lOlqnmjE99/kfpOYi/0Og==}
dependencies:
dezalgo: 1.0.4
hexoid: 1.0.0
once: 1.4.0
- qs: 6.11.2
dev: false
/fs-extra/11.2.0:
@@ -9849,21 +9853,19 @@ packages:
resolution: {integrity: sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==}
dev: false
- /superagent/8.1.2:
- resolution: {integrity: sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==}
- engines: {node: '>=6.4.0 <13 || >=14'}
- deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net
+ /superagent/9.0.2:
+ resolution: {integrity: sha512-xuW7dzkUpcJq7QnhOsnNUgtYp3xRwpt2F7abdRYIpCsAt0hhUqia0EdxyXZQQpNmGtsCzYHryaKSV3q3GJnq7w==}
+ engines: {node: '>=14.18.0'}
dependencies:
component-emitter: 1.3.1
cookiejar: 2.1.4
debug: 4.3.4
fast-safe-stringify: 2.1.1
form-data: 4.0.0
- formidable: 2.1.2
+ formidable: 3.5.1
methods: 1.1.2
mime: 2.6.0
qs: 6.11.2
- semver: 7.6.0
transitivePeerDependencies:
- supports-color
dev: false