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

chore(idea, hooks, wallet-connect): bump api #1675

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions idea/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"build": "tsc"
},
"dependencies": {
"@gear-js/api": "0.38.1",
"@polkadot/api": "13.2.1",
"@gear-js/api": "0.39.0",
"@polkadot/api": "14.3.1",
"winston": "3.7.2"
},
"license": "ISC",
Expand Down
4 changes: 2 additions & 2 deletions idea/faucet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"@gear-js/api": "0.38.1",
"@gear-js/api": "0.39.0",
"@gear-js/common": "workspace:^",
"@polkadot/api": "13.2.1",
"@polkadot/api": "14.3.1",
"chalk": "4.1.2",
"class-transformer": "0.5.1",
"cron": "^3.1.6",
Expand Down
8 changes: 4 additions & 4 deletions idea/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"preview": "vite preview"
},
"dependencies": {
"@gear-js/api": "0.38.3",
"@gear-js/api": "0.39.0",
"@gear-js/react-hooks": "workspace:^",
"@gear-js/ui": "workspace:^",
"@gear-js/wallet-connect": "workspace:^",
"@hcaptcha/react-hcaptcha": "1.8.1",
"@hookform/resolvers": "3.3.2",
"@polkadot/api": "13.2.1",
"@polkadot/react-identicon": "3.6.3",
"@polkadot/types": "13.2.1",
"@polkadot/api": "14.3.1",
"@polkadot/react-identicon": "3.11.3",
"@polkadot/types": "14.3.1",
"@polkadot/util": "12.6.2",
"@react-aria/utils": "3.21.0",
"@tanstack/react-query": "5.56.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ function BalanceDropdown() {

if (!balance) return null;

// availableBalance should be changed to transferableBalance after @polkadot/api 12.4 update
const { freeBalance, reservedBalance, availableBalance: transferable, lockedBalance } = balance;
const { freeBalance, reservedBalance, transferable, availableBalance, lockedBalance } = balance;

return (
<div className={styles.container} ref={ref}>
Expand All @@ -99,7 +98,7 @@ function BalanceDropdown() {
<span className={styles.heading}>Transferable Balance:</span>

<span>
<Balance value={transferable} hideUnit />
<Balance value={transferable || availableBalance} hideUnit />
<ArrowSVG className={styles.arrow} />
</span>
</span>
Expand All @@ -108,7 +107,7 @@ function BalanceDropdown() {
<CSSTransition in={isOpen} timeout={AnimationTimeout.Default} mountOnEnter unmountOnExit>
<Dropdown
total={freeBalance.add(reservedBalance).toString()}
transferable={transferable}
transferable={transferable || availableBalance}
lockedBalance={lockedBalance}
onHeaderClick={close}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const TransferBalanceModal = ({ defaultAddress = '', onClose }: Props) => {

<div className={styles.balance}>
<p className={styles.text}>Your transferable balance:</p>
<Balance value={balance?.availableBalance} variant="secondary" />
<Balance value={balance?.transferable || balance?.availableBalance} variant="secondary" />
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions idea/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@gear-js/api": "^0.38.1",
"@gear-js/common": "workspace:^",
"@polkadot/api": "13.2.1",
"@polkadot/api": "14.3.1",
"amqplib": "0.10.3",
"class-transformer": "0.5.1",
"cron": "^3.1.6",
Expand All @@ -26,7 +26,7 @@
"winston": "3.8.2"
},
"devDependencies": {
"@polkadot/api": "13.2.1",
"@polkadot/api": "14.3.1",
"@types/amqplib": "0.10.1",
"@types/node": "18.15.11",
"jest": "29.5.0",
Expand Down
4 changes: 2 additions & 2 deletions idea/meta-storage-2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"typescript": "5.5.3"
},
"dependencies": {
"@gear-js/api": "0.38.1",
"@gear-js/api": "0.39.0",
"@gear-js/common": "workspace:^",
"@polkadot/api": "13.2.1",
"@polkadot/api": "14.3.1",
"dotenv": "^16.3.1",
"express": "4.18.1",
"pg": "8.10.0",
Expand Down
4 changes: 2 additions & 2 deletions idea/meta-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"typescript": "5.5.3"
},
"dependencies": {
"@gear-js/api": "0.38.1",
"@gear-js/api": "0.39.0",
"@gear-js/common": "workspace:^",
"@polkadot/api": "13.2.1",
"@polkadot/api": "14.3.1",
"amqplib": "0.10.3",
"dotenv": "^16.3.1",
"pg": "8.10.0",
Expand Down
4 changes: 2 additions & 2 deletions idea/squid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"migration:apply": "squid-typeorm-migration apply"
},
"dependencies": {
"@gear-js/api": "0.38.1",
"@polkadot/api": "13.2.1",
"@gear-js/api": "0.39.0",
"@polkadot/api": "14.3.1",
"@subsquid/graphql-server": "4.5.1",
"@subsquid/ss58": "2.0.2",
"@subsquid/substrate-processor": "8.3.0",
Expand Down
4 changes: 2 additions & 2 deletions idea/test-balance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"@gear-js/api": "0.38.1",
"@gear-js/api": "0.39.0",
"@gear-js/common": "workspace:^",
"@polkadot/api": "13.2.1",
"@polkadot/api": "14.3.1",
"@types/amqplib": "0.8.2",
"amqplib": "0.10.3",
"chalk": "4.1.2",
Expand Down
4 changes: 2 additions & 2 deletions idea/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"@babel/plugin-transform-typescript": "7.20.2",
"@babel/preset-env": "7.20.2",
"@babel/preset-typescript": "7.18.6",
"@gear-js/api": "0.38.1",
"@gear-js/api": "0.39.0",
"@gear-js/common": "workspace:^",
"@polkadot/api": "13.2.1",
"@polkadot/api": "14.3.1",
"babel-jest": "28.1.3",
"dotenv": "16.0.3",
"jest": "^29.1.2",
Expand Down
20 changes: 10 additions & 10 deletions utils/gear-hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gear-js/react-hooks",
"version": "0.13.2",
"version": "0.14.0",
"description": "React hooks used across Gear applications",
"author": "Gear Technologies",
"license": "GPL-3.0",
Expand All @@ -21,27 +21,27 @@
"prepare": "yarn build"
},
"peerDependencies": {
"@gear-js/api": "0.38.3",
"@polkadot/api": "13.2.1",
"@gear-js/api": "0.39.0",
"@polkadot/api": "14.3.1",
"@tanstack/react-query": "^5.56.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sails-js": "0.3.0"
},
"dependencies": {
"@polkadot/api-derive": "13.2.1",
"@polkadot/extension-inject": "0.51.1",
"@polkadot/util": "12.6.2",
"@substrate/connect": "0.8.10",
"@polkadot/api-derive": "14.3.1",
"@polkadot/extension-inject": "0.56.2",
"@polkadot/util": "13.2.3",
"@substrate/connect": "2.1.0",
"bignumber.js": "9.1.2",
"nanoid": "5.0.1",
"react-transition-group": "4.4.5",
"sails-js-parser": "0.0.1"
},
"devDependencies": {
"@gear-js/api": "0.38.3",
"@polkadot/api": "13.2.1",
"@polkadot/types": "13.2.1",
"@gear-js/api": "0.39.0",
"@polkadot/api": "14.3.1",
"@polkadot/types": "14.3.1",
"@rollup/plugin-commonjs": "25.0.5",
"@rollup/plugin-node-resolve": "15.2.3",
"@tanstack/react-query": "5.56.2",
Expand Down
8 changes: 4 additions & 4 deletions utils/wallet-connect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gear-js/wallet-connect",
"version": "0.1.2",
"version": "0.2.0",
"type": "module",
"description": "React library to connect Substrate based wallets to Gear dApps",
"author": "Gear Technologies",
Expand All @@ -24,7 +24,7 @@
"preview": "vite preview"
},
"peerDependencies": {
"@gear-js/react-hooks": "^0.13.2",
"@gear-js/react-hooks": "^0.14.0",
"@gear-js/ui": "^0.5.28",
"@gear-js/vara-ui": "^0.0.11"
},
Expand All @@ -37,10 +37,10 @@
}
},
"devDependencies": {
"@gear-js/react-hooks": "0.13.2",
"@gear-js/react-hooks": "0.14.0",
"@gear-js/ui": "0.5.28",
"@gear-js/vara-ui": "0.0.11",
"@polkadot/react-identicon": "3.10.1",
"@polkadot/react-identicon": "3.11.3",
"@tanstack/react-query": "5.56.2",
"@types/react": "18.3.2",
"@types/react-dom": "18.3.0",
Expand Down
4 changes: 3 additions & 1 deletion utils/wallet-connect/src/components/balance/balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ function Balance({ theme }: Props) {
const { getFormattedBalance } = useBalanceFormat();

const { data: balances } = useDeriveBalancesAll({ address: account?.decodedAddress, watch: true });
const balance = isApiReady && balances ? getFormattedBalance(balances.freeBalance) : undefined;

const balance =
isApiReady && balances ? getFormattedBalance(balances.transferable || balances.availableBalance) : undefined;

if (!balance) return null;

Expand Down
Loading
Loading