diff --git a/RadixWallet/Core/DesignSystem/Components/WarningView.swift b/RadixWallet/Core/DesignSystem/Components/WarningView.swift index 87e5386951..df81cd7061 100644 --- a/RadixWallet/Core/DesignSystem/Components/WarningView.swift +++ b/RadixWallet/Core/DesignSystem/Components/WarningView.swift @@ -23,6 +23,7 @@ public struct WarningErrorView: View { HStack(spacing: spacing) { Image(.error) Text(text) + .lineSpacing(-.small3) .textStyle(.body1Header) .multilineTextAlignment(.leading) } diff --git a/RadixWallet/Core/Resources/Generated/L10n.generated.swift b/RadixWallet/Core/Resources/Generated/L10n.generated.swift index 1884bfb397..9db905d633 100644 --- a/RadixWallet/Core/Resources/Generated/L10n.generated.swift +++ b/RadixWallet/Core/Resources/Generated/L10n.generated.swift @@ -2107,6 +2107,246 @@ public enum L10n { /// Verify With Ledger Device public static let title = L10n.tr("Localizable", "importOlympiaLedgerAccounts_title", fallback: "Verify With Ledger Device") } + public enum InfoLink { + public enum Glossary { + /// ## Radix Accounts + /// + /// Accounts are secure containers for any kind of digital asset on the [Radix Network](?glossaryAnchor=radixnetwork). + /// + /// Unlike an account on a bank or other service, there is no company that controls your Radix Accounts for you. Your [Radix Wallet](?glossaryAnchor=radixwallet) app on your phone gives you direct access to your Accounts on the network, and can help you regain access to your Accounts if you lose your phone. + /// + /// Compared to accounts on other crypto networks, Radix Accounts are so much more clever, they’re sometimes called “Smart Accounts”. + /// + /// Learn: [More about Smart Accounts](https://learn.radixdlt.com/article/what-are-smart-accounts) + /// + /// Blog: [Smart Account multi-factor and other features](https://www.radixdlt.com/blog/how-radix-multi-factor-smart-accounts-work-and-what-they-can-do) + public static let accounts = L10n.tr("Localizable", "infoLink_glossary_accounts", fallback: "## Radix Accounts\n\nAccounts are secure containers for any kind of digital asset on the [Radix Network](?glossaryAnchor=radixnetwork).\n\nUnlike an account on a bank or other service, there is no company that controls your Radix Accounts for you. Your [Radix Wallet](?glossaryAnchor=radixwallet) app on your phone gives you direct access to your Accounts on the network, and can help you regain access to your Accounts if you lose your phone.\n\nCompared to accounts on other crypto networks, Radix Accounts are so much more clever, they’re sometimes called “Smart Accounts”.\n\nLearn: [More about Smart Accounts](https://learn.radixdlt.com/article/what-are-smart-accounts)\n\nBlog: [Smart Account multi-factor and other features](https://www.radixdlt.com/blog/how-radix-multi-factor-smart-accounts-work-and-what-they-can-do)") + /// ## Badges + /// + /// [Tokens](?glossaryAnchor=tokens) and [NFTs](?glossaryAnchor=nfts) can represent almost anything. The [Radix Network](?glossaryAnchor=radixnetwork) makes it possible to use ownership of a token or NFT to authorize the holder to access to certain [dApp](?glossaryAnchor=dapps) functionality. Tokens or NFTs used in this way are referred to as “badges”, indicating that only the holder of the badge can use it for authorization. + /// + /// When a badge is used to authorize access in a [transaction](?glossaryAnchor=transactions), you will see it listed in the [Radix Wallet’s](?glossaryAnchor=radixwallet) summary of the transaction under “presenting”. The badge isn’t being sent anywhere; all that’s happening is that you are providing proof that you own the badge. + /// + /// Learn: [More about badges on Radix](https://learn.radixdlt.com/article/whats-a-badge) + public static let badges = L10n.tr("Localizable", "infoLink_glossary_badges", fallback: "## Badges\n\n[Tokens](?glossaryAnchor=tokens) and [NFTs](?glossaryAnchor=nfts) can represent almost anything. The [Radix Network](?glossaryAnchor=radixnetwork) makes it possible to use ownership of a token or NFT to authorize the holder to access to certain [dApp](?glossaryAnchor=dapps) functionality. Tokens or NFTs used in this way are referred to as “badges”, indicating that only the holder of the badge can use it for authorization.\n\nWhen a badge is used to authorize access in a [transaction](?glossaryAnchor=transactions), you will see it listed in the [Radix Wallet’s](?glossaryAnchor=radixwallet) summary of the transaction under “presenting”. The badge isn’t being sent anywhere; all that’s happening is that you are providing proof that you own the badge.\n\nLearn: [More about badges on Radix](https://learn.radixdlt.com/article/whats-a-badge)") + /// ## Bridging + /// + /// Bridging is the process of getting assets into and out of the [Radix Network](?glossaryAnchor=radixnetwork). Assets on Radix can be held by your [Radix Wallet](?glossaryAnchor=radixnetwork), and used with [dApps](?glossaryAnchor=dapps) on Radix. There are a variety of dApps that provide bridging in different ways, for different assets. + /// + /// Sometimes bridging involves converting an asset into a different form that can live on Radix. For example, dollars (USD) in your bank account might be bridged into Radix and become xUSDC tokens in your Radix Wallet. Or your Bitcoin (BTC) might be bridged into xwBTC tokens. + /// + /// Sometimes bridging works as a swap, similar to a [DEX](?glossaryAnchor=dex). In this case you might swap one asset outside Radix for a different asset within Radix. Maybe you swap ETH (on the Ethereum network) for XRD tokens (on the Radix Network) at a current market price. + public static let bridging = L10n.tr("Localizable", "infoLink_glossary_bridging", fallback: "## Bridging\n\nBridging is the process of getting assets into and out of the [Radix Network](?glossaryAnchor=radixnetwork). Assets on Radix can be held by your [Radix Wallet](?glossaryAnchor=radixnetwork), and used with [dApps](?glossaryAnchor=dapps) on Radix. There are a variety of dApps that provide bridging in different ways, for different assets.\n\nSometimes bridging involves converting an asset into a different form that can live on Radix. For example, dollars (USD) in your bank account might be bridged into Radix and become xUSDC tokens in your Radix Wallet. Or your Bitcoin (BTC) might be bridged into xwBTC tokens.\n\nSometimes bridging works as a swap, similar to a [DEX](?glossaryAnchor=dex). In this case you might swap one asset outside Radix for a different asset within Radix. Maybe you swap ETH (on the Ethereum network) for XRD tokens (on the Radix Network) at a current market price.") + /// ## √ Connect Button + /// + /// [dApps](?glossaryAnchor=dapps) built on Radix should always include a button marked **√ Connect**. Start here to connect your [Radix Wallet](?glossaryAnchor=radixwallet) to the dApp. + /// + /// In most cases, the √ Connect button will include a menu where you can Connect Now, often asking your Radix Wallet to log in with a Persona. After logging in, that menu should provide a variety of features and information to help you manage your login and sharing with that dApp. + public static let connectbutton = L10n.tr("Localizable", "infoLink_glossary_connectbutton", fallback: "## √ Connect Button\n\n[dApps](?glossaryAnchor=dapps) built on Radix should always include a button marked **√ Connect**. Start here to connect your [Radix Wallet](?glossaryAnchor=radixwallet) to the dApp.\n\nIn most cases, the √ Connect button will include a menu where you can Connect Now, often asking your Radix Wallet to log in with a Persona. After logging in, that menu should provide a variety of features and information to help you manage your login and sharing with that dApp.") + /// ## dApps + /// + /// Decentralized applications, or dApps, are basically any application that makes use of web3 features. + /// + /// In web3, users control their own digital assets and identity. That’s much different from typical webpages and other apps today. For example, to access your money, you have to do it through a banking or payments app. Your login to every website is owned by that website, or else you use something like your Google login, which is owned by Google. + /// + /// But in web3, you can hold your money in an [account](?glossaryAnchor=accounts) that you control directly with a [wallet](?glossaryAnchor=radixwallet) app, and you can create your own [login](?glossaryAnchor=personas) in your wallet app and use that in many places. + /// + /// Doing things that way is “decentralized” – and it means that websites and applications need to be built specially to interact with wallet apps, self-owned accounts, and self-owned logins. That’s what makes them dApps. + /// + /// In the end, web3 dApps can do many things that were never possible before. For example, a [decentralized exchange](?glossaryAnchor=dex) dApp can let you instantly swap between two different kinds of assets right from your wallet in just a tap. + /// + /// [Radix dApp Ecosystem Page](https://www.radixdlt.com/ecosystem) + public static let dapps = L10n.tr("Localizable", "infoLink_glossary_dapps", fallback: "## dApps\n\nDecentralized applications, or dApps, are basically any application that makes use of web3 features.\n\nIn web3, users control their own digital assets and identity. That’s much different from typical webpages and other apps today. For example, to access your money, you have to do it through a banking or payments app. Your login to every website is owned by that website, or else you use something like your Google login, which is owned by Google.\n\nBut in web3, you can hold your money in an [account](?glossaryAnchor=accounts) that you control directly with a [wallet](?glossaryAnchor=radixwallet) app, and you can create your own [login](?glossaryAnchor=personas) in your wallet app and use that in many places.\n\nDoing things that way is “decentralized” – and it means that websites and applications need to be built specially to interact with wallet apps, self-owned accounts, and self-owned logins. That’s what makes them dApps.\n\nIn the end, web3 dApps can do many things that were never possible before. For example, a [decentralized exchange](?glossaryAnchor=dex) dApp can let you instantly swap between two different kinds of assets right from your wallet in just a tap.\n\n[Radix dApp Ecosystem Page](https://www.radixdlt.com/ecosystem)") + /// ## Radix Dashboard + /// + /// The Radix Dashboard is a [dApp](?glossaryAnchor=dappas) created by the same team as the [Radix Wallet](?glossaryAnchor=radixwallet) to help users interact with the [Radix Network](?glossaryAnchor=radixnetwork) directly. + /// + /// You can look up information about things on the Radix Network by entering its address, such as: Accounts, tokens, NFTs, components (smart contracts), and more. + /// + /// You can also use the Radix Dashboard’s [network staking](?glossaryAnchor=networkstaking) feature to view the list of current Radix Network validators, stake XRD, and manage your existing network staking. + /// + /// [Visit the Radix Dashboard at dashboard.radixdlt.com](https://dashboard.radixdlt.com) + public static let dashboard = L10n.tr("Localizable", "infoLink_glossary_dashboard", fallback: "## Radix Dashboard\n\nThe Radix Dashboard is a [dApp](?glossaryAnchor=dappas) created by the same team as the [Radix Wallet](?glossaryAnchor=radixwallet) to help users interact with the [Radix Network](?glossaryAnchor=radixnetwork) directly.\n\nYou can look up information about things on the Radix Network by entering its address, such as: Accounts, tokens, NFTs, components (smart contracts), and more.\n\nYou can also use the Radix Dashboard’s [network staking](?glossaryAnchor=networkstaking) feature to view the list of current Radix Network validators, stake XRD, and manage your existing network staking.\n\n[Visit the Radix Dashboard at dashboard.radixdlt.com](https://dashboard.radixdlt.com)") + /// ## Decentralized Exchange (DEX) + /// + /// A decentralized exchange, or "DEX" for short, is a [dApp](?glossaryAnchor=dapps) that offers something a bit like a much more powerful web3 version of a foreign currency exchange counter at the airport. + /// + /// A DEX dApp lets users do instant and fully automated swaps between a huge variety of tokens or other digital assets. The exchange logic runs right on the [Radix Network](?glossaryAnchor=radixnetwork) itself. This means that a DEX swap is done with a [transaction](?glossaryAnchor=transactions) and the [Radix Wallet](?glossaryAnchor=radixwallet) can show you exactly what’s going to happen, and let you apply [deposit guarantees](?glossaryAnchor=guarantees) to the results. + /// + /// Learn: [More about DEX dApps](https://learn.radixdlt.com/article/whats-a-dex) + public static let dex = L10n.tr("Localizable", "infoLink_glossary_dex", fallback: "## Decentralized Exchange (DEX)\n\nA decentralized exchange, or \"DEX\" for short, is a [dApp](?glossaryAnchor=dapps) that offers something a bit like a much more powerful web3 version of a foreign currency exchange counter at the airport.\n\nA DEX dApp lets users do instant and fully automated swaps between a huge variety of tokens or other digital assets. The exchange logic runs right on the [Radix Network](?glossaryAnchor=radixnetwork) itself. This means that a DEX swap is done with a [transaction](?glossaryAnchor=transactions) and the [Radix Wallet](?glossaryAnchor=radixwallet) can show you exactly what’s going to happen, and let you apply [deposit guarantees](?glossaryAnchor=guarantees) to the results.\n\nLearn: [More about DEX dApps](https://learn.radixdlt.com/article/whats-a-dex)") + /// ## Deposit Guarantees + /// + /// Some Radix [transactions](?glossaryAnchor=transactions) may have unpredictable results. In these cases, deposit guarantees make sure you never get less than you expect when you do a transaction. + /// + /// For example, the result of a swap between assets using a [DEX](?glossaryAnchor=dex) depends on a current market price of the assets involved. You may see one price when considering the swap, but it typically changes by the time the network processes it. Deposit guarantees protect you by letting you specify a minimum amount that must be deposited to your account at the end of the swap transaction. + /// + /// To make this possible, the [Radix Network](?glossaryAnchor=radixnetwork) app and [Radix Wallet](?glossaryAnchor=radixwallet) work together. The wallet will show you whenever a deposit to your account is "estimated" rather than of a known quantity. And whenever that's true, you can set your own "guarantees" in the wallet on those estimated deposits – putting a limit on how much you expect to get for you to be willing to go through with the transaction. If that guarantee isn't met at the time the transaction is processed, the deal is off! The transaction is rejected by the Radix Network and no assets change hands. + /// + /// Learn: [More about deposit guarantees](https://learn.radixdlt.com/article/what-are-customizable-transaction-guarantees-on-radix) + public static let guarantees = L10n.tr("Localizable", "infoLink_glossary_guarantees", fallback: "## Deposit Guarantees\n\nSome Radix [transactions](?glossaryAnchor=transactions) may have unpredictable results. In these cases, deposit guarantees make sure you never get less than you expect when you do a transaction.\n\nFor example, the result of a swap between assets using a [DEX](?glossaryAnchor=dex) depends on a current market price of the assets involved. You may see one price when considering the swap, but it typically changes by the time the network processes it. Deposit guarantees protect you by letting you specify a minimum amount that must be deposited to your account at the end of the swap transaction.\n\nTo make this possible, the [Radix Network](?glossaryAnchor=radixnetwork) app and [Radix Wallet](?glossaryAnchor=radixwallet) work together. The wallet will show you whenever a deposit to your account is \"estimated\" rather than of a known quantity. And whenever that's true, you can set your own \"guarantees\" in the wallet on those estimated deposits – putting a limit on how much you expect to get for you to be willing to go through with the transaction. If that guarantee isn't met at the time the transaction is processed, the deal is off! The transaction is rejected by the Radix Network and no assets change hands.\n\nLearn: [More about deposit guarantees](https://learn.radixdlt.com/article/what-are-customizable-transaction-guarantees-on-radix)") + /// ## Radix Network Staking + /// + /// An important feature of the [Radix Network](?glossaryAnchor=radixnetwork) is that users can "stake" [XRD tokens](?glossaryAnchor=xrd) to increase the security of the network, and be rewarded for doing so. + /// + /// The process involves choosing one or more [validators](?glossaryAnchor=validators) to stake to, and then doing a [transaction](?glossaryAnchor=transactions) to send some XRD to the network to support those validators. You can unstake the XRD later to get them back – and you’ll find that you accumulated extra XRD in the meantime. + /// + /// The extra XRD you earn is proportional to how much XRD you stake, and is often called an "APY" (annual percentage yield). + /// + /// You can stake, unstake, and check on your validators and APY returns using the [Radix Dashboard](?glossaryAnchor=dashboard) dApp. + /// + /// Staking is a great way to put your XRD to work and earn a return, but it’s **not simply free money**. Choosing validators is like voting for who will run the Radix Network. If you choose a bad validator, you might help slow down the network or even help attack it. And you might not get the APY you expect. + /// + /// Get started with the links below before you stake a meaningful amount of XRD. + /// + /// Learn: [Radix staking introduction](https://learn.radixdlt.com/article/start-here-radix-staking-introduction) + /// + /// Learn: [How to choose validators](https://learn.radixdlt.com/article/how-should-i-choose-validators-to-stake-to) + public static let networkstaking = L10n.tr("Localizable", "infoLink_glossary_networkstaking", fallback: "## Radix Network Staking\n\nAn important feature of the [Radix Network](?glossaryAnchor=radixnetwork) is that users can \"stake\" [XRD tokens](?glossaryAnchor=xrd) to increase the security of the network, and be rewarded for doing so.\n\nThe process involves choosing one or more [validators](?glossaryAnchor=validators) to stake to, and then doing a [transaction](?glossaryAnchor=transactions) to send some XRD to the network to support those validators. You can unstake the XRD later to get them back – and you’ll find that you accumulated extra XRD in the meantime.\n\nThe extra XRD you earn is proportional to how much XRD you stake, and is often called an \"APY\" (annual percentage yield).\n\nYou can stake, unstake, and check on your validators and APY returns using the [Radix Dashboard](?glossaryAnchor=dashboard) dApp.\n\nStaking is a great way to put your XRD to work and earn a return, but it’s **not simply free money**. Choosing validators is like voting for who will run the Radix Network. If you choose a bad validator, you might help slow down the network or even help attack it. And you might not get the APY you expect.\n\nGet started with the links below before you stake a meaningful amount of XRD.\n\nLearn: [Radix staking introduction](https://learn.radixdlt.com/article/start-here-radix-staking-introduction)\n\nLearn: [How to choose validators](https://learn.radixdlt.com/article/how-should-i-choose-validators-to-stake-to)") + /// ## Non-fungible Token (NFT) + /// + /// Non-fungible tokens are a special class of web3 [token](?glossaryAnchor=radixwallet) where each token has a unique identity. + /// + /// Like other tokens, they can represent many things. But NFTs are used to represent things where each is different from another, like pieces of art, loan positions, treasury bonds, tickets to assigned-seating events, collectible cards, or equipment in games. + /// + /// The [Radix Network](?glossaryAnchor=radixnetwork) has special features specifically to make the creation and use of non-fungible tokens on Radix safe and predictable, and the [Radix Wallet](?glossaryAnchor=radixwallet) can automatically provide useful information about the NFTs you hold in your [Accounts](?glossaryAnchor=accounts). + /// + /// Learn: [More about NFTs](https://learn.radixdlt.com/article/what-is-an-nft) + /// + /// Blog: [Why tokens on Radix are better than other crypto networks](https://www.radixdlt.com/blog/its-10pm-do-you-know-where-your-tokens-are) + public static let nfts = L10n.tr("Localizable", "infoLink_glossary_nfts", fallback: "## Non-fungible Token (NFT)\n\nNon-fungible tokens are a special class of web3 [token](?glossaryAnchor=radixwallet) where each token has a unique identity.\n\nLike other tokens, they can represent many things. But NFTs are used to represent things where each is different from another, like pieces of art, loan positions, treasury bonds, tickets to assigned-seating events, collectible cards, or equipment in games.\n\nThe [Radix Network](?glossaryAnchor=radixnetwork) has special features specifically to make the creation and use of non-fungible tokens on Radix safe and predictable, and the [Radix Wallet](?glossaryAnchor=radixwallet) can automatically provide useful information about the NFTs you hold in your [Accounts](?glossaryAnchor=accounts).\n\nLearn: [More about NFTs](https://learn.radixdlt.com/article/what-is-an-nft)\n\nBlog: [Why tokens on Radix are better than other crypto networks](https://www.radixdlt.com/blog/its-10pm-do-you-know-where-your-tokens-are)") + /// ## Radix Personas + /// + /// Personas are the web3 replacement for the old email address and password login. Using a Persona of your choice, you can securely log in to [dApps](?glossaryAnchor=dapps) built on Radix without having to remember a password at all. + /// + /// Using your [Radix Wallet](?glossaryAnchor=radixwallet) app, you can create as many Personas as you like. Personas can also hold pieces of your personal information - like name and email address - that dApps can request access to, if you want to give permission. + /// + /// Learn: [More about Personas](https://learn.radixdlt.com/article/what-are-personas-and-identities) + /// + /// Blog: [Personas are logins for the web3 era](https://www.radixdlt.com/blog/personas-logins-for-the-web3-era) + public static let personas = L10n.tr("Localizable", "infoLink_glossary_personas", fallback: "## Radix Personas\n\nPersonas are the web3 replacement for the old email address and password login. Using a Persona of your choice, you can securely log in to [dApps](?glossaryAnchor=dapps) built on Radix without having to remember a password at all.\n\nUsing your [Radix Wallet](?glossaryAnchor=radixwallet) app, you can create as many Personas as you like. Personas can also hold pieces of your personal information - like name and email address - that dApps can request access to, if you want to give permission.\n\nLearn: [More about Personas](https://learn.radixdlt.com/article/what-are-personas-and-identities)\n\nBlog: [Personas are logins for the web3 era](https://www.radixdlt.com/blog/personas-logins-for-the-web3-era)") + /// ## Radix Connector Browser Extension + /// + /// When you want to use [dApp websites](?glossaryAnchor=dapps) on your desktop web browser, the Radix Connect browser extension helps make the connection to your [Radix Wallet](?glossaryAnchor=radixwallet) mobile app, quickly and securely. + /// + /// All you need to do is install it in your preferred desktop browser, link it to your Radix Wallet app via QR code, and it sits quietly in the background making the magic happen. It will also give you your list of [Accounts](?glossaryAnchor=accounts) for easy copying of addresses on desktop. + /// + /// To download and set up the Radix Connector browser extension, visit **wallet.radixdlt.com** in your preferred desktop browser. + /// + /// Learn: [More about Radix Connector browser extension](https://learn.radixdlt.com/article/what-is-the-radix-connector-browser-extension) + public static let radixconnector = L10n.tr("Localizable", "infoLink_glossary_radixconnector", fallback: "## Radix Connector Browser Extension\n\nWhen you want to use [dApp websites](?glossaryAnchor=dapps) on your desktop web browser, the Radix Connect browser extension helps make the connection to your [Radix Wallet](?glossaryAnchor=radixwallet) mobile app, quickly and securely.\n\nAll you need to do is install it in your preferred desktop browser, link it to your Radix Wallet app via QR code, and it sits quietly in the background making the magic happen. It will also give you your list of [Accounts](?glossaryAnchor=accounts) for easy copying of addresses on desktop.\n\nTo download and set up the Radix Connector browser extension, visit **wallet.radixdlt.com** in your preferred desktop browser.\n\nLearn: [More about Radix Connector browser extension](https://learn.radixdlt.com/article/what-is-the-radix-connector-browser-extension)") + /// ## The Radix Network + /// + /// Radix is an open network that makes [web3](?glossaryAnchor=web3) possible. Think of the Radix Network as a public place on the internet where users can directly control their own digital assets, and where those assets can move effortlessly between users and applications – without relying on any company. + /// + /// You can view and freely [transfer](?glossaryAnchor=transfers) your assets on the Radix Network using the [Radix Wallet](?glossaryAnchor=radixwallet) app. Applications built using the Radix Network’s capabilities (called [dApps](?glossaryAnchor=dapps) – like [RadQuest](?glossaryAnchor=radquest)) – have the ability to interact with these assets and identities, letting you do things that weren't possible before on the web. + /// + /// For example, all of the rewards that you earn on [RadQuest](?glossaryAnchor=radquest) are real Radix assets, which means that they aren’t stuck inside RadQuest. You’ll see them in your Radix Wallet and can transfer and trade them with others outside RadQuest. + /// + /// [The Official Radix Homepage](https://radixdlt.com) + /// + /// Learn: [More about the Radix Network](https://learn.radixdlt.com/article/what-are-the-radix-public-network-and-radix-ledger) + public static let radixnetwork = L10n.tr("Localizable", "infoLink_glossary_radixnetwork", fallback: "## The Radix Network\n\nRadix is an open network that makes [web3](?glossaryAnchor=web3) possible. Think of the Radix Network as a public place on the internet where users can directly control their own digital assets, and where those assets can move effortlessly between users and applications – without relying on any company.\n\nYou can view and freely [transfer](?glossaryAnchor=transfers) your assets on the Radix Network using the [Radix Wallet](?glossaryAnchor=radixwallet) app. Applications built using the Radix Network’s capabilities (called [dApps](?glossaryAnchor=dapps) – like [RadQuest](?glossaryAnchor=radquest)) – have the ability to interact with these assets and identities, letting you do things that weren't possible before on the web.\n\nFor example, all of the rewards that you earn on [RadQuest](?glossaryAnchor=radquest) are real Radix assets, which means that they aren’t stuck inside RadQuest. You’ll see them in your Radix Wallet and can transfer and trade them with others outside RadQuest.\n\n[The Official Radix Homepage](https://radixdlt.com)\n\nLearn: [More about the Radix Network](https://learn.radixdlt.com/article/what-are-the-radix-public-network-and-radix-ledger)") + /// ## Radix Wallet + /// + /// The Radix Wallet is an iOS and Android mobile app that is your gateway to the capabilities of the Radix Network. + /// + /// It helps you create and use [Accounts](?glossaryAnchor=accounts) that can hold all of your digital assets on Radix, and [Personas](?glossaryAnchor=personas) that you can use to securely log in to [dApps](?glossaryAnchor=dapps) built on Radix without a password. + /// + /// The Radix Wallet also makes sure that you are always in control of [transactions](?glossaryAnchor=transactions) that interact with your Accounts and assets. + /// + /// Think of the Radix Wallet as your companion as you move between dApps on Radix – keeping your assets safe, and letting you choose who you are and what you bring with you on each dApp. + /// + /// The Radix Wallet was created by the team who created the Radix Network’s technology, and is offered for free (and open-source) to let anyone use Radix and dApps built on Radix. + /// + /// [Get the Radix Wallet](https://wallet.radixdlt.com/) + /// + /// Learn: [More about the Radix Wallet](https://learn.radixdlt.com/article/what-is-the-radix-wallet) + public static let radixwallet = L10n.tr("Localizable", "infoLink_glossary_radixwallet", fallback: "## Radix Wallet\n\nThe Radix Wallet is an iOS and Android mobile app that is your gateway to the capabilities of the Radix Network.\n\nIt helps you create and use [Accounts](?glossaryAnchor=accounts) that can hold all of your digital assets on Radix, and [Personas](?glossaryAnchor=personas) that you can use to securely log in to [dApps](?glossaryAnchor=dapps) built on Radix without a password.\n\nThe Radix Wallet also makes sure that you are always in control of [transactions](?glossaryAnchor=transactions) that interact with your Accounts and assets.\n\nThink of the Radix Wallet as your companion as you move between dApps on Radix – keeping your assets safe, and letting you choose who you are and what you bring with you on each dApp.\n\nThe Radix Wallet was created by the team who created the Radix Network’s technology, and is offered for free (and open-source) to let anyone use Radix and dApps built on Radix.\n\n[Get the Radix Wallet](https://wallet.radixdlt.com/)\n\nLearn: [More about the Radix Wallet](https://learn.radixdlt.com/article/what-is-the-radix-wallet)") + /// ## RadQuest + /// + /// RadQuest is a [dApp](?glossaryAnchor=dapps) created by the creators of the [Radix Network](?glossaryAnchor=radixnetwork) and [Radix Wallet](?glossaryAnchor=radixwallet) to help people get started on Radix and learn about web3, while having a little fun and earning some rewards. + /// + /// After going through the quests of RadQuest, you should be fully set up to use dApps on Radix, and can start finding exciting opportunities in the Radix community and Radix ecosystem. + public static let radquest = L10n.tr("Localizable", "infoLink_glossary_radquest", fallback: "## RadQuest\n\nRadQuest is a [dApp](?glossaryAnchor=dapps) created by the creators of the [Radix Network](?glossaryAnchor=radixnetwork) and [Radix Wallet](?glossaryAnchor=radixwallet) to help people get started on Radix and learn about web3, while having a little fun and earning some rewards.\n\nAfter going through the quests of RadQuest, you should be fully set up to use dApps on Radix, and can start finding exciting opportunities in the Radix community and Radix ecosystem.") + /// ## Token + /// + /// Token is the general term for any kind of web3 asset that you can hold in a crypto wallet. + /// + /// Tokens can represent many things, like dollars and euros, shares of companies, cryptocurrencies, or imaginary currencies in games. One special kind of token on Radix is [XRD](?glossaryAnchor=xrd). + /// + /// The [Radix Network](?glossaryAnchor=radixnetwork) has special features specifically to make the creation and use of tokens on Radix safe and predictable, and the [Radix Wallet](?glossaryAnchor=radixwallet) can automatically provide useful information about the tokens you hold in your [Accounts](?glossaryAnchor=accounts). + /// + /// Usually “token” is used specifically to refer to assets that are all alike. For example, one XRD token is exactly the same as any other XRD token. Assets where each token has a unique identity have a special term: [a non-fungible token or NFT](?glossaryAnchor=nfts). + /// + /// Learn: [More about tokens](https://learn.radixdlt.com/article/what-is-a-token) + /// + /// Blog: [Why tokens on Radix are better than other crypto networks](https://www.radixdlt.com/blog/its-10pm-do-you-know-where-your-tokens-are) + public static let tokens = L10n.tr("Localizable", "infoLink_glossary_tokens", fallback: "## Token\n\nToken is the general term for any kind of web3 asset that you can hold in a crypto wallet.\n\nTokens can represent many things, like dollars and euros, shares of companies, cryptocurrencies, or imaginary currencies in games. One special kind of token on Radix is [XRD](?glossaryAnchor=xrd).\n\nThe [Radix Network](?glossaryAnchor=radixnetwork) has special features specifically to make the creation and use of tokens on Radix safe and predictable, and the [Radix Wallet](?glossaryAnchor=radixwallet) can automatically provide useful information about the tokens you hold in your [Accounts](?glossaryAnchor=accounts).\n\nUsually “token” is used specifically to refer to assets that are all alike. For example, one XRD token is exactly the same as any other XRD token. Assets where each token has a unique identity have a special term: [a non-fungible token or NFT](?glossaryAnchor=nfts).\n\nLearn: [More about tokens](https://learn.radixdlt.com/article/what-is-a-token)\n\nBlog: [Why tokens on Radix are better than other crypto networks](https://www.radixdlt.com/blog/its-10pm-do-you-know-where-your-tokens-are)") + /// ## Transaction Fee + /// + /// Each time a [transaction](?glossaryAnchor=transactions) is submitted to the [Radix Network](?glossaryAnchor=radixnetwork), a _very_ small fee (usually only a few cents) has to be paid to the network itself. + /// + /// This fee must be paid in [XRD tokens](?glossaryAnchor=xrd) and is paid as a part of each transaction. For transactions you submit to the network in your [Radix Wallet](?glossaryAnchor=radixwallet), you will see how much it will cost before you submit, and you can choose which [Account](?glossaryAnchor=accounts) you want to pay the fee from. + /// + /// Learn: [More about transaction fees](https://learn.radixdlt.com/article/how-do-transaction-fees-work-on-radix) + public static let transactionfee = L10n.tr("Localizable", "infoLink_glossary_transactionfee", fallback: "## Transaction Fee\n\nEach time a [transaction](?glossaryAnchor=transactions) is submitted to the [Radix Network](?glossaryAnchor=radixnetwork), a _very_ small fee (usually only a few cents) has to be paid to the network itself.\n\nThis fee must be paid in [XRD tokens](?glossaryAnchor=xrd) and is paid as a part of each transaction. For transactions you submit to the network in your [Radix Wallet](?glossaryAnchor=radixwallet), you will see how much it will cost before you submit, and you can choose which [Account](?glossaryAnchor=accounts) you want to pay the fee from.\n\nLearn: [More about transaction fees](https://learn.radixdlt.com/article/how-do-transaction-fees-work-on-radix)") + /// ## Transactions + /// + /// Any time a user or application wants to move assets around on the [Radix Network](?glossaryAnchor=radixnetwork), they must sign and submit a transaction to the network to do it. + /// + /// A transaction on Radix is basically a set of instructions to the network that might include things like "withdraw 10 XRD from my account" or "pass 2 RadGem NFTs to RadQuest". + /// + /// Transactions can be very simple – like sending tokens to somebody – or can be complex, with lots of steps and interactions with dApps. But no matter what, any time a transaction touches your own assets, you will see and approve it in your [Radix Wallet](?glossaryAnchor=radixwallet) app first. + /// + /// Learn: [More about transactions](https://learn.radixdlt.com/article/what-is-a-transaction-in-crypto) + /// + /// Blog: [How Radix’s transactions are better than other crypto networks’](https://www.radixdlt.com/blog/radixs-asset-oriented-transactions) + public static let transactions = L10n.tr("Localizable", "infoLink_glossary_transactions", fallback: "## Transactions\n\nAny time a user or application wants to move assets around on the [Radix Network](?glossaryAnchor=radixnetwork), they must sign and submit a transaction to the network to do it.\n\nA transaction on Radix is basically a set of instructions to the network that might include things like \"withdraw 10 XRD from my account\" or \"pass 2 RadGem NFTs to RadQuest\".\n\nTransactions can be very simple – like sending tokens to somebody – or can be complex, with lots of steps and interactions with dApps. But no matter what, any time a transaction touches your own assets, you will see and approve it in your [Radix Wallet](?glossaryAnchor=radixwallet) app first.\n\nLearn: [More about transactions](https://learn.radixdlt.com/article/what-is-a-transaction-in-crypto)\n\nBlog: [How Radix’s transactions are better than other crypto networks’](https://www.radixdlt.com/blog/radixs-asset-oriented-transactions)") + /// ## Asset Transfers + /// + /// The simplest kind of [transaction](?glossaryAnchor=transactions) on Radix is an asset transfer. It is simply a transaction to move a [token](?glossaryAnchor=tokens) or [NFT](?glossaryAnchor=nfts) from one [Account](?glossaryAnchor=accounts) to another. + /// + /// The [Radix Wallet](?glossaryAnchor=radixwallet) lets you do asset transfers from your own Accounts without using any other [dApp](?glossaryAnchor=dapps). Simply go into the Account, tap the “Transfer” button, and fill in the recipient and the assets you want to transfer there. You can even choose multiple recipients and assets in a single asset transfer transaction. + public static let transfers = L10n.tr("Localizable", "infoLink_glossary_transfers", fallback: "## Asset Transfers\n\nThe simplest kind of [transaction](?glossaryAnchor=transactions) on Radix is an asset transfer. It is simply a transaction to move a [token](?glossaryAnchor=tokens) or [NFT](?glossaryAnchor=nfts) from one [Account](?glossaryAnchor=accounts) to another.\n\nThe [Radix Wallet](?glossaryAnchor=radixwallet) lets you do asset transfers from your own Accounts without using any other [dApp](?glossaryAnchor=dapps). Simply go into the Account, tap the “Transfer” button, and fill in the recipient and the assets you want to transfer there. You can even choose multiple recipients and assets in a single asset transfer transaction.") + /// ## Radix Network Validators + /// + /// The [Radix Network](?glossaryAnchor=radixnetwork) is an open network that anybody can freely use. To make that possible, the network isn’t run by a company, but by an open community of "validators". + /// + /// Each validator is a server run by somebody that helps "validate" [transactions](?glossaryAnchor=transactions). Working together, validators make sure that transactions are correctly processed and committed on the Radix Network. + /// + /// When you [stake XRD tokens to the network](?glossaryAnchor=networkstaking), you select validators that you trust to correctly and reliably keep running the Radix Network - it's a big responsibility, kind of like voting in an open election to pick good leaders. + /// + /// Start with the link below to consider how you choose the validators that you stake to. + /// + /// Learn: [How to choose validators](https://learn.radixdlt.com/article/how-should-i-choose-validators-to-stake-to) + public static let validators = L10n.tr("Localizable", "infoLink_glossary_validators", fallback: "## Radix Network Validators\n\nThe [Radix Network](?glossaryAnchor=radixnetwork) is an open network that anybody can freely use. To make that possible, the network isn’t run by a company, but by an open community of \"validators\".\n\nEach validator is a server run by somebody that helps \"validate\" [transactions](?glossaryAnchor=transactions). Working together, validators make sure that transactions are correctly processed and committed on the Radix Network.\n\nWhen you [stake XRD tokens to the network](?glossaryAnchor=networkstaking), you select validators that you trust to correctly and reliably keep running the Radix Network - it's a big responsibility, kind of like voting in an open election to pick good leaders.\n\nStart with the link below to consider how you choose the validators that you stake to.\n\nLearn: [How to choose validators](https://learn.radixdlt.com/article/how-should-i-choose-validators-to-stake-to)") + /// ## Web3 + /// + /// In the beginning, the web was all about just viewing content produced by other people. Here’s a webpage, look at it, click it. That was Web1. + /// + /// **Web2** made it possible for users to create their own content online. Social media, social news, photo sharing, and more became possible – communicating on the web became a 2-way street + /// + /// However, parts of the web are still a 1-way street. While we have control of what we create and share, we don’t have control over _what we own_ and _who we are_. Your money and everything you can do with it is still locked inside separate bank or payment apps, and your logins are specific to every website (if not controlled by Google or Apple or Meta). + /// + /// **Web3** now adds the ability for users to own their own digital assets and digital identities online, and allows websites and other applications to interact with these truly digital-native assets and identities in powerful new ways. + /// + /// Cryptocurrencies like Bitcoin were the very beginning of web3, but it goes so much further. In web3, “Decentralized Finance” becomes possible, making finance cheaper, better, and more accessible to anyone – financial services compete to put your money to work, rather than charging you for the privilege of holding it. And new things become possible; imagine logging out of your favorite game, but taking your equipment with you to trade with others directly, outside the game? + /// + /// This new capability is generally enabled by blockchain technology, but it is in its early days. [Radix](?glossaryAnchor=radixnetwork) is pushing the cutting edge of making web3 ready for average users and real applications that matter. + public static let web3 = L10n.tr("Localizable", "infoLink_glossary_web3", fallback: "## Web3\n\nIn the beginning, the web was all about just viewing content produced by other people. Here’s a webpage, look at it, click it. That was Web1.\n\n**Web2** made it possible for users to create their own content online. Social media, social news, photo sharing, and more became possible – communicating on the web became a 2-way street\n\nHowever, parts of the web are still a 1-way street. While we have control of what we create and share, we don’t have control over _what we own_ and _who we are_. Your money and everything you can do with it is still locked inside separate bank or payment apps, and your logins are specific to every website (if not controlled by Google or Apple or Meta).\n\n**Web3** now adds the ability for users to own their own digital assets and digital identities online, and allows websites and other applications to interact with these truly digital-native assets and identities in powerful new ways.\n\nCryptocurrencies like Bitcoin were the very beginning of web3, but it goes so much further. In web3, “Decentralized Finance” becomes possible, making finance cheaper, better, and more accessible to anyone – financial services compete to put your money to work, rather than charging you for the privilege of holding it. And new things become possible; imagine logging out of your favorite game, but taking your equipment with you to trade with others directly, outside the game?\n\nThis new capability is generally enabled by blockchain technology, but it is in its early days. [Radix](?glossaryAnchor=radixnetwork) is pushing the cutting edge of making web3 ready for average users and real applications that matter.") + /// ## XRD Token + /// + /// XRD is the official Radix Network token. It is created by the [Radix Network](?glossaryAnchor=radixnetwork) itself and users and applications can use it to use features of the network. For example, [transaction fees](?glossaryAnchor=transactionfee) are always paid in XRD, and XRD is the only token that can be used to participate in [Radix Network staking](?glossaryAnchor=networkstaking). + /// + /// Because XRD has a special role on Radix, XRD is also frequently used by [dApps](?glossaryAnchor=dapps) on Radix as a convenient form of money to pay for things and to enable exchanges with other tokens. + /// + /// [Options to buy XRD tokens](https://www.radixdlt.com/token) + /// + /// Learn: [More about the XRD token](https://learn.radixdlt.com/article/what-is-the-xrd-token) + public static let xrd = L10n.tr("Localizable", "infoLink_glossary_xrd", fallback: "## XRD Token\n\nXRD is the official Radix Network token. It is created by the [Radix Network](?glossaryAnchor=radixnetwork) itself and users and applications can use it to use features of the network. For example, [transaction fees](?glossaryAnchor=transactionfee) are always paid in XRD, and XRD is the only token that can be used to participate in [Radix Network staking](?glossaryAnchor=networkstaking).\n\nBecause XRD has a special role on Radix, XRD is also frequently used by [dApps](?glossaryAnchor=dapps) on Radix as a convenient form of money to pay for things and to enable exchanges with other tokens.\n\n[Options to buy XRD tokens](https://www.radixdlt.com/token)\n\nLearn: [More about the XRD token](https://learn.radixdlt.com/article/what-is-the-xrd-token)") + } + } public enum LedgerHardwareDevices { /// Added public static let addedHeading = L10n.tr("Localizable", "ledgerHardwareDevices_addedHeading", fallback: "Added") @@ -2795,26 +3035,10 @@ public enum L10n { public static func multipleConnectedAccounts(_ p1: Int) -> String { return L10n.tr("Localizable", "seedPhrases_seedPhrase_multipleConnectedAccounts", p1, fallback: "Connected to %d Accounts") } - /// Connected to %d Accounts - public static func multipleConnectedAccountsReveal(_ p1: Int) -> String { - return L10n.tr("Localizable", "seedPhrases_seedPhrase_multipleConnectedAccountsReveal", p1, fallback: "Connected to %d Accounts") - } - /// Currently connected to %d Accounts - public static func multipleConnectedAccountsScan(_ p1: Int) -> String { - return L10n.tr("Localizable", "seedPhrases_seedPhrase_multipleConnectedAccountsScan", p1, fallback: "Currently connected to %d Accounts") - } /// Not connected to any Accounts public static let noConnectedAccounts = L10n.tr("Localizable", "seedPhrases_seedPhrase_noConnectedAccounts", fallback: "Not connected to any Accounts") - /// Not connected to any Accounts - public static let noConnectedAccountsReveal = L10n.tr("Localizable", "seedPhrases_seedPhrase_noConnectedAccountsReveal", fallback: "Not connected to any Accounts") - /// Not yet connected to any Accounts - public static let noConnectedAccountsScan = L10n.tr("Localizable", "seedPhrases_seedPhrase_noConnectedAccountsScan", fallback: "Not yet connected to any Accounts") /// Connected to 1 Account public static let oneConnectedAccount = L10n.tr("Localizable", "seedPhrases_seedPhrase_oneConnectedAccount", fallback: "Connected to 1 Account") - /// Connected to 1 Account - public static let oneConnectedAccountReveal = L10n.tr("Localizable", "seedPhrases_seedPhrase_oneConnectedAccountReveal", fallback: "Connected to 1 Account") - /// Currently connected to 1 Account - public static let oneConnectedAccountScan = L10n.tr("Localizable", "seedPhrases_seedPhrase_oneConnectedAccountScan", fallback: "Currently connected to 1 Account") } } public enum Settings { @@ -3018,12 +3242,8 @@ public enum L10n { public static let estimated = L10n.tr("Localizable", "transactionReview_estimated", fallback: "Estimated") /// Account public static let externalAccountName = L10n.tr("Localizable", "transactionReview_externalAccountName", fallback: "Account") - /// Fee payer account required - public static let feePayerRequiredMessage = L10n.tr("Localizable", "transactionReview_feePayerRequiredMessage", fallback: "Fee payer account required") /// Guaranteed public static let guaranteed = L10n.tr("Localizable", "transactionReview_guaranteed", fallback: "Guaranteed") - /// Not enough XRD for transaction fee - public static let insufficientBalance = L10n.tr("Localizable", "transactionReview_insufficientBalance", fallback: "Not enough XRD for transaction fee") /// Message public static let messageHeading = L10n.tr("Localizable", "transactionReview_messageHeading", fallback: "Message") /// Contributing to pools diff --git a/RadixWallet/Core/Resources/Resources/en.lproj/Localizable.strings b/RadixWallet/Core/Resources/Resources/en.lproj/Localizable.strings index 885a73c206..afcf916d88 100644 --- a/RadixWallet/Core/Resources/Resources/en.lproj/Localizable.strings +++ b/RadixWallet/Core/Resources/Resources/en.lproj/Localizable.strings @@ -419,8 +419,6 @@ "transactionReview_poolUnits" = "Pool Units"; "transactionReview_slideToSign" = "Slide to Sign"; "transactionReview_xrdAmount" = "%@ XRD"; -"transactionReview_insufficientBalance" = "Not enough XRD for transaction fee"; -"transactionReview_feePayerRequiredMessage" = "Fee payer account required"; "transactionReview_withdrawalsHeading" = "Withdrawing From"; "transactionReview_depositsHeading" = "Depositing To"; "transactionReview_sendingToHeading" = "Sending to"; @@ -767,13 +765,7 @@ Code: %@"; "seedPhrases_hiddenAccountsOnly" = "Hidden Accounts only"; "seedPhrases_seedPhrase_headingNeedsImport" = "Seed Phrase Entry Required"; "seedPhrases_seedPhrase_headingReveal" = "Reveal Seed Phrase"; -"seedPhrases_seedPhrase_noConnectedAccountsReveal" = "Not connected to any Accounts"; -"seedPhrases_seedPhrase_oneConnectedAccountReveal" = "Connected to 1 Account"; -"seedPhrases_seedPhrase_multipleConnectedAccountsReveal" = "Connected to %d Accounts"; "seedPhrases_seedPhrase_headingScan" = "Seed Phrase"; -"seedPhrases_seedPhrase_noConnectedAccountsScan" = "Not yet connected to any Accounts"; -"seedPhrases_seedPhrase_oneConnectedAccountScan" = "Currently connected to 1 Account"; -"seedPhrases_seedPhrase_multipleConnectedAccountsScan" = "Currently connected to %d Accounts"; "seedPhrases_seedPhrase_noConnectedAccounts" = "Not connected to any Accounts"; "seedPhrases_seedPhrase_oneConnectedAccount" = "Connected to 1 Account"; "seedPhrases_seedPhrase_multipleConnectedAccounts" = "Connected to %d Accounts"; @@ -1243,4 +1235,26 @@ Code: %@"; "scanQR_connectorExtension_disclosureItem1" = "Go to **wallet.radixdlt.com** in your desktop browser."; "scanQR_connectorExtension_disclosureItem2" = "Follow the instructions there to install the Radix Connector."; "scanQR_account_instructions" = "Scan a QR code of a Radix Account address from another wallet or an exchange."; -"scanQR_importOlympia_instructions" = "Scan the QR code shown in the Export section of the Radix Desktop Wallet for Olympia."; \ No newline at end of file +"scanQR_importOlympia_instructions" = "Scan the QR code shown in the Export section of the Radix Desktop Wallet for Olympia."; +"infoLink_glossary_radixnetwork" = "## The Radix Network\n\nRadix is an open network that makes [web3](?glossaryAnchor=web3) possible. Think of the Radix Network as a public place on the internet where users can directly control their own digital assets, and where those assets can move effortlessly between users and applications – without relying on any company.\n\nYou can view and freely [transfer](?glossaryAnchor=transfers) your assets on the Radix Network using the [Radix Wallet](?glossaryAnchor=radixwallet) app. Applications built using the Radix Network’s capabilities (called [dApps](?glossaryAnchor=dapps) – like [RadQuest](?glossaryAnchor=radquest)) – have the ability to interact with these assets and identities, letting you do things that weren\'t possible before on the web.\n\nFor example, all of the rewards that you earn on [RadQuest](?glossaryAnchor=radquest) are real Radix assets, which means that they aren’t stuck inside RadQuest. You’ll see them in your Radix Wallet and can transfer and trade them with others outside RadQuest.\n\n[The Official Radix Homepage](https://radixdlt.com)\n\nLearn: [More about the Radix Network](https://learn.radixdlt.com/article/what-are-the-radix-public-network-and-radix-ledger)"; +"infoLink_glossary_radquest" = "## RadQuest\n\nRadQuest is a [dApp](?glossaryAnchor=dapps) created by the creators of the [Radix Network](?glossaryAnchor=radixnetwork) and [Radix Wallet](?glossaryAnchor=radixwallet) to help people get started on Radix and learn about web3, while having a little fun and earning some rewards.\n\nAfter going through the quests of RadQuest, you should be fully set up to use dApps on Radix, and can start finding exciting opportunities in the Radix community and Radix ecosystem."; +"infoLink_glossary_tokens" = "## Token\n\nToken is the general term for any kind of web3 asset that you can hold in a crypto wallet.\n\nTokens can represent many things, like dollars and euros, shares of companies, cryptocurrencies, or imaginary currencies in games. One special kind of token on Radix is [XRD](?glossaryAnchor=xrd).\n\nThe [Radix Network](?glossaryAnchor=radixnetwork) has special features specifically to make the creation and use of tokens on Radix safe and predictable, and the [Radix Wallet](?glossaryAnchor=radixwallet) can automatically provide useful information about the tokens you hold in your [Accounts](?glossaryAnchor=accounts).\n\nUsually “token” is used specifically to refer to assets that are all alike. For example, one XRD token is exactly the same as any other XRD token. Assets where each token has a unique identity have a special term: [a non-fungible token or NFT](?glossaryAnchor=nfts).\n\nLearn: [More about tokens](https://learn.radixdlt.com/article/what-is-a-token)\n\nBlog: [Why tokens on Radix are better than other crypto networks](https://www.radixdlt.com/blog/its-10pm-do-you-know-where-your-tokens-are)"; +"infoLink_glossary_nfts" = "## Non-fungible Token (NFT)\n\nNon-fungible tokens are a special class of web3 [token](?glossaryAnchor=radixwallet) where each token has a unique identity.\n\nLike other tokens, they can represent many things. But NFTs are used to represent things where each is different from another, like pieces of art, loan positions, treasury bonds, tickets to assigned-seating events, collectible cards, or equipment in games.\n\nThe [Radix Network](?glossaryAnchor=radixnetwork) has special features specifically to make the creation and use of non-fungible tokens on Radix safe and predictable, and the [Radix Wallet](?glossaryAnchor=radixwallet) can automatically provide useful information about the NFTs you hold in your [Accounts](?glossaryAnchor=accounts).\n\nLearn: [More about NFTs](https://learn.radixdlt.com/article/what-is-an-nft)\n\nBlog: [Why tokens on Radix are better than other crypto networks](https://www.radixdlt.com/blog/its-10pm-do-you-know-where-your-tokens-are)"; +"infoLink_glossary_web3" = "## Web3\n\nIn the beginning, the web was all about just viewing content produced by other people. Here’s a webpage, look at it, click it. That was Web1.\n\n**Web2** made it possible for users to create their own content online. Social media, social news, photo sharing, and more became possible – communicating on the web became a 2-way street\n\nHowever, parts of the web are still a 1-way street. While we have control of what we create and share, we don’t have control over _what we own_ and _who we are_. Your money and everything you can do with it is still locked inside separate bank or payment apps, and your logins are specific to every website (if not controlled by Google or Apple or Meta).\n\n**Web3** now adds the ability for users to own their own digital assets and digital identities online, and allows websites and other applications to interact with these truly digital-native assets and identities in powerful new ways.\n\nCryptocurrencies like Bitcoin were the very beginning of web3, but it goes so much further. In web3, “Decentralized Finance” becomes possible, making finance cheaper, better, and more accessible to anyone – financial services compete to put your money to work, rather than charging you for the privilege of holding it. And new things become possible; imagine logging out of your favorite game, but taking your equipment with you to trade with others directly, outside the game?\n\nThis new capability is generally enabled by blockchain technology, but it is in its early days. [Radix](?glossaryAnchor=radixnetwork) is pushing the cutting edge of making web3 ready for average users and real applications that matter."; +"infoLink_glossary_accounts" = "## Radix Accounts\n\nAccounts are secure containers for any kind of digital asset on the [Radix Network](?glossaryAnchor=radixnetwork).\n\nUnlike an account on a bank or other service, there is no company that controls your Radix Accounts for you. Your [Radix Wallet](?glossaryAnchor=radixwallet) app on your phone gives you direct access to your Accounts on the network, and can help you regain access to your Accounts if you lose your phone.\n\nCompared to accounts on other crypto networks, Radix Accounts are so much more clever, they’re sometimes called “Smart Accounts”.\n\nLearn: [More about Smart Accounts](https://learn.radixdlt.com/article/what-are-smart-accounts)\n\nBlog: [Smart Account multi-factor and other features](https://www.radixdlt.com/blog/how-radix-multi-factor-smart-accounts-work-and-what-they-can-do)"; +"infoLink_glossary_personas" = "## Radix Personas\n\nPersonas are the web3 replacement for the old email address and password login. Using a Persona of your choice, you can securely log in to [dApps](?glossaryAnchor=dapps) built on Radix without having to remember a password at all.\n\nUsing your [Radix Wallet](?glossaryAnchor=radixwallet) app, you can create as many Personas as you like. Personas can also hold pieces of your personal information - like name and email address - that dApps can request access to, if you want to give permission.\n\nLearn: [More about Personas](https://learn.radixdlt.com/article/what-are-personas-and-identities)\n\nBlog: [Personas are logins for the web3 era](https://www.radixdlt.com/blog/personas-logins-for-the-web3-era)"; +"infoLink_glossary_radixwallet" = "## Radix Wallet\n\nThe Radix Wallet is an iOS and Android mobile app that is your gateway to the capabilities of the Radix Network.\n\nIt helps you create and use [Accounts](?glossaryAnchor=accounts) that can hold all of your digital assets on Radix, and [Personas](?glossaryAnchor=personas) that you can use to securely log in to [dApps](?glossaryAnchor=dapps) built on Radix without a password.\n\nThe Radix Wallet also makes sure that you are always in control of [transactions](?glossaryAnchor=transactions) that interact with your Accounts and assets.\n\nThink of the Radix Wallet as your companion as you move between dApps on Radix – keeping your assets safe, and letting you choose who you are and what you bring with you on each dApp.\n\nThe Radix Wallet was created by the team who created the Radix Network’s technology, and is offered for free (and open-source) to let anyone use Radix and dApps built on Radix.\n\n[Get the Radix Wallet](https://wallet.radixdlt.com/)\n\nLearn: [More about the Radix Wallet](https://learn.radixdlt.com/article/what-is-the-radix-wallet)"; +"infoLink_glossary_dapps" = "## dApps\n\nDecentralized applications, or dApps, are basically any application that makes use of web3 features.\n\nIn web3, users control their own digital assets and identity. That’s much different from typical webpages and other apps today. For example, to access your money, you have to do it through a banking or payments app. Your login to every website is owned by that website, or else you use something like your Google login, which is owned by Google.\n\nBut in web3, you can hold your money in an [account](?glossaryAnchor=accounts) that you control directly with a [wallet](?glossaryAnchor=radixwallet) app, and you can create your own [login](?glossaryAnchor=personas) in your wallet app and use that in many places.\n\nDoing things that way is “decentralized” – and it means that websites and applications need to be built specially to interact with wallet apps, self-owned accounts, and self-owned logins. That’s what makes them dApps.\n\nIn the end, web3 dApps can do many things that were never possible before. For example, a [decentralized exchange](?glossaryAnchor=dex) dApp can let you instantly swap between two different kinds of assets right from your wallet in just a tap.\n\n[Radix dApp Ecosystem Page](https://www.radixdlt.com/ecosystem)"; +"infoLink_glossary_transactions" = "## Transactions\n\nAny time a user or application wants to move assets around on the [Radix Network](?glossaryAnchor=radixnetwork), they must sign and submit a transaction to the network to do it.\n\nA transaction on Radix is basically a set of instructions to the network that might include things like \"withdraw 10 XRD from my account\" or \"pass 2 RadGem NFTs to RadQuest\".\n\nTransactions can be very simple – like sending tokens to somebody – or can be complex, with lots of steps and interactions with dApps. But no matter what, any time a transaction touches your own assets, you will see and approve it in your [Radix Wallet](?glossaryAnchor=radixwallet) app first.\n\nLearn: [More about transactions](https://learn.radixdlt.com/article/what-is-a-transaction-in-crypto)\n\nBlog: [How Radix’s transactions are better than other crypto networks’](https://www.radixdlt.com/blog/radixs-asset-oriented-transactions)"; +"infoLink_glossary_transactionfee" = "## Transaction Fee\n\nEach time a [transaction](?glossaryAnchor=transactions) is submitted to the [Radix Network](?glossaryAnchor=radixnetwork), a _very_ small fee (usually only a few cents) has to be paid to the network itself.\n\nThis fee must be paid in [XRD tokens](?glossaryAnchor=xrd) and is paid as a part of each transaction. For transactions you submit to the network in your [Radix Wallet](?glossaryAnchor=radixwallet), you will see how much it will cost before you submit, and you can choose which [Account](?glossaryAnchor=accounts) you want to pay the fee from.\n\nLearn: [More about transaction fees](https://learn.radixdlt.com/article/how-do-transaction-fees-work-on-radix)"; +"infoLink_glossary_xrd" = "## XRD Token\n\nXRD is the official Radix Network token. It is created by the [Radix Network](?glossaryAnchor=radixnetwork) itself and users and applications can use it to use features of the network. For example, [transaction fees](?glossaryAnchor=transactionfee) are always paid in XRD, and XRD is the only token that can be used to participate in [Radix Network staking](?glossaryAnchor=networkstaking).\n\nBecause XRD has a special role on Radix, XRD is also frequently used by [dApps](?glossaryAnchor=dapps) on Radix as a convenient form of money to pay for things and to enable exchanges with other tokens.\n\n[Options to buy XRD tokens](https://www.radixdlt.com/token)\n\nLearn: [More about the XRD token](https://learn.radixdlt.com/article/what-is-the-xrd-token)"; +"infoLink_glossary_badges" = "## Badges\n\n[Tokens](?glossaryAnchor=tokens) and [NFTs](?glossaryAnchor=nfts) can represent almost anything. The [Radix Network](?glossaryAnchor=radixnetwork) makes it possible to use ownership of a token or NFT to authorize the holder to access to certain [dApp](?glossaryAnchor=dapps) functionality. Tokens or NFTs used in this way are referred to as “badges”, indicating that only the holder of the badge can use it for authorization.\n\nWhen a badge is used to authorize access in a [transaction](?glossaryAnchor=transactions), you will see it listed in the [Radix Wallet’s](?glossaryAnchor=radixwallet) summary of the transaction under “presenting”. The badge isn’t being sent anywhere; all that’s happening is that you are providing proof that you own the badge.\n\nLearn: [More about badges on Radix](https://learn.radixdlt.com/article/whats-a-badge)"; +"infoLink_glossary_transfers" = "## Asset Transfers\n\nThe simplest kind of [transaction](?glossaryAnchor=transactions) on Radix is an asset transfer. It is simply a transaction to move a [token](?glossaryAnchor=tokens) or [NFT](?glossaryAnchor=nfts) from one [Account](?glossaryAnchor=accounts) to another.\n\nThe [Radix Wallet](?glossaryAnchor=radixwallet) lets you do asset transfers from your own Accounts without using any other [dApp](?glossaryAnchor=dapps). Simply go into the Account, tap the “Transfer” button, and fill in the recipient and the assets you want to transfer there. You can even choose multiple recipients and assets in a single asset transfer transaction."; +"infoLink_glossary_dex" = "## Decentralized Exchange (DEX)\n\nA decentralized exchange, or \"DEX\" for short, is a [dApp](?glossaryAnchor=dapps) that offers something a bit like a much more powerful web3 version of a foreign currency exchange counter at the airport.\n\nA DEX dApp lets users do instant and fully automated swaps between a huge variety of tokens or other digital assets. The exchange logic runs right on the [Radix Network](?glossaryAnchor=radixnetwork) itself. This means that a DEX swap is done with a [transaction](?glossaryAnchor=transactions) and the [Radix Wallet](?glossaryAnchor=radixwallet) can show you exactly what’s going to happen, and let you apply [deposit guarantees](?glossaryAnchor=guarantees) to the results.\n\nLearn: [More about DEX dApps](https://learn.radixdlt.com/article/whats-a-dex)"; +"infoLink_glossary_guarantees" = "## Deposit Guarantees\n\nSome Radix [transactions](?glossaryAnchor=transactions) may have unpredictable results. In these cases, deposit guarantees make sure you never get less than you expect when you do a transaction.\n\nFor example, the result of a swap between assets using a [DEX](?glossaryAnchor=dex) depends on a current market price of the assets involved. You may see one price when considering the swap, but it typically changes by the time the network processes it. Deposit guarantees protect you by letting you specify a minimum amount that must be deposited to your account at the end of the swap transaction.\n\nTo make this possible, the [Radix Network](?glossaryAnchor=radixnetwork) app and [Radix Wallet](?glossaryAnchor=radixwallet) work together. The wallet will show you whenever a deposit to your account is \"estimated\" rather than of a known quantity. And whenever that\'s true, you can set your own \"guarantees\" in the wallet on those estimated deposits – putting a limit on how much you expect to get for you to be willing to go through with the transaction. If that guarantee isn\'t met at the time the transaction is processed, the deal is off! The transaction is rejected by the Radix Network and no assets change hands.\n\nLearn: [More about deposit guarantees](https://learn.radixdlt.com/article/what-are-customizable-transaction-guarantees-on-radix)"; +"infoLink_glossary_networkstaking" = "## Radix Network Staking\n\nAn important feature of the [Radix Network](?glossaryAnchor=radixnetwork) is that users can \"stake\" [XRD tokens](?glossaryAnchor=xrd) to increase the security of the network, and be rewarded for doing so.\n\nThe process involves choosing one or more [validators](?glossaryAnchor=validators) to stake to, and then doing a [transaction](?glossaryAnchor=transactions) to send some XRD to the network to support those validators. You can unstake the XRD later to get them back – and you’ll find that you accumulated extra XRD in the meantime.\n\nThe extra XRD you earn is proportional to how much XRD you stake, and is often called an \"APY\" (annual percentage yield).\n\nYou can stake, unstake, and check on your validators and APY returns using the [Radix Dashboard](?glossaryAnchor=dashboard) dApp.\n\nStaking is a great way to put your XRD to work and earn a return, but it’s **not simply free money**. Choosing validators is like voting for who will run the Radix Network. If you choose a bad validator, you might help slow down the network or even help attack it. And you might not get the APY you expect.\n\nGet started with the links below before you stake a meaningful amount of XRD.\n\nLearn: [Radix staking introduction](https://learn.radixdlt.com/article/start-here-radix-staking-introduction)\n\nLearn: [How to choose validators](https://learn.radixdlt.com/article/how-should-i-choose-validators-to-stake-to)"; +"infoLink_glossary_validators" = "## Radix Network Validators\n\nThe [Radix Network](?glossaryAnchor=radixnetwork) is an open network that anybody can freely use. To make that possible, the network isn’t run by a company, but by an open community of \"validators\".\n\nEach validator is a server run by somebody that helps \"validate\" [transactions](?glossaryAnchor=transactions). Working together, validators make sure that transactions are correctly processed and committed on the Radix Network.\n\nWhen you [stake XRD tokens to the network](?glossaryAnchor=networkstaking), you select validators that you trust to correctly and reliably keep running the Radix Network - it\'s a big responsibility, kind of like voting in an open election to pick good leaders.\n\nStart with the link below to consider how you choose the validators that you stake to.\n\nLearn: [How to choose validators](https://learn.radixdlt.com/article/how-should-i-choose-validators-to-stake-to)"; +"infoLink_glossary_radixconnector" = "## Radix Connector Browser Extension\n\nWhen you want to use [dApp websites](?glossaryAnchor=dapps) on your desktop web browser, the Radix Connect browser extension helps make the connection to your [Radix Wallet](?glossaryAnchor=radixwallet) mobile app, quickly and securely.\n\nAll you need to do is install it in your preferred desktop browser, link it to your Radix Wallet app via QR code, and it sits quietly in the background making the magic happen. It will also give you your list of [Accounts](?glossaryAnchor=accounts) for easy copying of addresses on desktop.\n\nTo download and set up the Radix Connector browser extension, visit **wallet.radixdlt.com** in your preferred desktop browser.\n\nLearn: [More about Radix Connector browser extension](https://learn.radixdlt.com/article/what-is-the-radix-connector-browser-extension)"; +"infoLink_glossary_connectbutton" = "## √ Connect Button\n\n[dApps](?glossaryAnchor=dapps) built on Radix should always include a button marked **√ Connect**. Start here to connect your [Radix Wallet](?glossaryAnchor=radixwallet) to the dApp.\n\nIn most cases, the √ Connect button will include a menu where you can Connect Now, often asking your Radix Wallet to log in with a Persona. After logging in, that menu should provide a variety of features and information to help you manage your login and sharing with that dApp."; +"infoLink_glossary_dashboard" = "## Radix Dashboard\n\nThe Radix Dashboard is a [dApp](?glossaryAnchor=dappas) created by the same team as the [Radix Wallet](?glossaryAnchor=radixwallet) to help users interact with the [Radix Network](?glossaryAnchor=radixnetwork) directly.\n\nYou can look up information about things on the Radix Network by entering its address, such as: Accounts, tokens, NFTs, components (smart contracts), and more.\n\nYou can also use the Radix Dashboard’s [network staking](?glossaryAnchor=networkstaking) feature to view the list of current Radix Network validators, stake XRD, and manage your existing network staking.\n\n[Visit the Radix Dashboard at dashboard.radixdlt.com](https://dashboard.radixdlt.com)"; +"infoLink_glossary_bridging" = "## Bridging\n\nBridging is the process of getting assets into and out of the [Radix Network](?glossaryAnchor=radixnetwork). Assets on Radix can be held by your [Radix Wallet](?glossaryAnchor=radixnetwork), and used with [dApps](?glossaryAnchor=dapps) on Radix. There are a variety of dApps that provide bridging in different ways, for different assets.\n\nSometimes bridging involves converting an asset into a different form that can live on Radix. For example, dollars (USD) in your bank account might be bridged into Radix and become xUSDC tokens in your Radix Wallet. Or your Bitcoin (BTC) might be bridged into xwBTC tokens.\n\nSometimes bridging works as a swap, similar to a [DEX](?glossaryAnchor=dex). In this case you might swap one asset outside Radix for a different asset within Radix. Maybe you swap ETH (on the Ethereum network) for XRD tokens (on the Radix Network) at a current market price."; \ No newline at end of file diff --git a/RadixWallet/Features/DisplayEntitiesControlledByMnemonic/DisplayEntitiesControlledByMnemonic+View.swift b/RadixWallet/Features/DisplayEntitiesControlledByMnemonic/DisplayEntitiesControlledByMnemonic+View.swift index 6a4770f928..2a6c71251f 100644 --- a/RadixWallet/Features/DisplayEntitiesControlledByMnemonic/DisplayEntitiesControlledByMnemonic+View.swift +++ b/RadixWallet/Features/DisplayEntitiesControlledByMnemonic/DisplayEntitiesControlledByMnemonic+View.swift @@ -45,19 +45,19 @@ extension DisplayEntitiesControlledByMnemonic { switch type { case .standard: switch (personas, accounts) { - case (0, 0): L10n.SeedPhrases.SeedPhrase.noConnectedAccountsReveal - case (0, 1): L10n.SeedPhrases.SeedPhrase.oneConnectedAccountReveal - case (0, _): L10n.SeedPhrases.SeedPhrase.multipleConnectedAccountsReveal(accounts) + case (0, 0): L10n.SeedPhrases.SeedPhrase.noConnectedAccounts + case (0, 1): L10n.SeedPhrases.SeedPhrase.oneConnectedAccount + case (0, _): L10n.SeedPhrases.SeedPhrase.multipleConnectedAccounts(accounts) case (_, 1): L10n.DisplayMnemonics.ConnectedAccountsPersonasLabel.one(accounts) case (_, _): L10n.DisplayMnemonics.ConnectedAccountsPersonasLabel.many(accounts) } case .scanning: if accounts == 0 { - L10n.SeedPhrases.SeedPhrase.noConnectedAccountsReveal + L10n.SeedPhrases.SeedPhrase.noConnectedAccounts } else if accounts == 1 { - L10n.SeedPhrases.SeedPhrase.oneConnectedAccountReveal + L10n.SeedPhrases.SeedPhrase.oneConnectedAccount } else { - L10n.SeedPhrases.SeedPhrase.multipleConnectedAccountsReveal(accounts) + L10n.SeedPhrases.SeedPhrase.multipleConnectedAccounts(accounts) } } } diff --git a/RadixWallet/Features/TransactionReviewFeature/CustomizeFees/CustomizeFees+View.swift b/RadixWallet/Features/TransactionReviewFeature/CustomizeFees/CustomizeFees+View.swift index 178d2ef650..3f2096a65a 100644 --- a/RadixWallet/Features/TransactionReviewFeature/CustomizeFees/CustomizeFees+View.swift +++ b/RadixWallet/Features/TransactionReviewFeature/CustomizeFees/CustomizeFees+View.swift @@ -1,64 +1,64 @@ extension CustomizeFees.State { - // Need to disable, since broken in swiftformat 0.52.7 - // swiftformat:disable redundantClosure - var viewState: CustomizeFees.ViewState { .init( - title: { - switch transactionFee.mode { - case .normal: - L10n.CustomizeNetworkFees.NormalMode.title - case .advanced: - L10n.CustomizeNetworkFees.AdvancedMode.title - } - }(), - description: { - switch transactionFee.mode { - case .normal: - L10n.CustomizeNetworkFees.NormalMode.subtitle - case .advanced: - L10n.CustomizeNetworkFees.AdvancedMode.subtitle - } - }(), - modeSwitchTitle: { - switch transactionFee.mode { - case .normal: - L10n.CustomizeNetworkFees.viewAdvancedModeButtonTitle - case .advanced: - L10n.CustomizeNetworkFees.viewNormalModeButtonTitle - } - }(), - feePayer: feePayer, - noFeePayerText: { - if transactionFee.totalFee.lockFee == .zero { - L10n.CustomizeNetworkFees.noneRequired - } else { - L10n.CustomizeNetworkFees.noAccountSelected - } - }(), - insufficientBalanceMessage: { - if let feePayer { - if feePayer.xrdBalance < transactionFee.totalFee.lockFee { - return L10n.CustomizeNetworkFees.Warning.insufficientBalance - } - } - return nil - }() + mode: transactionFee.mode, + feePayer: feePayer?.account, + feePayingValidation: feePayingValidation ) } +} + +extension CustomizeFees.ViewState { + var title: String { + switch mode { + case .normal: + L10n.CustomizeNetworkFees.NormalMode.title + case .advanced: + L10n.CustomizeNetworkFees.AdvancedMode.title + } + } - // swiftformat:enable redundantClosure + var description: String { + switch mode { + case .normal: + L10n.CustomizeNetworkFees.NormalMode.subtitle + case .advanced: + L10n.CustomizeNetworkFees.AdvancedMode.subtitle + } + } + + var modeSwitchTitle: String { + switch mode { + case .normal: + L10n.CustomizeNetworkFees.viewAdvancedModeButtonTitle + case .advanced: + L10n.CustomizeNetworkFees.viewNormalModeButtonTitle + } + } + + var noFeePayerText: String { + if feePayingValidation == .valid(.feePayerSuperfluous) { + L10n.CustomizeNetworkFees.noneRequired + } else { + L10n.CustomizeNetworkFees.noAccountSelected + } + } + + var insufficientBalance: Bool { + feePayingValidation == .insufficientBalance + } + + var linkingNewAccount: Bool { + feePayingValidation == .valid(.introducesNewAccount) + } } extension CustomizeFees { public struct ViewState: Equatable { - let title: String - let description: String - let modeSwitchTitle: String - let feePayer: FeePayerCandidate? - let noFeePayerText: String - let insufficientBalanceMessage: String? + let mode: TransactionFee.Mode + let feePayer: Account? + let feePayingValidation: FeeValidationOutcome? } @MainActor @@ -145,7 +145,7 @@ extension CustomizeFees { .textStyle(.body1StandaloneLink) .foregroundColor(.app.blue2) } - if let feePayer = viewState.feePayer?.account { + if let feePayer = viewState.feePayer { AccountCard(account: feePayer) } else { AppTextField( @@ -155,8 +155,10 @@ extension CustomizeFees { .disabled(true) } - if let insufficientBalanceMessage = viewState.insufficientBalanceMessage { - WarningErrorView(text: insufficientBalanceMessage, type: .warning) + if viewState.insufficientBalance { + WarningErrorView(text: L10n.CustomizeNetworkFees.Warning.insufficientBalance, type: .error) + } else if viewState.linkingNewAccount { + WarningErrorView(text: L10n.TransactionReview.FeePayerValidation.linksNewAccount, type: .warning) } } } diff --git a/RadixWallet/Features/TransactionReviewFeature/CustomizeFees/CustomizeFees.swift b/RadixWallet/Features/TransactionReviewFeature/CustomizeFees/CustomizeFees.swift index dd991b8e01..302bbe0cf5 100644 --- a/RadixWallet/Features/TransactionReviewFeature/CustomizeFees/CustomizeFees.swift +++ b/RadixWallet/Features/TransactionReviewFeature/CustomizeFees/CustomizeFees.swift @@ -27,6 +27,10 @@ public struct CustomizeFees: FeatureReducer, Sendable { reviewedTransaction.transactionFee } + var feePayingValidation: FeeValidationOutcome? { + reviewedTransaction.feePayingValidation.wrappedValue + } + @PresentationState public var destination: Destination.State? = nil diff --git a/RadixWallet/Features/TransactionReviewFeature/TransactionReview.swift b/RadixWallet/Features/TransactionReviewFeature/TransactionReview.swift index 3b120960a8..9fbc803be6 100644 --- a/RadixWallet/Features/TransactionReviewFeature/TransactionReview.swift +++ b/RadixWallet/Features/TransactionReviewFeature/TransactionReview.swift @@ -973,11 +973,16 @@ public struct ReviewedTransaction: Hashable, Sendable { } // MARK: - FeeValidationOutcome -enum FeeValidationOutcome { - case valid(introducesNewAccount: Bool) +enum FeeValidationOutcome: Equatable { + case valid(Details?) case needsFeePayer case insufficientBalance + enum Details { + case introducesNewAccount + case feePayerSuperfluous + } + var isValid: Bool { guard case .valid = self else { return false } return true @@ -991,53 +996,38 @@ extension ReviewedTransaction { var feePayingValidation: Loadable { feePayer.map { selected in - let introducesNewAccount = selected.map { !involvedAccounts.contains($0.account.address) } ?? false - - guard let feePayer = selected, - let feePayerWithdraws = accountWithdraws[feePayer.account.address] - else { - return selected.validateBalance(forFee: transactionFee, introducesNewAccount: introducesNewAccount) + guard let selected else { + if transactionFee.totalFee.lockFee == .zero { + // No fee is required - no fee payer needed + return .valid(.feePayerSuperfluous) + } else { + // Fee is required, but no fee payer selected - invalid + return .needsFeePayer + } } - let xrdAddress = ResourceAddress.xrd(on: networkID) - - let xrdTotalTransfer: Decimal192 = feePayerWithdraws.reduce(.zero) { partialResult, resource in + let xrdAddress: ResourceAddress = .xrd(on: networkID) + let feePayerWithdraws = accountWithdraws[selected.account.address] ?? [] + let xrdTransfer: Decimal192 = feePayerWithdraws.reduce(.zero) { partialResult, resource in if case let .fungible(resourceAddress, indicator) = resource, resourceAddress == xrdAddress { return partialResult + indicator.amount } return partialResult } - let total = xrdTotalTransfer + transactionFee.totalFee.lockFee + let totalAmountNeeded = xrdTransfer + transactionFee.totalFee.lockFee - guard feePayer.xrdBalance >= total else { + guard selected.xrdBalance >= totalAmountNeeded else { // Insufficient balance to pay for withdraws and transaction fee return .insufficientBalance } - return .valid(introducesNewAccount: false) - } - } -} - -extension FeePayerCandidate? { - func validateBalance(forFee transactionFee: TransactionFee, introducesNewAccount: Bool) -> FeeValidationOutcome { - if transactionFee.totalFee.lockFee == .zero { - // If no fee is required - valid - return .valid(introducesNewAccount: introducesNewAccount) - } - - guard let self else { - // If fee is required, but no fee payer selected - invalid - return .needsFeePayer - } - - guard self.xrdBalance >= transactionFee.totalFee.lockFee else { - // If insufficient balance - invalid - return .insufficientBalance + if !involvedAccounts.contains(selected.account.address) { + return .valid(.introducesNewAccount) + } else { + return .valid(nil) + } } - - return .valid(introducesNewAccount: introducesNewAccount) } } diff --git a/RadixWallet/Features/TransactionReviewFeature/TransactionReviewNetworkFee/TransactionReviewNetworkFee+View.swift b/RadixWallet/Features/TransactionReviewFeature/TransactionReviewNetworkFee/TransactionReviewNetworkFee+View.swift index 870014661c..71b2a236c3 100644 --- a/RadixWallet/Features/TransactionReviewFeature/TransactionReviewNetworkFee/TransactionReviewNetworkFee+View.swift +++ b/RadixWallet/Features/TransactionReviewFeature/TransactionReviewNetworkFee/TransactionReviewNetworkFee+View.swift @@ -40,12 +40,12 @@ extension TransactionReviewNetworkFee { loadable(viewStore.reviewedTransaction.feePayingValidation) { validation in switch validation { case .needsFeePayer: - WarningErrorView(text: L10n.TransactionReview.feePayerRequiredMessage, type: .warning) + WarningErrorView(text: L10n.TransactionReview.FeePayerValidation.feePayerRequired, type: .warning) case .insufficientBalance: - WarningErrorView(text: L10n.TransactionReview.insufficientBalance, type: .warning) - case .valid(introducesNewAccount: true): - EmptyView() // TODO: Here we could show a warning, that this introduces a new account into the transaction - the link between the accounts will now be public - case .valid(introducesNewAccount: false): + WarningErrorView(text: L10n.TransactionReview.FeePayerValidation.insufficientBalance, type: .error) + case .valid(.introducesNewAccount): + WarningErrorView(text: L10n.TransactionReview.FeePayerValidation.linksNewAccount, type: .warning) + case .valid: EmptyView() }