Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert - tokens vs UTXO screen #365

Merged
merged 12 commits into from
Jul 29, 2021
Merged

Conversation

kyleleow
Copy link
Contributor

What kind of PR is this?:

/kind feature

What this PR does / why we need it:

  • Add tokens vs utxo screen that explains the differences

Which issue(s) does this PR fixes?:

Fixes #272

@defichain-bot
Copy link
Contributor

defichain-bot commented Jul 28, 2021

Missing Translations Report

The following translations are missing for this pull request.

View Full Report
{
    "zh-Hans": {
        "missingCount": 135,
        "labels": {
            "screens/OceanInterface": [
                "Transaction Sent",
                "title",
                "An error has occurred",
                "OK"
            ],
            "components/BarCodeScanner": [
                "Requesting for camera permission",
                "You have denied the permission request to use your camera"
            ],
            "screens/OnboardingCarousel": [
                "DeFiChain",
                "Wallet",
                "A wallet dedicated to the native decentralized finance for bitcoin.",
                "title",
                "subtitle"
            ],
            "screens/RestoreWallet": [
                "Error",
                "The recovery words you have entered are invalid. Please double check and try again.",
                "Please provide your 24 recovery words to regain access to your wallet.",
                "ENTER THE CORRECT WORD",
                "RECOVER WALLET"
            ],
            "screens/SendScreen": [
                "`Enter word #${order}`",
                "CONTINUE",
                "Sending",
                "Transaction fee",
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "screens/Onboarding": [
                "CREATE A WALLET",
                "RESTORE WALLET"
            ],
            "screens/GuidelinesRecoveryWords": [
                "What are recovery words?",
                "'Your unique 24 recovery words is a human-readable representation of your wallet private key",
                "'You will need your recovery words to restore your wallet on",
                "'If you lose your recovery words",
                "'It is important that you write down your recovery words legibly and in the correct order. Store your recovery words safely and securely"
            ],
            "screens/Guidelines": [
                "Creating a wallet",
                "'Before you create a wallet",
                "Learn more about recovery words",
                "g.title",
                "g.subtitle",
                "'I understand it is my responsibility to keep my recovery words secure",
                "SHOW MY 24 RECOVERY WORDS"
            ],
            "screens/WalletNavigator": [
                "Guidelines",
                "Learn More",
                "Display recovery words",
                "Verify words",
                "Recover Wallet"
            ],
            "screens/LoadingScreen": [
                "Loading"
            ],
            "screens/ErrorBoundary": [
                "Something went wrong",
                "The app ran into a problem and could not recover. Please restart your application."
            ],
            "screens/TransactionDetailScreen": [
                "tx.desc)",
                "tx.amount)",
                "`${tx.block}`)",
                "tx.txid"
            ],
            "screens/TransactionsScreen": [
                "desc",
                "block",
                "LOAD MORE",
                "Transactions",
                "No transactions yet",
                "Start transacting with your wallet. All transactions made will be displayed here.",
                "RECEIVE COINS"
            ],
            "screens/TransactionsDetailScreen": [
                "Transaction"
            ],
            "screens/CommunityScreen": [
                "Connect with the community:",
                "DeFiChain is a community-driven and open project.",
                "The DeFiChain Foundation does not provide direct support.",
                "title",
                "Community"
            ],
            "screens/Settings": [
                "NETWORK",
                "Are you sure you want to unlink your wallet?",
                "You will need to use your recovery words the next time you want to get back to your wallet.",
                "Cancel",
                "Unlink Wallet",
                "UNLINK WALLET"
            ],
            "screens/SettingsNavigator": [
                "Settings"
            ],
            "screens/PoolSwapScreen": [
                "From",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee",
                "Swapping Token"
            ],
            "screens/DexScreen": [
                "YOUR LIQUIDITY",
                "'Pick a pool pair below",
                "section.key",
                "Decentralized Exchange",
                "Add Liquidity",
                "Remove Liquidity"
            ],
            "screens/RemoveLiquidity": [
                "Amount of liquidity to remove",
                "Removing Liquidity"
            ],
            "screens/AddLiquidity": [
                "Price",
                "`Token ${props.type === 'primary' ? 'A' : 'B'}`",
                "Balance",
                "MAX",
                "per",
                "Share of pool",
                "Pooled "
            ],
            "components/slider": [
                "None"
            ],
            "components": [
                "All"
            ],
            "components/Button": [
                "CONTINUE"
            ],
            "screens/ConfirmAddLiq": [
                "Adding",
                "Fee",
                "Price",
                "Liquidity tokens received",
                "Share of pool",
                "Pooled"
            ],
            "screens/ConfirmLiquidity": [
                "CONFIRM",
                "Adding Liquidity"
            ],
            "screens/TokensVsUtxoScreen": [
                "'DFI exists in two forms – UTXO and token",
                "'UTXO DFI is the main form DFI and is used for core cryptocurrency purposes like send",
                "Your DFI balance includes both UTXO and tokens.",
                "label",
                "props.label"
            ],
            "screens/TokenDetailScreen": [
                "AMOUNT BALANCE",
                "AVAILABLE OPTIONS",
                "Send to other wallet",
                "Receive",
                "Convert"
            ],
            "screens/ReceiveScreen": [
                "Use this address to receive DFI or any DST",
                "Copy",
                "Wallet Receive"
            ],
            "screens/ConvertScreen": [
                "PREVIEW CONVERSION",
                "\"Tokens vs UTXO",
                "Converting DFI",
                "Convert DFIs",
                "Scan recipient QR",
                "Tokens vs UTXO"
            ],
            "screens/Convert": [
                "titlePrefix",
                "Balance"
            ],
            "components/max": [
                "MAX"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 135
    },
    "zh-Hant": {
        "missingCount": 134,
        "labels": {
            "screens/OceanInterface": [
                "Transaction Sent",
                "title",
                "An error has occurred",
                "OK"
            ],
            "components/BarCodeScanner": [
                "Requesting for camera permission",
                "You have denied the permission request to use your camera"
            ],
            "screens/OnboardingCarousel": [
                "DeFiChain",
                "Wallet",
                "A wallet dedicated to the native decentralized finance for bitcoin.",
                "title",
                "subtitle"
            ],
            "screens/RestoreWallet": [
                "Error",
                "The recovery words you have entered are invalid. Please double check and try again.",
                "Please provide your 24 recovery words to regain access to your wallet.",
                "ENTER THE CORRECT WORD",
                "RECOVER WALLET"
            ],
            "screens/SendScreen": [
                "`Enter word #${order}`",
                "CONTINUE",
                "Sending",
                "Transaction fee",
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "screens/Onboarding": [
                "CREATE A WALLET",
                "RESTORE WALLET"
            ],
            "screens/GuidelinesRecoveryWords": [
                "What are recovery words?",
                "'Your unique 24 recovery words is a human-readable representation of your wallet private key",
                "'You will need your recovery words to restore your wallet on",
                "'If you lose your recovery words",
                "'It is important that you write down your recovery words legibly and in the correct order. Store your recovery words safely and securely"
            ],
            "screens/Guidelines": [
                "Creating a wallet",
                "'Before you create a wallet",
                "Learn more about recovery words",
                "g.title",
                "g.subtitle",
                "'I understand it is my responsibility to keep my recovery words secure",
                "SHOW MY 24 RECOVERY WORDS"
            ],
            "screens/WalletNavigator": [
                "Guidelines",
                "Learn More",
                "Display recovery words",
                "Verify words",
                "Recover Wallet"
            ],
            "screens/LoadingScreen": [
                "Loading"
            ],
            "screens/ErrorBoundary": [
                "Something went wrong",
                "The app ran into a problem and could not recover. Please restart your application."
            ],
            "screens/TransactionDetailScreen": [
                "tx.desc)",
                "tx.amount)",
                "`${tx.block}`)",
                "tx.txid"
            ],
            "screens/TransactionsScreen": [
                "desc",
                "block",
                "LOAD MORE",
                "No transactions yet",
                "Start transacting with your wallet. All transactions made will be displayed here.",
                "RECEIVE COINS"
            ],
            "screens/TransactionsDetailScreen": [
                "Transaction"
            ],
            "screens/CommunityScreen": [
                "Connect with the community:",
                "DeFiChain is a community-driven and open project.",
                "The DeFiChain Foundation does not provide direct support.",
                "title",
                "Community"
            ],
            "screens/Settings": [
                "NETWORK",
                "Are you sure you want to unlink your wallet?",
                "You will need to use your recovery words the next time you want to get back to your wallet.",
                "Cancel",
                "Unlink Wallet",
                "UNLINK WALLET"
            ],
            "screens/SettingsNavigator": [
                "Settings"
            ],
            "screens/PoolSwapScreen": [
                "From",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee",
                "Swapping Token"
            ],
            "screens/DexScreen": [
                "YOUR LIQUIDITY",
                "'Pick a pool pair below",
                "section.key",
                "Decentralized Exchange",
                "Add Liquidity",
                "Remove Liquidity"
            ],
            "screens/RemoveLiquidity": [
                "Amount of liquidity to remove",
                "Removing Liquidity"
            ],
            "screens/AddLiquidity": [
                "Price",
                "`Token ${props.type === 'primary' ? 'A' : 'B'}`",
                "Balance",
                "MAX",
                "per",
                "Share of pool",
                "Pooled "
            ],
            "components/slider": [
                "None"
            ],
            "components": [
                "All"
            ],
            "components/Button": [
                "CONTINUE"
            ],
            "screens/ConfirmAddLiq": [
                "Adding",
                "Fee",
                "Price",
                "Liquidity tokens received",
                "Share of pool",
                "Pooled"
            ],
            "screens/ConfirmLiquidity": [
                "CONFIRM",
                "Adding Liquidity"
            ],
            "screens/TokensVsUtxoScreen": [
                "'DFI exists in two forms – UTXO and token",
                "'UTXO DFI is the main form DFI and is used for core cryptocurrency purposes like send",
                "Your DFI balance includes both UTXO and tokens.",
                "label",
                "props.label"
            ],
            "screens/TokenDetailScreen": [
                "AMOUNT BALANCE",
                "AVAILABLE OPTIONS",
                "Send to other wallet",
                "Receive",
                "Convert"
            ],
            "screens/ReceiveScreen": [
                "Use this address to receive DFI or any DST",
                "Copy",
                "Wallet Receive"
            ],
            "screens/ConvertScreen": [
                "PREVIEW CONVERSION",
                "\"Tokens vs UTXO",
                "Converting DFI",
                "Convert DFIs",
                "Scan recipient QR",
                "Tokens vs UTXO"
            ],
            "screens/Convert": [
                "titlePrefix",
                "Balance"
            ],
            "components/max": [
                "MAX"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 135
    },
    "de": {
        "missingCount": 134,
        "labels": {
            "screens/OceanInterface": [
                "Transaction Sent",
                "title",
                "An error has occurred",
                "OK"
            ],
            "components/BarCodeScanner": [
                "Requesting for camera permission",
                "You have denied the permission request to use your camera"
            ],
            "screens/OnboardingCarousel": [
                "DeFiChain",
                "Wallet",
                "A wallet dedicated to the native decentralized finance for bitcoin.",
                "title",
                "subtitle"
            ],
            "screens/RestoreWallet": [
                "Error",
                "The recovery words you have entered are invalid. Please double check and try again.",
                "Please provide your 24 recovery words to regain access to your wallet.",
                "ENTER THE CORRECT WORD",
                "RECOVER WALLET"
            ],
            "screens/SendScreen": [
                "`Enter word #${order}`",
                "CONTINUE",
                "Sending",
                "Transaction fee",
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "screens/Onboarding": [
                "CREATE A WALLET",
                "RESTORE WALLET"
            ],
            "screens/GuidelinesRecoveryWords": [
                "What are recovery words?",
                "'Your unique 24 recovery words is a human-readable representation of your wallet private key",
                "'You will need your recovery words to restore your wallet on",
                "'If you lose your recovery words",
                "'It is important that you write down your recovery words legibly and in the correct order. Store your recovery words safely and securely"
            ],
            "screens/Guidelines": [
                "Creating a wallet",
                "'Before you create a wallet",
                "Learn more about recovery words",
                "g.title",
                "g.subtitle",
                "'I understand it is my responsibility to keep my recovery words secure",
                "SHOW MY 24 RECOVERY WORDS"
            ],
            "screens/WalletNavigator": [
                "Guidelines",
                "Learn More",
                "Display recovery words",
                "Verify words",
                "Recover Wallet"
            ],
            "screens/LoadingScreen": [
                "Loading"
            ],
            "screens/ErrorBoundary": [
                "Something went wrong",
                "The app ran into a problem and could not recover. Please restart your application."
            ],
            "screens/TransactionDetailScreen": [
                "tx.desc)",
                "tx.amount)",
                "`${tx.block}`)",
                "tx.txid"
            ],
            "screens/TransactionsScreen": [
                "desc",
                "block",
                "LOAD MORE",
                "No transactions yet",
                "Start transacting with your wallet. All transactions made will be displayed here.",
                "RECEIVE COINS"
            ],
            "screens/TransactionsDetailScreen": [
                "Transaction"
            ],
            "screens/CommunityScreen": [
                "Connect with the community:",
                "DeFiChain is a community-driven and open project.",
                "The DeFiChain Foundation does not provide direct support.",
                "title",
                "Community"
            ],
            "screens/Settings": [
                "NETWORK",
                "Are you sure you want to unlink your wallet?",
                "You will need to use your recovery words the next time you want to get back to your wallet.",
                "Cancel",
                "Unlink Wallet",
                "UNLINK WALLET"
            ],
            "screens/SettingsNavigator": [
                "Settings"
            ],
            "screens/PoolSwapScreen": [
                "From",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee",
                "Swapping Token"
            ],
            "screens/DexScreen": [
                "YOUR LIQUIDITY",
                "'Pick a pool pair below",
                "section.key",
                "Decentralized Exchange",
                "Add Liquidity",
                "Remove Liquidity"
            ],
            "screens/RemoveLiquidity": [
                "Amount of liquidity to remove",
                "Removing Liquidity"
            ],
            "screens/AddLiquidity": [
                "Price",
                "`Token ${props.type === 'primary' ? 'A' : 'B'}`",
                "Balance",
                "MAX",
                "per",
                "Share of pool",
                "Pooled "
            ],
            "components/slider": [
                "None"
            ],
            "components": [
                "All"
            ],
            "components/Button": [
                "CONTINUE"
            ],
            "screens/ConfirmAddLiq": [
                "Adding",
                "Fee",
                "Price",
                "Liquidity tokens received",
                "Share of pool",
                "Pooled"
            ],
            "screens/ConfirmLiquidity": [
                "CONFIRM",
                "Adding Liquidity"
            ],
            "screens/TokensVsUtxoScreen": [
                "'DFI exists in two forms – UTXO and token",
                "'UTXO DFI is the main form DFI and is used for core cryptocurrency purposes like send",
                "Your DFI balance includes both UTXO and tokens.",
                "label",
                "props.label"
            ],
            "screens/TokenDetailScreen": [
                "AMOUNT BALANCE",
                "AVAILABLE OPTIONS",
                "Send to other wallet",
                "Receive",
                "Convert"
            ],
            "screens/ReceiveScreen": [
                "Use this address to receive DFI or any DST",
                "Copy",
                "Wallet Receive"
            ],
            "screens/ConvertScreen": [
                "PREVIEW CONVERSION",
                "\"Tokens vs UTXO",
                "Converting DFI",
                "Convert DFIs",
                "Scan recipient QR",
                "Tokens vs UTXO"
            ],
            "screens/Convert": [
                "titlePrefix",
                "Balance"
            ],
            "components/max": [
                "MAX"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 135
    }
}

@codeclimate
Copy link

codeclimate bot commented Jul 28, 2021

Code Climate has analyzed commit 89d1946 and detected 0 issues on this pull request.

View more on Code Climate.

@codecov
Copy link

codecov bot commented Jul 28, 2021

Codecov Report

Merging #365 (89d1946) into main (5a0606a) will increase coverage by 0.15%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #365      +/-   ##
==========================================
+ Coverage   88.36%   88.51%   +0.15%     
==========================================
  Files          94       95       +1     
  Lines        1366     1376      +10     
  Branches      209      210       +1     
==========================================
+ Hits         1207     1218      +11     
+ Misses        158      157       -1     
  Partials        1        1              
Impacted Files Coverage Δ
...ppNavigator/screens/Balances/BalancesNavigator.tsx 100.00% <ø> (ø)
...ns/AppNavigator/screens/Balances/ConvertScreen.tsx 96.05% <100.00%> (+1.45%) ⬆️
...or/screens/Balances/screens/TokensVsUtxoScreen.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a0606a...89d1946. Read the comment docs.

@netlify
Copy link

netlify bot commented Jul 28, 2021

✔️ Deploy Preview for defi-wallet ready!

🔨 Explore the source changes: 89d1946

🔍 Inspect the deploy log: https://app.netlify.com/sites/defi-wallet/deploys/6102214349d98c0008c80cec

😎 Browse the preview: https://deploy-preview-365--defi-wallet.netlify.app/

@defichain-bot
Copy link
Contributor

defichain-bot commented Jul 28, 2021

Build preview for DeFi Wallet is ready!

Built with commit b816eae

https://expo.io/@defichain/wallet?release-channel=pr-preview-365

Move testID to jsx.element
@cypress
Copy link

cypress bot commented Jul 28, 2021



Test summary

87 0 0 0


Run details

Project wallet
Status Passed
Commit b816eae ℹ️
Started Jul 29, 2021 3:35 AM
Ended Jul 29, 2021 3:46 AM
Duration 11:40 💡
OS Linux Ubuntu - 20.04
Browser Chrome 91

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@kyleleow kyleleow marked this pull request as ready for review July 28, 2021 11:10
@thedoublejay
Copy link
Member

Some comments:

  1. Can we make the CTA of "UTXO vs Token" - use primary color? So it looks like a link. Currently, it looks plain since it's all grayed out. @jtlntno-cake
  2. Can you also change the icons on the Convert page? Using the proper icon for UTXO and Token. In the input and summary part @kyleleow

kyleleow added 3 commits July 29, 2021 10:17
Change background to white

Add contentContainerStyle to fill empty spaces if any, and able to scroll when container height < content's height
Fix typo of DFI unit string used in checking
@jtlntno-des
Copy link

  1. @thedoublejay Yes, let's do that for consistency. I updated the Marvel project to reflect this.

@thedoublejay thedoublejay enabled auto-merge (squash) July 29, 2021 04:31
@thedoublejay thedoublejay merged commit 242b60d into main Jul 29, 2021
@thedoublejay thedoublejay deleted the kengye/token-vs-utxo-screen branch July 29, 2021 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

convert - tokens vs UTXO screen
5 participants