From ebcb6027defa575ce2e97472493cf5982b052ad7 Mon Sep 17 00:00:00 2001 From: devchenyan Date: Thu, 24 Oct 2024 08:46:30 +0800 Subject: [PATCH 1/3] fix: Asset Accounts UI (#3252) * fix: Asset Accounts UI * fix: spell check --- .../src/components/PageContainer/index.tsx | 34 ++++++++++--------- .../PageContainer/pageContainer.module.scss | 5 ++- .../src/services/transaction-sender.ts | 10 +++--- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/packages/neuron-ui/src/components/PageContainer/index.tsx b/packages/neuron-ui/src/components/PageContainer/index.tsx index d17f8b3649..7ad1f56910 100755 --- a/packages/neuron-ui/src/components/PageContainer/index.tsx +++ b/packages/neuron-ui/src/components/PageContainer/index.tsx @@ -132,22 +132,24 @@ const PageContainer: React.FC = props => { {notice && } - {showWaitForFullySynced && ( - - {t(`messages.codes.${ErrorCode.WaitForFullySynced}`)} - - - )} -
{children}
- +
+ {showWaitForFullySynced && ( + + {t(`messages.codes.${ErrorCode.WaitForFullySynced}`)} + + + )} +
{children}
+ +
) } diff --git a/packages/neuron-ui/src/components/PageContainer/pageContainer.module.scss b/packages/neuron-ui/src/components/PageContainer/pageContainer.module.scss index d45835d52d..7e08c0479e 100755 --- a/packages/neuron-ui/src/components/PageContainer/pageContainer.module.scss +++ b/packages/neuron-ui/src/components/PageContainer/pageContainer.module.scss @@ -3,7 +3,6 @@ .page { background: var(--main-background-color); color: var(--main-text-color); - padding: 0 24px; position: relative; display: flex; flex-direction: column; @@ -15,6 +14,7 @@ align-items: center; height: 72px; margin: 0; + padding: 0 24px; font-size: 20px; font-weight: 500; justify-content: space-between; @@ -78,6 +78,9 @@ } } } + .content { + padding: 0 24px; + } } .notice { diff --git a/packages/neuron-wallet/src/services/transaction-sender.ts b/packages/neuron-wallet/src/services/transaction-sender.ts index 09dfd25c10..ebe753e0c1 100644 --- a/packages/neuron-wallet/src/services/transaction-sender.ts +++ b/packages/neuron-wallet/src/services/transaction-sender.ts @@ -755,13 +755,13 @@ export default class TransactionSender { const withdrawFraction = withdrawEpoch.index * depositEpoch.length const depositFraction = depositEpoch.index * withdrawEpoch.length - let depositedEpoches = withdrawEpoch.number - depositEpoch.number + let depositedEpochs = withdrawEpoch.number - depositEpoch.number if (withdrawFraction > depositFraction) { - depositedEpoches += BigInt(1) + depositedEpochs += BigInt(1) } - const lockEpoches = - ((depositedEpoches + (DAO_LOCK_PERIOD_EPOCHS - BigInt(1))) / DAO_LOCK_PERIOD_EPOCHS) * DAO_LOCK_PERIOD_EPOCHS - const minimalSinceEpochNumber = depositEpoch.number + lockEpoches + const lockEpochs = + ((depositedEpochs + (DAO_LOCK_PERIOD_EPOCHS - BigInt(1))) / DAO_LOCK_PERIOD_EPOCHS) * DAO_LOCK_PERIOD_EPOCHS + const minimalSinceEpochNumber = depositEpoch.number + lockEpochs const minimalSinceEpochIndex = depositEpoch.index const minimalSinceEpochLength = depositEpoch.length From e4fe532573b004872b291d1e228d214641709adf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:12:36 +0900 Subject: [PATCH 2/3] chore(deps): bump elliptic from 6.5.5 to 6.5.7 (#3251) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.5 to 6.5.7. - [Commits](https://github.com/indutny/elliptic/compare/v6.5.5...v6.5.7) --- updated-dependencies: - dependency-name: elliptic dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/neuron-wallet/package.json | 2 +- yarn.lock | 37 ++++++++++------------------- 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/packages/neuron-wallet/package.json b/packages/neuron-wallet/package.json index dcd3c40b61..5ce7eed6cd 100644 --- a/packages/neuron-wallet/package.json +++ b/packages/neuron-wallet/package.json @@ -58,7 +58,7 @@ "electron-log": "4.4.8", "electron-updater": "6.3.0", "electron-window-state": "5.0.3", - "elliptic": "6.5.5", + "elliptic": "6.5.7", "hw-app-ckb": "0.1.2", "i18next": "21.10.0", "leveldown": "6.1.1", diff --git a/yarn.lock b/yarn.lock index a925a6d045..b2f54b0175 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2030,10 +2030,10 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.24.8": - version "7.24.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.8.tgz#5d958c3827b13cc6d05e038c07fb2e5e3420d82e" - integrity sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA== +"@babel/runtime@^7.25.0": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.9.tgz#65884fd6dc255a775402cc1d9811082918f4bf00" + integrity sha512-4zpTHZ9Cm6L9L+uIqghQX8ZXg8HKFcjYO3qHoO8zTmRm6HQUJ8SSJ+KRvbMBZn0EGVlT4DRYeQ/6hjlyXBh+Kg== dependencies: regenerator-runtime "^0.14.0" @@ -9869,23 +9869,10 @@ electron@30.0.0: "@types/node" "^20.9.0" extract-zip "^2.0.1" -elliptic@6.5.5: - version "6.5.5" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.5.tgz#c715e09f78b6923977610d4c2346d6ce22e6dded" - integrity sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== +elliptic@6.5.7, elliptic@^6.5.4: + version "6.5.7" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b" + integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q== dependencies: bn.js "^4.11.9" brorand "^1.1.0" @@ -17372,11 +17359,11 @@ react-error-overlay@^6.0.11: integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== react-i18next@13.5.0, react-i18next@>=11.16.4: - version "15.0.0" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-15.0.0.tgz#4980f8edf85b9df6573d6b12d95aca5b8f0cc8b0" - integrity sha512-2O3IgF4zivg57Q6p6i+ChDgJ371IDcEWbuWC6gvoh5NbkDMs0Q+O7RPr4v61+Se32E0V+LmtwePAeqWZW0bi6g== + version "15.1.0" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-15.1.0.tgz#9494e4add2389f04c205dd7628c1aa75747b98a3" + integrity sha512-zj3nJynMnZsy2gPZiOTC7XctCY5eQGqT3tcKMmfJWC9FMvgd+960w/adq61j8iPzpwmsXejqID9qC3Mqu1Xu2Q== dependencies: - "@babel/runtime" "^7.24.8" + "@babel/runtime" "^7.25.0" html-parse-stringify "^3.0.1" react-inspector@6.0.2: From 525afe1446a039f873b0bb2bb13c34e0e64ff74a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:21:51 +0900 Subject: [PATCH 3/3] chore(deps): bump markdown-to-jsx from 7.2.1 to 7.5.0 (#3253) Bumps [markdown-to-jsx](https://github.com/quantizor/markdown-to-jsx) from 7.2.1 to 7.5.0. - [Release notes](https://github.com/quantizor/markdown-to-jsx/releases) - [Changelog](https://github.com/quantizor/markdown-to-jsx/blob/main/CHANGELOG.md) - [Commits](https://github.com/quantizor/markdown-to-jsx/compare/v7.2.1...v7.5.0) --- updated-dependencies: - dependency-name: markdown-to-jsx dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b2f54b0175..8ef9de3b93 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14618,9 +14618,9 @@ map-visit@^1.0.0: object-visit "^1.0.0" markdown-to-jsx@^7.1.8: - version "7.2.1" - resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-7.2.1.tgz#87061fd3176ad926ef3d99493e5c57f6335e0c51" - integrity sha512-9HrdzBAo0+sFz9ZYAGT5fB8ilzTW+q6lPocRxrIesMO+aB40V9MgFfbfMXxlGjf22OpRy+IXlvVaQenicdpgbg== + version "7.5.0" + resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-7.5.0.tgz#42ece0c71e842560a7d8bd9f81e7a34515c72150" + integrity sha512-RrBNcMHiFPcz/iqIj0n3wclzHXjwS7mzjBNWecKKVhNTIxQepIix6Il/wZCn2Cg5Y1ow2Qi84+eJrryFRWBEWw== matcher@^3.0.0: version "3.0.0"