diff --git a/packages/apps-config/src/api/typesBundle.ts b/packages/apps-config/src/api/typesBundle.ts index 2cb37b491dd0..94d531b2f29d 100644 --- a/packages/apps-config/src/api/typesBundle.ts +++ b/packages/apps-config/src/api/typesBundle.ts @@ -16393,16 +16393,6 @@ export const typesBundle = { "Cell": { "row": "BlockLengthRows", "col": "BlockLengthColumns" - }, - "ProxyType": { - "_enum": [ - "Any", - "NonTransfer", - "Governance", - "Staking", - "IdentityJudgement", - "NominationPools" - ] } } } diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx index 3b403cc64fcd..7a23db337770 100644 --- a/packages/page-accounts/src/Accounts/Account.tsx +++ b/packages/page-accounts/src/Accounts/Account.tsx @@ -197,7 +197,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt locked: balancesAll.lockedBalance, redeemable: stakingInfo?.redeemable || BN_ZERO, total: balancesAll.freeBalance.add(balancesAll.reservedBalance), - transferable: balancesAll.availableBalance, + transferable: balancesAll.transferable || balancesAll.availableBalance, unbonding: calcUnbonding(stakingInfo) }); diff --git a/packages/page-bounties/src/hooks/useBalance.ts b/packages/page-bounties/src/hooks/useBalance.ts index 353804989eeb..9b60f733cd12 100644 --- a/packages/page-bounties/src/hooks/useBalance.ts +++ b/packages/page-bounties/src/hooks/useBalance.ts @@ -10,7 +10,7 @@ function useBalanceImpl (accountId: string | null): Balance | undefined { const { api } = useApi(); const balancesAll = useCall(api.derive.balances?.all, [accountId]); - return balancesAll?.availableBalance; + return balancesAll?.transferable || balancesAll?.availableBalance; } export const useBalance = createNamedHook('useBalance', useBalanceImpl); diff --git a/packages/page-staking2/src/Pools/useAmountError.ts b/packages/page-staking2/src/Pools/useAmountError.ts index fb02275fa6aa..94082c647f80 100644 --- a/packages/page-staking2/src/Pools/useAmountError.ts +++ b/packages/page-staking2/src/Pools/useAmountError.ts @@ -15,7 +15,7 @@ function useAmountErrorImpl (accountId?: string | null, amount?: BN | null, minA return useMemo( () => !amount || amount.isZero() || !minAmount || minAmount.gt(amount) || ( !!balances && - amount.gt(balances.availableBalance.sub(api.consts.balances.existentialDeposit)) + amount.gt((balances.transferable || balances.availableBalance).sub(api.consts.balances.existentialDeposit)) ), [api, amount, balances, minAmount] ); diff --git a/packages/react-components/src/AddressInfo.tsx b/packages/react-components/src/AddressInfo.tsx index ec0d8cf49e96..571346054b48 100644 --- a/packages/react-components/src/AddressInfo.tsx +++ b/packages/react-components/src/AddressInfo.tsx @@ -252,14 +252,14 @@ function createBalanceItems (formatIndex: number, lookup: Record /> ); - balancesAll && balanceDisplay.available && deriveBalances.availableBalance && allItems.push( + balancesAll && balanceDisplay.available && (deriveBalances.transferable || deriveBalances.availableBalance) && allItems.push( ); diff --git a/packages/react-components/src/modals/Transfer.tsx b/packages/react-components/src/modals/Transfer.tsx index 6a1b8a6bd684..71df3eae9c58 100644 --- a/packages/react-components/src/modals/Transfer.tsx +++ b/packages/react-components/src/modals/Transfer.tsx @@ -67,10 +67,10 @@ function Transfer ({ className = '', onClose, recipientId: propRecipientId, send if (balances && balances.accountId?.eq(fromId) && fromId && toId && api.call.transactionPaymentApi && api.tx.balances) { nextTick(async (): Promise => { try { - const extrinsic = (api.tx.balances.transferAllowDeath || api.tx.balances.transfer)(toId, balances.availableBalance); + const extrinsic = (api.tx.balances.transferAllowDeath || api.tx.balances.transfer)(toId, (balances.transferable || balances.availableBalance)); const { partialFee } = await extrinsic.paymentInfo(fromId); const adjFee = partialFee.muln(110).div(BN_HUNDRED); - const maxTransfer = balances.availableBalance.sub(adjFee); + const maxTransfer = (balances.transferable || balances.availableBalance).sub(adjFee); setMaxTransfer( api.consts.balances && maxTransfer.gt(api.consts.balances.existentialDeposit) diff --git a/packages/react-query/src/Available.tsx b/packages/react-query/src/Available.tsx index 91fae8a0e16e..759d1fc00748 100644 --- a/packages/react-query/src/Available.tsx +++ b/packages/react-query/src/Available.tsx @@ -25,7 +25,7 @@ function AvailableDisplay ({ children, className = '', label, params }: Props): {children} diff --git a/packages/react-signer/src/PaymentInfo.tsx b/packages/react-signer/src/PaymentInfo.tsx index dd0b1f4cac7f..b0259b31d281 100644 --- a/packages/react-signer/src/PaymentInfo.tsx +++ b/packages/react-signer/src/PaymentInfo.tsx @@ -49,7 +49,7 @@ function PaymentInfo ({ accountId, className = '', extrinsic, isHeader }: Props) } const isFeeError = api.consts.balances && !(api.tx.balances?.transferAllowDeath?.is(extrinsic) || api.tx.balances?.transfer?.is(extrinsic)) && balances?.accountId.eq(accountId) && ( - balances.availableBalance.lte(dispatchInfo.partialFee) || + (balances.transferable || balances.availableBalance).lte(dispatchInfo.partialFee) || balances.freeBalance.sub(dispatchInfo.partialFee).lte(api.consts.balances.existentialDeposit) );