This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
generated from rsksmart/react-app-rif-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Use latest package of pinner service - Works on all networks, not just RSK Testnet This fixes the following issues: - Fixed #32 - Broken connections to the datavault are thrown and the client is not saved into context. - Fixed #30 - DataVault now only requests auth token once with the init getStorageInfo() command. - Fixed #23 - DataVault works on Ethereum and RSK Mainnet
javiesses
reviewed
Jan 12, 2021
This was referenced Jan 13, 2021
javiesses
approved these changes
Jan 13, 2021
jessgusclark
added a commit
that referenced
this pull request
Mar 1, 2021
* Data vault view insert (#14) * Create authenticated component/container to hold the header and navigtation. - will handle navigation next. * Create navigation with useState() - Using useState() instead of routes right now becuase it is only two pages. Keeping it simple - Empty DataVault component/container that will be populated next. - Add test for navigation file * Create Add Declarative Details UI, update scss and add icons. * Add DeclarativeDetails display and update styles on Add. * Move navigation and header into the authenticated folder. - These are not reusable components but specific to the id manager. * Fix broken test by wrapping it in act(). * Fix broken test by wrapping it in act(). * Add DataVault pinner service - Save pinner client into context - Create reducer to hold DV content, and connect it to components - Create config endpoint for DV * Connect "Add New" component to datavault - Create create operations to connect DV - Ad loading component and update button and input styles when loading. * Fix test and create defaultstate for context. * Move DV config to JSON files and handle null - Save if it has DataVault in redux. Will be used in multiple places soon - Do not show navigation tab for datavault if none for network - Remove test that will always fail * Remove hasDataVault from redux - get the vault from context in the authenticated component and pass down to navigation. * Implement ipfs-cpinner-client...beta2 version - Save item in redux using its key - Content is saved with its id to be used as the <tr> key and will be used for delete/update - Update frontend and tests to reflect the changes * Create pr.yml (#15) * Data vault delete (#17) * Add delete functionality. * Improve user experience when deleting - Create modal to handle yes/no confirmations - Implement this modal when the user clicks 'delete' - Add trash icon and CSS for buttons * Move context out of AddComponent and to DataVaultComponent - Moving the reference to context to the container/component. This will allow this component to be more independent. - Matches the implementation from "delete" * use correct function when deleting. * Add .disabled option to list items. * Fix pr.yml (#16) * Fix pr.yml * Update package.json * Fix CSS on Build (#18) * Use same version of SC as in rLogin. * ignore windows debug.log file. * revert jsx setting caused by build. * Set fixed version of typescript, ref: facebook/create-react-app#10110. * Data vault swap (#19) * Create EditValueModal to handle editing of content - Handles single & multiline with custom inputs and event handlers - Additionally, add classNames to modal for better testing 'finds' - Can replace modal in EthrDid sections * Implement swap content by id/key. - Use EditValue modal to handle visuals - Add operations to interact with DV - Update value in redux on success * Update tests - Fix existing (delete) test that now found two buttons - Write test for upgrade state changes - Add missing reducer tests for types/payloads * DataVault Summary Panel with max storage (#22) * Build DataVault Summary Panel on Dashboard - Show MaxStorage, button to DataVault screen - New component: progress bar that takes total and value * Implement getStorageInformation operation and redux value - Static storage until beta3 is published * Use beta3 version of the ipfs pinner - Implement size operation - Show sizes on hover as bytes - Progress bar will show at least 1% if the value is more than 0 but less than 1%. This is visual for the user to at least see a value * final cleanup. * Manage Identity Screen (#31) * Create empty container/component for Identity screen. * Move Identity owner and delegate to new screen. * Refactor Owner component on Identity Screen - Elevate context to component/container level - Use EditValue Modal to simplify code - Remove unused formatter in favor of formatAddressDid() * Refactor Delegates - Use EditValueModal and pass value up to container/component which handles connection to context. - Show PublicKey not Authentication to get the delegate address * Move edit buttons to panel header row. * Add Service Endpoint component. - Format <ul> inside of panels * Add PublicKeys Component and interaction, add TransactionListener - Use exsiting "addAttribute" function - Add transactionListener to watch the transactions - Update addAttribute to use new listner - SCSS changes to make it classy - Add inputDefaults and return int * Implement transaction listener on all ethr-did calls. * Hide adding attributes if the user is not the owner. * Add icons and cleanup console logs and comments. * Requested Changes - Replace secp256ka with secp256k1 - Update button title to "Add Public Key" * Edit persona, multiple fields, and avatar (#29) * Remove 'includeEthr' parameter from createDidFormat - DIDs should always include :ethr: * Add icon and get DD_NAME from datavault (if exists) to display in header. - Style and center profile icon - Display only * Create Edit Persona Modal and pass down Persona Declarative Details. * Connect editing persona UX to helper function that updates/inserts/deletes the content. * Refactor to make it easier to add fields for Persona. - Use shallow on header tests so we don't have to update test when adding field * Add missing fields. * Remove catch from getStorage. * Requested Changes - Remove catch statement on getStorageInfo - No hover state if there is a name in the header. * Fix issue created by rebase. * Add Copy button to dashboard persona information (#34) - Don't render the persona info panel until chainId and address are saved - pass address & chainId instead of DID to panel - Add copy button to DID and Address * Defi Assets Screen and Get USD balance (#33) * Create new screen for DeFi Assets and move Balance component to that screen. * STASH * Rename `tokens` to `defi` - defi is expanding and not all the data will be tokens. i.e. gas - Reducer & operations updated and their connections. * Create DeFi Summary panel on Dashboard - Get balance from wallet and prefix it with its name - Pull in featured token if name is RIF or tRIF - Create component 'BalanceRow' to format the balances * Update defi screen to use BalanceRow and new [add] button. * Fix navigation classNames. * Fix issues caused by assumed and rebase. * Add USD conversion to balanceRow. * Get conversion rates from CoinGecko - Use the RSKSmart list of contracts to pull in tokens for RSK networks - In config, create coinGecko ID list to pull in values once - Map conversion values to defaultBalance, or to a contract name (RIF) * Final cleanup - Pass RIF balance to summary panel - Update Tooltip inheritance * Save token (from RSK list) to storage if it has a balance. * Display Verifiable Credentials (#35) * Rename data to declarativeDetails in reducer. * Add credentials to reducer and update receiveKeyData to handle keys with 'credential' in them. * Create panel for Credentials - Pass credentials into panel - CredentialView component to handle displaying the credential, add button to view raw and handle non-JWTs. * Prefix user's declarative details with DD_ and convert key to uppercase. * Update DataVault to use Encryption (#39) * Update DataVault to use Encryption - Use latest package of pinner service - Works on all networks, not just RSK Testnet This fixes the following issues: - Fixed #32 - Broken connections to the datavault are thrown and the client is not saved into context. - Fixed #30 - DataVault now only requests auth token once with the init getStorageInfo() command. - Fixed #23 - DataVault works on Ethereum and RSK Mainnet * Missed linebreak and package update. * Use v0 dv endpoint. * Allow user to Download contents from DataVault - Panel at the bottom of the DV screen for downloading - Component to handle UX - Operations function that calls the download function, creates text file and downloads it to the user * Delete credential from the Data Vault (#41) * Extract DeleteButton into its own component - Migrate test to check functionality, - Pass handleDelete up the tree to container * Add error to Binary Modal. * Allow user to delete a credential - Add `options` props in credentialViewer, - Pass delete button and connect to existing reducer - Remove item from the credential key * Final Cleanup. * Implement Lazy loading of content inside of keys (#40) * Add Lazy Loading - At the init of the app, only the keys are downloaded - Button to download and decrypt data on each row * Refactor DecryptKey Button into its own file - Connect to existing DD table - Add download button to Credential table * Update DD Display test and add additional for getContent. * Delete the key if the user deletes all the content from it. * Hide/Show message to download if keys have no content * Added MIT license and ignore .env (#45) * Create Verifiable Presentations from Credentials stored in the DataVault (#46) * POC of Verifiable Credential - Create proof of concept with static DID and Address to see if it works. * Refactor to pull credential part out and use ENUM for status. * Pass presentation up the chain and create tests. * Handle connections to DV where encryption is not possible (#44) * Fix error with sign where address and data are swapped. - Resolves an issue with WalletConnect where it couldn't authenticate with the datavault. * Use real encryptionManager if Metamask, but dummy for Nifty - Pass dummy encryption function for Nifty and WalletConnect - Add function to get provider name from the provider. FYI: Nifty return true to isMetaMask, so it check isNifty first. * Show static alert if wallet is not Metamask - Metamask is encrypted * Quick Fixes - Use correct prefix for Ethereum - Use lowercase DID with Datavault. Resolves an issue where metamask and Trust wallet return different checksums for the address. * Bump DV client to 8. * Throw and Handle Error Throw and handle an error if the user's wallet is unable to decrypt encrypted content from the DV. Edge case when user inserts data using Metamask and retrieves it via nifty or walletConnect. * Extract message and refactor to use in Credential section. * Bump DataVault client and endpoint (#49) * Bump pinner client to 9. * Update datavault endpoint to /v2 * Return correct provider constant and allow valut to be optional. * Add logout button (#54) * Add reset option to each reducer and test. * Add code to reset app on Logout - Centralized logout function - Connect to each reset() function in reducers - Clear localStorage. This will be moved to rLogin in the future * Add visual logout button and connect it to context.reset() and the operations logout file. * Add Ethereum Testnets (#53) * Add Ropsten testnet. * Add Koven testnet. * Add Rinkeby testnet. * Add Goerli * reduce duplicate code. * Update names for testnet gas. * Final clean up. * Change <Button to <button in the DV summary. (#51) - Update text * Fix Debug Logs exposed in the Browser (#55) * Fix Debug Logs exposed in the Browser From security audit RLOGIN-006 * Lint * Cache the web3 provider (#56) * Bump rLogin and move services into dep. * Implement auto-login based on cached value - check if cached value exists, rLogin will use it automatically * Move resetting context to the operations file. * Remove passing cachedProvider as it is not needed. * Add eip1193 listners to the AuthenticatedComponent - Since these listeners change the Context, they need to be inside of a React Component. Placing them in the operations file resulted in creating unwanted copies. * Add warning message to DV component and refacor the &&. * Combine functions and pass to container to make decision. * cleanup. * Explicitly set styled-components and add resolution to make sure they remain the same. - rLogin, or web3Modal's version of styled components was different than the Id Manager. This caused rendering issues. The resolution idea was from the issue raised below. Ref: styled-components/styled-components#1941 * Use the did-jwt version from RSK to sign the presentations. (#50) * Use the did-jwt version from RSK to sign the presentations. * Use link to verifier instead of textarea with DID. * Fix data vault endpoint (#60) * Update encryption methods (#61) * bump package version. * Update create client to use new encryption options. * Remove warning that the wallet is not secure. * Update test props and remove test for for the warning. * use AsymmetricEncryptionManager for metamask Update src/app/state/operations/datavault.ts Co-authored-by: Ilan <36084092+ilanolkies@users.noreply.github.com> Co-authored-by: Ilan <36084092+ilanolkies@users.noreply.github.com> * Add continuous delivery (#63) * Fix encryption with WC (#62) * Update datavault endpoint (#64) * Update datavault endpoint. * Add homepage backend using "." so it will support relative paths Reference: https://create-react-app.dev/docs/deployment/#serving-the-same-build-from-different-paths * Refactor encryption for Metamask, fix how it is created. * Continuous Delivery added (#65) Co-authored-by: Jesse Clark <hello@developerjesse.com> Co-authored-by: Javier Esses <javiesses@hotmail.com> Co-authored-by: juan-rsk <57964683+juan-rsk@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
beta.7
This also fixes the following issues:
config.json
file to hold DV endpoint.What this does not implement and will be handled in additional PRs.