Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

CD for main #66

Merged
merged 32 commits into from
Mar 1, 2021
Merged

CD for main #66

merged 32 commits into from
Mar 1, 2021

Conversation

ilanolkies
Copy link
Contributor

No description provided.

jessgusclark and others added 30 commits December 1, 2020 10:46
* 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
* 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

* Update package.json
* 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.
* 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
* 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.
* 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"
* 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.
- 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
* 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.
* 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

- 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.
- 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
* 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.
* 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
…ult (#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.
* 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 pinner client to 9.

* Update datavault endpoint to /v2

* Return correct provider constant and allow valut to be optional.
* 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 Ropsten testnet.

* Add Koven testnet.

* Add Rinkeby testnet.

* Add Goerli

* reduce duplicate code.

* Update names for testnet gas.

* Final clean up.
* Fix Debug Logs exposed in the Browser

From security audit RLOGIN-006

* Lint
* 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.

* Use link to verifier instead of textarea with DID.
* 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>
jessgusclark and others added 2 commits February 26, 2021 13:16
* 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.
Copy link
Member

@jessgusclark jessgusclark left a comment

Choose a reason for hiding this comment

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

Great, first release!

@jessgusclark jessgusclark merged commit b315211 into main Mar 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants