-
Notifications
You must be signed in to change notification settings - Fork 47
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
#351
- WalletProvider
refactor to move init logic into contexts/*.tsx
#380
Conversation
completed verify pin (pending some text and styling)
…nterface-perform-signing
…n-interface-perform-signing
- ui implementation (page, pin input) - tx queue (in store), split from broadcast queue - retry mech + state management - clear wallet after consecutive failure (persistent failure counter, reset upon valid pin)
# Conflicts: # package-lock.json # package.json
Code Climate has analyzed commit 773c589 and detected 0 issues on this pull request. View more on Code Climate. |
Missing Translations ReportThe 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
}
} |
Codecov Report
@@ Coverage Diff @@
## main #380 +/- ##
==========================================
- Coverage 88.51% 86.83% -1.69%
==========================================
Files 95 97 +2
Lines 1376 1413 +37
Branches 210 210
==========================================
+ Hits 1218 1227 +9
- Misses 157 185 +28
Partials 1 1
Continue to review full report at Codecov.
|
✔️ Deploy Preview for defi-wallet ready! 🔨 Explore the source changes: 773c589 🔍 Inspect the deploy log: https://app.netlify.com/sites/defi-wallet/deploys/61067a0cc34aae0007678244 😎 Browse the preview: https://deploy-preview-380--defi-wallet.netlify.app/ |
Build preview for DeFi Wallet is ready! Built with commit fea926d https://expo.io/@defichain/wallet?release-channel=pr-preview-380 |
Test summaryRun details
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 |
#351
- WalletProvider
refactor to move init logic into tsx
#351
- WalletProvider
refactor to move init logic into contexts/*.tsx
What kind of PR is this?:
/kind refactor
What this PR does / why we need it:
WalletManagementProvider
toWalletPersistenceProvider
as it should not init wallet.WalletProvider
can accept anyWalletPersistenceData
and automatically init the correct wallet type withWalletProvider
.PasscodeAttempt
logic into the context instead.<WalletContext.Provider value={wallet}>
is still used to allow for wallet agnostic implementation.PasscodeAttemptCounter
fromEncrypted Mnemonic Wallet
#3510.33.0
that usesscrypt-js
with pure JS implementation closesScryptProvider
implementation #370Playground
to support newWalletPersistenceProvider
implementation withWalletProvider
WalletAddressProvider
for setting address in-store, this is added for legacy reasons. This should be deprecated.