diff --git a/.changeset/fuzzy-baboons-compete.md b/.changeset/fuzzy-baboons-compete.md new file mode 100644 index 0000000000..e11c51f70d --- /dev/null +++ b/.changeset/fuzzy-baboons-compete.md @@ -0,0 +1,5 @@ +--- +'ui': patch +--- + +fix: accounts transaction loading diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index ef9aa2d208..a2307149f1 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -61,7 +61,7 @@ jobs: env: PROJECT_NAME: ${{ matrix.project }} NEXT_PUBLIC_CHAIN_TYPE: ${{ github.event.inputs.chain_type }} - - name: Insall Vercel CLI + - name: Install Vercel CLI run: npm i -g vercel - name: Generate vercel.json run: | diff --git a/.pnp.cjs b/.pnp.cjs index ea54c75aed..ce1052bf1a 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -244,7 +244,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-turbo", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:1.9.3"],\ ["husky", "npm:8.0.3"],\ ["lint-staged", "npm:13.2.2"],\ + ["next", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:13.4.1"],\ ["prettier", "npm:2.8.8"],\ + ["react", "npm:18.2.0"],\ + ["react-dom", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:18.2.0"],\ ["turbo", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ @@ -6630,7 +6633,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/react", null],\ ["@types/webpack", null],\ ["chalk", "npm:3.0.0"],\ - ["next", "virtual:5684e10df0b0d4ceda81e7a49e1dce0cdeefe64f7cf73f6b65bae6b36056a2c8afe7954893d9e8e0af41d3fa80eeeeb8dbad164e06bfc993741bc538f79f2b2b#npm:13.4.1"],\ + ["next", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:13.4.1"],\ ["react", "npm:18.2.0"],\ ["rollup", "npm:2.78.0"],\ ["stacktrace-parser", "npm:0.1.10"],\ @@ -9521,7 +9524,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-turbo", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:1.9.3"],\ ["husky", "npm:8.0.3"],\ ["lint-staged", "npm:13.2.2"],\ + ["next", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:13.4.1"],\ ["prettier", "npm:2.8.8"],\ + ["react", "npm:18.2.0"],\ + ["react-dom", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:18.2.0"],\ ["turbo", "npm:1.9.3"],\ ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ @@ -16555,10 +16561,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "SOFT"\ }],\ - ["virtual:5684e10df0b0d4ceda81e7a49e1dce0cdeefe64f7cf73f6b65bae6b36056a2c8afe7954893d9e8e0af41d3fa80eeeeb8dbad164e06bfc993741bc538f79f2b2b#npm:13.4.1", {\ - "packageLocation": "./.yarn/__virtual__/next-virtual-c635472a55/0/cache/next-npm-13.4.1-90d996c9e4-169e3fbbf7.zip/node_modules/next/",\ + ["virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:13.4.1", {\ + "packageLocation": "./.yarn/__virtual__/next-virtual-40087ac84d/0/cache/next-npm-13.4.1-90d996c9e4-169e3fbbf7.zip/node_modules/next/",\ "packageDependencies": [\ - ["next", "virtual:5684e10df0b0d4ceda81e7a49e1dce0cdeefe64f7cf73f6b65bae6b36056a2c8afe7954893d9e8e0af41d3fa80eeeeb8dbad164e06bfc993741bc538f79f2b2b#npm:13.4.1"],\ + ["next", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:13.4.1"],\ ["@next/env", "npm:13.4.1"],\ ["@next/swc-darwin-arm64", "npm:13.4.1"],\ ["@next/swc-darwin-x64", "npm:13.4.1"],\ @@ -16583,9 +16589,9 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["node-sass", null],\ ["postcss", "npm:8.4.14"],\ ["react", "npm:18.2.0"],\ - ["react-dom", "virtual:5684e10df0b0d4ceda81e7a49e1dce0cdeefe64f7cf73f6b65bae6b36056a2c8afe7954893d9e8e0af41d3fa80eeeeb8dbad164e06bfc993741bc538f79f2b2b#npm:18.2.0"],\ + ["react-dom", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:18.2.0"],\ ["sass", null],\ - ["styled-jsx", "virtual:c635472a55b203fb7933b47cbfaf21672915228418b022b63d07469620c4ae464410c04ce222a6a810c944ccec4de2ee626b209f22ae8761cee3c504970f7531#npm:5.1.1"],\ + ["styled-jsx", "virtual:40087ac84dfe1219c2801565ab50b046700c498b6f5411beb214cae87f087b9683e9aed12423299df12cd9b7569920024dfc140e467ebba896624f7481c94f4d#npm:5.1.1"],\ ["zod", "npm:3.21.4"]\ ],\ "packagePeers": [\ @@ -17915,10 +17921,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "SOFT"\ }],\ - ["virtual:5684e10df0b0d4ceda81e7a49e1dce0cdeefe64f7cf73f6b65bae6b36056a2c8afe7954893d9e8e0af41d3fa80eeeeb8dbad164e06bfc993741bc538f79f2b2b#npm:18.2.0", {\ - "packageLocation": "./.yarn/__virtual__/react-dom-virtual-8d1937ff3e/0/cache/react-dom-npm-18.2.0-dd675bca1c-7d323310be.zip/node_modules/react-dom/",\ + ["virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:18.2.0", {\ + "packageLocation": "./.yarn/__virtual__/react-dom-virtual-d0e9e06f0d/0/cache/react-dom-npm-18.2.0-dd675bca1c-7d323310be.zip/node_modules/react-dom/",\ "packageDependencies": [\ - ["react-dom", "virtual:5684e10df0b0d4ceda81e7a49e1dce0cdeefe64f7cf73f6b65bae6b36056a2c8afe7954893d9e8e0af41d3fa80eeeeb8dbad164e06bfc993741bc538f79f2b2b#npm:18.2.0"],\ + ["react-dom", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:18.2.0"],\ ["@types/react", null],\ ["loose-envify", "npm:1.4.0"],\ ["react", "npm:18.2.0"],\ @@ -18986,9 +18992,9 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint-plugin-turbo", "virtual:f7bc41586b68b5179d26bce3bfb89ba68358f8cd7c2ddff4083d94b6829a704acc2424da9379676891d28c060e6d7ef24661ff4a113dbb2daf852983923aee3a#npm:1.9.3"],\ ["esprima", "npm:4.0.1"],\ ["jest", "virtual:f7bc41586b68b5179d26bce3bfb89ba68358f8cd7c2ddff4083d94b6829a704acc2424da9379676891d28c060e6d7ef24661ff4a113dbb2daf852983923aee3a#npm:29.5.0"],\ - ["next", "virtual:5684e10df0b0d4ceda81e7a49e1dce0cdeefe64f7cf73f6b65bae6b36056a2c8afe7954893d9e8e0af41d3fa80eeeeb8dbad164e06bfc993741bc538f79f2b2b#npm:13.4.1"],\ + ["next", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:13.4.1"],\ ["react", "npm:18.2.0"],\ - ["react-dom", "virtual:5684e10df0b0d4ceda81e7a49e1dce0cdeefe64f7cf73f6b65bae6b36056a2c8afe7954893d9e8e0af41d3fa80eeeeb8dbad164e06bfc993741bc538f79f2b2b#npm:18.2.0"],\ + ["react-dom", "virtual:680b866b1f607595b2b59758405cb64dff07d461aebb031486e5900d3b742457da054ab889d192b9338afd7b8895fdd9016de2dbb9d2a9b7e5b890949f153324#npm:18.2.0"],\ ["ts-jest", "virtual:f7bc41586b68b5179d26bce3bfb89ba68358f8cd7c2ddff4083d94b6829a704acc2424da9379676891d28c060e6d7ef24661ff4a113dbb2daf852983923aee3a#npm:29.1.0"],\ ["typescript", "patch:typescript@npm%3A5.0.4#~builtin::version=5.0.4&hash=85af82"]\ ],\ @@ -19624,10 +19630,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ],\ "linkType": "HARD"\ }],\ - ["virtual:c635472a55b203fb7933b47cbfaf21672915228418b022b63d07469620c4ae464410c04ce222a6a810c944ccec4de2ee626b209f22ae8761cee3c504970f7531#npm:5.1.1", {\ - "packageLocation": "./.yarn/__virtual__/styled-jsx-virtual-8f6e752656/0/cache/styled-jsx-npm-5.1.1-2557a209ba-523a33b386.zip/node_modules/styled-jsx/",\ + ["virtual:40087ac84dfe1219c2801565ab50b046700c498b6f5411beb214cae87f087b9683e9aed12423299df12cd9b7569920024dfc140e467ebba896624f7481c94f4d#npm:5.1.1", {\ + "packageLocation": "./.yarn/__virtual__/styled-jsx-virtual-1b1fa3ac83/0/cache/styled-jsx-npm-5.1.1-2557a209ba-523a33b386.zip/node_modules/styled-jsx/",\ "packageDependencies": [\ - ["styled-jsx", "virtual:c635472a55b203fb7933b47cbfaf21672915228418b022b63d07469620c4ae464410c04ce222a6a810c944ccec4de2ee626b209f22ae8761cee3c504970f7531#npm:5.1.1"],\ + ["styled-jsx", "virtual:40087ac84dfe1219c2801565ab50b046700c498b6f5411beb214cae87f087b9683e9aed12423299df12cd9b7569920024dfc140e467ebba896624f7481c94f4d#npm:5.1.1"],\ ["@babel/core", null],\ ["@types/babel-plugin-macros", null],\ ["@types/babel__core", null],\ diff --git a/apps/web-emoney/src/screens/account_details/index.tsx b/apps/web-emoney/src/screens/account_details/index.tsx index 5a68e826dd..6d28e31fd3 100644 --- a/apps/web-emoney/src/screens/account_details/index.tsx +++ b/apps/web-emoney/src/screens/account_details/index.tsx @@ -53,7 +53,7 @@ const AccountDetails = () => { /> - + diff --git a/apps/web-evmos/src/screens/account_details/index.tsx b/apps/web-evmos/src/screens/account_details/index.tsx index 5a68e826dd..6d28e31fd3 100644 --- a/apps/web-evmos/src/screens/account_details/index.tsx +++ b/apps/web-evmos/src/screens/account_details/index.tsx @@ -53,7 +53,7 @@ const AccountDetails = () => { /> - + diff --git a/apps/web-osmosis/src/screens/account_details/hooks.ts b/apps/web-osmosis/src/screens/account_details/hooks.ts index 6d86be13a7..06d68a6c20 100644 --- a/apps/web-osmosis/src/screens/account_details/hooks.ts +++ b/apps/web-osmosis/src/screens/account_details/hooks.ts @@ -27,6 +27,7 @@ const defaultTokenUnit: TokenUnit = { const initialState: AccountDetailState = { loading: true, + balanceLoading: true, exists: true, desmosProfile: null, overview: { @@ -125,7 +126,7 @@ const formatBalance = (data?: Data) => { // ========================== const formatAllBalance = (data?: Data) => { const stateChange: Partial = { - loading: false, + balanceLoading: false, }; stateChange.rewards = formatRewards(data); @@ -177,7 +178,7 @@ const formatOtherTokens = (data?: Data) => { const availableAmount = formatToken(availableRawAmount.amount, x); const rewardsRawAmount = rewards.reduce((a, b) => { if (!b) return a; - const coins = R.pathOr>([], ['coins'], b); + const coins = R.pathOr>([], ['coins'], b); const denom = getDenom(coins, x); return Big(a).plus(denom.amount).toPrecision(); }, '0'); @@ -263,6 +264,7 @@ export const useAccountDetails = () => { useEffect(() => { handleSetState((prevState) => ({ ...prevState, + loading: false, overview: { address: address ?? '', withdrawalAddress: withdrawalAddress.withdrawalAddress?.address ?? '', diff --git a/apps/web-osmosis/src/screens/account_details/index.tsx b/apps/web-osmosis/src/screens/account_details/index.tsx index 5a68e826dd..6d28e31fd3 100644 --- a/apps/web-osmosis/src/screens/account_details/index.tsx +++ b/apps/web-osmosis/src/screens/account_details/index.tsx @@ -53,7 +53,7 @@ const AccountDetails = () => { /> - + diff --git a/apps/web-persistence/src/screens/account_details/index.tsx b/apps/web-persistence/src/screens/account_details/index.tsx index 5a68e826dd..6d28e31fd3 100644 --- a/apps/web-persistence/src/screens/account_details/index.tsx +++ b/apps/web-persistence/src/screens/account_details/index.tsx @@ -53,7 +53,7 @@ const AccountDetails = () => { /> - + diff --git a/apps/web-stride/src/screens/account_details/hooks.ts b/apps/web-stride/src/screens/account_details/hooks.ts index dcafcf61d6..7796920da4 100644 --- a/apps/web-stride/src/screens/account_details/hooks.ts +++ b/apps/web-stride/src/screens/account_details/hooks.ts @@ -171,7 +171,7 @@ const formatOtherTokens = (data: Data) => { const availableRawAmount = getDenom(available, x); const availableAmount = formatToken(availableRawAmount.amount, x); const rewardsRawAmount = rewards.reduce((a, b) => { - const coins = R.pathOr>([], ['coins'], b); + const coins = R.pathOr>([], ['coins'], b); const denom = getDenom(coins, x); return Big(a).plus(denom.amount).toPrecision(); }, '0'); @@ -308,6 +308,7 @@ export const useAccountDetails = () => { useEffect(() => { handleSetState((prevState) => ({ ...prevState, + loading: false, overview: { address: address ?? '', withdrawalAddress: address ?? withdrawalAddress?.withdrawalAddress?.address ?? '', diff --git a/bun.lockb b/bun.lockb deleted file mode 100755 index 8775630db1..0000000000 Binary files a/bun.lockb and /dev/null differ diff --git a/package.json b/package.json index dcd77806e0..77f6f60f0e 100644 --- a/package.json +++ b/package.json @@ -48,13 +48,17 @@ "eslint-plugin-turbo": "^1.9.3", "husky": "^8.0.3", "lint-staged": "^13.2.2", + "next": "^13.4.1", "prettier": "2.8.8", + "react": "^18.2.0", + "react-dom": "^18.2.0", "turbo": "^1.9.3", "typescript": "^5.0.4" }, "packageManager": "yarn@3.5.0", "engines": { - "yarn": ">=1.22" + "yarn": ">=3.5", + "node": ">=18.17.1" }, "lint-staged": { "*.{js,jsx,ts,tsx,mjs,cjs,css,md}": "npx prettier --write" diff --git a/packages/ui/src/screens/account_details/hooks.ts b/packages/ui/src/screens/account_details/hooks.ts index 6a3592468b..b33185e077 100644 --- a/packages/ui/src/screens/account_details/hooks.ts +++ b/packages/ui/src/screens/account_details/hooks.ts @@ -100,7 +100,7 @@ const formatBalance = (data: Data): BalanceType => { const rewardsAmount = formatToken(rewards, primaryTokenUnit); const commission = getDenom( - R.pathOr['coins']>>( + R.pathOr['coins']>>( [], ['commission', 'coins'], data @@ -170,7 +170,7 @@ const formatOtherTokens = (data: Data) => { const availableRawAmount = getDenom(available, x); const availableAmount = formatToken(availableRawAmount.amount, x); const rewardsRawAmount = rewards.reduce((a, b) => { - const coins = R.pathOr>([], ['coins'], b); + const coins = R.pathOr>([], ['coins'], b); const denom = getDenom(coins, x); return Big(a).plus(denom.amount).toPrecision(); }, '0'); @@ -248,11 +248,11 @@ export const useAccountDetails = () => { useEffect(() => { const formattedRawData: { - commission?: typeof commission['commission']; - accountBalances?: typeof available['accountBalances']; - delegationBalance?: typeof delegation['delegationBalance']; - unbondingBalance?: typeof unbonding['unbondingBalance']; - delegationRewards?: typeof rewards['delegationRewards']; + commission?: (typeof commission)['commission']; + accountBalances?: (typeof available)['accountBalances']; + delegationBalance?: (typeof delegation)['delegationBalance']; + unbondingBalance?: (typeof unbonding)['unbondingBalance']; + delegationRewards?: (typeof rewards)['delegationRewards']; } = {}; formattedRawData.commission = R.pathOr({ coins: [] }, ['commission'], commission); formattedRawData.accountBalances = R.pathOr({ coins: [] }, ['accountBalances'], available); @@ -270,6 +270,7 @@ export const useAccountDetails = () => { useEffect(() => { handleSetState((prevState) => ({ ...prevState, + loading: false, overview: { address: address ?? '', withdrawalAddress: withdrawalAddress.withdrawalAddress?.address ?? '', diff --git a/yarn.lock b/yarn.lock index 89c2972ac0..1dd9897392 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6275,7 +6275,10 @@ __metadata: eslint-plugin-turbo: ^1.9.3 husky: ^8.0.3 lint-staged: ^13.2.2 + next: ^13.4.1 prettier: 2.8.8 + react: ^18.2.0 + react-dom: ^18.2.0 turbo: ^1.9.3 typescript: ^5.0.4 languageName: unknown