diff --git a/packages/apps/public/locales/ar/translation.json b/packages/apps/public/locales/ar/translation.json index 4fbeb62de503..1fc70bc7dfd4 100644 --- a/packages/apps/public/locales/ar/translation.json +++ b/packages/apps/public/locales/ar/translation.json @@ -1218,7 +1218,7 @@ "total staked": "إجمالي المرهون", "transactions": "معاملات", "transfer received": "تم استلام التحويل", - "transferrable": "قابل للتحويل", + "transferable": "قابل للتحويل", "trusted social recovery helpers": "مساعدو الإسترجاع الاجتماعي الموثوق بهم", "turnout": "معدل المشاركة في الإنتخابات", "twitter": "تويتر", diff --git a/packages/apps/public/locales/bn/translation.json b/packages/apps/public/locales/bn/translation.json index b2796f10e3e8..6672dd5039b9 100644 --- a/packages/apps/public/locales/bn/translation.json +++ b/packages/apps/public/locales/bn/translation.json @@ -1291,7 +1291,7 @@ "transactions": "লেনদেনসমূহ", "transfer received": "প্রাপ্ত হস্তান্তর", "transfer remark/comment": "হস্তান্তর উক্তি/মন্তব্য", - "transferrable": "হস্তান্তরযোগ্য", + "transferable": "হস্তান্তরযোগ্য", "trusted social recovery helpers": "বিশ্বস্ত সামাজিক পুনরুদ্ধার সহায়কবৃন্দ", "turnout": "ভোটার", "twitter": "টুইটার", diff --git a/packages/apps/public/locales/en/app-accounts.json b/packages/apps/public/locales/en/app-accounts.json index f6a1236b5f95..dea561433a95 100644 --- a/packages/apps/public/locales/en/app-accounts.json +++ b/packages/apps/public/locales/en/app-accounts.json @@ -285,7 +285,7 @@ "total balance": "total balance", "total deposit": "total deposit", "total locked": "total locked", - "total transferrable": "total transferrable", + "total transferable": "total transferable", "trusted social recovery helpers": "trusted social recovery helpers", "twitter": "twitter", "unbonding": "unbonding", diff --git a/packages/apps/public/locales/en/app-contracts.json b/packages/apps/public/locales/en/app-contracts.json index 6860c5b804c5..87eaa99323ec 100644 --- a/packages/apps/public/locales/en/app-contracts.json +++ b/packages/apps/public/locales/en/app-contracts.json @@ -63,7 +63,7 @@ "read": "read", "read contract only, no execution": "read contract only, no execution", "status": "status", - "transferrable": "transferrable", + "transferable": "transferable", "unique deployment salt": "unique deployment salt", "use deployment salt": "use deployment salt", "use estimated gas": "use estimated gas", diff --git a/packages/apps/public/locales/en/app-democracy.json b/packages/apps/public/locales/en/app-democracy.json index 2eb18f146038..851c75bb44f7 100644 --- a/packages/apps/public/locales/en/app-democracy.json +++ b/packages/apps/public/locales/en/app-democracy.json @@ -66,7 +66,7 @@ "send from account": "send from account", "threshold": "threshold", "total": "total", - "transferrable": "transferrable", + "transferable": "transferable", "turnout": "turnout", "votes": "votes", "voting period": "voting period", diff --git a/packages/apps/public/locales/en/app-files.json b/packages/apps/public/locales/en/app-files.json index b50a5b9e7c18..f9b1b83be083 100644 --- a/packages/apps/public/locales/en/app-files.json +++ b/packages/apps/public/locales/en/app-files.json @@ -37,6 +37,6 @@ "files": "files", "password": "password", "status": "status", - "transferrable": "transferrable", + "transferable": "transferable", "⚡️ Thunder Gateway": "⚡️ Thunder Gateway" } \ No newline at end of file diff --git a/packages/apps/public/locales/en/app-gilt.json b/packages/apps/public/locales/en/app-gilt.json index 337cdf43661f..382372373bb4 100644 --- a/packages/apps/public/locales/en/app-gilt.json +++ b/packages/apps/public/locales/en/app-gilt.json @@ -21,7 +21,7 @@ "send via proxy": "send via proxy", "submit gilt bid": "submit gilt bid", "target": "target", - "transferrable": "transferrable", + "transferable": "transferable", "use proxied account": "use proxied account", "yes": "yes" } \ No newline at end of file diff --git a/packages/apps/public/locales/en/app-nis.json b/packages/apps/public/locales/en/app-nis.json index a1eb2754ea92..08301a2a4805 100644 --- a/packages/apps/public/locales/en/app-nis.json +++ b/packages/apps/public/locales/en/app-nis.json @@ -18,6 +18,6 @@ "queues": "queues", "send via proxy": "send via proxy", "submit nis bid": "submit nis bid", - "transferrable": "transferrable", + "transferable": "transferable", "use proxied account": "use proxied account" } \ No newline at end of file diff --git a/packages/apps/public/locales/en/app-parachains.json b/packages/apps/public/locales/en/app-parachains.json index 46bf719f993e..71bc0ce5f924 100644 --- a/packages/apps/public/locales/en/app-parachains.json +++ b/packages/apps/public/locales/en/app-parachains.json @@ -155,7 +155,7 @@ "timeout": "timeout", "total": "total", "total raised / cap": "total raised / cap", - "transferrable": "transferrable", + "transferable": "transferable", "validation code": "validation code", "validator {{index}}": "validator {{index}}", "value": "value", diff --git a/packages/apps/public/locales/en/app-preimages.json b/packages/apps/public/locales/en/app-preimages.json index 15d87ac8d3e6..efa12be120b2 100644 --- a/packages/apps/public/locales/en/app-preimages.json +++ b/packages/apps/public/locales/en/app-preimages.json @@ -18,5 +18,5 @@ "propose": "propose", "send from account": "send from account", "status": "status", - "transferrable": "transferrable" + "transferable": "transferable" } \ No newline at end of file diff --git a/packages/apps/public/locales/en/app-referenda.json b/packages/apps/public/locales/en/app-referenda.json index 897ccc5ffa7a..ed65e2788fcd 100644 --- a/packages/apps/public/locales/en/app-referenda.json +++ b/packages/apps/public/locales/en/app-referenda.json @@ -102,7 +102,7 @@ "total": "total", "total issuance": "total issuance", "track origin": "track origin", - "transferrable": "transferrable", + "transferable": "transferable", "vote": "vote", "votes": "votes", "{{blocks}} blocks": "{{blocks}} blocks", diff --git a/packages/apps/public/locales/en/react-components.json b/packages/apps/public/locales/en/react-components.json index cbbb53db4e95..ade29350c6f1 100644 --- a/packages/apps/public/locales/en/react-components.json +++ b/packages/apps/public/locales/en/react-components.json @@ -110,8 +110,8 @@ "threshold": "threshold", "total": "total", "transactions": "transactions", - "transferrable": "transferrable", - "transferrable minus fees": "transferrable minus fees", + "transferable": "transferable", + "transferable minus fees": "transferable minus fees", "twitter": "twitter", "type": "type", "unbonding": "unbonding", diff --git a/packages/apps/public/locales/en/translation.json b/packages/apps/public/locales/en/translation.json index 1b04defeb819..3333c2bae966 100644 --- a/packages/apps/public/locales/en/translation.json +++ b/packages/apps/public/locales/en/translation.json @@ -1754,13 +1754,13 @@ "total stake": "", "total staked": "", "total sub": "", - "total transferrable": "", + "total transferable": "", "track origin": "", "transactions": "", "transfer asset": "", "transfer received": "", - "transferrable": "", - "transferrable minus fees": "", + "transferable": "", + "transferable minus fees": "", "transfers": "", "trusted social recovery helpers": "", "turnout": "", diff --git a/packages/apps/public/locales/es/translation.json b/packages/apps/public/locales/es/translation.json index b6021427527c..1bbf52b2d533 100644 --- a/packages/apps/public/locales/es/translation.json +++ b/packages/apps/public/locales/es/translation.json @@ -1052,7 +1052,7 @@ "total staked": "staked total", "transactions": "transacciones", "transfer received": "transferencia recibida", - "transferrable": "transferible", + "transferable": "transferible", "trusted social recovery helpers": "asistentes de confianza para la recuperación social", "turnout": "participación", "twitter": "twitter", diff --git a/packages/apps/public/locales/fr/translation.json b/packages/apps/public/locales/fr/translation.json index 48441018adc2..d7f4b2423e6b 100644 --- a/packages/apps/public/locales/fr/translation.json +++ b/packages/apps/public/locales/fr/translation.json @@ -1433,8 +1433,8 @@ "transactions": "transactions", "transfer received": "transfert reçu", "transfer remark/comment": "transférer une remarque/commentaire", - "transferrable": "transferrable", - "transferrable minus fees": "transferable moins les frais", + "transferable": "transferable", + "transferable minus fees": "transferable moins les frais", "trusted social recovery helpers": "assistants sociaux de confiance", "turnout": "participation", "twitter": "twitter", diff --git a/packages/apps/public/locales/hi/translation.json b/packages/apps/public/locales/hi/translation.json index a40613b3cb5b..c421abb9ab9c 100644 --- a/packages/apps/public/locales/hi/translation.json +++ b/packages/apps/public/locales/hi/translation.json @@ -1051,7 +1051,7 @@ "total staked": "कुल दांव", "transactions": "लेनदेन", "transfer received": "स्थानांतरण प्राप्त हुआ", - "transferrable": "हस्तांतरणीय", + "transferable": "हस्तांतरणीय", "trusted social recovery helpers": "विश्वसनीय सामाजिक पुनर्प्राप्ति सहायक", "turnout": "भागीदारी", "twitter": "ट्विटर", diff --git a/packages/apps/public/locales/id/translation.json b/packages/apps/public/locales/id/translation.json index 4d09bd25651a..732101f6dc80 100644 --- a/packages/apps/public/locales/id/translation.json +++ b/packages/apps/public/locales/id/translation.json @@ -1359,8 +1359,8 @@ "transactions": "transaksi", "transfer received": "transfer diterima", "transfer remark/comment": "transfer ucapan/komentar", - "transferrable": "yang dapat ditransfer", - "transferrable minus fees": "biaya dikurangi yang dapat dialihkan", + "transferable": "yang dapat ditransfer", + "transferable minus fees": "biaya dikurangi yang dapat dialihkan", "trusted social recovery helpers": "pemulihan sosial helper terpercaya", "turnout": "beralih", "twitter": "twitter", diff --git a/packages/apps/public/locales/it/translation.json b/packages/apps/public/locales/it/translation.json index 8bc438b158e8..4de8e24fc5d6 100644 --- a/packages/apps/public/locales/it/translation.json +++ b/packages/apps/public/locales/it/translation.json @@ -2017,8 +2017,8 @@ "transfer asset": "trasferimento asset", "transfer received": "trasferimento ricevuto", "transfer remark/comment": "commento/nota sul trasferimento", - "transferrable": "trasferibili", - "transferrable minus fees": "transferibile al netto delle commissioni", + "transferable": "trasferibili", + "transferable minus fees": "transferibile al netto delle commissioni", "transfers": "trasferimenti", "trusted social recovery helpers": "garanti di fiducia per recupero account", "turnout": "partecipanti", diff --git a/packages/apps/public/locales/ja/translation.json b/packages/apps/public/locales/ja/translation.json index 63033c929396..901b310f0717 100644 --- a/packages/apps/public/locales/ja/translation.json +++ b/packages/apps/public/locales/ja/translation.json @@ -546,7 +546,7 @@ "threshold": "出発点", "transactions": "トランザクション", "transfer received": "受信", - "transferrable": "送信可能な", + "transferable": "送信可能な", "trusted social recovery helpers": "信頼できるソーシャルリカバリーヘルパー", "twitter": "twitter", "type": "タイプ", diff --git a/packages/apps/public/locales/ko/translation.json b/packages/apps/public/locales/ko/translation.json index 692666516c29..9ce883b9b719 100644 --- a/packages/apps/public/locales/ko/translation.json +++ b/packages/apps/public/locales/ko/translation.json @@ -1389,8 +1389,8 @@ "transactions": "거래 목록", "transfer received": "트랜스퍼를 받았습니다", "transfer remark/comment": "이체할 발언/ 논평", - "transferrable": "이체 가능", - "transferrable minus fees": "수수료를 제외하고 이체 가능", + "transferable": "이체 가능", + "transferable minus fees": "수수료를 제외하고 이체 가능", "trusted social recovery helpers": "신뢰할 수 있는 \"계정 복구 도우미\" 목록", "turnout": "투표자 수", "twitter": "트워터", diff --git a/packages/apps/public/locales/pl/add-accounts.json b/packages/apps/public/locales/pl/add-accounts.json index e1bb0075c39e..cb35807dde75 100644 --- a/packages/apps/public/locales/pl/add-accounts.json +++ b/packages/apps/public/locales/pl/add-accounts.json @@ -328,8 +328,8 @@ "threshold": "próg / limit", "total deposit": "ogólny depozyt", "transactions": "tranzakcje", - "transferrable": "możliwy do przeslania", - "transferrable minus fees": "możliwy do przesłania po odjęciu opłat", + "transferable": "możliwy do przeslania", + "transferable minus fees": "możliwy do przesłania po odjęciu opłat", "trusted social recovery helpers": "zaufani pomocnicy w naprawie społecznej", "twitter": "twitter", "type": "typ", diff --git a/packages/apps/public/locales/pt/translation.json b/packages/apps/public/locales/pt/translation.json index 8384dbb7cd53..c2c06020cc4f 100644 --- a/packages/apps/public/locales/pt/translation.json +++ b/packages/apps/public/locales/pt/translation.json @@ -1057,7 +1057,7 @@ "total staked": "total em participação", "transactions": "transações", "transfer received": "transferência recebida", - "transferrable": "transferível", + "transferable": "transferível", "trusted social recovery helpers": "auxiliares confiáveis de recuperação social", "turnout": "vire para fora", "twitter": "Twitter", diff --git a/packages/apps/public/locales/ru/translation.json b/packages/apps/public/locales/ru/translation.json index e05d2eac1ffa..53c96b4a5ed2 100644 --- a/packages/apps/public/locales/ru/translation.json +++ b/packages/apps/public/locales/ru/translation.json @@ -1384,12 +1384,12 @@ "total peers": "всего соединений с другими нодами", "total stake": "всего стейк", "total staked": "всего застейкано", - "total transferrable": "всего доступно для перевода", + "total transferable": "всего доступно для перевода", "transactions": "транзакции", "transfer asset": "отправить средства", "transfer received": "трансферов получено", - "transferrable": "передаваемые", - "transferrable minus fees": "доступное для перевода без комиссии", + "transferable": "передаваемые", + "transferable minus fees": "доступное для перевода без комиссии", "trusted social recovery helpers": "доверяемые помощники для социального восстановления", "turnout": "оказаться", "twitter": "twitter", diff --git a/packages/apps/public/locales/ur/translation.json b/packages/apps/public/locales/ur/translation.json index 6a15ce1d17b6..279e72ed79a8 100644 --- a/packages/apps/public/locales/ur/translation.json +++ b/packages/apps/public/locales/ur/translation.json @@ -1292,7 +1292,7 @@ "transactions": "ٹرانزیکشنز", "transfer received": "منتقلی موصول ہوئی", "transfer remark/comment": "منتقلی پر کمینٹ/ریمارک دیں", - "transferrable": "قابل منتقلی", + "transferable": "قابل منتقلی", "trusted social recovery helpers": "قابل اعتماد سوشل ریکوری ہیلپرز", "turnout": "ٹرن آؤٹ", "twitter": "ٹویٹر", diff --git a/packages/apps/public/locales/zh/translation.json b/packages/apps/public/locales/zh/translation.json index a70f0d68a8ef..12f0d5b8b027 100644 --- a/packages/apps/public/locales/zh/translation.json +++ b/packages/apps/public/locales/zh/translation.json @@ -1295,7 +1295,7 @@ "transactions": "交易", "transfer received": "转账接收成功", "transfer remark/comment": "转账备注/评论", - "transferrable": "可转账的", + "transferable": "可转账的", "trusted social recovery helpers": "信任的社交恢复帮手", "turnout": "结果", "twitter": "Twitter", diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx index e52c9d50ed9c..04daae3a9957 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), - transferrable: balancesAll.availableBalance, + transferable: balancesAll.transferable || balancesAll.availableBalance, unbonding: calcUnbonding(stakingInfo) }); diff --git a/packages/page-accounts/src/Accounts/Summary.tsx b/packages/page-accounts/src/Accounts/Summary.tsx index ac5503be98fe..fac087d377ae 100644 --- a/packages/page-accounts/src/Accounts/Summary.tsx +++ b/packages/page-accounts/src/Accounts/Summary.tsx @@ -28,11 +28,11 @@ function Summary ({ balance, className }: Props) { diff --git a/packages/page-accounts/src/Accounts/index.spec.ts b/packages/page-accounts/src/Accounts/index.spec.ts index 0b8352d94808..0f27f8f089e0 100644 --- a/packages/page-accounts/src/Accounts/index.spec.ts +++ b/packages/page-accounts/src/Accounts/index.spec.ts @@ -110,10 +110,10 @@ describe.skip('Accounts page', () => { const rows = await accountsPage.getAccountRows(); await rows[0].assertBalancesDetails([ - { amount: balance(0), name: 'transferrable' }, + { amount: balance(0), name: 'transferable' }, { amount: balance(30), name: 'locked' }]); await rows[1].assertBalancesDetails([ - { amount: balance(50), name: 'transferrable' }, + { amount: balance(50), name: 'transferable' }, { amount: balance(150), name: 'reserved' }]); }); @@ -211,7 +211,7 @@ describe.skip('Accounts page', () => { anAccountWithBalance({ availableBalance: balance(600) }) ); - const summary = await screen.findByTestId(/card-summary:(total )?transferrable/i); + const summary = await screen.findByTestId(/card-summary:(total )?transferable/i); expect(summary).toHaveTextContent(showBalance(400 + 600)); }); diff --git a/packages/page-accounts/src/Accounts/index.tsx b/packages/page-accounts/src/Accounts/index.tsx index b14d88270717..7afb1f854926 100644 --- a/packages/page-accounts/src/Accounts/index.tsx +++ b/packages/page-accounts/src/Accounts/index.tsx @@ -140,7 +140,7 @@ function Overview ({ className = '', onStatusChange }: Props): React.ReactElemen locked: aggregate('locked'), redeemable: aggregate('redeemable'), total: aggregate('total'), - transferrable: aggregate('transferrable'), + transferable: aggregate('transferable'), unbonding: aggregate('unbonding') } }; diff --git a/packages/page-accounts/src/types.ts b/packages/page-accounts/src/types.ts index b1396e5fd620..320f2ddc8c5f 100644 --- a/packages/page-accounts/src/types.ts +++ b/packages/page-accounts/src/types.ts @@ -37,7 +37,7 @@ export interface SortedAccount { export interface AccountBalance { total: BN; locked: BN; - transferrable: BN; + transferable: BN; bonded: BN; redeemable: BN; unbonding: BN; diff --git a/packages/page-addresses/src/Contacts/index.spec.ts b/packages/page-addresses/src/Contacts/index.spec.ts index 87bc321fd64e..de53661ef26b 100644 --- a/packages/page-addresses/src/Contacts/index.spec.ts +++ b/packages/page-addresses/src/Contacts/index.spec.ts @@ -95,10 +95,10 @@ describe.skip('Addresses page', () => { const rows = await addressesPage.getAddressesRows(); await rows[0].assertBalancesDetails([ - { amount: balance(0), name: 'transferrable' }, + { amount: balance(0), name: 'transferable' }, { amount: balance(30), name: 'locked' }]); await rows[1].assertBalancesDetails([ - { amount: balance(50), name: 'transferrable' }, + { amount: balance(50), name: 'transferable' }, { amount: balance(150), name: 'reserved' }]); }); diff --git a/packages/page-bounties/src/hooks/useBalance.ts b/packages/page-bounties/src/hooks/useBalance.ts index 1df7303b4ee4..9b60f733cd12 100644 --- a/packages/page-bounties/src/hooks/useBalance.ts +++ b/packages/page-bounties/src/hooks/useBalance.ts @@ -8,8 +8,9 @@ import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; function useBalanceImpl (accountId: string | null): Balance | undefined { const { api } = useApi(); + const balancesAll = useCall(api.derive.balances?.all, [accountId]); - return useCall(api.derive.balances?.all, [accountId])?.availableBalance; + return balancesAll?.transferable || balancesAll?.availableBalance; } export const useBalance = createNamedHook('useBalance', useBalanceImpl); diff --git a/packages/page-contracts/src/Codes/Upload.tsx b/packages/page-contracts/src/Codes/Upload.tsx index 75a6b6f72e33..3c28cc3014dd 100644 --- a/packages/page-contracts/src/Codes/Upload.tsx +++ b/packages/page-contracts/src/Codes/Upload.tsx @@ -163,7 +163,7 @@ function Upload ({ onClose }: Props): React.ReactElement { label={t('deployment account')} labelExtra={ } diff --git a/packages/page-contracts/src/Contracts/Call.tsx b/packages/page-contracts/src/Contracts/Call.tsx index c6f1a409451c..7b85873e5822 100644 --- a/packages/page-contracts/src/Contracts/Call.tsx +++ b/packages/page-contracts/src/Contracts/Call.tsx @@ -175,7 +175,7 @@ function Call ({ className = '', contract, messageIndex, onCallResult, onChangeM label={t('call from account')} labelExtra={ } diff --git a/packages/page-contracts/src/Contracts/Deploy.tsx b/packages/page-contracts/src/Contracts/Deploy.tsx index c69749be3037..bdb5b9c6a758 100644 --- a/packages/page-contracts/src/Contracts/Deploy.tsx +++ b/packages/page-contracts/src/Contracts/Deploy.tsx @@ -128,7 +128,7 @@ function Deploy ({ codeHash, constructorIndex = 0, onClose, setConstructorIndex label={t('deployment account')} labelExtra={ } diff --git a/packages/page-democracy/src/Overview/PreImage.tsx b/packages/page-democracy/src/Overview/PreImage.tsx index 6c3a37d4488f..c2c140dba9e8 100644 --- a/packages/page-democracy/src/Overview/PreImage.tsx +++ b/packages/page-democracy/src/Overview/PreImage.tsx @@ -73,7 +73,7 @@ function PreImage ({ className = '', imageHash, isImminent = false, onClose }: P label={t('send from account')} labelExtra={ {t('transferrable')}} + label={{t('transferable')}} params={accountId} /> } diff --git a/packages/page-democracy/src/Overview/Propose.tsx b/packages/page-democracy/src/Overview/Propose.tsx index f483bf33dcf4..6a1e3a002b14 100644 --- a/packages/page-democracy/src/Overview/Propose.tsx +++ b/packages/page-democracy/src/Overview/Propose.tsx @@ -82,7 +82,7 @@ function Propose ({ className = '', onClose }: Props): React.ReactElement label={t('send from account')} labelExtra={ {t('transferrable')}} + label={{t('transferable')}} params={accountId} /> } diff --git a/packages/page-files/src/UploadModal.tsx b/packages/page-files/src/UploadModal.tsx index dad01614cf5b..b4e747e01a3c 100644 --- a/packages/page-files/src/UploadModal.tsx +++ b/packages/page-files/src/UploadModal.tsx @@ -338,7 +338,7 @@ function UploadModal ({ className, file, onClose = NOOP, onSuccess = NOOP }: Pro label={t('Please choose account')} labelExtra={ } diff --git a/packages/page-gilt/src/Overview/BidAdd.tsx b/packages/page-gilt/src/Overview/BidAdd.tsx index ac24aa47838a..ea451f41178e 100644 --- a/packages/page-gilt/src/Overview/BidAdd.tsx +++ b/packages/page-gilt/src/Overview/BidAdd.tsx @@ -61,7 +61,7 @@ function Bid ({ className, isDisabled, proxies }: Props): React.ReactElement{t('transferrable')}} + label={{t('transferable')}} params={accountId} /> } diff --git a/packages/page-nis/src/Overview/BidAdd.tsx b/packages/page-nis/src/Overview/BidAdd.tsx index a9d2883219da..c9317b325a47 100644 --- a/packages/page-nis/src/Overview/BidAdd.tsx +++ b/packages/page-nis/src/Overview/BidAdd.tsx @@ -60,7 +60,7 @@ function Bid ({ className, isDisabled, proxies }: Props): React.ReactElement{t('transferrable')}} + label={{t('transferable')}} params={accountId} /> } diff --git a/packages/page-parachains/src/Teleport.tsx b/packages/page-parachains/src/Teleport.tsx index ad7de09743ed..dd0cf030a66d 100644 --- a/packages/page-parachains/src/Teleport.tsx +++ b/packages/page-parachains/src/Teleport.tsx @@ -139,7 +139,7 @@ function Teleport ({ onClose }: Props): React.ReactElement | null { label={t('send from account')} labelExtra={ } diff --git a/packages/page-preimages/src/Preimages/Add/index.tsx b/packages/page-preimages/src/Preimages/Add/index.tsx index 0532fde3ce37..c29d4bc73ae7 100644 --- a/packages/page-preimages/src/Preimages/Add/index.tsx +++ b/packages/page-preimages/src/Preimages/Add/index.tsx @@ -40,7 +40,7 @@ function Add ({ className, imageHash }: Props): React.ReactElement { label={t('send from account')} labelExtra={ {t('transferrable')}} + label={{t('transferable')}} params={accountId} /> } diff --git a/packages/page-referenda/src/Referenda/Deposits/Place.tsx b/packages/page-referenda/src/Referenda/Deposits/Place.tsx index cf498744c1bc..6203ffc7fd3a 100644 --- a/packages/page-referenda/src/Referenda/Deposits/Place.tsx +++ b/packages/page-referenda/src/Referenda/Deposits/Place.tsx @@ -41,7 +41,7 @@ function Deposit ({ className = '', id, palletReferenda, track }: Props): React. label={t('deposit from account')} labelExtra={ {t('transferrable')}} + label={{t('transferable')}} params={accountId} /> } diff --git a/packages/page-referenda/src/Referenda/Submit/index.tsx b/packages/page-referenda/src/Referenda/Submit/index.tsx index 164955125123..062885b1ed62 100644 --- a/packages/page-referenda/src/Referenda/Submit/index.tsx +++ b/packages/page-referenda/src/Referenda/Submit/index.tsx @@ -166,7 +166,7 @@ function Submit ({ className = '', isMember, members, palletReferenda, tracks }: label={t('propose from account')} labelExtra={ {t('transferrable')}} + label={{t('transferable')}} params={accountId} /> } 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 b1c9f96d80bd..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 68f314f17f02..88bfd603584c 100644 --- a/packages/react-components/src/modals/Transfer.tsx +++ b/packages/react-components/src/modals/Transfer.tsx @@ -73,10 +73,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) @@ -121,7 +121,7 @@ function Transfer ({ className = '', onClose, recipientId: propRecipientId, send label={t('send from account')} labelExtra={ } @@ -136,7 +136,7 @@ function Transfer ({ className = '', onClose, recipientId: propRecipientId, send label={t('send to address')} labelExtra={ } @@ -155,7 +155,7 @@ function Transfer ({ className = '', onClose, recipientId: propRecipientId, send defaultValue={maxTransfer} isDisabled key={maxTransfer?.toString()} - label={t('transferrable minus fees')} + label={t('transferable minus fees')} /> ) : ( 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) );