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

ocean interface provide wallet context to sign #333

Merged
merged 8 commits into from
Jul 26, 2021

Conversation

ivan-zynesis
Copy link
Contributor

What kind of PR is this?:

/kind refactor

What this PR does / why we need it:

Essentially eliminate wallet context requirement outside OceanInterface to start queuing transaction to be signed.
Better versatility, wallet can be only unlocked within OceanInterface (ease encrypted mnemonic integration)

Which issue(s) does this PR fixes?:

Fixes #

Additional comments?:

@codeclimate
Copy link

codeclimate bot commented Jul 23, 2021

Code Climate has analyzed commit 6f37b3a and detected 0 issues on this pull request.

View more on Code Climate.

@defichain-bot
Copy link
Contributor

defichain-bot commented Jul 23, 2021

Missing Translations Report

The following translations are missing for this pull request.

View Full Report
{
    "zh-Hans": {
        "missingCount": 101,
        "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/Onboarding": [
                "CREATE A WALLET",
                "RESTORE WALLET"
            ],
            "screens/WalletNavigator": [
                "Create Mnemonic Phrase",
                "Verify Mnemonic Phrase",
                "Restore Mnemonic 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"
            ],
            "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",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee",
                "Swapping Token"
            ],
            "app/DexScreen": [
                "section.key"
            ],
            "screens/DexScreen": [
                "SWAP",
                "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/SendScreen": [
                "CONTINUE",
                "Sending",
                "Transaction fee",
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "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"
            ],
            "screens/Convert": [
                "titlePrefix",
                "Balance"
            ],
            "components/max": [
                "MAX"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 101
    },
    "zh-Hant": {
        "missingCount": 100,
        "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/Onboarding": [
                "CREATE A WALLET",
                "RESTORE WALLET"
            ],
            "screens/WalletNavigator": [
                "Create Mnemonic Phrase",
                "Verify Mnemonic Phrase",
                "Restore Mnemonic 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"
            ],
            "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",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee",
                "Swapping Token"
            ],
            "app/DexScreen": [
                "section.key"
            ],
            "screens/DexScreen": [
                "SWAP",
                "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/SendScreen": [
                "CONTINUE",
                "Sending",
                "Transaction fee",
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "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"
            ],
            "screens/Convert": [
                "titlePrefix",
                "Balance"
            ],
            "components/max": [
                "MAX"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 101
    },
    "de": {
        "missingCount": 100,
        "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/Onboarding": [
                "CREATE A WALLET",
                "RESTORE WALLET"
            ],
            "screens/WalletNavigator": [
                "Create Mnemonic Phrase",
                "Verify Mnemonic Phrase",
                "Restore Mnemonic 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"
            ],
            "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",
                "To",
                "SWAP",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Price",
                "Estimated to receive",
                "Minimum to receive",
                "Liquidity provider fee",
                "Swapping Token"
            ],
            "app/DexScreen": [
                "section.key"
            ],
            "screens/DexScreen": [
                "SWAP",
                "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/SendScreen": [
                "CONTINUE",
                "Sending",
                "Transaction fee",
                "SEND",
                "TO ADDRESS",
                "Enter an address",
                "Enter an amount",
                "Balance: ",
                "MAX",
                "Wallet Send"
            ],
            "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"
            ],
            "screens/Convert": [
                "titlePrefix",
                "Balance"
            ],
            "components/max": [
                "MAX"
            ],
            "screens/BalancesScreen": [
                "BALANCE DETAILS",
                "props.title",
                "Wallet Balances"
            ]
        },
        "totalCount": 101
    }
}

@ivan-zynesis ivan-zynesis marked this pull request as draft July 23, 2021 08:47
@netlify
Copy link

netlify bot commented Jul 23, 2021

✔️ Deploy Preview for defi-wallet ready!

🔨 Explore the source changes: 6f37b3a

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

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

@defichain-bot
Copy link
Contributor

defichain-bot commented Jul 23, 2021

Build preview for DeFi Wallet is ready!

Built with commit c2916c0

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

@cypress
Copy link

cypress bot commented Jul 23, 2021



Test summary

54 0 0 0


Run details

Project wallet
Status Passed
Commit c2916c0 ℹ️
Started Jul 26, 2021 10:07 AM
Ended Jul 26, 2021 10:18 AM
Duration 10:52 💡
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

@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #333 (6f37b3a) into main (dbb45d5) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #333      +/-   ##
==========================================
- Coverage   87.97%   87.93%   -0.04%     
==========================================
  Files          91       91              
  Lines        1347     1343       -4     
  Branches      204      204              
==========================================
- Hits         1185     1181       -4     
  Misses        161      161              
  Partials        1        1              
Impacted Files Coverage Δ
app/components/OceanInterface/OceanInterface.tsx 90.47% <100.00%> (+0.15%) ⬆️
...ns/AppNavigator/screens/Balances/ConvertScreen.tsx 94.59% <100.00%> (-0.08%) ⬇️
...pNavigator/screens/Balances/screens/SendScreen.tsx 90.90% <100.00%> (-0.32%) ⬇️
...ppNavigator/screens/Dex/DexConfirmAddLiquidity.tsx 91.17% <100.00%> (-0.26%) ⬇️
...ns/AppNavigator/screens/Dex/DexRemoveLiquidity.tsx 94.11% <100.00%> (-0.12%) ⬇️
...pNavigator/screens/Dex/PoolSwap/PoolSwapScreen.tsx 94.11% <100.00%> (ø)
app/store/ocean.ts 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 dbb45d5...6f37b3a. Read the comment docs.

@ivan-zynesis ivan-zynesis marked this pull request as ready for review July 23, 2021 10:09
@thedoublejay thedoublejay enabled auto-merge (squash) July 26, 2021 10:24
@thedoublejay thedoublejay merged commit b517f12 into main Jul 26, 2021
@thedoublejay thedoublejay deleted the ivan/refactor/ocean-interface-perform-signing branch July 26, 2021 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/store area/ui-ux kind/refactor Non feature refactor change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants