Skip to content

Commit

Permalink
chore(frontend): bump api (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov authored Nov 28, 2024
1 parent 5695a46 commit 72cd9e7
Show file tree
Hide file tree
Showing 8 changed files with 450 additions and 831 deletions.
14 changes: 7 additions & 7 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"codegen": "graphql-codegen"
},
"dependencies": {
"@gear-js/api": "0.38.1",
"@gear-js/react-hooks": "0.12.2",
"@gear-js/api": "0.39.0",
"@gear-js/react-hooks": "0.14.0",
"@gear-js/vara-ui": "0.0.10",
"@hookform/resolvers": "3.9.0",
"@polkadot/api": "11.0.2",
"@polkadot/react-identicon": "3.9.1",
"@tanstack/react-query": "5.52.1",
"@polkadot/api": "14.3.1",
"@polkadot/react-identicon": "3.11.3",
"@tanstack/react-query": "5.61.5",
"@web3modal/wagmi": "5.1.3",
"graphql": "16.9.0",
"graphql-request": "7.1.0",
Expand All @@ -26,7 +26,7 @@
"react-hook-form": "7.52.2",
"react-number-format": "5.4.0",
"react-router-dom": "6.26.1",
"sails-js": "0.1.8",
"sails-js": "0.3.0",
"viem": "2.19.6",
"wagmi": "2.12.7",
"zod": "3.23.8"
Expand All @@ -35,7 +35,7 @@
"@graphql-codegen/cli": "5.0.2",
"@graphql-codegen/client-preset": "4.3.3",
"@graphql-typed-document-node/core": "3.2.0",
"@polkadot/types": "11.0.2",
"@polkadot/types": "14.3.1",
"@types/react": "18.3.4",
"@types/react-dom": "18.3.0",
"@typescript-eslint/eslint-plugin": "8.2.0",
Expand Down
1,172 changes: 437 additions & 735 deletions frontend/pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ function useVaraAccountBalance() {
const { account, isAccountReady } = useAccount();
const { getFormattedBalance } = useBalanceFormat();

const data = useDeriveBalancesAll(account?.address);
const { freeBalance } = data || {};
const value = freeBalance?.toBigInt();
const { data } = useDeriveBalancesAll({ address: account?.address, watch: true });
const { transferable, availableBalance } = data || {};
const value = (transferable || availableBalance)?.toBigInt();
const formattedValue = value !== undefined ? getFormattedBalance(value).value : undefined;

// cuz swap vara form is rendered by default without login and we have to handle empty balance state
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/features/wallet/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { NetworkWalletField } from './network-wallet-field';
import { SwapNetworkButton } from './swap-network-button';
import { Wallet } from './wallet';

export { Wallet, NetworkWalletField, SwapNetworkButton };
export { NetworkWalletField, SwapNetworkButton };
3 changes: 0 additions & 3 deletions frontend/src/features/wallet/components/wallet/index.ts

This file was deleted.

30 changes: 0 additions & 30 deletions frontend/src/features/wallet/components/wallet/wallet.module.scss

This file was deleted.

49 changes: 0 additions & 49 deletions frontend/src/features/wallet/components/wallet/wallet.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions frontend/src/features/wallet/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Wallet, NetworkWalletField, SwapNetworkButton } from './components';
import { NetworkWalletField, SwapNetworkButton } from './components';

export { Wallet, NetworkWalletField, SwapNetworkButton };
export { NetworkWalletField, SwapNetworkButton };

0 comments on commit 72cd9e7

Please sign in to comment.