Break (some) circular dependencies (#9464)
* Break (some) circular dependencies * Rebuild translations
This commit is contained in:
parent
479a01faa6
commit
1e7ebdee40
@ -4,7 +4,7 @@
|
||||
import type { TFunction } from 'i18next';
|
||||
import type { Route } from './types.js';
|
||||
|
||||
import Modal from '@polkadot/app-accounts/modals/Transfer';
|
||||
import { TransferModal as Modal } from '@polkadot/react-components';
|
||||
|
||||
export default function create (t: TFunction): Route {
|
||||
return {
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
"//hard/soft": "//hard/soft",
|
||||
"//hard/soft///password": "//hard/soft///password",
|
||||
"<none provided>": "<none provided>",
|
||||
"<unknown>": "<unknown>",
|
||||
"@YourTwitterName": "@YourTwitterName",
|
||||
"@yourname:matrix.org": "@yourname:matrix.org",
|
||||
"A deposit paid by the proxied account that can not be used while the proxy is in existence. The deposit is returned when the proxy is destroyed. The amount reserved is based on the base deposit and number of proxies": "A deposit paid by the proxied account that can not be used while the proxy is in existence. The deposit is returned when the proxy is destroyed. The amount reserved is based on the base deposit and number of proxies",
|
||||
@ -16,7 +15,6 @@
|
||||
"Add account via Ledger": "Add account via Ledger",
|
||||
"Add account via Qr": "Add account via Qr",
|
||||
"Add an account via seed {{step}}/{{STEPS_COUNT}}": "Add an account via seed {{step}}/{{STEPS_COUNT}}",
|
||||
"Add identity judgment": "Add identity judgment",
|
||||
"Add multisig": "Add multisig",
|
||||
"Add proxied account": "Add proxied account",
|
||||
"Add proxy": "Add proxy",
|
||||
@ -30,7 +28,6 @@
|
||||
"Approve this call hash": "Approve this call hash",
|
||||
"Backup": "Backup",
|
||||
"Backup account": "Backup account",
|
||||
"Cancel": "Cancel",
|
||||
"Cancel this call hash": "Cancel this call hash",
|
||||
"Change": "Change",
|
||||
"Change account password": "Change account password",
|
||||
@ -42,9 +39,6 @@
|
||||
"Clear expired democracy locks": "Clear expired democracy locks",
|
||||
"Clear expired referenda locks": "Clear expired referenda locks",
|
||||
"Consider storing your account in a signer such as a browser extension, hardware device, QR-capable phone wallet (non-connected) or desktop application for optimal account security.": "Consider storing your account in a signer such as a browser extension, hardware device, QR-capable phone wallet (non-connected) or desktop application for optimal account security.",
|
||||
"Copied": "Copied",
|
||||
"Copy": "Copy",
|
||||
"Council": "Council",
|
||||
"Create": "Create",
|
||||
"Create a backup file for this account": "Create a backup file for this account",
|
||||
"Custom index": "Custom index",
|
||||
@ -56,14 +50,11 @@
|
||||
"Derive account via derivation path": "Derive account via derivation path",
|
||||
"Development": "Development",
|
||||
"Download": "Download",
|
||||
"Edit": "Edit",
|
||||
"Ensure that the extension has accounts, some accounts are visible globally and available for this chain and that you gave the application permission to access accounts from the extension to use them.": "Ensure that the extension has accounts, some accounts are visible globally and available for this chain and that you gave the application permission to access accounts from the extension to use them.",
|
||||
"Ensure that you utilized the \"Save\" functionality before using a generated address to receive funds. Without saving the address and the associated seed any funds sent to it will be lost.": "Ensure that you utilized the \"Save\" functionality before using a generated address to receive funds. Without saving the address and the associated seed any funds sent to it will be lost.",
|
||||
"Ensure you are using a strong password for proper account protection.": "Ensure you are using a strong password for proper account protection.",
|
||||
"Evaluated {{count}} keys in {{elapsed}}s ({{avg}} keys/s)": "Evaluated {{count}} keys in {{elapsed}}s ({{avg}} keys/s)",
|
||||
"Existing approvals ({{approvals}}/{{threshold}})": "Existing approvals ({{approvals}}/{{threshold}})",
|
||||
"External": "External",
|
||||
"Flags": "Flags",
|
||||
"For approvals outstanding approvers will be shown, for hashes that should be cancelled the first approver is required.": "For approvals outstanding approvers will be shown, for hashes that should be cancelled the first approver is required.",
|
||||
"Forget this account": "Forget this account",
|
||||
"From JSON": "From JSON",
|
||||
@ -74,17 +65,13 @@
|
||||
"I have saved my mnemonic seed safely": "I have saved my mnemonic seed safely",
|
||||
"Identity": "Identity",
|
||||
"If the delegated account is currently voting in a referendum, the delegating vote and conviction will be added.": "If the delegated account is currently voting in a referendum, the delegating vote and conviction will be added.",
|
||||
"If the recipient account is new, the balance needs to be more than the existential deposit. Likewise if the sending account balance drops below the same value, the account will be removed from the state.": "If the recipient account is new, the balance needs to be more than the existential deposit. Likewise if the sending account balance drops below the same value, the account will be removed from the state.",
|
||||
"If you add several proxy accounts for the same proxy type (e.g 2 accounts set as proxy for Governance), then any of those 2 accounts will be able to perform governance actions on behalf of the proxied account": "If you add several proxy accounts for the same proxy type (e.g 2 accounts set as proxy for Governance), then any of those 2 accounts will be able to perform governance actions on behalf of the proxied account",
|
||||
"If you are moving accounts between applications, ensure that you use the correct type.": "If you are moving accounts between applications, ensure that you use the correct type.",
|
||||
"Initiate account recovery": "Initiate account recovery",
|
||||
"Initiate recovery for another": "Initiate recovery for another",
|
||||
"Injected": "Injected",
|
||||
"It is recommended that you create/store your accounts securely and externally from the app. On {{yourBrowser}} the following browser extensions are available for use -": "It is recommended that you create/store your accounts securely and externally from the app. On {{yourBrowser}} the following browser extensions are available for use -",
|
||||
"Judge": "Judge",
|
||||
"Learn more...": "Learn more...",
|
||||
"Ledger app type (originated from)": "Ledger app type (originated from)",
|
||||
"Make Transfer": "Make Transfer",
|
||||
"Make recoverable": "Make recoverable",
|
||||
"Manage delegation": "Manage delegation",
|
||||
"Manage proxies": "Manage proxies",
|
||||
@ -98,19 +85,14 @@
|
||||
"My accounts": "My accounts",
|
||||
"Next": "Next",
|
||||
"No accounts": "No accounts",
|
||||
"No identity associated with account": "No identity associated with account",
|
||||
"No judgements": "No judgements",
|
||||
"No matches found": "No matches found",
|
||||
"No sub identities set.": "No sub identities set.",
|
||||
"Nominator": "Nominator",
|
||||
"Normal transfer without keep-alive checks": "Normal transfer without keep-alive checks",
|
||||
"One or more extensions are detected in your browser, however no accounts has been injected.": "One or more extensions are detected in your browser, however no accounts has been injected.",
|
||||
"Password are ignored for hex seed": "Password are ignored for hex seed",
|
||||
"Pending call hashes": "Pending call hashes",
|
||||
"Please make sure to save this file in a secure location as it is required, together with your password, to restore your account.": "Please make sure to save this file in a secure location as it is required, together with your password, to restore your account.",
|
||||
"Prev": "Prev",
|
||||
"Private Key": "Private Key",
|
||||
"Provide judgement": "Provide judgement",
|
||||
"Provide the account QR from the module/external application for scanning. Once detected as valid, you will be taken to the next step to add the account to your list.": "Provide the account QR from the module/external application for scanning. Once detected as valid, you will be taken to the next step to add the account to your list.",
|
||||
"Proxied": "Proxied",
|
||||
"Proxied account has no owned proxies": "Proxied account has no owned proxies",
|
||||
@ -119,7 +101,6 @@
|
||||
"Recovery": "Recovery",
|
||||
"Register identity": "Register identity",
|
||||
"Register sub-identities": "Register sub-identities",
|
||||
"Remove": "Remove",
|
||||
"Remove sub": "Remove sub",
|
||||
"Reset": "Reset",
|
||||
"Restore": "Restore",
|
||||
@ -128,8 +109,6 @@
|
||||
"Save delegation": "Save delegation",
|
||||
"Save this backup file in a secure location. Additionally, the password associated with this account is needed together with this backup file in order to restore your account.": "Save this backup file in a secure location. Additionally, the password associated with this account is needed together with this backup file in order to restore your account.",
|
||||
"Search for": "Search for",
|
||||
"Send": "Send",
|
||||
"Send funds": "Send funds",
|
||||
"Set Identity": "Set Identity",
|
||||
"Set Subs": "Set Subs",
|
||||
"Set on-chain identity": "Set on-chain identity",
|
||||
@ -138,22 +117,17 @@
|
||||
"Show address on hardware device": "Show address on hardware device",
|
||||
"Since some extensions, such as the polkadot-js extension, protects you against all community reported phishing sites, there are valid reasons to use them for additional protection, even if you are not storing accounts in it.": "Since some extensions, such as the polkadot-js extension, protects you against all community reported phishing sites, there are valid reasons to use them for additional protection, even if you are not storing accounts in it.",
|
||||
"Since the multisig function like any other account, once created it is available for selection anywhere accounts are used and needs to be funded before use.": "Since the multisig function like any other account, once created it is available for selection anywhere accounts are used and needs to be funded before use.",
|
||||
"Society": "Society",
|
||||
"Soft derivation paths are not allowed on ed25519": "Soft derivation paths are not allowed on ed25519",
|
||||
"Start generation": "Start generation",
|
||||
"Start recovery": "Start recovery",
|
||||
"Stop generation": "Stop generation",
|
||||
"Sudo key": "Sudo key",
|
||||
"Supply a JSON file with the list of signatories.": "Supply a JSON file with the list of signatories.",
|
||||
"Supply a backed-up JSON file, encrypted with your account-specific password.": "Supply a backed-up JSON file, encrypted with your account-specific password.",
|
||||
"Swap to a non-executing approval type, with subsequent calls providing the actual call data.": "Swap to a non-executing approval type, with subsequent calls providing the actual call data.",
|
||||
"Technical committee": "Technical committee",
|
||||
"Test account": "Test account",
|
||||
"The account type that you wish to create. This is the top-level derivation.": "The account type that you wish to create. This is the top-level derivation.",
|
||||
"The address index on the account that you wish to add. This is the second-level derivation.": "The address index on the account that you wish to add. This is the second-level derivation.",
|
||||
"The address that has previously setup a proxy to one of the accounts that you control.": "The address that has previously setup a proxy to one of the accounts that you control.",
|
||||
"The amount to allocate and the conviction that will be applied to all votes made on a referendum.": "The amount to allocate and the conviction that will be applied to all votes made on a referendum.",
|
||||
"The beneficiary will have access to the transferred fees when the transaction is included in a block.": "The beneficiary will have access to the transferred fees when the transaction is included in a block.",
|
||||
"The call data for this transaction matching the hash. Once sent, the multisig will be executed against this.": "The call data for this transaction matching the hash. Once sent, the multisig will be executed against this.",
|
||||
"The call hash from the list of available and unapproved calls.": "The call hash from the list of available and unapproved calls.",
|
||||
"The creator for this multisig call": "The creator for this multisig call",
|
||||
@ -173,15 +147,11 @@
|
||||
"The operation type to apply. For approvals both non-final and final approvals are supported.": "The operation type to apply. For approvals both non-final and final approvals are supported.",
|
||||
"The password and password confirmation for this account. This is required to authenticate any transactions made and to encrypt the keypair.": "The password and password confirmation for this account. This is required to authenticate any transactions made and to encrypt the keypair.",
|
||||
"The password previously used to encrypt this account.": "The password previously used to encrypt this account.",
|
||||
"The recipient is associated with a known phishing site on {{url}}": "The recipient is associated with a known phishing site on {{url}}",
|
||||
"The recoverable account is protected against the loss of seed/access by a social process.": "The recoverable account is protected against the loss of seed/access by a social process.",
|
||||
"The secret seed value for this account. Ensure that you keep this in a safe place, with access to the seed you can re-create the account.": "The secret seed value for this account. Ensure that you keep this in a safe place, with access to the seed you can re-create the account.",
|
||||
"The signatories has the ability to create transactions using the multisig and approve transactions sent by others.Once the threshold is reached with approvals, the multisig transaction is enacted on-chain.": "The signatories has the ability to create transactions using the multisig and approve transactions sent by others.Once the threshold is reached with approvals, the multisig transaction is enacted on-chain.",
|
||||
"The threshold for approval should be less or equal to the number of signatories for this multisig.": "The threshold for approval should be less or equal to the number of signatories for this multisig.",
|
||||
"The threshold for approvals and the delay is the protection associated with the account. The delay should be such that any colluding recovery attempts does have a window to stop.": "The threshold for approvals and the delay is the protection associated with the account. The delay should be such that any colluding recovery attempts does have a window to stop.",
|
||||
"The transaction, after application of the transfer fees, will drop the available balance below the existential deposit. As such the transfer will fail. The account needs more free funds to cover the transaction fees.": "The transaction, after application of the transfer fees, will drop the available balance below the existential deposit. As such the transfer will fail. The account needs more free funds to cover the transaction fees.",
|
||||
"The transferred balance will be subtracted (along with fees) from the sender account.": "The transferred balance will be subtracted (along with fees) from the sender account.",
|
||||
"There is an existing reference count on the sender account. As such the account cannot be reaped from the state.": "There is an existing reference count on the sender account. As such the account cannot be reaped from the state.",
|
||||
"These are trusted individuals that can verify and approve any recovery actions. With recovery, once the threshold is reached, the funds associated with the account can be moved to a new destination.": "These are trusted individuals that can verify and approve any recovery actions. With recovery, once the threshold is reached, the funds associated with the account can be moved to a new destination.",
|
||||
"This account has a governance delegation": "This account has a governance delegation",
|
||||
"This account has a proxy set": "This account has a proxy set",
|
||||
@ -192,19 +162,15 @@
|
||||
"This is a development account derived from the known development seed. Do not use for any funds on a non-development network.": "This is a development account derived from the known development seed. Do not use for any funds on a non-development network.",
|
||||
"This is an invalid derivation path.": "This is an invalid derivation path.",
|
||||
"This will apply to any future use of this account as stored on this browser. Ensure that you securely store this new password and that it is strong and unique to the account.": "This will apply to any future use of this account as stored on this browser. Ensure that you securely store this new password and that it is strong and unique to the account.",
|
||||
"Transfer the full account balance, reap the sender": "Transfer the full account balance, reap the sender",
|
||||
"Transfer with account keep-alive checks": "Transfer with account keep-alive checks",
|
||||
"Undelegate": "Undelegate",
|
||||
"Unlock": "Unlock",
|
||||
"Unlock vested amount": "Unlock vested amount",
|
||||
"Upload JSON file with signatories": "Upload JSON file with signatories",
|
||||
"Use custom address index": "Use custom address index",
|
||||
"Use custom derivation path": "Use custom derivation path",
|
||||
"Validator": "Validator",
|
||||
"Vanity generator": "Vanity generator",
|
||||
"View pending approvals": "View pending approvals",
|
||||
"We will provide you with a generated backup file after your account is created. As long as you have access to your account you can always download this file later by clicking on \"Backup\" button from the Accounts section.": "We will provide you with a generated backup file after your account is created. As long as you have access to your account you can always download this file later by clicking on \"Backup\" button from the Accounts section.",
|
||||
"With the keep-alive option set, the account is protected against removal due to low balances.": "With the keep-alive option set, the account is protected against removal due to low balances.",
|
||||
"You don't have any accounts. Some features are currently hidden and will only become available once you have accounts.": "You don't have any accounts. Some features are currently hidden and will only become available once you have accounts.",
|
||||
"You have 1 extension that needs to be updated with the latest chain properties in order to display the correct information for the chain you are connected to.": "You have 1 extension that needs to be updated with the latest chain properties in order to display the correct information for the chain you are connected to.",
|
||||
"You have {{claimCount}} accounts that need attestations. Use the Claim Tokens app on the navigation bar to complete the process. Until you do, your balances for those accounts will not be reflected.": "You have {{claimCount}} accounts that need attestations. Use the Claim Tokens app on the navigation bar to complete the process. Until you do, your balances for those accounts will not be reflected.",
|
||||
@ -227,7 +193,6 @@
|
||||
"address index": "address index",
|
||||
"address {{index}}": "address {{index}}",
|
||||
"all locally stored accounts": "all locally stored accounts",
|
||||
"amount": "amount",
|
||||
"approval type": "approval type",
|
||||
"available signatories": "available signatories",
|
||||
"available social recovery helpers": "available social recovery helpers",
|
||||
@ -255,18 +220,12 @@
|
||||
"display name": "display name",
|
||||
"email": "email",
|
||||
"ethereum private key": "ethereum private key",
|
||||
"existential deposit": "existential deposit",
|
||||
"extension": "extension",
|
||||
"filter by name or tags": "filter by name or tags",
|
||||
"found signatories": "found signatories",
|
||||
"hardware": "hardware",
|
||||
"https://example.com": "https://example.com",
|
||||
"identity": "identity",
|
||||
"identity hash": "identity hash",
|
||||
"include field": "include field",
|
||||
"index": "index",
|
||||
"invalid/unknown registrar account": "invalid/unknown registrar account",
|
||||
"judgement": "judgement",
|
||||
"keypair crypto type": "keypair crypto type",
|
||||
"keypair type": "keypair type",
|
||||
"legal name": "legal name",
|
||||
@ -279,7 +238,6 @@
|
||||
"new account": "new account",
|
||||
"on-chain multisig accounts": "on-chain multisig accounts",
|
||||
"on-chain proxied accounts": "on-chain proxied accounts",
|
||||
"parent": "parent",
|
||||
"partial seed": "partial seed",
|
||||
"password": "password",
|
||||
"password (repeat)": "password (repeat)",
|
||||
@ -294,24 +252,17 @@
|
||||
"recovery block delay": "recovery block delay",
|
||||
"recovery threshold": "recovery threshold",
|
||||
"redeemable": "redeemable",
|
||||
"registrar account": "registrar account",
|
||||
"registrar index": "registrar index",
|
||||
"reserved balance": "reserved balance",
|
||||
"riot": "riot",
|
||||
"riot name": "riot name",
|
||||
"secret": "secret",
|
||||
"secret derivation path": "secret derivation path",
|
||||
"seed (hex or string)": "seed (hex or string)",
|
||||
"selected signatories": "selected signatories",
|
||||
"send": "send",
|
||||
"send from account": "send from account",
|
||||
"send to address": "send to address",
|
||||
"signatories": "signatories",
|
||||
"signatory": "signatory",
|
||||
"somebody@example.com": "somebody@example.com",
|
||||
"sort by": "sort by",
|
||||
"sub name": "sub name",
|
||||
"subs": "subs",
|
||||
"the account to make recoverable": "the account to make recoverable",
|
||||
"the account to recover to": "the account to recover to",
|
||||
"threshold": "threshold",
|
||||
@ -319,15 +270,12 @@
|
||||
"total deposit": "total deposit",
|
||||
"total locked": "total locked",
|
||||
"total transferrable": "total transferrable",
|
||||
"transferrable": "transferrable",
|
||||
"transferrable minus fees": "transferrable minus fees",
|
||||
"trusted social recovery helpers": "trusted social recovery helpers",
|
||||
"twitter": "twitter",
|
||||
"unbonding": "unbonding",
|
||||
"upload signatories list": "upload signatories list",
|
||||
"via qr": "via qr",
|
||||
"web": "web",
|
||||
"website": "website",
|
||||
"your current password": "your current password",
|
||||
"your new password": "your new password"
|
||||
}
|
||||
@ -23,13 +23,11 @@
|
||||
"annoucements": "annoucements",
|
||||
"code": "code",
|
||||
"codec": "codec",
|
||||
"deposit": "deposit",
|
||||
"kicking": "kicking",
|
||||
"members": "members",
|
||||
"no": "no",
|
||||
"prime voter": "prime voter",
|
||||
"retirting": "retirting",
|
||||
"role": "role",
|
||||
"rule": "rule",
|
||||
"version": "version",
|
||||
"voter": "voter",
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
"Save": "Save",
|
||||
"The code is not recognized as being in valid WASM format": "The code is not recognized as being in valid WASM format",
|
||||
"The codeHash is not a valid hex hash": "The codeHash is not a valid hex hash",
|
||||
"The maximum amount of gas to use for this contract call. If the call requires more, it will fail.": "The maximum amount of gas to use for this contract call. If the call requires more, it will fail.",
|
||||
"The value is not in a valid address format": "The value is not in a valid address format",
|
||||
"This operation does not impact the associated on-chain code or any of its contracts.": "This operation does not impact the associated on-chain code or any of its contracts.",
|
||||
"This operation does not remove the uploaded code WASM and ABI from the chain, nor any deployed contracts. The forget operation only limits your access to the code on this browser.": "This operation does not remove the uploaded code WASM and ABI from the chain, nor any deployed contracts. The forget operation only limits your access to the code on this browser.",
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
"Cancel slashes": "Cancel slashes",
|
||||
"Close": "Close",
|
||||
"Close proposal": "Close proposal",
|
||||
"Current prime member, default voting": "Current prime member, default voting",
|
||||
"In calculating the election outcome, this prioritized vote ordering will be used to determine the final score for the candidates.": "In calculating the election outcome, this prioritized vote ordering will be used to determine the final score for the candidates.",
|
||||
"Motions": "Motions",
|
||||
"Nay {{count}}": "Nay {{count}}",
|
||||
@ -44,7 +43,6 @@
|
||||
"Vote for current candidates": "Vote for current candidates",
|
||||
"Vote on proposal": "Vote on proposal",
|
||||
"You are voting with this collective's prime account. The vote will be the default outcome in case of any abstentions.": "You are voting with this collective's prime account. The vote will be the default outcome in case of any abstentions.",
|
||||
"backing": "backing",
|
||||
"candidacy bond": "candidacy bond",
|
||||
"candidate account": "candidate account",
|
||||
"candidates": "candidates",
|
||||
@ -58,7 +56,6 @@
|
||||
"preimage hash": "preimage hash",
|
||||
"preimage length": "preimage length",
|
||||
"prime": "prime",
|
||||
"prime voter": "prime voter",
|
||||
"proposal": "proposal",
|
||||
"propose from account": "propose from account",
|
||||
"runners up": "runners up",
|
||||
|
||||
@ -21,8 +21,6 @@
|
||||
"Submit an Aye vote alongside the proposal as part of a batch": "Submit an Aye vote alongside the proposal as part of a batch",
|
||||
"Submit preimage": "Submit preimage",
|
||||
"Submit proposal": "Submit proposal",
|
||||
"The amount this total can be reduced by to change the referendum outcome. This assumes changes to the convictions of the existing votes, with no additional turnout.": "The amount this total can be reduced by to change the referendum outcome. This assumes changes to the convictions of the existing votes, with no additional turnout.",
|
||||
"The amount this total should be increased by to change the referendum outcome. This assumes additional turnout with new votes at 1x conviction.": "The amount this total should be increased by to change the referendum outcome. This assumes additional turnout with new votes at 1x conviction.",
|
||||
"The associated deposit for this proposal should be more then the minimum on-chain deposit required. It will be locked until the proposal passes.": "The associated deposit for this proposal should be more then the minimum on-chain deposit required. It will be locked until the proposal passes.",
|
||||
"The balance associated with the vote will be locked as per the conviction specified and will not be available for transfer during this period.": "The balance associated with the vote will be locked as per the conviction specified and will not be available for transfer during this period.",
|
||||
"The calculated storage costs based on the size and the per-bytes fee.": "The calculated storage costs based on the size and the per-bytes fee.",
|
||||
@ -62,7 +60,6 @@
|
||||
"referenda": "referenda",
|
||||
"remaining": "remaining",
|
||||
"send from account": "send from account",
|
||||
"support": "support",
|
||||
"threshold": "threshold",
|
||||
"total": "total",
|
||||
"transferrable": "transferrable",
|
||||
|
||||
@ -78,7 +78,6 @@
|
||||
"total peers": "total peers",
|
||||
"total req": "total req",
|
||||
"total sub": "total sub",
|
||||
"transfer": "transfer",
|
||||
"transfers": "transfers",
|
||||
"weight": "weight",
|
||||
"yes": "yes"
|
||||
|
||||
@ -101,7 +101,6 @@
|
||||
"total": "total",
|
||||
"total issuance": "total issuance",
|
||||
"track origin": "track origin",
|
||||
"track overview": "track overview",
|
||||
"transferrable": "transferrable",
|
||||
"vote": "vote",
|
||||
"votes": "votes",
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
"Save": "Save",
|
||||
"Save & Reload": "Save & Reload",
|
||||
"Share": "Share",
|
||||
"This is not a valid JSON object.": "This is not a valid JSON object.",
|
||||
"Translate": "Translate",
|
||||
"UI options": "UI options",
|
||||
"Unit": "Unit",
|
||||
|
||||
@ -4,9 +4,7 @@
|
||||
"Accounts": "Accounts",
|
||||
"Active": "Active",
|
||||
"Active nominations ({{count}})": "Active nominations ({{count}})",
|
||||
"Add pool": "Add pool",
|
||||
"All bags": "All bags",
|
||||
"All pools": "All pools",
|
||||
"All rewards will go towards the selected output destination when a payout is made.": "All rewards will go towards the selected output destination when a payout is made.",
|
||||
"All stashes": "All stashes",
|
||||
"All the listed validators and all their nominators will receive their rewards.": "All the listed validators and all their nominators will receive their rewards.",
|
||||
@ -33,8 +31,6 @@
|
||||
"Change validator preferences": "Change validator preferences",
|
||||
"Chilled": "Chilled",
|
||||
"Controller account": "Controller account",
|
||||
"Create": "Create",
|
||||
"Create nomination pool": "Create nomination pool",
|
||||
"Distinct stash and controller accounts are recommended to ensure fund security. You will be allowed to make the transaction, but take care to not tie up all funds, only use a portion of the available funds during this period.": "Distinct stash and controller accounts are recommended to ensure fund security. You will be allowed to make the transaction, but take care to not tie up all funds, only use a portion of the available funds during this period.",
|
||||
"Era points": "Era points",
|
||||
"For fund security, your session key should not match your stash key.": "For fund security, your session key should not match your stash key.",
|
||||
@ -46,11 +42,8 @@
|
||||
"Inactive nominations ({{count}})": "Inactive nominations ({{count}})",
|
||||
"Inject Keys": "Inject Keys",
|
||||
"Inject session keys (advanced)": "Inject session keys (advanced)",
|
||||
"Join": "Join",
|
||||
"Join nomination pool": "Join nomination pool",
|
||||
"Keys from rotateKeys": "Keys from rotateKeys",
|
||||
"Max, {{eras}} eras": "Max, {{eras}} eras",
|
||||
"Members ({{count}})": "Members ({{count}})",
|
||||
"Most profitable": "Most profitable",
|
||||
"Move up {{jumpCount}}": "Move up {{jumpCount}}",
|
||||
"My bags": "My bags",
|
||||
@ -58,10 +51,7 @@
|
||||
"No active validators found": "No active validators found",
|
||||
"No active validators to check": "No active validators to check",
|
||||
"No available bags": "No available bags",
|
||||
"No available nomination pools": "No available nomination pools",
|
||||
"No funds staked yet. Bond funds to validate or nominate a validator": "No funds staked yet. Bond funds to validate or nominate a validator",
|
||||
"No members": "No members",
|
||||
"No nominees": "No nominees",
|
||||
"No pending payouts for your stashes": "No pending payouts for your stashes",
|
||||
"No pending payouts for your validators": "No pending payouts for your validators",
|
||||
"No waiting validators found": "No waiting validators found",
|
||||
@ -76,7 +66,6 @@
|
||||
"Nominators": "Nominators",
|
||||
"Nominators ({{count}})": "Nominators ({{count}})",
|
||||
"Nominators can be selected manually from the list of all currently available validators.": "Nominators can be selected manually from the list of all currently available validators.",
|
||||
"Nominees ({{count}})": "Nominees ({{count}})",
|
||||
"Not participating in any pools. Join a pool first.": "Not participating in any pools. Join a pool first.",
|
||||
"Once bonded, it will need to be unlocked/withdrawn and will be locked for at least the bonding duration.": "Once bonded, it will need to be unlocked/withdrawn and will be locked for at least the bonding duration.",
|
||||
"Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.": "Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.",
|
||||
@ -86,7 +75,6 @@
|
||||
"Oversubscribed": "Oversubscribed",
|
||||
"Oversubscribed nominations ({{count}})": "Oversubscribed nominations ({{count}})",
|
||||
"Overview": "Overview",
|
||||
"Own pools": "Own pools",
|
||||
"Own stashes": "Own stashes",
|
||||
"Own validators": "Own validators",
|
||||
"Para validator": "Para validator",
|
||||
@ -113,7 +101,6 @@
|
||||
"Retrieving active nominators": "Retrieving active nominators",
|
||||
"Retrieving all available bags, this will take some time": "Retrieving all available bags, this will take some time",
|
||||
"Retrieving info for the selected eras, this will take some time": "Retrieving info for the selected eras, this will take some time",
|
||||
"Retrieving nomination pools": "Retrieving nomination pools",
|
||||
"Retrieving nominators": "Retrieving nominators",
|
||||
"Retrieving online status": "Retrieving online status",
|
||||
"Retrieving validator info": "Retrieving validator info",
|
||||
@ -143,7 +130,6 @@
|
||||
"The Threshold must be a positive number": "The Threshold must be a positive number",
|
||||
"The Threshold must lower than 11": "The Threshold must lower than 11",
|
||||
"The UI puts a limit of 40 payouts at a time, where each payout is a single validator for a single era.": "The UI puts a limit of 40 payouts at a time, where each payout is a single validator for a single era.",
|
||||
"The account that will join the pool.": "The account that will join the pool.",
|
||||
"The account that will submit the rebag transaction.": "The account that will submit the rebag transaction.",
|
||||
"The accounts that will be rebagged as a result of this operation.": "The accounts that will be rebagged as a result of this operation.",
|
||||
"The amount placed at-stake should allow some free funds for future transactions.": "The amount placed at-stake should allow some free funds for future transactions.",
|
||||
@ -159,12 +145,7 @@
|
||||
"The controller does not have sufficient funds available to cover transaction fees. Ensure that a funded controller is used.": "The controller does not have sufficient funds available to cover transaction fees. Ensure that a funded controller is used.",
|
||||
"The funds will only be available for withdrawal after the unbonding period, however will not be part of the staked amount after the next validator election. You can follow the unlock countdown in the UI.": "The funds will only be available for withdrawal after the unbonding period, however will not be part of the staked amount after the next validator election. You can follow the unlock countdown in the UI.",
|
||||
"The hex output from author_rotateKeys, as executed on the validator node. The keys will show as pending until applied at the start of a new session.": "The hex output from author_rotateKeys, as executed on the validator node. The keys will show as pending until applied at the start of a new session.",
|
||||
"The id that will be assigned to this nomination pool.": "The id that will be assigned to this nomination pool.",
|
||||
"The initial value to assign to the pool. It is set to the maximum of the minimum bond and the minium nomination value.": "The initial value to assign to the pool. It is set to the maximum of the minimum bond and the minium nomination value.",
|
||||
"The initial value to assign to the pool. It is set to the minimum value required to join a pool.": "The initial value to assign to the pool. It is set to the minimum value required to join a pool.",
|
||||
"The key type and crypto type to use for this key. Be aware that different keys have different crypto requirements. You should be familiar with the type requirements for the different keys.": "The key type and crypto type to use for this key. Be aware that different keys have different crypto requirements. You should be familiar with the type requirements for the different keys.",
|
||||
"The metadata description to set for this pool": "The metadata description to set for this pool",
|
||||
"The origin account will also be set as the pool admin, nominator and state toggler.": "The origin account will also be set as the pool admin, nominator and state toggler.",
|
||||
"The pool and pool member that is to be affected. The transaction will be sent from the associated pool member account.": "The pool and pool member that is to be affected. The transaction will be sent from the associated pool member account.",
|
||||
"The seed and derivation path will be submitted to the validator node. this is an advanced operation, only to be performed when you are sure of the security and connection risks.": "The seed and derivation path will be submitted to the validator node. this is an advanced operation, only to be performed when you are sure of the security and connection risks.",
|
||||
"The selected controller tied to this stash. Once set, this account will be able to control the actions performed by the stash account.": "The selected controller tied to this stash. Once set, this account will be able to control the actions performed by the stash account.",
|
||||
@ -172,10 +153,6 @@
|
||||
"The selected validators to nominate, either via the \"currently best algorithm\" or via a manual selection.": "The selected validators to nominate, either via the \"currently best algorithm\" or via a manual selection.",
|
||||
"The specified value is large and may not allow enough funds to pay future transaction fees.": "The specified value is large and may not allow enough funds to pay future transaction fees.",
|
||||
"The stash account that is used. This will allow the controller to perform all non-funds related operations on behalf of the account.": "The stash account that is used. This will allow the controller to perform all non-funds related operations on behalf of the account.",
|
||||
"The stash and controller pair as linked. This operation will be performed via the controller.": "The stash and controller pair as linked. This operation will be performed via the controller.",
|
||||
"The stash and controller pair, here the controller will be used to send the transaction.": "The stash and controller pair, here the controller will be used to send the transaction.",
|
||||
"The stash and controller pair. This transaction, managing preferences, will be sent from the controller.": "The stash and controller pair. This transaction, managing preferences, will be sent from the controller.",
|
||||
"The stash and controller pair. This transaction, setting the session keys, will be sent from the controller.": "The stash and controller pair. This transaction, setting the session keys, will be sent from the controller.",
|
||||
"The stash should be treated as a cold wallet.": "The stash should be treated as a cold wallet.",
|
||||
"The stash that is to be affected.": "The stash that is to be affected.",
|
||||
"The stash that is to be affected. The transaction will be sent from the associated controller account.": "The stash that is to be affected. The transaction will be sent from the associated controller account.",
|
||||
@ -209,7 +186,6 @@
|
||||
"active / nominators": "active / nominators",
|
||||
"additional free funds to bond": "additional free funds to bond",
|
||||
"additional funds to bond": "additional funds to bond",
|
||||
"all bonded": "all bonded",
|
||||
"allows new nominations": "allows new nominations",
|
||||
"amount to unbond": "amount to unbond",
|
||||
"apply": "apply",
|
||||
@ -226,12 +202,9 @@
|
||||
"commission": "commission",
|
||||
"controller": "controller",
|
||||
"controller account": "controller account",
|
||||
"create pool from": "create pool from",
|
||||
"creator": "creator",
|
||||
"crypto type to use": "crypto type to use",
|
||||
"currently elected": "currently elected",
|
||||
"defer": "defer",
|
||||
"description": "description",
|
||||
"ed25519, Edwards": "ed25519, Edwards",
|
||||
"elected stake": "elected stake",
|
||||
"era points": "era points",
|
||||
@ -246,17 +219,13 @@
|
||||
"historic results": "historic results",
|
||||
"ideal staked": "ideal staked",
|
||||
"inflation": "inflation",
|
||||
"initial value": "initial value",
|
||||
"intentions": "intentions",
|
||||
"join pool from": "join pool from",
|
||||
"key type to set": "key type to set",
|
||||
"last": "last",
|
||||
"last #": "last #",
|
||||
"last reward": "last reward",
|
||||
"lowest / avg staked": "lowest / avg staked",
|
||||
"max": "max",
|
||||
"max. members": "max. members",
|
||||
"max. members / pool": "max. members / pool",
|
||||
"member account": "member account",
|
||||
"min": "min",
|
||||
"min nominated": "min nominated",
|
||||
@ -265,7 +234,6 @@
|
||||
"next": "next",
|
||||
"nodes": "nodes",
|
||||
"nominated accounts": "nominated accounts",
|
||||
"nominator": "nominator",
|
||||
"nominators": "nominators",
|
||||
"nominators to be removed": "nominators to be removed",
|
||||
"on-chain bonding duration": "on-chain bonding duration",
|
||||
@ -296,20 +264,16 @@
|
||||
"reward commission percentage": "reward commission percentage",
|
||||
"rewards": "rewards",
|
||||
"rewards & slashes": "rewards & slashes",
|
||||
"root": "root",
|
||||
"selected validators": "selected validators",
|
||||
"sr15519, Schnorrkel": "sr15519, Schnorrkel",
|
||||
"staked": "staked",
|
||||
"stash": "stash",
|
||||
"stash account": "stash account",
|
||||
"stashes": "stashes",
|
||||
"state": "state",
|
||||
"suri (seed & derivation)": "suri (seed & derivation)",
|
||||
"the associated controller": "the associated controller",
|
||||
"the payment account": "the payment account",
|
||||
"the stash account to nominate with": "the stash account to nominate with",
|
||||
"to rebag": "to rebag",
|
||||
"toggler": "toggler",
|
||||
"total": "total",
|
||||
"total bags": "total bags",
|
||||
"total nodes": "total nodes",
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
"create pool from": "create pool from",
|
||||
"creator": "creator",
|
||||
"description": "description",
|
||||
"favorites": "favorites",
|
||||
"initial value": "initial value",
|
||||
"join pool from": "join pool from",
|
||||
"max. members": "max. members",
|
||||
|
||||
@ -1,41 +1 @@
|
||||
{
|
||||
"nav.accounts": "Accounts",
|
||||
"nav.addresses": "Address book",
|
||||
"nav.alliance": "Alliance",
|
||||
"nav.assets": "Assets",
|
||||
"nav.bounties": "Bounties",
|
||||
"nav.calendar": "Event calendar",
|
||||
"nav.claims": "Claim Tokens",
|
||||
"nav.collator": "Collators",
|
||||
"nav.contracts": "Contracts",
|
||||
"nav.council": "Council",
|
||||
"nav.democracy": "Democracy",
|
||||
"nav.explorer": "Explorer",
|
||||
"nav.extrinsics": "Extrinsics",
|
||||
"nav.fellowship": "Fellowship",
|
||||
"nav.files": "Files (IPFS)",
|
||||
"nav.gilt": "Gilt",
|
||||
"nav.js": "JavaScript",
|
||||
"nav.membership": "Membership",
|
||||
"nav.nfts": "NFTs",
|
||||
"nav.parachains": "Parachains",
|
||||
"nav.poll": "Token poll",
|
||||
"nav.preimages": "Preimages",
|
||||
"nav.ranked": "Ranked collective",
|
||||
"nav.referenda": "Referenda",
|
||||
"nav.rpc": "RPC calls",
|
||||
"nav.runtime": "Runtime calls",
|
||||
"nav.scheduler": "Scheduler",
|
||||
"nav.settings": "Settings",
|
||||
"nav.signing": "Sign and verify",
|
||||
"nav.society": "Society",
|
||||
"nav.staking": "Staking",
|
||||
"nav.storage": "Chain state",
|
||||
"nav.sudo": "Sudo",
|
||||
"nav.tech-comm": "Tech. comm.",
|
||||
"nav.teleport": "Teleport",
|
||||
"nav.transfer": "Transfer",
|
||||
"nav.treasury": "Treasury",
|
||||
"nav.utilities": "Utilities",
|
||||
"nav.whitelist": "Whitelist"
|
||||
}
|
||||
{}
|
||||
@ -37,7 +37,6 @@
|
||||
"app-utilities.json",
|
||||
"app-whitelist.json",
|
||||
"apps-config.json",
|
||||
"apps-routing.json",
|
||||
"apps.json",
|
||||
"react-components.json",
|
||||
"react-params.json",
|
||||
|
||||
@ -1,32 +1,70 @@
|
||||
{
|
||||
"0.1x voting balance, no lockup period": "0.1x voting balance, no lockup period",
|
||||
"<unknown>": "<unknown>",
|
||||
"Add identity judgment": "Add identity judgment",
|
||||
"Cancel": "Cancel",
|
||||
"Confirm account removal": "Confirm account removal",
|
||||
"Confirm address removal": "Confirm address removal",
|
||||
"Confirm code removal": "Confirm code removal",
|
||||
"Confirm contract removal": "Confirm contract removal",
|
||||
"Copied": "Copied",
|
||||
"Copy": "Copy",
|
||||
"Council": "Council",
|
||||
"Edit": "Edit",
|
||||
"Era is overdue for completion due to current network operating conditions": "Era is overdue for completion due to current network operating conditions",
|
||||
"External": "External",
|
||||
"Flags": "Flags",
|
||||
"Forget": "Forget",
|
||||
"If the recipient account is new, the balance needs to be more than the existential deposit. Likewise if the sending account balance drops below the same value, the account will be removed from the state.": "If the recipient account is new, the balance needs to be more than the existential deposit. Likewise if the sending account balance drops below the same value, the account will be removed from the state.",
|
||||
"Injected": "Injected",
|
||||
"Judge": "Judge",
|
||||
"Make Transfer": "Make Transfer",
|
||||
"Multisig": "Multisig",
|
||||
"No execution details available for this proposal": "No execution details available for this proposal",
|
||||
"No identity associated with account": "No identity associated with account",
|
||||
"No judgements": "No judgements",
|
||||
"Nominator": "Nominator",
|
||||
"Normal transfer without keep-alive checks": "Normal transfer without keep-alive checks",
|
||||
"Positive number": "Positive number",
|
||||
"Prior locked voting": "Prior locked voting",
|
||||
"Provide judgement": "Provide judgement",
|
||||
"Proxied": "Proxied",
|
||||
"Remove": "Remove",
|
||||
"Retrieving data": "Retrieving data",
|
||||
"Save": "Save",
|
||||
"Send": "Send",
|
||||
"Send funds": "Send funds",
|
||||
"Society": "Society",
|
||||
"Submit": "Submit",
|
||||
"Sudo key": "Sudo key",
|
||||
"Tags": "Tags",
|
||||
"Technical committee": "Technical committee",
|
||||
"Test account": "Test account",
|
||||
"The beneficiary will have access to the transferred fees when the transaction is included in a block.": "The beneficiary will have access to the transferred fees when the transaction is included in a block.",
|
||||
"The recipient is associated with a known phishing site on {{url}}": "The recipient is associated with a known phishing site on {{url}}",
|
||||
"The transaction, after application of the transfer fees, will drop the available balance below the existential deposit. As such the transfer will fail. The account needs more free funds to cover the transaction fees.": "The transaction, after application of the transfer fees, will drop the available balance below the existential deposit. As such the transfer will fail. The account needs more free funds to cover the transaction fees.",
|
||||
"The transferred balance will be subtracted (along with fees) from the sender account.": "The transferred balance will be subtracted (along with fees) from the sender account.",
|
||||
"There is an existing reference count on the sender account. As such the account cannot be reaped from the state.": "There is an existing reference count on the sender account. As such the account cannot be reaped from the state.",
|
||||
"This chain does not yet support atomic batch operations. This means that if the transaction gets executed and one of the operations do fail (due to invalid data or lack of available funds) some of the changes made may not be applied.": "This chain does not yet support atomic batch operations. This means that if the transaction gets executed and one of the operations do fail (due to invalid data or lack of available funds) some of the changes made may not be applied.",
|
||||
"This operation does not remove the history of the account from the chain, nor any associated funds from the account. The forget operation only limits your access to the account on this browser.": "This operation does not remove the history of the account from the chain, nor any associated funds from the account. The forget operation only limits your access to the account on this browser.",
|
||||
"This operation does not remove the history of the account from the chain, nor any associated funds from the account. The forget operation only limits your access to the address on this browser.": "This operation does not remove the history of the account from the chain, nor any associated funds from the account. The forget operation only limits your access to the address on this browser.",
|
||||
"This operation does not remove the history of the contract from the chain, nor any associated funds from its account. The forget operation only limits your access to the contract on this browser.": "This operation does not remove the history of the contract from the chain, nor any associated funds from its account. The forget operation only limits your access to the contract on this browser.",
|
||||
"Transfer the full account balance, reap the sender": "Transfer the full account balance, reap the sender",
|
||||
"Transfer with account keep-alive checks": "Transfer with account keep-alive checks",
|
||||
"Unbonding {{value}}": "Unbonding {{value}}",
|
||||
"Uncaught error. Something went wrong with the query and rendering of this component. Please supply all the details below when logging an issue, it may help in tracing the cause.": "Uncaught error. Something went wrong with the query and rendering of this component. Please supply all the details below when logging an issue, it may help in tracing the cause.",
|
||||
"Valid number": "Valid number",
|
||||
"Validator": "Validator",
|
||||
"View this externally": "View this externally",
|
||||
"With the keep-alive option set, the account is protected against removal due to low balances.": "With the keep-alive option set, the account is protected against removal due to low balances.",
|
||||
"Withdraw these unbonded funds": "Withdraw these unbonded funds",
|
||||
"You are about to remove this account from your list of available accounts. Once completed, should you need to access it again, you will have to re-create the account either via seed or via a backup file.": "You are about to remove this account from your list of available accounts. Once completed, should you need to access it again, you will have to re-create the account either via seed or via a backup file.",
|
||||
"You are about to remove this address from your address book. Once completed, should you need to access it again, you will have to re-add the address.": "You are about to remove this address from your address book. Once completed, should you need to access it again, you will have to re-add the address.",
|
||||
"You are about to remove this contract from your list of available contracts. Once completed, should you need to access it again, you will have to manually add the contract's address in the Instantiate tab.": "You are about to remove this contract from your list of available contracts. Once completed, should you need to access it again, you will have to manually add the contract's address in the Instantiate tab.",
|
||||
"address copied": "address copied",
|
||||
"amount": "amount",
|
||||
"available to be unlocked": "available to be unlocked",
|
||||
"balance": "balance",
|
||||
"beneficiary": "beneficiary",
|
||||
"blocks": "blocks",
|
||||
"bond": "bond",
|
||||
@ -36,32 +74,52 @@
|
||||
"commission": "commission",
|
||||
"contract event": "contract event",
|
||||
"democracy": "democracy",
|
||||
"discord": "discord",
|
||||
"email": "email",
|
||||
"everything": "everything",
|
||||
"existential deposit": "existential deposit",
|
||||
"external links": "external links",
|
||||
"extrinsic hash": "extrinsic hash",
|
||||
"filter by name, address, or account index": "filter by name, address, or account index",
|
||||
"identity": "identity",
|
||||
"identity hash": "identity hash",
|
||||
"index": "index",
|
||||
"invalid/unknown registrar account": "invalid/unknown registrar account",
|
||||
"judgement": "judgement",
|
||||
"lifetime": "lifetime",
|
||||
"link": "link",
|
||||
"lock expired": "lock expired",
|
||||
"locked": "locked",
|
||||
"multisig": "multisig",
|
||||
"none": "none",
|
||||
"of {{locked}} vested": "of {{locked}} vested",
|
||||
"ongoing referendum": "ongoing referendum",
|
||||
"only this network": "only this network",
|
||||
"parent": "parent",
|
||||
"per block": "per block",
|
||||
"preimage": "preimage",
|
||||
"proposed by": "proposed by",
|
||||
"redeemable": "redeemable",
|
||||
"referenda": "referenda",
|
||||
"registrar account": "registrar account",
|
||||
"registrar index": "registrar index",
|
||||
"reserved": "reserved",
|
||||
"riot": "riot",
|
||||
"send from account": "send from account",
|
||||
"send to address": "send to address",
|
||||
"session keys": "session keys",
|
||||
"session next": "session next",
|
||||
"signatories": "signatories",
|
||||
"signature {{type}}": "signature {{type}}",
|
||||
"strong": "strong",
|
||||
"subs": "subs",
|
||||
"threshold": "threshold",
|
||||
"tip": "tip",
|
||||
"total": "total",
|
||||
"transactions": "transactions",
|
||||
"transferrable": "transferrable",
|
||||
"transferrable minus fees": "transferrable minus fees",
|
||||
"twitter": "twitter",
|
||||
"type": "type",
|
||||
"unbonding": "unbonding",
|
||||
"unstake threshold": "unstake threshold",
|
||||
@ -77,6 +135,7 @@
|
||||
"vote with account": "vote with account",
|
||||
"voting balance": "voting balance",
|
||||
"weak": "weak",
|
||||
"website": "website",
|
||||
"{{blocks}} blocks": "{{blocks}} blocks",
|
||||
"{{eras}} eras remaining": "{{eras}} eras remaining",
|
||||
"{{name}} ({{size}} bytes)": "{{name}} ({{size}} bytes)",
|
||||
|
||||
@ -1,387 +1,28 @@
|
||||
{
|
||||
"@YourTwitterName": "",
|
||||
"@yourname:matrix.org": "",
|
||||
"A controller account should not be set to manage multiple stashes. The selected controller is already controlling {{stashId}}": "",
|
||||
"A controller account should not map to another stash. This selected controller is a stash, controlled by {{bondedId}}": "",
|
||||
"Account type {{index}}": "",
|
||||
"Accounts": "",
|
||||
"Active": "",
|
||||
"Add an existing code hash": "",
|
||||
"Add an existing contract": "",
|
||||
"Add proxy": "",
|
||||
"Address index {{index}}": "",
|
||||
"All bags": "",
|
||||
"All pools": "",
|
||||
"All stashes": "",
|
||||
"All validators": "",
|
||||
"All voters may alter their votes any number of times prior to the close of the poll.": "",
|
||||
"Allow local in-browser account storage": "",
|
||||
"Any combination of the four options may be approved of by the voter. There is no need to select only one option!": "",
|
||||
"Approving of all or none of the options is equivalent and will not affect the outcome of the poll.": "",
|
||||
"Authorize transaction": "",
|
||||
"Aye": "",
|
||||
"Aye: {{count}}": "",
|
||||
"Backup": "",
|
||||
"Berlin": "",
|
||||
"Blocks nominations": "",
|
||||
"Bond": "",
|
||||
"Bounty approval under voting": "",
|
||||
"Bounty rejection under voting": "",
|
||||
"Cancel": "",
|
||||
"Cancel all": "",
|
||||
"Cancel selected": "",
|
||||
"Candidate": "",
|
||||
"Change democracy delegation": "",
|
||||
"Change this account's password": "",
|
||||
"Chilled": "",
|
||||
"Claim": "",
|
||||
"Clear expired democracy locks": "",
|
||||
"Clear expired referenda locks": "",
|
||||
"Close": "",
|
||||
"Confirmation period": "",
|
||||
"Contracts": "",
|
||||
"Controller account": "",
|
||||
"Create a backup file for this account": "",
|
||||
"Crust Network": "",
|
||||
"Curator proposal under voting": "",
|
||||
"Curator slash under voting": "",
|
||||
"Curator's deposit": "",
|
||||
"Curator's deposit will be slashed and curator will be unassigned. Bounty will return to the Funded state.": "",
|
||||
"Curator's fee": "",
|
||||
"DCF": "",
|
||||
"Dark theme": "",
|
||||
"Defender": "",
|
||||
"Delegate": "",
|
||||
"Delegate democracy votes": "",
|
||||
"Deploy": "",
|
||||
"Deploy a contract": "",
|
||||
"Derive": "",
|
||||
"Derive account via derivation path": "",
|
||||
"Developer": "",
|
||||
"Distinct stash and controller accounts are recommended to ensure fund security. You will be allowed to make the transaction, but take care to not tie up all funds, only use a portion of the available funds during this period.": "",
|
||||
"Do not allow local in-browser account storage": "",
|
||||
"Enactment period": "",
|
||||
"Era points": "",
|
||||
"Evaluated {{count}} keys in {{elapsed}}s ({{avg}} keys/s)": "",
|
||||
"Execute": "",
|
||||
"Export": "",
|
||||
"Extensions": "",
|
||||
"File": "",
|
||||
"Files": "",
|
||||
"Folder": "",
|
||||
"For approvals outstanding approvers will be shown, for hashes that should be cancelled the first approver is required.": "",
|
||||
"Forget this account": "",
|
||||
"Frozen": "",
|
||||
"Full Legal Name": "",
|
||||
"Governance": "",
|
||||
"Identity": "",
|
||||
"If the motion is approved, Curator's deposit will be slashed and Curator will be unassigned. Bounty will return to the Funded state.": "",
|
||||
"If the motion is approved, the current Curator will be unassigned and the Bounty will return to the Funded state.": "",
|
||||
"If you have not claimed rewards straight after the end of the era, the validator is in the active set and you are seeing no rewards, this would mean that the reward payout transaction was made by another account on your behalf. Always check your favorite explorer to see any historic payouts made to your accounts.": "",
|
||||
"Import": "",
|
||||
"Import Success": "",
|
||||
"Import files": "",
|
||||
"Importing": "",
|
||||
"Inactive": "",
|
||||
"Initiate recovery for another": "",
|
||||
"Ledger app type (originated from)": "",
|
||||
"Light theme": "",
|
||||
"Locked funds (e.g. for staking) are counted.": "",
|
||||
"Make recoverable": "",
|
||||
"Manage proxies": "",
|
||||
"Multisig": "",
|
||||
"Multisig approvals": "",
|
||||
"My On-Chain Name": "",
|
||||
"My bags": "",
|
||||
"Nay": "",
|
||||
"Nay: {{count}}": "",
|
||||
"Network": "",
|
||||
"Never execute JS snippets from untrusted sources.": "",
|
||||
"Next session": "",
|
||||
"No change": "",
|
||||
"No change from the original 2017 sale definitions; will mean a total of 10 million DOT from genesis.": "",
|
||||
"No discretionary lock-voting is in place; all DOT used to vote counts the same.": "",
|
||||
"No sub identities set.": "",
|
||||
"No, block all nominations": "",
|
||||
"Nominating": "",
|
||||
"Nominators": "",
|
||||
"None": "",
|
||||
"Note: The file list is cached locally, switching browsers or devices will not keep displaying the original browser information.": "",
|
||||
"Online message": "",
|
||||
"Override any applicable values for the specific signed output. These will be used to construct and display the signed transaction.": "",
|
||||
"Oversubscribed": "",
|
||||
"Own pools": "",
|
||||
"Own stashes": "",
|
||||
"Own validators": "",
|
||||
"Para validator": "",
|
||||
"Payouts of rewards for a validator can be initiated by any account. This means that as soon as a validator or nominator requests a payout for an era, all the nominators for that validator will be rewarded. Each user does not need to claim individually and the suggestion is that validators should claim rewards for everybody as soon as an era ends.": "",
|
||||
"Please do not upload more than 2000 files": "",
|
||||
"Please read these terms and conditions carefully. By submitting this statement, you are deemed to have accepted these Terms and Conditions. If you do not agree to these terms, please refrain from accessing or proceeding. You can also find them at:": "",
|
||||
"Please select non-empty folder": "",
|
||||
"Preparing target display": "",
|
||||
"Prior locked voting": "",
|
||||
"Produced blocks": "",
|
||||
"Proposer": "",
|
||||
"Recovery": "",
|
||||
"Retrieving data": "",
|
||||
"Retrieving nominators": "",
|
||||
"Retrieving validators": "",
|
||||
"Save": "",
|
||||
"Seattle": "",
|
||||
"Set on-chain identity": "",
|
||||
"Set on-chain sub-identities": "",
|
||||
"Settings": "",
|
||||
"Show address on hardware device": "",
|
||||
"Singapore": "",
|
||||
"Slash curator": "",
|
||||
"Slash curator (Council)": "",
|
||||
"Slashed": "",
|
||||
"Specified payment account": "",
|
||||
"Split of 1000x": "",
|
||||
"Split of 1000x from the original sale; will mean a total of 10 billion DOT from genesis. Apparent DOT price would be 1000x lower and apparent account balances 1000x higher.": "",
|
||||
"Split of 100x": "",
|
||||
"Split of 100x from the original sale; will mean a total of 1 billion DOT from genesis. Apparent DOT price would be 100x lower and apparent account balances 100x higher.": "",
|
||||
"Split of 10x": "",
|
||||
"Split of 10x from the original sale; will mean a total of 100 million DOT from genesis. Apparent DOT price would be 10x lower and apparent account balances 10x higher.": "",
|
||||
"Stash account (do not increase the amount at stake)": "",
|
||||
"Stash account (increase the amount at stake)": "",
|
||||
"Submit (no signature)": "",
|
||||
"Swap to a non-executing approval type, with subsequent calls providing the actual call data.": "",
|
||||
"The All bags list is composed of bags that each describe a range of active bonded funds of the nominators. In each bag is a list of nodes that correspond to a nominator and their staked funds.": "",
|
||||
"The account that will create the transaction.": "",
|
||||
"The account type that you wish to create. This is the top-level derivation.": "",
|
||||
"The actual fully constructed signed output. This can be used for submission via other channels.": "",
|
||||
"The address index on the account that you wish to add. This is the second-level derivation.": "",
|
||||
"The amount to allocate and the conviction that will be applied to all votes made on a referendum.": "",
|
||||
"The amount will be reserved for the duration of your vote": "",
|
||||
"The bond will be reserved for the duration of your alliance membership.": "",
|
||||
"The bond will be reserved for the duration of your candidacy and membership.": "",
|
||||
"The bonded amount is less than the current active minimum nominated amount of {{minNomination}} and depending on the network state, may not be selected to participate": "",
|
||||
"The bonded amount is less than the minimum bond amount of {{existentialDeposit}}": "",
|
||||
"The bonded amount is less than the minimum threshold of {{minBond}} for nominators": "",
|
||||
"The bonded amount is less than the minimum threshold of {{minBond}} for validators": "",
|
||||
"The call data for this transaction matching the hash. Once sent, the multisig will be executed against this.": "",
|
||||
"The call hash as calculated for this transaction": "",
|
||||
"The call hash from the list of available and unapproved calls.": "",
|
||||
"The codeHash is not a valid hex hash": "",
|
||||
"The controller does not have sufficient funds available to cover transaction fees. Ensure that a funded controller is used.": "",
|
||||
"The council member that will create the motion, submission equates to an \"aye\" vote.": "",
|
||||
"The full call data that can be supplied to a final call to multi approvals": "",
|
||||
"The maximum amount you can delegate is the amount of funds available on the delegating account.": "",
|
||||
"The operation type to apply. For approvals both non-final and final approvals are supported.": "",
|
||||
"The proxy is one of the allowed proxies on the account, as set and filtered by the transaction type.": "",
|
||||
"The sending account that will be used to send this transaction. Any applicable fees will be paid by this account.": "",
|
||||
"The signatory is one of the allowed accounts on the multisig, making a recorded approval for the transaction.": "",
|
||||
"The specified value is large and may not allow enough funds to pay future transaction fees.": "",
|
||||
"This action will Slash the Curator.": "",
|
||||
"This action will create a Council motion to slash the Curator.": "",
|
||||
"This action will create a Council motion to unassign the Curator.": "",
|
||||
"This could either be an approval for the hash or with full call details. The call as last approval triggers execution.": "",
|
||||
"This is a developer tool that allows you to execute selected snippets in a limited context.": "",
|
||||
"This is not a valid JSON object.": "",
|
||||
"This vote does not affect any economics of the Polkadot platform. Staking rewards, inflation, effective market capitalisation and the underlying balances of every account remain completely unchanged. It is \"merely\" about what units we use to denominate the balances into \"DOT\" for the purpose of display.": "",
|
||||
"Unable to find on-chain WASM code for the supplied codeHash": "",
|
||||
"Unassign curator": "",
|
||||
"Unassign curator under voting": "",
|
||||
"Undelegate": "",
|
||||
"Unknown": "",
|
||||
"Unless you are a developer with insight into what the specific script does to your environment (based on reading the code being executed) generally the advice would be to not use this environment.": "",
|
||||
"Unlock the sending account to allow signing of this transaction.": "",
|
||||
"Unlock vested amount": "",
|
||||
"Upload": "",
|
||||
"Upload & deploy code": "",
|
||||
"Upload & deploy code {{info}}": "",
|
||||
"Validators": "",
|
||||
"View status in Crust": "",
|
||||
"Vote": "",
|
||||
"Voting": "",
|
||||
"Voting costs nothing other than the transaction fee and can be done from all accounts with a non-zero spendable balance.": "",
|
||||
"Voting is made on a per-account basis; a single account must all vote the same way and cannot split its vote.": "",
|
||||
"Waiting": "",
|
||||
"Warning: we did not find any attest statement for {{chain}}": "",
|
||||
"With the keep-alive option set, the account is protected against removal due to low balances.": "",
|
||||
"Within the context of a single bag, nodes are not sorted by their stake, but instead placed in insertion order. In other words, the most recently inserted node will be the last node in the bag, regardless of stake. Events like staking rewards or slashes do not automatically put you in a different bag. The bags-list pallet comes with an important permissionless extrinsic: rebag. This allows anyone to specify another account that is in the wrong bag, and place it in the correct one.": "",
|
||||
"Yes, allow nominations": "",
|
||||
"You need to sign an attestation for the following account:": "",
|
||||
"You need to sign an attestation for the following accounts:": "",
|
||||
"YourDiscordHandle": "",
|
||||
"account": "",
|
||||
"account type": "",
|
||||
"accounts": "",
|
||||
"action": "",
|
||||
"activate": "",
|
||||
"address copied": "",
|
||||
"address index": "",
|
||||
"admin": "",
|
||||
"apply": "",
|
||||
"assets": "",
|
||||
"available to be unlocked": "",
|
||||
"aye": "",
|
||||
"backed": "",
|
||||
"backing": "",
|
||||
"bags": "",
|
||||
"balance": "",
|
||||
"best #": "",
|
||||
"best hash": "",
|
||||
"bid kind": "",
|
||||
"bidder": "",
|
||||
"bids": "",
|
||||
"blocks": "",
|
||||
"bonded": "",
|
||||
"bounties": "",
|
||||
"call data for final approval": "",
|
||||
"calls": "",
|
||||
"candidates": "",
|
||||
"chain": "",
|
||||
"chain specifications": "",
|
||||
"claimable": "",
|
||||
"clipboard": "",
|
||||
"code hash": "",
|
||||
"code hashes": "",
|
||||
"collections": "",
|
||||
"comm.": "",
|
||||
"commission": "",
|
||||
"completed": "",
|
||||
"connected peers": "",
|
||||
"contacts": "",
|
||||
"contracts": "",
|
||||
"controller": "",
|
||||
"count": "",
|
||||
"creator": "",
|
||||
"crowdloan": "",
|
||||
"curator": "",
|
||||
"defender": "",
|
||||
"denomination vote": "",
|
||||
"deploy": "",
|
||||
"deployment account": "",
|
||||
"deployment constructor": "",
|
||||
"design samples": "",
|
||||
"development": "",
|
||||
"dispatch queue": "",
|
||||
"elapsed": "",
|
||||
"enact": "",
|
||||
"ending": "",
|
||||
"era {{era}}/unapplied": "",
|
||||
"eras": "",
|
||||
"events": "",
|
||||
"extension": "",
|
||||
"external": "",
|
||||
"external links": "",
|
||||
"extrinsics": "",
|
||||
"file cid": "",
|
||||
"file content error": "",
|
||||
"file error": "",
|
||||
"file size": "",
|
||||
"files": "",
|
||||
"finder": "",
|
||||
"first": "",
|
||||
"freezer": "",
|
||||
"frozen": "",
|
||||
"hardware": "",
|
||||
"hash": "",
|
||||
"head": "",
|
||||
"https://example.com": "",
|
||||
"id": "",
|
||||
"in/out": "",
|
||||
"included": "",
|
||||
"initial state": "",
|
||||
"intentions": "",
|
||||
"issuer": "",
|
||||
"items": "",
|
||||
"justifications": "",
|
||||
"last": "",
|
||||
"last #": "",
|
||||
"leases": "",
|
||||
"length": "",
|
||||
"lifecycle": "",
|
||||
"lock expired": "",
|
||||
"locked": "",
|
||||
"logs": "",
|
||||
"matches": "",
|
||||
"max": "",
|
||||
"members": "",
|
||||
"min": "",
|
||||
"motions": "",
|
||||
"multisig": "",
|
||||
"multisig signatory": "",
|
||||
"nay": "",
|
||||
"next action": "",
|
||||
"no": "",
|
||||
"no name": "",
|
||||
"nodes": "",
|
||||
"nominator": "",
|
||||
"nominators": "",
|
||||
"of {{locked}} vested": "",
|
||||
"ongoing": "",
|
||||
"ongoing referendum": "",
|
||||
"other": "",
|
||||
"other stake": "",
|
||||
"overall/validator": "",
|
||||
"own": "",
|
||||
"owner": "",
|
||||
"parachains": "",
|
||||
"parathreads": "",
|
||||
"parent": "",
|
||||
"participants": "",
|
||||
"payout": "",
|
||||
"payout/stash": "",
|
||||
"payout/validator": "",
|
||||
"per block": "",
|
||||
"period": "",
|
||||
"points": "",
|
||||
"pools": "",
|
||||
"preimages": "",
|
||||
"proposals": "",
|
||||
"proposer": "",
|
||||
"proxied": "",
|
||||
"proxy account": "",
|
||||
"queues": "",
|
||||
"raised": "",
|
||||
"reason": "",
|
||||
"recent blocks": "",
|
||||
"recently": "",
|
||||
"referenda": "",
|
||||
"remaining": "",
|
||||
"reporters": "",
|
||||
"rewards": "",
|
||||
"root": "",
|
||||
"runners up": "",
|
||||
"scheduled": "",
|
||||
"secret": "",
|
||||
"sending from my account": "",
|
||||
"somebody@example.com": "",
|
||||
"stash": "",
|
||||
"stashes": "",
|
||||
"state": "",
|
||||
"status": "",
|
||||
"strikes": "",
|
||||
"sufficient": "",
|
||||
"supply": "",
|
||||
"the payment account": "",
|
||||
"threshold": "",
|
||||
"timeout": "",
|
||||
"tip": "",
|
||||
"tips": "",
|
||||
"toggler": "",
|
||||
"total": "",
|
||||
"turnout": "",
|
||||
"unapplied": "",
|
||||
"until block": "",
|
||||
"validator {{index}}": "",
|
||||
"validators": "",
|
||||
"value": "",
|
||||
"via qr": "",
|
||||
"vote using my account": "",
|
||||
"voted on": "",
|
||||
"votes": "",
|
||||
"voting end": "",
|
||||
"weight": "",
|
||||
"yes": "",
|
||||
"yesterday": "",
|
||||
"{{balance}} voted": "",
|
||||
"{{count}} key/value pairs encoded for submission": "",
|
||||
"{{days}} days": "",
|
||||
"{{percentage}}% turnout": "",
|
||||
"{{when}} (est.)": "",
|
||||
"⚡️ Thunder Gateway": ""
|
||||
"until block": ""
|
||||
}
|
||||
@ -5,8 +5,7 @@ import type { BareProps as Props } from '@polkadot/react-components/types';
|
||||
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
import AccountSidebar from '@polkadot/app-accounts/Sidebar';
|
||||
import { styled } from '@polkadot/react-components/styled';
|
||||
import { AccountSidebar, styled } from '@polkadot/react-components';
|
||||
import GlobalStyle from '@polkadot/react-components/styles';
|
||||
import { useApi, useTheme } from '@polkadot/react-hooks';
|
||||
import Signer from '@polkadot/react-signer';
|
||||
|
||||
@ -7,8 +7,9 @@ import React, { Suspense, useMemo } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import createRoutes from '@polkadot/apps-routing';
|
||||
import { ErrorBoundary, Spinner, styled, TabsCtx } from '@polkadot/react-components';
|
||||
import { ErrorBoundary, Spinner, styled } from '@polkadot/react-components';
|
||||
import { useApi, useQueue } from '@polkadot/react-hooks';
|
||||
import { TabsCtx } from '@polkadot/react-hooks/ctx/Tabs';
|
||||
|
||||
import { findMissingApis } from '../endpoint.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/apps authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
|
||||
import type { ThemeDef } from '@polkadot/react-components/types';
|
||||
import type { KeyringStore } from '@polkadot/ui-keyring/types';
|
||||
|
||||
import React, { Suspense, useEffect, useState } from 'react';
|
||||
@ -9,11 +9,11 @@ import { HashRouter } from 'react-router-dom';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
|
||||
import { ApiCtxRoot } from '@polkadot/react-api';
|
||||
import { darkTheme, lightTheme } from '@polkadot/react-components';
|
||||
import { ApiStatsCtxRoot, BlockAuthorsCtxRoot, BlockEventsCtxRoot, KeyringCtxRoot, QueueCtxRoot, WindowSizeCtxRoot } from '@polkadot/react-hooks';
|
||||
import { settings } from '@polkadot/ui-settings';
|
||||
|
||||
import Apps from './Apps.js';
|
||||
import { darkTheme, lightTheme } from './themes.js';
|
||||
|
||||
interface Props {
|
||||
isElectron: boolean;
|
||||
|
||||
@ -14,7 +14,7 @@ import type { AccountBalance, Delegation } from '../types.js';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
|
||||
import useAccountLocks from '@polkadot/app-referenda/useAccountLocks';
|
||||
import { AddressInfo, AddressSmall, Badge, Button, ChainLock, Columar, CryptoType, Forget, LinkExternal, Menu, Popup, styled, Table, Tags } from '@polkadot/react-components';
|
||||
import { AddressInfo, AddressSmall, Badge, Button, ChainLock, Columar, CryptoType, Forget, LinkExternal, Menu, Popup, styled, Table, Tags, TransferModal } from '@polkadot/react-components';
|
||||
import { useAccountInfo, useApi, useBalancesAll, useBestNumber, useCall, useLedger, useQueue, useStakingInfo, useToggle } from '@polkadot/react-hooks';
|
||||
import { keyring } from '@polkadot/ui-keyring';
|
||||
import { BN, BN_ZERO, formatBalance, formatNumber, isFunction } from '@polkadot/util';
|
||||
@ -29,7 +29,6 @@ import MultisigApprove from '../modals/MultisigApprove.js';
|
||||
import ProxyOverview from '../modals/ProxyOverview.js';
|
||||
import RecoverAccount from '../modals/RecoverAccount.js';
|
||||
import RecoverSetup from '../modals/RecoverSetup.js';
|
||||
import Transfer from '../modals/Transfer.js';
|
||||
import UndelegateModal from '../modals/Undelegate.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
import { createMenuGroup } from '../util.js';
|
||||
@ -530,7 +529,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt
|
||||
/>
|
||||
)}
|
||||
{isTransferOpen && (
|
||||
<Transfer
|
||||
<TransferModal
|
||||
key='modal-transfer'
|
||||
onClose={toggleTransfer}
|
||||
senderId={address}
|
||||
|
||||
@ -11,8 +11,8 @@ import { MemoryRouter } from 'react-router-dom';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
|
||||
import AccountsApp from '@polkadot/app-accounts';
|
||||
import { lightTheme } from '@polkadot/apps/themes';
|
||||
import { ApiCtxRoot } from '@polkadot/react-api';
|
||||
import { lightTheme } from '@polkadot/react-components';
|
||||
import { MemoryStore } from '@polkadot/test-support/keyring';
|
||||
import { WaitForApi } from '@polkadot/test-support/react';
|
||||
import { SUBSTRATE_PORT } from '@polkadot/test-support/substrate';
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ActionStatus } from '@polkadot/react-components/Status/types';
|
||||
import type { DisplayedJudgement } from '@polkadot/react-components/types';
|
||||
import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces';
|
||||
import type { CreateResult } from '@polkadot/ui-keyring/types';
|
||||
import type { AccountBalance, SortedAccount } from './types.js';
|
||||
@ -117,9 +116,3 @@ export function sortAccounts (accountsList: SortedAccount[], accountsMap: Record
|
||||
? 1
|
||||
: -1);
|
||||
}
|
||||
|
||||
export function getJudgementColor (name: DisplayedJudgement): 'green' | 'red' {
|
||||
return (name === 'Erroneous' || name === 'Low quality')
|
||||
? 'red'
|
||||
: 'green';
|
||||
}
|
||||
|
||||
@ -6,8 +6,7 @@ import type { KeyringAddress } from '@polkadot/ui-keyring/types';
|
||||
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
import Transfer from '@polkadot/app-accounts/modals/Transfer';
|
||||
import { AddressInfo, AddressSmall, Button, ChainLock, Columar, Forget, LinkExternal, Menu, Popup, Table, Tags } from '@polkadot/react-components';
|
||||
import { AddressInfo, AddressSmall, Button, ChainLock, Columar, Forget, LinkExternal, Menu, Popup, Table, Tags, TransferModal } from '@polkadot/react-components';
|
||||
import { useApi, useBalancesAll, useDeriveAccountInfo, useToggle } from '@polkadot/react-hooks';
|
||||
import { keyring } from '@polkadot/ui-keyring';
|
||||
import { isFunction } from '@polkadot/util';
|
||||
@ -200,7 +199,7 @@ function Address ({ address, className = '', filter, isFavorite, toggleFavorite
|
||||
/>
|
||||
)}
|
||||
{isTransferOpen && (
|
||||
<Transfer
|
||||
<TransferModal
|
||||
key='modal-transfer'
|
||||
onClose={_toggleTransfer}
|
||||
recipientId={address}
|
||||
|
||||
@ -10,8 +10,8 @@ import React, { Suspense } from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
|
||||
import { lightTheme } from '@polkadot/apps/themes';
|
||||
import { ApiCtxRoot } from '@polkadot/react-api';
|
||||
import { lightTheme } from '@polkadot/react-components';
|
||||
import { createApi } from '@polkadot/test-support/api';
|
||||
import { aliceSigner, MemoryStore } from '@polkadot/test-support/keyring';
|
||||
import { WaitForApi } from '@polkadot/test-support/react';
|
||||
|
||||
@ -15,10 +15,10 @@ import React, { Suspense } from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
|
||||
import { lightTheme } from '@polkadot/apps/themes';
|
||||
import { POLKADOT_GENESIS } from '@polkadot/apps-config';
|
||||
import { ApiCtx } from '@polkadot/react-api';
|
||||
import { lightTheme } from '@polkadot/react-components';
|
||||
import { KeyringCtxRoot } from '@polkadot/react-hooks';
|
||||
import { ApiCtx } from '@polkadot/react-hooks/ctx/Api';
|
||||
import { QueueCtx } from '@polkadot/react-hooks/ctx/Queue';
|
||||
import { balanceOf } from '@polkadot/test-support/creation/balance';
|
||||
import { BountyFactory } from '@polkadot/test-support/creation/bounties';
|
||||
|
||||
@ -10,7 +10,7 @@ import CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import { Trans } from 'react-i18next';
|
||||
|
||||
import { Button, Card, Columar, Input, InputAddress, styled, Tabs, Tooltip } from '@polkadot/react-components';
|
||||
import { TokenUnit } from '@polkadot/react-components/InputNumber';
|
||||
import { TokenUnit } from '@polkadot/react-components/InputConsts/units';
|
||||
import { useApi, useCall } from '@polkadot/react-hooks';
|
||||
import { u8aToHex, u8aToString } from '@polkadot/util';
|
||||
import { decodeAddress } from '@polkadot/util-crypto';
|
||||
|
||||
@ -5,7 +5,7 @@ import type { EcdsaSignature, EthereumAddress, StatementKind } from '@polkadot/t
|
||||
|
||||
import secp256k1 from 'secp256k1/elliptic.js';
|
||||
|
||||
import { registry } from '@polkadot/react-api';
|
||||
import { statics } from '@polkadot/react-api';
|
||||
import { assert, hexToU8a, stringToU8a, u8aConcat, u8aToBuffer } from '@polkadot/util';
|
||||
import { keccakAsHex, keccakAsU8a } from '@polkadot/util-crypto';
|
||||
|
||||
@ -95,8 +95,8 @@ export function recoverFromJSON (signatureJson: string | null): RecoveredSignatu
|
||||
|
||||
return {
|
||||
error: null,
|
||||
ethereumAddress: registry.createType('EthereumAddress', recoverAddress(msg, parts)),
|
||||
signature: registry.createType('EcdsaSignature', u8aConcat(parts.signature, new Uint8Array([parts.recovery])))
|
||||
ethereumAddress: statics.registry.createType('EthereumAddress', recoverAddress(msg, parts)),
|
||||
signature: statics.registry.createType('EcdsaSignature', u8aConcat(parts.signature, new Uint8Array([parts.recovery])))
|
||||
};
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
@ -8,7 +8,7 @@ import { EventEmitter } from 'eventemitter3';
|
||||
import store from 'store';
|
||||
|
||||
import { Abi } from '@polkadot/api-contract';
|
||||
import { api } from '@polkadot/react-api';
|
||||
import { statics } from '@polkadot/react-api';
|
||||
import { isString } from '@polkadot/util';
|
||||
|
||||
const KEY_CODE = 'code:';
|
||||
@ -29,13 +29,13 @@ class Store extends EventEmitter {
|
||||
}
|
||||
|
||||
public saveCode (_codeHash: string | Hash, partial: Partial<CodeJson>): void {
|
||||
const codeHash = (isString(_codeHash) ? api.registry.createType('Hash', _codeHash) : _codeHash).toHex();
|
||||
const codeHash = (isString(_codeHash) ? statics.api.registry.createType('Hash', _codeHash) : _codeHash).toHex();
|
||||
const existing = this.getCode(codeHash);
|
||||
const json = {
|
||||
...(existing ? existing.json : {}),
|
||||
...partial,
|
||||
codeHash,
|
||||
genesisHash: api.genesisHash.toHex(),
|
||||
genesisHash: statics.api.genesisHash.toHex(),
|
||||
whenCreated: existing?.json.whenCreated || Date.now()
|
||||
};
|
||||
const key = `${KEY_CODE}${json.codeHash}`;
|
||||
@ -50,7 +50,7 @@ class Store extends EventEmitter {
|
||||
|
||||
public loadAll (onLoaded?: () => void): void {
|
||||
try {
|
||||
const genesisHash = api.genesisHash.toHex();
|
||||
const genesisHash = statics.api.genesisHash.toHex();
|
||||
|
||||
store.each((json: CodeJson, key: string): void => {
|
||||
if (json && json.genesisHash === genesisHash && key.startsWith(KEY_CODE)) {
|
||||
@ -68,7 +68,7 @@ class Store extends EventEmitter {
|
||||
try {
|
||||
this.#allCode[json.codeHash] = {
|
||||
contractAbi: json.abi
|
||||
? new Abi(json.abi, api.registry.getChainProperties())
|
||||
? new Abi(json.abi, statics.api.registry.getChainProperties())
|
||||
: undefined,
|
||||
json
|
||||
};
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
import { Abi } from '@polkadot/api-contract';
|
||||
import { api } from '@polkadot/react-api';
|
||||
import { statics } from '@polkadot/react-api';
|
||||
import { createNamedHook } from '@polkadot/react-hooks';
|
||||
import { u8aToString } from '@polkadot/util';
|
||||
|
||||
@ -67,7 +67,7 @@ function useAbiImpl (initialValue: [string | null | undefined, Abi | null | unde
|
||||
setAbi({
|
||||
abi: json,
|
||||
abiName: name.replace('.contract', '').replace('.json', '').replace('_', ' '),
|
||||
contractAbi: new Abi(json, api.registry.getChainProperties()),
|
||||
contractAbi: new Abi(json, statics.api.registry.getChainProperties()),
|
||||
errorText: null,
|
||||
isAbiError: false,
|
||||
isAbiSupplied: true,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from 'i18next';
|
||||
import type { TabItem } from '@polkadot/react-components/Tabs/types';
|
||||
import type { TabItem } from '@polkadot/react-components/types';
|
||||
import type { KeyedEvent } from '@polkadot/react-hooks/ctx/types';
|
||||
|
||||
import React, { useMemo, useRef } from 'react';
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TFunction } from 'i18next';
|
||||
import type { TabItem } from '@polkadot/react-components/Tabs/types';
|
||||
import type { AppProps as Props } from '@polkadot/react-components/types';
|
||||
import type { AppProps as Props, TabItem } from '@polkadot/react-components/types';
|
||||
import type { DecodedExtrinsic } from './types.js';
|
||||
|
||||
import React, { useRef, useState } from 'react';
|
||||
|
||||
@ -15,8 +15,9 @@ import { ApiPromise, ScProvider, WsProvider } from '@polkadot/api';
|
||||
import { deriveMapCache, setDeriveCache } from '@polkadot/api-derive/util';
|
||||
import { ethereumChains, typesBundle } from '@polkadot/apps-config';
|
||||
import { web3Accounts, web3Enable } from '@polkadot/extension-dapp';
|
||||
import { TokenUnit } from '@polkadot/react-components/InputNumber';
|
||||
import { TokenUnit } from '@polkadot/react-components/InputConsts/units';
|
||||
import { useApiUrl, useEndpoint, useQueue } from '@polkadot/react-hooks';
|
||||
import { ApiCtx } from '@polkadot/react-hooks/ctx/Api';
|
||||
import { ApiSigner } from '@polkadot/react-signer';
|
||||
import { keyring } from '@polkadot/ui-keyring';
|
||||
import { settings } from '@polkadot/ui-settings';
|
||||
@ -24,7 +25,7 @@ import { formatBalance, isNumber, isTestChain, objectSpread, stringify } from '@
|
||||
import { defaults as addressDefaults } from '@polkadot/util-crypto/address/defaults';
|
||||
|
||||
import { lightSpecs, relaySpecs } from './light/index.js';
|
||||
import { registry } from './typeRegistry.js';
|
||||
import { statics } from './statics.js';
|
||||
import { decodeUrlTypes } from './urlTypes.js';
|
||||
|
||||
interface Props {
|
||||
@ -52,19 +53,13 @@ interface ChainData {
|
||||
systemVersion: string;
|
||||
}
|
||||
|
||||
export const DEFAULT_DECIMALS = registry.createType('u32', 12);
|
||||
export const DEFAULT_SS58 = registry.createType('u32', addressDefaults.prefix);
|
||||
export const DEFAULT_DECIMALS = statics.registry.createType('u32', 12);
|
||||
export const DEFAULT_SS58 = statics.registry.createType('u32', addressDefaults.prefix);
|
||||
export const DEFAULT_AUX = ['Aux1', 'Aux2', 'Aux3', 'Aux4', 'Aux5', 'Aux6', 'Aux7', 'Aux8', 'Aux9'];
|
||||
|
||||
export const ApiCtx = React.createContext<ApiProps>({} as unknown as ApiProps);
|
||||
|
||||
const DISALLOW_EXTENSIONS: string[] = [];
|
||||
const EMPTY_STATE = { hasInjectedAccounts: false, isApiReady: false } as unknown as ApiState;
|
||||
|
||||
let api: ApiPromise;
|
||||
|
||||
export { api, registry };
|
||||
|
||||
function isKeyringLoaded () {
|
||||
try {
|
||||
return !!keyring.keyring;
|
||||
@ -115,7 +110,7 @@ async function retrieve (api: ApiPromise, injectedPromise: Promise<InjectedExten
|
||||
api.rpc.system.chain(),
|
||||
api.rpc.system.chainType
|
||||
? api.rpc.system.chainType()
|
||||
: Promise.resolve(registry.createType('ChainType', 'Live')),
|
||||
: Promise.resolve(statics.registry.createType('ChainType', 'Live')),
|
||||
api.rpc.system.name(),
|
||||
api.rpc.system.version(),
|
||||
getInjectedAccounts(injectedPromise)
|
||||
@ -125,7 +120,7 @@ async function retrieve (api: ApiPromise, injectedPromise: Promise<InjectedExten
|
||||
injectedAccounts: injectedAccounts.filter(({ meta: { source } }) =>
|
||||
!DISALLOW_EXTENSIONS.includes(source)
|
||||
),
|
||||
properties: registry.createType('ChainProperties', {
|
||||
properties: statics.registry.createType('ChainProperties', {
|
||||
ss58Format: api.registry.chainSS58,
|
||||
tokenDecimals: api.registry.chainDecimals,
|
||||
tokenSymbol: api.registry.chainTokens
|
||||
@ -138,7 +133,7 @@ async function retrieve (api: ApiPromise, injectedPromise: Promise<InjectedExten
|
||||
}
|
||||
|
||||
async function loadOnReady (api: ApiPromise, endpoint: LinkOption | null, injectedPromise: Promise<InjectedExtension[]>, store: KeyringStore | undefined, types: Record<string, Record<string, string>>): Promise<ApiState> {
|
||||
registry.register(types);
|
||||
statics.registry.register(types);
|
||||
|
||||
const { injectedAccounts, properties, systemChain, systemChainType, systemName, systemVersion } = await retrieve(api, injectedPromise);
|
||||
const chainSS58 = properties.ss58Format.unwrapOr(DEFAULT_SS58).toNumber();
|
||||
@ -153,7 +148,13 @@ async function loadOnReady (api: ApiPromise, endpoint: LinkOption | null, inject
|
||||
console.log(`chain: ${systemChain} (${systemChainType.toString()}), ${stringify(properties)}`);
|
||||
|
||||
// explicitly override the ss58Format as specified
|
||||
registry.setChainProperties(registry.createType('ChainProperties', { ss58Format, tokenDecimals, tokenSymbol }));
|
||||
statics.registry.setChainProperties(
|
||||
statics.registry.createType('ChainProperties', {
|
||||
ss58Format,
|
||||
tokenDecimals,
|
||||
tokenSymbol
|
||||
})
|
||||
);
|
||||
|
||||
// first setup the UI helpers
|
||||
formatBalance.setDefaults({
|
||||
@ -235,9 +236,9 @@ async function createApi (apiUrl: string, signer: ApiSigner, onError: (error: un
|
||||
? await getLightProvider(apiUrl.replace('light://', ''))
|
||||
: new WsProvider(apiUrl);
|
||||
|
||||
api = new ApiPromise({
|
||||
statics.api = new ApiPromise({
|
||||
provider,
|
||||
registry,
|
||||
registry: statics.registry,
|
||||
signer,
|
||||
types,
|
||||
typesBundle
|
||||
@ -274,7 +275,7 @@ export function ApiCtxRoot ({ apiUrl, children, isElectron, store }: Props): Rea
|
||||
[apiUrl, isElectron]
|
||||
);
|
||||
const value = useMemo<ApiProps>(
|
||||
() => objectSpread({}, state, { api, apiEndpoint, apiError, apiRelay, apiUrl, createLink, extensions, isApiConnected, isApiInitialized, isElectron, isWaitingInjected: !extensions }),
|
||||
() => objectSpread({}, state, { api: statics.api, apiEndpoint, apiError, apiRelay, apiUrl, createLink, extensions, isApiConnected, isApiInitialized, isElectron, isWaitingInjected: !extensions }),
|
||||
[apiError, createLink, extensions, isApiConnected, isApiInitialized, isElectron, state, apiEndpoint, apiRelay, apiUrl]
|
||||
);
|
||||
|
||||
@ -286,19 +287,19 @@ export function ApiCtxRoot ({ apiUrl, children, isElectron, store }: Props): Rea
|
||||
setApiError((error as Error).message);
|
||||
};
|
||||
|
||||
createApi(apiUrl, new ApiSigner(registry, queuePayload, queueSetTxStatus), onError)
|
||||
createApi(apiUrl, new ApiSigner(statics.registry, queuePayload, queueSetTxStatus), onError)
|
||||
.then((types): void => {
|
||||
api.on('connected', () => setIsApiConnected(true));
|
||||
api.on('disconnected', () => setIsApiConnected(false));
|
||||
api.on('error', onError);
|
||||
api.on('ready', (): void => {
|
||||
statics.api.on('connected', () => setIsApiConnected(true));
|
||||
statics.api.on('disconnected', () => setIsApiConnected(false));
|
||||
statics.api.on('error', onError);
|
||||
statics.api.on('ready', (): void => {
|
||||
const injectedPromise = web3Enable('polkadot-js/apps');
|
||||
|
||||
injectedPromise
|
||||
.then(setExtensions)
|
||||
.catch(console.error);
|
||||
|
||||
loadOnReady(api, apiEndpoint, injectedPromise, store, types)
|
||||
loadOnReady(statics.api, apiEndpoint, injectedPromise, store, types)
|
||||
.then(setState)
|
||||
.catch(onError);
|
||||
});
|
||||
|
||||
@ -6,10 +6,9 @@ import type { DefaultProps } from './types.js';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { ApiCtx } from '@polkadot/react-hooks/ctx/Api';
|
||||
import { assert } from '@polkadot/util';
|
||||
|
||||
import { ApiCtx } from '../Api.js';
|
||||
|
||||
export default function withApi <P extends ApiProps> (Inner: React.ComponentType<P>, defaultProps: DefaultProps = {}): React.ComponentType<any> {
|
||||
class WithApi extends React.PureComponent<SubtractProps<P, ApiProps>> {
|
||||
private component: any = React.createRef();
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
// Copyright 2017-2023 @polkadot/react-api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { api, ApiCtx, ApiCtxRoot, DEFAULT_DECIMALS, DEFAULT_SS58, registry } from './Api.js';
|
||||
export { ApiCtxRoot, DEFAULT_DECIMALS, DEFAULT_SS58 } from './Api.js';
|
||||
export { withApi, withCallDiv, withCalls, withMulti, withObservable } from './hoc/index.js';
|
||||
export { statics } from './statics.js';
|
||||
|
||||
17
packages/react-api/src/statics.ts
Normal file
17
packages/react-api/src/statics.ts
Normal file
@ -0,0 +1,17 @@
|
||||
// Copyright 2017-2023 @polkadot/react-api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
|
||||
interface Statics {
|
||||
api: ApiPromise;
|
||||
registry: TypeRegistry;
|
||||
}
|
||||
|
||||
// NOTE We are assuming that the Api class _will_ set it correctly
|
||||
export const statics = {
|
||||
api: undefined,
|
||||
registry: new TypeRegistry()
|
||||
} as unknown as Statics;
|
||||
@ -1,6 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/react-api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
|
||||
export const registry = new TypeRegistry();
|
||||
@ -7,9 +7,9 @@ import type { AccountId, AccountIndex, Address } from '@polkadot/types/interface
|
||||
|
||||
import React, { useCallback, useContext, useEffect, useState } from 'react';
|
||||
|
||||
import { AccountSidebarCtx } from '@polkadot/app-accounts/Sidebar';
|
||||
import { registry } from '@polkadot/react-api';
|
||||
import { statics } from '@polkadot/react-api';
|
||||
import { useDeriveAccountInfo, useSystemApi } from '@polkadot/react-hooks';
|
||||
import { AccountSidebarCtx } from '@polkadot/react-hooks/ctx/AccountSidebar';
|
||||
import { formatNumber, isCodec, isFunction, stringToU8a, u8aEmpty, u8aEq, u8aToBn } from '@polkadot/util';
|
||||
|
||||
import { getAddressName } from './util/index.js';
|
||||
@ -32,7 +32,7 @@ interface Props {
|
||||
type AddrMatcher = (addr: unknown) => string | null;
|
||||
|
||||
function createAllMatcher (prefix: string, name: string): AddrMatcher {
|
||||
const test = registry.createType('AccountId', stringToU8a(prefix.padEnd(32, '\0')));
|
||||
const test = statics.registry.createType('AccountId', stringToU8a(prefix.padEnd(32, '\0')));
|
||||
|
||||
return (addr: unknown) =>
|
||||
test.eq(addr)
|
||||
@ -49,7 +49,7 @@ function createNumMatcher (prefix: string, name: string, add?: string): AddrMatc
|
||||
return (addr: unknown): string | null => {
|
||||
const u8a = isCodec(addr)
|
||||
? addr.toU8a()
|
||||
: registry.createType('AccountId', addr as string).toU8a();
|
||||
: statics.registry.createType('AccountId', addr as string).toU8a();
|
||||
|
||||
return (u8a.length >= minLength) && u8aEq(test, u8a.subarray(0, test.length)) && u8aEmpty(u8a.subarray(minLength))
|
||||
? `${name} ${formatNumber(u8aToBn(u8a.subarray(test.length, minLength)))}${add ? ` (${add})` : ''}`
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { AddressFlags } from '@polkadot/react-hooks/types';
|
||||
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import { Button, styled } from '@polkadot/react-components';
|
||||
import { useApi, useToggle } from '@polkadot/react-hooks';
|
||||
import { isFunction } from '@polkadot/util';
|
||||
|
||||
import Transfer from '../modals/Transfer.js';
|
||||
import Button from '../Button/index.js';
|
||||
import { TransferModal } from '../modals/index.js';
|
||||
import { styled } from '../styled.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
|
||||
interface Props {
|
||||
@ -122,7 +123,7 @@ function AccountMenuButtons ({ className = '', flags, isEditing, isEditingName,
|
||||
)
|
||||
}
|
||||
{isTransferOpen && (
|
||||
<Transfer
|
||||
<TransferModal
|
||||
key='modal-transfer'
|
||||
onClose={toggleIsTransferOpen}
|
||||
recipientId={recipientId}
|
||||
@ -6,9 +6,12 @@ import type { AddressFlags } from '@polkadot/react-hooks/types';
|
||||
import React from 'react';
|
||||
import CopyToClipboard from 'react-copy-to-clipboard';
|
||||
|
||||
import { AccountName, Button, IdentityIcon, Input } from '@polkadot/react-components';
|
||||
import { useToggle } from '@polkadot/react-hooks';
|
||||
|
||||
import AccountName from '../AccountName.js';
|
||||
import Button from '../Button/index.js';
|
||||
import IdentityIcon from '../IdentityIcon/index.js';
|
||||
import Input from '../Input.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
|
||||
interface Props {
|
||||
@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { AddressInfo, styled } from '@polkadot/react-components';
|
||||
|
||||
import AddressInfo from '../AddressInfo.js';
|
||||
import { styled } from '../styled.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
|
||||
interface Props {
|
||||
@ -1,12 +1,12 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { AddressFlags } from '@polkadot/react-hooks/types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { Flag, styled } from '@polkadot/react-components';
|
||||
|
||||
import Flag from '../Flag.js';
|
||||
import { styled } from '../styled.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
|
||||
interface Props {
|
||||
@ -1,15 +1,18 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { AddressIdentity } from '@polkadot/react-hooks/types';
|
||||
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
import { AddressMini, AvatarItem, Expander, IconLink } from '@polkadot/react-components';
|
||||
import { useApi, useRegistrars, useSubidentities, useToggle } from '@polkadot/react-hooks';
|
||||
import { AddressIdentityOtherDiscordKey } from '@polkadot/react-hooks/types';
|
||||
import { isHex } from '@polkadot/util';
|
||||
|
||||
import AddressMini from '../AddressMini.js';
|
||||
import AvatarItem from '../AvatarItem.js';
|
||||
import Expander from '../Expander.js';
|
||||
import IconLink from '../IconLink.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
import Judgements from './Judgements.js';
|
||||
import RegistrarJudgement from './RegistrarJudgement.js';
|
||||
@ -1,18 +1,26 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Judgement } from '@polkadot/react-hooks/types';
|
||||
import type { DisplayedJudgement } from '../types.js';
|
||||
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
import { AddressSmall, Menu, Popup, Tag } from '@polkadot/react-components';
|
||||
|
||||
import { getJudgementColor } from '../util.js';
|
||||
import AddressSmall from '../AddressSmall.js';
|
||||
import Menu from '../Menu/index.js';
|
||||
import Popup from '../Popup/index.js';
|
||||
import Tag from '../Tag.js';
|
||||
|
||||
interface Props {
|
||||
judgement: Judgement
|
||||
}
|
||||
|
||||
export function getJudgementColor (name: DisplayedJudgement): 'green' | 'red' {
|
||||
return (name === 'Erroneous' || name === 'Low quality')
|
||||
? 'red'
|
||||
: 'green';
|
||||
}
|
||||
|
||||
function JudgementTag ({ judgement: { judgementName, registrars } }: Props): React.ReactElement<Props> {
|
||||
const judgementColor = useMemo(() => getJudgementColor(judgementName), [judgementName]);
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { styled, Tag } from '@polkadot/react-components';
|
||||
import { useJudgements } from '@polkadot/react-hooks';
|
||||
|
||||
import { styled } from '../styled.js';
|
||||
import Tag from '../Tag.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
import JudgementTag from './JudgementTag.js';
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { AddressMini } from '@polkadot/react-components';
|
||||
|
||||
import AddressMini from '../AddressMini.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
|
||||
interface Props {
|
||||
@ -7,10 +7,16 @@ import type { HexString } from '@polkadot/util/types';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import { Dropdown, Input, InputAddress, MarkError, Modal, Spinner, TxButton } from '@polkadot/react-components';
|
||||
import { useApi, useCall } from '@polkadot/react-hooks';
|
||||
|
||||
import Dropdown from '../Dropdown.js';
|
||||
import Input from '../Input.js';
|
||||
import InputAddress from '../InputAddress/index.js';
|
||||
import MarkError from '../MarkError.js';
|
||||
import Modal from '../Modal/index.js';
|
||||
import Spinner from '../Spinner.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
import TxButton from '../TxButton.js';
|
||||
|
||||
interface Props {
|
||||
address: string;
|
||||
@ -16,7 +16,7 @@ import { charlieShortAddress, ferdieShortAddress, mockRegistration, registrars }
|
||||
import { mockApiHooks } from '@polkadot/test-support/utils';
|
||||
import { keyring } from '@polkadot/ui-keyring';
|
||||
|
||||
import { AccountsPage } from '../../test/pages/accountsPage.js';
|
||||
import { AccountsPage } from '../../../page-accounts/test/pages/accountsPage.js';
|
||||
|
||||
// FIXME: these all need to be wrapped in waitFor ....
|
||||
describe.skip('Sidebar', () => {
|
||||
@ -1,13 +1,14 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React, { useRef, useState } from 'react';
|
||||
|
||||
import { LinkExternal, styled } from '@polkadot/react-components';
|
||||
import Sidebar from '@polkadot/react-components/Sidebar';
|
||||
import { colorLink } from '@polkadot/react-components/styles/theme';
|
||||
import { useAccountInfo } from '@polkadot/react-hooks';
|
||||
|
||||
import LinkExternal from '../LinkExternal.js';
|
||||
import Sidebar from '../Sidebar.js';
|
||||
import { styled } from '../styled.js';
|
||||
import { colorLink } from '../styles/theme.js';
|
||||
import Balances from './Balances.js';
|
||||
import Identity from './Identity.js';
|
||||
import Multisig from './Multisig.js';
|
||||
@ -3,10 +3,10 @@
|
||||
|
||||
import React, { useCallback, useEffect, useMemo } from 'react';
|
||||
|
||||
import { Tags } from '@polkadot/react-components';
|
||||
import { useAccountInfo, useOutsideClick } from '@polkadot/react-hooks';
|
||||
import { keyring } from '@polkadot/ui-keyring';
|
||||
|
||||
import Tags from '../Tags.js';
|
||||
import AccountMenuButtons from './AccountMenuButtons.js';
|
||||
import AddressSection from './AddressSection.js';
|
||||
import Flags from './Flags.js';
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
@ -1,8 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React, { useCallback, useState } from 'react';
|
||||
|
||||
import { AccountSidebarCtx } from '@polkadot/react-hooks/ctx/AccountSidebar';
|
||||
|
||||
import Sidebar from './Sidebar.js';
|
||||
|
||||
interface Props {
|
||||
@ -11,12 +13,8 @@ interface Props {
|
||||
|
||||
type State = [string | null, (() => void) | null];
|
||||
|
||||
type SetStateContext = undefined | (([address, onUpdateName]: State) => void);
|
||||
|
||||
const EMPTY_STATE: State = [null, null];
|
||||
|
||||
export const AccountSidebarCtx = React.createContext<SetStateContext>(undefined);
|
||||
|
||||
function AccountSidebar ({ children }: Props): React.ReactElement<Props> {
|
||||
const [[address, onUpdateName], setAddress] = useState<State>(EMPTY_STATE);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React, { useCallback, useMemo } from 'react';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { FlagColor } from './types.js';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
|
||||
10
packages/react-components/src/InputConsts/units.ts
Normal file
10
packages/react-components/src/InputConsts/units.ts
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export class TokenUnit {
|
||||
public static abbr = 'Unit';
|
||||
|
||||
public static setAbbr (abbr: string = TokenUnit.abbr): void {
|
||||
TokenUnit.abbr = abbr;
|
||||
}
|
||||
}
|
||||
@ -10,6 +10,7 @@ import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { useApi } from '@polkadot/react-hooks';
|
||||
import { BN, BN_ONE, BN_TEN, BN_TWO, BN_ZERO, formatBalance, isBn, isUndefined } from '@polkadot/util';
|
||||
|
||||
import { TokenUnit } from './InputConsts/units.js';
|
||||
import Input, { KEYS_PRE } from './Input.js';
|
||||
import { styled } from './styled.js';
|
||||
import { useTranslation } from './translate.js';
|
||||
@ -48,14 +49,6 @@ interface Props {
|
||||
|
||||
const DEFAULT_BITLENGTH = 32;
|
||||
|
||||
export class TokenUnit {
|
||||
public static abbr = 'Unit';
|
||||
|
||||
public static setAbbr (abbr: string = TokenUnit.abbr): void {
|
||||
TokenUnit.abbr = abbr;
|
||||
}
|
||||
}
|
||||
|
||||
function getGlobalMaxValue (bitLength?: number): BN {
|
||||
return BN_TWO.pow(new BN(bitLength || DEFAULT_BITLENGTH)).isub(BN_ONE);
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
|
||||
import type { ThemeDef } from './types.js';
|
||||
|
||||
import React, { useContext } from 'react';
|
||||
import store from 'store';
|
||||
|
||||
@ -7,7 +7,7 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
||||
import React, { Suspense } from 'react';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
|
||||
import { lightTheme } from '@polkadot/apps/themes';
|
||||
import { lightTheme } from '@polkadot/react-components';
|
||||
import { useToggle } from '@polkadot/react-hooks';
|
||||
|
||||
import Button from '../Button/index.js';
|
||||
|
||||
@ -7,7 +7,7 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react';
|
||||
import React, { Suspense } from 'react';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
|
||||
import { lightTheme } from '@polkadot/apps/themes';
|
||||
import { lightTheme } from '@polkadot/react-components';
|
||||
import i18next from '@polkadot/react-components/i18n';
|
||||
|
||||
import Popup from './index.js';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { TabItem } from './types.js';
|
||||
import type { TabItem } from '../types.js';
|
||||
|
||||
import React from 'react';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
@ -2,18 +2,18 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Location } from 'history';
|
||||
import type { SectionType, TabItem } from './types.js';
|
||||
import type { TabItem } from '../types.js';
|
||||
|
||||
import React, { useEffect, useMemo } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import { TabsCtx } from '@polkadot/react-hooks/ctx/Tabs';
|
||||
|
||||
import { styled } from '../styled.js';
|
||||
import CurrentSection from './CurrentSection.js';
|
||||
import Tab from './Tab.js';
|
||||
import Delimiter from './TabsSectionDelimiter.js';
|
||||
|
||||
export const TabsCtx = React.createContext<SectionType>({});
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
basePath: string;
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { IconName } from '@fortawesome/fontawesome-svg-core';
|
||||
import type React from 'react';
|
||||
|
||||
export interface TabItem {
|
||||
alias?: string;
|
||||
count?: number;
|
||||
hasParams?: boolean;
|
||||
isExact?: boolean;
|
||||
isHidden?: boolean;
|
||||
isRoot?: boolean;
|
||||
name: string;
|
||||
text: React.ReactNode;
|
||||
}
|
||||
|
||||
export interface SectionType {
|
||||
icon?: IconName;
|
||||
text?: string;
|
||||
}
|
||||
@ -1,8 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
|
||||
import type { FlagColor as TagColor } from './types.js';
|
||||
import type { FlagColor as TagColor, ThemeDef } from './types.js';
|
||||
|
||||
import React, { useContext, useState } from 'react';
|
||||
import { ThemeContext } from 'styled-components';
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// named exports
|
||||
export { default as AccountIndex } from './AccountIndex.js';
|
||||
export { default as AccountName } from './AccountName.js';
|
||||
export { default as AccountSidebar } from './AccountSidebar/index.js';
|
||||
export { default as AddressInfo } from './AddressInfo.js';
|
||||
export { default as AddressMini } from './AddressMini.js';
|
||||
export { default as AddressRow } from './AddressRow.js';
|
||||
@ -91,7 +93,7 @@ export { default as Status } from './Status/index.js';
|
||||
export { styled } from './styled.js';
|
||||
export { default as SummaryBox } from './SummaryBox.js';
|
||||
export { default as Table } from './Table/index.js';
|
||||
export { default as Tabs, TabsCtx } from './Tabs/index.js';
|
||||
export { default as Tabs } from './Tabs/index.js';
|
||||
export { default as Tag } from './Tag.js';
|
||||
export { default as Tags } from './Tags.js';
|
||||
export { default as TextArea } from './TextArea.js';
|
||||
@ -101,4 +103,10 @@ export { default as Tooltip } from './Tooltip.js';
|
||||
export { default as TxButton } from './TxButton.js';
|
||||
export { default as VoteAccount } from './VoteAccount.js';
|
||||
export { default as VoteValue } from './VoteValue.js';
|
||||
|
||||
// star exports
|
||||
export * from './modals/index.js';
|
||||
export * from './themes.js';
|
||||
|
||||
// external exports
|
||||
export * from '@polkadot/react-qr';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/app-accounts authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DeriveBalancesAll } from '@polkadot/api-derive/types';
|
||||
@ -8,12 +8,19 @@ import type { BN } from '@polkadot/util';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import { checkAddress } from '@polkadot/phishing';
|
||||
import { InputAddress, InputBalance, MarkError, MarkWarning, Modal, styled, Toggle, TxButton } from '@polkadot/react-components';
|
||||
import { useApi, useCall } from '@polkadot/react-hooks';
|
||||
import { Available } from '@polkadot/react-query';
|
||||
import { BN_HUNDRED, BN_ZERO, isFunction, nextTick } from '@polkadot/util';
|
||||
|
||||
import InputAddress from '../InputAddress/index.js';
|
||||
import InputBalance from '../InputBalance.js';
|
||||
import MarkError from '../MarkError.js';
|
||||
import MarkWarning from '../MarkWarning.js';
|
||||
import Modal from '../Modal/index.js';
|
||||
import { styled } from '../styled.js';
|
||||
import Toggle from '../Toggle.js';
|
||||
import { useTranslation } from '../translate.js';
|
||||
import TxButton from '../TxButton.js';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
4
packages/react-components/src/modals/index.ts
Normal file
4
packages/react-components/src/modals/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as TransferModal } from './Transfer.js';
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
|
||||
import type { ThemeDef } from '../types.js';
|
||||
|
||||
export default (_theme: ThemeDef): string => `
|
||||
.ui--output {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
|
||||
import type { ThemeDef } from '../types.js';
|
||||
|
||||
export default (_theme: ThemeDef): string => `
|
||||
.ui.hidden.divider {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/apps authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
|
||||
import type { ThemeDef } from './types.js';
|
||||
|
||||
export const darkTheme: ThemeDef = {
|
||||
theme: 'dark'
|
||||
@ -5,7 +5,6 @@ import type { IconName } from '@fortawesome/fontawesome-svg-core';
|
||||
import type { WithTranslation } from 'react-i18next';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/types';
|
||||
import type { Abi } from '@polkadot/api-contract';
|
||||
import type { ThemeDef } from '@polkadot/react-hooks/ctx/types';
|
||||
import type { AccountId, AccountIndex, Address, Index } from '@polkadot/types/interfaces';
|
||||
import type { ActionStatus, TxCallback, TxFailedCallback } from './Status/types.js';
|
||||
|
||||
@ -21,6 +20,10 @@ export interface AppProps {
|
||||
onStatusChange: (status: ActionStatus) => void;
|
||||
}
|
||||
|
||||
export interface ThemeDef {
|
||||
theme: 'dark' | 'light';
|
||||
}
|
||||
|
||||
export type I18nProps = BareProps & WithTranslation;
|
||||
|
||||
export interface TxButtonProps {
|
||||
@ -79,3 +82,14 @@ export type FlagColor = 'blue' | 'black' | 'green' | 'grey' | 'lightgrey' | 'ora
|
||||
export type AccountIdIsh = AccountId | AccountIndex | Address | string | Uint8Array | null;
|
||||
|
||||
export type DisplayedJudgement = 'Erroneous' | 'Low quality' | 'Known good' | 'Reasonable';
|
||||
|
||||
export interface TabItem {
|
||||
alias?: string;
|
||||
count?: number;
|
||||
hasParams?: boolean;
|
||||
isExact?: boolean;
|
||||
isHidden?: boolean;
|
||||
isRoot?: boolean;
|
||||
name: string;
|
||||
text: React.ReactNode;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { Abi } from '@polkadot/api-contract';
|
||||
import { api } from '@polkadot/react-api';
|
||||
import { statics } from '@polkadot/react-api';
|
||||
|
||||
import { getAddressMeta } from './getAddressMeta.js';
|
||||
|
||||
@ -17,7 +17,7 @@ export function getContractAbi (address: string | null): Abi | null {
|
||||
try {
|
||||
const data = (meta.contract && JSON.parse(meta.contract.abi)) as string;
|
||||
|
||||
abi = new Abi(data, api.registry.getChainProperties());
|
||||
abi = new Abi(data, statics.api.registry.getChainProperties());
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
8
packages/react-hooks/src/ctx/AccountSidebar.tsx
Normal file
8
packages/react-hooks/src/ctx/AccountSidebar.tsx
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
|
||||
type SetStateContext = undefined | (([address, onUpdateName]: [string | null, (() => void) | null]) => void);
|
||||
|
||||
export const AccountSidebarCtx = React.createContext<SetStateContext>(undefined);
|
||||
8
packages/react-hooks/src/ctx/Api.tsx
Normal file
8
packages/react-hooks/src/ctx/Api.tsx
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiProps } from '@polkadot/react-api/types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
export const ApiCtx = React.createContext<ApiProps>({} as unknown as ApiProps);
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { SubmittableResult } from '@polkadot/api';
|
||||
|
||||
13
packages/react-hooks/src/ctx/Tabs.tsx
Normal file
13
packages/react-hooks/src/ctx/Tabs.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { IconName } from '@fortawesome/fontawesome-svg-core';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
interface SectionType {
|
||||
icon?: IconName;
|
||||
text?: string;
|
||||
}
|
||||
|
||||
export const TabsCtx = React.createContext<SectionType>({});
|
||||
@ -55,10 +55,6 @@ export type SidebarState = [string | null, (() => void) | null];
|
||||
|
||||
export type Sidebar = undefined | (([address, onUpdateName]: SidebarState) => void);
|
||||
|
||||
export interface ThemeDef {
|
||||
theme: 'dark' | 'light';
|
||||
}
|
||||
|
||||
export interface WindowSize {
|
||||
height: number;
|
||||
width: number;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
|
||||
@ -5,8 +5,7 @@ import type { ApiProps } from '@polkadot/react-api/types';
|
||||
|
||||
import { useContext } from 'react';
|
||||
|
||||
import { ApiCtx } from '@polkadot/react-api';
|
||||
|
||||
import { ApiCtx } from './ctx/Api.js';
|
||||
import { createNamedHook } from './createNamedHook.js';
|
||||
|
||||
function useApiImpl (): ApiProps {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiStats } from './ctx/types.js';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { RefObject } from 'react';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ThemeDef } from './ctx/types.js';
|
||||
import type { ThemeDef } from '@polkadot/react-components/types';
|
||||
|
||||
import { useContext, useMemo } from 'react';
|
||||
import { ThemeContext } from 'styled-components';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
@ -7,7 +7,7 @@ import type { ComponentMap, ParamDef, RawParam, RawParamOnChangeValue, RawParams
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { api } from '@polkadot/react-api';
|
||||
import { statics } from '@polkadot/react-api';
|
||||
import { ErrorBoundary } from '@polkadot/react-components';
|
||||
import { stringify } from '@polkadot/util';
|
||||
|
||||
@ -44,7 +44,7 @@ class Params extends React.PureComponent<Props, State> {
|
||||
params: null
|
||||
};
|
||||
|
||||
public static getDerivedStateFromProps ({ isDisabled, params, registry = api.registry, values }: Props, prevState: State): Pick<State, never> | null {
|
||||
public static getDerivedStateFromProps ({ isDisabled, params, registry = statics.api.registry, values }: Props, prevState: State): Pick<State, never> | null {
|
||||
if (isDisabled || stringify(prevState.params) === stringify(params)) {
|
||||
return null;
|
||||
}
|
||||
@ -82,7 +82,7 @@ class Params extends React.PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
public override render (): React.ReactNode {
|
||||
const { children, className = '', isDisabled, isError, onEnter, onEscape, overrides, params, registry = api.registry, withBorder = true, withExpander } = this.props;
|
||||
const { children, className = '', isDisabled, isError, onEnter, onEscape, overrides, params, registry = statics.api.registry, withBorder = true, withExpander } = this.props;
|
||||
const { values = this.props.values } = this.state;
|
||||
|
||||
if (!values || !values.length) {
|
||||
|
||||
@ -6,7 +6,7 @@ import type { BN } from '@polkadot/util';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { styled } from '@polkadot/react-components/styled';
|
||||
import { styled } from '@polkadot/react-components';
|
||||
import { useBlockTime } from '@polkadot/react-hooks';
|
||||
|
||||
interface Props {
|
||||
|
||||
@ -5,7 +5,7 @@ import type { BN } from '@polkadot/util';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
import { styled } from '@polkadot/react-components/styled';
|
||||
import { styled } from '@polkadot/react-components';
|
||||
import { bnToBn } from '@polkadot/util';
|
||||
|
||||
type Ticker = (now: number) => void;
|
||||
|
||||
@ -7,7 +7,7 @@ import type { BN } from '@polkadot/util';
|
||||
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
import { styled } from '@polkadot/react-components/styled';
|
||||
import { styled } from '@polkadot/react-components';
|
||||
import { useApi } from '@polkadot/react-hooks';
|
||||
import { formatBalance, isString } from '@polkadot/util';
|
||||
|
||||
|
||||
@ -3,32 +3,32 @@
|
||||
|
||||
import type { Registrar } from '@polkadot/react-hooks/types';
|
||||
|
||||
import { registry } from '@polkadot/react-api';
|
||||
import { statics } from '@polkadot/react-api';
|
||||
|
||||
import { bob, charlie, ferdie } from '../keyring/index.js';
|
||||
|
||||
export const mockRegistration = {
|
||||
judgements: [
|
||||
[
|
||||
registry.createType('RegistrarIndex', '0'),
|
||||
statics.registry.createType('RegistrarIndex', '0'),
|
||||
{
|
||||
isReasonable: true
|
||||
}
|
||||
],
|
||||
[
|
||||
registry.createType('RegistrarIndex', '1'),
|
||||
statics.registry.createType('RegistrarIndex', '1'),
|
||||
{
|
||||
isKnownGood: true
|
||||
}
|
||||
],
|
||||
[
|
||||
registry.createType('RegistrarIndex', '2'),
|
||||
statics.registry.createType('RegistrarIndex', '2'),
|
||||
{
|
||||
isErroneous: true
|
||||
}
|
||||
],
|
||||
[
|
||||
registry.createType('RegistrarIndex', '3'),
|
||||
statics.registry.createType('RegistrarIndex', '3'),
|
||||
{
|
||||
isReasonable: true
|
||||
}
|
||||
|
||||
@ -12,10 +12,9 @@ import React, { Suspense } from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
|
||||
import AccountSidebar from '@polkadot/app-accounts/Sidebar';
|
||||
import { lightTheme } from '@polkadot/apps/themes';
|
||||
import { POLKADOT_GENESIS } from '@polkadot/apps-config';
|
||||
import { ApiCtx } from '@polkadot/react-api';
|
||||
import { AccountSidebar, lightTheme } from '@polkadot/react-components';
|
||||
import { ApiCtx } from '@polkadot/react-hooks/ctx/Api';
|
||||
import { QueueCtx } from '@polkadot/react-hooks/ctx/Queue';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { keyring } from '@polkadot/ui-keyring';
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
"paths": {
|
||||
"@polkadot/apps": ["apps/src/index.tsx"],
|
||||
"@polkadot/apps/Root": ["apps/src/Root.tsx"],
|
||||
"@polkadot/apps/themes": ["apps/src/themes.ts"],
|
||||
"@polkadot/apps-config": ["apps-config/src/index.ts"],
|
||||
"@polkadot/apps-config/endpoints": ["apps-config/src/endpoints/index.ts"],
|
||||
"@polkadot/apps-config/endpoints/*": ["apps-config/src/endpoints/*.ts"],
|
||||
@ -15,8 +14,6 @@
|
||||
"@polkadot/apps-routing": ["apps-routing/src/index.ts"],
|
||||
"@polkadot/apps-routing/*": ["apps-routing/src/*.ts"],
|
||||
"@polkadot/app-accounts": ["page-accounts/src/index.tsx"],
|
||||
"@polkadot/app-accounts/modals/Transfer": ["page-accounts/src/modals/Transfer.tsx"],
|
||||
"@polkadot/app-accounts/Sidebar": ["page-accounts/src/Sidebar/index.tsx"],
|
||||
"@polkadot/app-addresses": ["page-addresses/src/index.tsx"],
|
||||
"@polkadot/app-alliance": ["page-alliance/src/index.tsx"],
|
||||
"@polkadot/app-assets": ["page-assets/src/index.tsx"],
|
||||
@ -85,10 +82,8 @@
|
||||
"@polkadot/react-components/InputConsts/*": ["react-components/src/InputConsts/*.ts"],
|
||||
"@polkadot/react-components/Popup/*": ["react-components/src/Popup/*.ts"],
|
||||
"@polkadot/react-components/Status/*": ["react-components/src/Status/*.ts"],
|
||||
"@polkadot/react-components/styled": ["react-components/src/styled.ts"],
|
||||
"@polkadot/react-components/styles": ["react-components/src/styles/index.ts"],
|
||||
"@polkadot/react-components/styles/*": ["react-components/src/styles/*.ts"],
|
||||
"@polkadot/react-components/Tabs/*": ["react-components/src/Tabs/*.ts"],
|
||||
"@polkadot/react-components/types": ["react-components/src/types.ts"],
|
||||
"@polkadot/react-components/util": ["react-components/src/util/index.ts"],
|
||||
"@polkadot/react-components/util/types": ["react-components/src/util/types.ts"],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user