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

dex - poolswap #216

Merged
merged 9 commits into from
Jul 7, 2021
Merged

dex - poolswap #216

merged 9 commits into from
Jul 7, 2021

Conversation

thedoublejay
Copy link
Member

@thedoublejay thedoublejay commented Jun 30, 2021

What kind of PR is this?:

/kind feature
Initial UI design for Pool Swap

  1. Form validations
  • Number
  • Max value for Token A
  • For now, both fields are required
  1. Clickable Swap Button
  2. Clickable Max Button
  3. Display summary layout if Token A and Token B have values

What this PR does / why we need it:

Which issue(s) does this PR fixes?:

Fixes #146

Additional comments?:

@codeclimate
Copy link

codeclimate bot commented Jun 30, 2021

Code Climate has analyzed commit 5bba40f and detected 0 issues on this pull request.

View more on Code Climate.

@defichain-bot
Copy link
Contributor

defichain-bot commented Jun 30, 2021

Missing Translations Report

The following translations are missing for this pull request.

View Full Report
{
    "zh-Hans": {
        "missingCount": 54,
        "labels": {
            "screens/WalletOnboarding": [
                "No wallets"
            ],
            "screens/WalletNavigator": [
                "Wallets",
                "Create Mnemonic Phrase",
                "Verify Mnemonic Phrase",
                "Restore Mnemonic Wallet"
            ],
            "screens/LoadingScreen": [
                "Loading"
            ],
            "screens/TransactionDetailScreen": [
                "tx.desc)",
                "tx.amount)",
                "`${tx.block}`)",
                "tx.txid"
            ],
            "screens/TransactionsScreen": [
                "desc",
                "block",
                "LOAD MORE",
                "Transactions"
            ],
            "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"
            ],
            "wallet/settings": [
                "key",
                "EXIT WALLET"
            ],
            "screens/SettingsNavigator": [
                "Settings"
            ],
            "screens/PoolSwapScreen": [
                "'From'} onMaxPress={async (amount)",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee"
            ],
            "app/DexScreen": [
                "section.key"
            ],
            "screens/DexScreen": [
                "SWAP",
                "Decentralized Exchange"
            ],
            "screens/TokenDetailScreen": [
                "AMOUNT BALANCE",
                "AVAILABLE OPTIONS",
                "Send to other wallet",
                "Receive",
                "Convert"
            ],
            "screens/SendScreen": [
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "screens/ReceiveScreen": [
                "Use this address to receive DFI or any DST",
                "Copy",
                "Wallet Receive"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 54
    },
    "zh-Hant": {
        "missingCount": 53,
        "labels": {
            "screens/WalletOnboarding": [
                "No wallets"
            ],
            "screens/WalletNavigator": [
                "Wallets",
                "Create Mnemonic Phrase",
                "Verify Mnemonic Phrase",
                "Restore Mnemonic Wallet"
            ],
            "screens/LoadingScreen": [
                "Loading"
            ],
            "screens/TransactionDetailScreen": [
                "tx.desc)",
                "tx.amount)",
                "`${tx.block}`)",
                "tx.txid"
            ],
            "screens/TransactionsScreen": [
                "desc",
                "block",
                "LOAD MORE"
            ],
            "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"
            ],
            "wallet/settings": [
                "key",
                "EXIT WALLET"
            ],
            "screens/SettingsNavigator": [
                "Settings"
            ],
            "screens/PoolSwapScreen": [
                "'From'} onMaxPress={async (amount)",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee"
            ],
            "app/DexScreen": [
                "section.key"
            ],
            "screens/DexScreen": [
                "SWAP",
                "Decentralized Exchange"
            ],
            "screens/TokenDetailScreen": [
                "AMOUNT BALANCE",
                "AVAILABLE OPTIONS",
                "Send to other wallet",
                "Receive",
                "Convert"
            ],
            "screens/SendScreen": [
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "screens/ReceiveScreen": [
                "Use this address to receive DFI or any DST",
                "Copy",
                "Wallet Receive"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 54
    },
    "de": {
        "missingCount": 53,
        "labels": {
            "screens/WalletOnboarding": [
                "No wallets"
            ],
            "screens/WalletNavigator": [
                "Wallets",
                "Create Mnemonic Phrase",
                "Verify Mnemonic Phrase",
                "Restore Mnemonic Wallet"
            ],
            "screens/LoadingScreen": [
                "Loading"
            ],
            "screens/TransactionDetailScreen": [
                "tx.desc)",
                "tx.amount)",
                "`${tx.block}`)",
                "tx.txid"
            ],
            "screens/TransactionsScreen": [
                "desc",
                "block",
                "LOAD MORE"
            ],
            "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"
            ],
            "wallet/settings": [
                "key",
                "EXIT WALLET"
            ],
            "screens/SettingsNavigator": [
                "Settings"
            ],
            "screens/PoolSwapScreen": [
                "'From'} onMaxPress={async (amount)",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee"
            ],
            "app/DexScreen": [
                "section.key"
            ],
            "screens/DexScreen": [
                "SWAP",
                "Decentralized Exchange"
            ],
            "screens/TokenDetailScreen": [
                "AMOUNT BALANCE",
                "AVAILABLE OPTIONS",
                "Send to other wallet",
                "Receive",
                "Convert"
            ],
            "screens/SendScreen": [
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "screens/ReceiveScreen": [
                "Use this address to receive DFI or any DST",
                "Copy",
                "Wallet Receive"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 54
    }
}

@netlify
Copy link

netlify bot commented Jun 30, 2021

✔️ Deploy Preview for defi-wallet ready!

🔨 Explore the source changes: 5bba40f

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

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

@codecov
Copy link

codecov bot commented Jun 30, 2021

Codecov Report

Merging #216 (5bba40f) into main (546b492) will increase coverage by 3.06%.
The diff coverage is 84.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #216      +/-   ##
==========================================
+ Coverage   42.47%   45.54%   +3.06%     
==========================================
  Files          67       68       +1     
  Lines         784      830      +46     
  Branches       82       90       +8     
==========================================
+ Hits          333      378      +45     
- Misses        451      452       +1     
Impacted Files Coverage Δ
.../screens/AppNavigator/screens/Dex/DexNavigator.tsx 0.00% <ø> (ø)
app/screens/AppNavigator/screens/Dex/DexScreen.tsx 0.00% <0.00%> (ø)
...igator/screens/Transactions/TransactionsScreen.tsx 0.00% <0.00%> (ø)
...pNavigator/screens/Dex/PoolSwap/PoolSwapScreen.tsx 93.33% <93.33%> (ø)
app/components/index.tsx 100.00% <0.00%> (+30.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 546b492...5bba40f. Read the comment docs.

@defichain-bot
Copy link
Contributor

defichain-bot commented Jun 30, 2021

Build preview for DeFi Wallet is ready!

Built with commit dfa5536

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

@cypress
Copy link

cypress bot commented Jun 30, 2021



Test summary

11 0 0 0


Run details

Project wallet
Status Passed
Commit dfa5536 ℹ️
Started Jul 7, 2021 1:57 AM
Ended Jul 7, 2021 1:59 AM
Duration 01:43 💡
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

@thedoublejay thedoublejay marked this pull request as ready for review July 6, 2021 09:38
Copy link
Contributor

@fuxingloh fuxingloh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. need to disable the swap button if 0 token amount, it will load forever if we don't have the token to swap
  2. we can move some shared components in /app/components/

@fuxingloh fuxingloh merged commit 7c89a34 into main Jul 7, 2021
@fuxingloh fuxingloh deleted the thedoublejay/poolswap branch July 7, 2021 03:55
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.

dex - swap page
3 participants