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

feat: wallet test plan page #205

Merged
merged 15 commits into from
May 23, 2022
Merged

feat: wallet test plan page #205

merged 15 commits into from
May 23, 2022

Conversation

crondinini
Copy link
Contributor

@crondinini crondinini commented May 23, 2022

This addresses #164

Overview

Following the draft PR #200, this PR adds a page to the Example app where the user can go through a set of steps to check how well a wallet interacts with the available actions from react-celo.

There are more tests to be added, but to avoid a huge PR, I'm opening this to merge these first ones.

I've simplified the UI a bit (compared to the Draft PR) to make it leaner and more consistent.

image

Problems/UX issues I found that we could consider addressing

  • Calling destroy for some reason doesn't update the address returned by useCelo. This means, if you click on it, you'll need to refresh the page to see the test reset.
  • Even though the provider is set to Mainnet, if you change the network to Alfajores, then refresh the page, it will still be set to Alfajores - not sure if this is the expected behavior. I'd think it should at least prompt the user to change the network to Mainnet.
  • Switching networks programmatically: initially I wanted to switch networks twice, from Mainnet to Alfajores and then back to Mainnet, but this caused a loop in Metamask because even though the promise ended, Metamask was still processing it.
  • The message for the transaction never changes. Even when the user already approved the transaction, the message displayed is that the user needs to approve it (see the last part of the gif below). We could update the message when the user has already approved the transaction to say it's now just waiting on the tx to be confirmed in the blockchain.

Demo

Kapture 2022-05-23 at 17 50 33

@vercel
Copy link

vercel bot commented May 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
use-contractkit ✅ Ready (Inspect) Visit Preview May 23, 2022 at 6:08PM (UTC)

@crondinini crondinini self-assigned this May 23, 2022
@aaronmgdr
Copy link
Member

Very nice code organization

Copy link
Contributor

@nicolasbrugneaux nicolasbrugneaux left a comment

Choose a reason for hiding this comment

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

Love this, my only "request" would be to have a link from the main page to the test page

import { UseCelo } from '@celo/react-celo';
import Web3 from 'web3';

export async function sendTransaction(
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: maybe the naming is too general, sendTestTransaction maybe?

Comment on lines +83 to +139

.test-tag {
text-transform: lowercase;
display: inline-block;
border-radius: 10px;
padding: 2px 10px;
height: max-content;
transform: translate(0, 9px);
font-size: 14px;
}

.success {
background: #43aa8b;
color: white;
}

.success-text {
color: #43aa8b;
}

.not-started {
background: #577590;
color: white;
}

.error {
background: #f94144;
color: white;
}

.pending {
background-color: #f9c74f;
color: black;
}

.test-block {
display: flex;
margin-top: 20px;
}

.test-instructions {
margin-left: 20px;
}

.test-result {
display: inline-block;
padding: 10px;
font-size: 13px;
border-radius: 4px;
border: 1px solid #dbdbdb;
width: 100%;
}

.tag-column {
min-width: 100px;
text-align: right;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nothing against ol' css, but could have used tailwind's classes too there

eg: .test-block roughly equals .flex .mt-t

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, it's a bit of a mess between tailwind and css classes. I'll improve it in the next PR!

@crondinini
Copy link
Contributor Author

Love this, my only "request" would be to have a link from the main page to the test page

Yep, agreed! Once I add the other actions, I'll also add a link from the main page. I didn't want to add it before it being complete. Forgot to mention that in the PR description.

@aaronmgdr
Copy link
Member

I made issues #206 #207 #208 for the bugs listed in this PR

@crondinini
Copy link
Contributor Author

Thanks @aaronmgdr

@codecov-commenter
Copy link

Codecov Report

Merging #205 (5896946) into master (6a5a033) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #205   +/-   ##
=======================================
  Coverage   45.42%   45.42%           
=======================================
  Files          51       51           
  Lines        1376     1376           
  Branches      182      182           
=======================================
  Hits          625      625           
  Misses        593      593           
  Partials      158      158           

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 6a5a033...5896946. Read the comment docs.

@crondinini crondinini merged commit 18ac469 into master May 23, 2022
@crondinini crondinini deleted the feat/wallet-test-plan-page branch May 23, 2022 18:18
aaronmgdr added a commit that referenced this pull request Jun 2, 2022
* chore: Label all issues in repo as Applications so they show in zenhub

* FEAT: Allow developers to pass in any networks they wish

add passed networks as a return value of useContractKit
replace NetWorkNames Enum with POJO so that its extendable
Make Network interface support arbitrary networks and include option to pass in the nativeCurrency which is used when adding to metamask.
For non celo networks dont try to add celo tokens to metamask

* fix: update Fee Currency should only be an option for Connectors / wallets that support alternative  gas fee currencies

* lint extra imports

* expose supportsFeeCurrency so devs can use to display conditional fee currency setting ops + demo it in our example app

* make it clear why we are returning false

* conflict

* Append current browser location in Metamask mobile

* replacing use of contractkit with minicontractkit

* Missing Import

* Add optional contractCache builder and memoization

* Catch token not registered error, display balances

* Fix empty block

* Change value to be type string

* Log error

* upgrade to react 18
add testing utils
start testing of Provider and hook

* upgrade jest and friends

remove react-test-render as we dont use and its not cool

* feat: redesign and wc fixes (#169)

* added search bar

* added search bar and optimization

* made some changes

* feat: initial redesign

* chore: remove unused unstated-next

* chore: review feedback

* fix: bad merge + pr review

* perf: search

* feat: adjust install logic

Co-authored-by: Henry Nunez <henry.nunez@clabs.co>

* Balances has BigNumber value and string error

* chore: Add svg icon for celo terminal (#69)

Add svg icon for celo terminal

* docs: improve readme (#184)

* docs(readme): fix typo
* docs(readme): add better development instructions
* refactor: remove check for window
* docs(readme): remove v2 of WC from example
* docs(readme): add wallets to list
* docs(readme): add supported actions
* fix: issue labeler error
* fix(docs): original instructions with alternative

* fix: remove toggle z-index to not interfere

* fix: remove specific actions from wallet (#188)

* move to target es6

All major browsers support es6 and this should improve bundle size too.

https://www.typescriptlang.org/tsconfig#target

* Renames use-contract kit to react-celo

4.0 now requires contractkit 2.0 and greater

* fix typo

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* Add test for modal

* no message

* Add basic level testing for private-key and wallet connect connectors.

* If the network is not set here than initialise call will just re establish connection to metamask with this.network (probably the one it was constructed with)

* fix: adjust styles for mobile and specifically for ios safari (#192)

* codeReview from @dckesler

* Feat/theming (#198)

* feat: initial theming

* chore: codereview

* test: add updateTheme tests

* Add Aliases for old function names  (#204)

Add Aliases for old function names so its not a pain to upgrade to v4

* feat: wallet test plan page (#205)

adds a page to the Example app (hidden in this commit) where the user can go through a set of steps to check how well a wallet interacts with the available actions of the package.

* fix: export useContractKit (#215)

* Some Network Change Errors (#216)

* Add tests for address handling in reducer
fix test file being misnamed
fix some error messages and code comments to be more clear

* fix #214 There was a destructuring error when init was not passed which is legal as its optional

* fixes #209 when switching network feeCurrency could be undefined. In that case lets skip setting it.

* fix: celo-wallet web connection (#217)

* fix: celo-wallet web connection

* refactor: rename getDesktopLink->getWebLink

* fix: destroy not re-rendering

* refactor: deeplinks and weblinks logic

* Allow updateTheme to take a null value (#219)

* Fix #211 Cleanup Init Errors (#223)

* Fix #211 Cleanup Init Errors when going to a new Wallet Screen or closing the modal

* lint: remove unused import

* fix: handle disconnect events coming from sessionUpdate events

* fix: show qrcode for mobile connectors

* chore: eslint warnings

* feat: show mobile disclaimer on apps with a deeplink

* fix dark toggle on example app (#227)

* Move the toggle down by the rest of the styling options this way it isnt  blocking everything on mobile.

also make it a little smaller

* update the used by list not to include projects that are dead or use a fork

* Change css classes to react-celo, include necessary TW css (#231)

* 4.0 Alpha 2

* fix example app dependencies (#233)

* fix example app dependencies

* attempt fix on deploy

* chore: configure test in example app (#234)

Sets up tests in the example app, using the configuration from the root (modified only to accept .test files outside of __tests__).

* docs: Add Migration Guide for v4 (#235)

* Add Guides





Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* style consistency

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* pr review @crondinini: clarify version needed

* add proper link to release notes

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* v4.0.0-beta.1 (React Celo Beta 1)

* 4.0 release

Co-authored-by: zhaonancy <nancy.zhao@clabs.co>
Co-authored-by: Nancy Zhao <32007540+zhaonancy@users.noreply.github.com>
Co-authored-by: Nicolas Brugneaux <nicolas.brugneaux@gmail.com>
Co-authored-by: Henry Nunez <henry.nunez@clabs.co>
Co-authored-by: J M Rossy <jm.rossy@gmail.com>
Co-authored-by: Camila Rondinini <crondinini@gmail.com>
Co-authored-by: Daniel Kesler <danielckesler@gmail.com>
@aaronmgdr aaronmgdr mentioned this pull request Jun 14, 2022
aaronmgdr added a commit that referenced this pull request Jun 28, 2022
* 4.0 release (#256)

* chore: Label all issues in repo as Applications so they show in zenhub

* FEAT: Allow developers to pass in any networks they wish

add passed networks as a return value of useContractKit
replace NetWorkNames Enum with POJO so that its extendable
Make Network interface support arbitrary networks and include option to pass in the nativeCurrency which is used when adding to metamask.
For non celo networks dont try to add celo tokens to metamask

* fix: update Fee Currency should only be an option for Connectors / wallets that support alternative  gas fee currencies

* lint extra imports

* expose supportsFeeCurrency so devs can use to display conditional fee currency setting ops + demo it in our example app

* make it clear why we are returning false

* conflict

* Append current browser location in Metamask mobile

* replacing use of contractkit with minicontractkit

* Missing Import

* Add optional contractCache builder and memoization

* Catch token not registered error, display balances

* Fix empty block

* Change value to be type string

* Log error

* upgrade to react 18
add testing utils
start testing of Provider and hook

* upgrade jest and friends

remove react-test-render as we dont use and its not cool

* feat: redesign and wc fixes (#169)

* added search bar

* added search bar and optimization

* made some changes

* feat: initial redesign

* chore: remove unused unstated-next

* chore: review feedback

* fix: bad merge + pr review

* perf: search

* feat: adjust install logic

Co-authored-by: Henry Nunez <henry.nunez@clabs.co>

* Balances has BigNumber value and string error

* chore: Add svg icon for celo terminal (#69)

Add svg icon for celo terminal

* docs: improve readme (#184)

* docs(readme): fix typo
* docs(readme): add better development instructions
* refactor: remove check for window
* docs(readme): remove v2 of WC from example
* docs(readme): add wallets to list
* docs(readme): add supported actions
* fix: issue labeler error
* fix(docs): original instructions with alternative

* fix: remove toggle z-index to not interfere

* fix: remove specific actions from wallet (#188)

* move to target es6

All major browsers support es6 and this should improve bundle size too.

https://www.typescriptlang.org/tsconfig#target

* Renames use-contract kit to react-celo

4.0 now requires contractkit 2.0 and greater

* fix typo

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* Add test for modal

* no message

* Add basic level testing for private-key and wallet connect connectors.

* If the network is not set here than initialise call will just re establish connection to metamask with this.network (probably the one it was constructed with)

* fix: adjust styles for mobile and specifically for ios safari (#192)

* codeReview from @dckesler

* Feat/theming (#198)

* feat: initial theming

* chore: codereview

* test: add updateTheme tests

* Add Aliases for old function names  (#204)

Add Aliases for old function names so its not a pain to upgrade to v4

* feat: wallet test plan page (#205)

adds a page to the Example app (hidden in this commit) where the user can go through a set of steps to check how well a wallet interacts with the available actions of the package.

* fix: export useContractKit (#215)

* Some Network Change Errors (#216)

* Add tests for address handling in reducer
fix test file being misnamed
fix some error messages and code comments to be more clear

* fix #214 There was a destructuring error when init was not passed which is legal as its optional

* fixes #209 when switching network feeCurrency could be undefined. In that case lets skip setting it.

* fix: celo-wallet web connection (#217)

* fix: celo-wallet web connection

* refactor: rename getDesktopLink->getWebLink

* fix: destroy not re-rendering

* refactor: deeplinks and weblinks logic

* Allow updateTheme to take a null value (#219)

* Fix #211 Cleanup Init Errors (#223)

* Fix #211 Cleanup Init Errors when going to a new Wallet Screen or closing the modal

* lint: remove unused import

* fix: handle disconnect events coming from sessionUpdate events

* fix: show qrcode for mobile connectors

* chore: eslint warnings

* feat: show mobile disclaimer on apps with a deeplink

* fix dark toggle on example app (#227)

* Move the toggle down by the rest of the styling options this way it isnt  blocking everything on mobile.

also make it a little smaller

* update the used by list not to include projects that are dead or use a fork

* Change css classes to react-celo, include necessary TW css (#231)

* 4.0 Alpha 2

* fix example app dependencies (#233)

* fix example app dependencies

* attempt fix on deploy

* chore: configure test in example app (#234)

Sets up tests in the example app, using the configuration from the root (modified only to accept .test files outside of __tests__).

* docs: Add Migration Guide for v4 (#235)

* Add Guides





Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* style consistency

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* pr review @crondinini: clarify version needed

* add proper link to release notes

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* v4.0.0-beta.1 (React Celo Beta 1)

* 4.0 release

Co-authored-by: zhaonancy <nancy.zhao@clabs.co>
Co-authored-by: Nancy Zhao <32007540+zhaonancy@users.noreply.github.com>
Co-authored-by: Nicolas Brugneaux <nicolas.brugneaux@gmail.com>
Co-authored-by: Henry Nunez <henry.nunez@clabs.co>
Co-authored-by: J M Rossy <jm.rossy@gmail.com>
Co-authored-by: Camila Rondinini <crondinini@gmail.com>
Co-authored-by: Daniel Kesler <danielckesler@gmail.com>

* Fixes #268 (-webkit-fill-available vs background gradient bug) 

use react modals custom classname to add the styles to html and body only when our modal is open

* Fix (hideFromDefaults option not hiding wallets) (#275)

* fixes #274 (hide from defaults not hiding wallets)

* return an array of which default providers are being used. rather than reuse all screens, which would have had extra and potentially gotten weird

* beta 1

* update example app

* measure once cut twice

* Fix handling of reactModalProp (#278)

* fixes the connect modal not recognizing when it receives style props externally.

* ensure out styles are not overwritten.

* Remove Extra Global Styles (#282)

* remove  tailwind base as it is messing with global styles

* remove unnessessary css resets for react-celo

* fix vertical allignments

* beta 2

* release

* Release/4.0.1 (#277)

* Fixes #268 (-webkit-fill-available vs background gradient bug) 

use react modals custom classname to add the styles to html and body only when our modal is open

* Fix (hideFromDefaults option not hiding wallets) (#275)

* fixes #274 (hide from defaults not hiding wallets)

* return an array of which default providers are being used. rather than reuse all screens, which would have had extra and potentially gotten weird


* Fix handling of reactModalProp (#278)

* fixes the connect modal not recognizing when it receives style props externally.

* Remove Extra Global Styles (#282)

* remove  tailwind base as it is messing with global styles

* remove unnessessary css resets for react-celo

* fix vertical allignments

* merge release/4.0.1 into master

* fix merge issues

* remove duplicated files

Co-authored-by: zhaonancy <nancy.zhao@clabs.co>
Co-authored-by: Nancy Zhao <32007540+zhaonancy@users.noreply.github.com>
Co-authored-by: Nicolas Brugneaux <nicolas.brugneaux@gmail.com>
Co-authored-by: Henry Nunez <henry.nunez@clabs.co>
Co-authored-by: J M Rossy <jm.rossy@gmail.com>
Co-authored-by: Camila Rondinini <crondinini@gmail.com>
Co-authored-by: Daniel Kesler <danielckesler@gmail.com>
aaronmgdr added a commit that referenced this pull request Aug 22, 2022
* chore: Label all issues in repo as Applications so they show in zenhub

* FEAT: Allow developers to pass in any networks they wish

add passed networks as a return value of useContractKit
replace NetWorkNames Enum with POJO so that its extendable
Make Network interface support arbitrary networks and include option to pass in the nativeCurrency which is used when adding to metamask.
For non celo networks dont try to add celo tokens to metamask

* fix: update Fee Currency should only be an option for Connectors / wallets that support alternative  gas fee currencies

* lint extra imports

* expose supportsFeeCurrency so devs can use to display conditional fee currency setting ops + demo it in our example app

* make it clear why we are returning false

* conflict

* Append current browser location in Metamask mobile

* replacing use of contractkit with minicontractkit

* Missing Import

* Add optional contractCache builder and memoization

* Catch token not registered error, display balances

* Fix empty block

* Change value to be type string

* Log error

* upgrade to react 18
add testing utils
start testing of Provider and hook

* upgrade jest and friends

remove react-test-render as we dont use and its not cool

* feat: redesign and wc fixes (#169)

* added search bar

* added search bar and optimization

* made some changes

* feat: initial redesign

* chore: remove unused unstated-next

* chore: review feedback

* fix: bad merge + pr review

* perf: search

* feat: adjust install logic

Co-authored-by: Henry Nunez <henry.nunez@clabs.co>

* Balances has BigNumber value and string error

* chore: Add svg icon for celo terminal (#69)

Add svg icon for celo terminal

* docs: improve readme (#184)

* docs(readme): fix typo
* docs(readme): add better development instructions
* refactor: remove check for window
* docs(readme): remove v2 of WC from example
* docs(readme): add wallets to list
* docs(readme): add supported actions
* fix: issue labeler error
* fix(docs): original instructions with alternative

* fix: remove toggle z-index to not interfere

* fix: remove specific actions from wallet (#188)

* move to target es6

All major browsers support es6 and this should improve bundle size too.

https://www.typescriptlang.org/tsconfig#target

* Renames use-contract kit to react-celo

4.0 now requires contractkit 2.0 and greater

* fix typo

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* Add test for modal

* no message

* Add basic level testing for private-key and wallet connect connectors.

* If the network is not set here than initialise call will just re establish connection to metamask with this.network (probably the one it was constructed with)

* fix: adjust styles for mobile and specifically for ios safari (#192)

* codeReview from @dckesler

* Feat/theming (#198)

* feat: initial theming

* chore: codereview

* test: add updateTheme tests

* Add Aliases for old function names  (#204)

Add Aliases for old function names so its not a pain to upgrade to v4

* feat: wallet test plan page (#205)

adds a page to the Example app (hidden in this commit) where the user can go through a set of steps to check how well a wallet interacts with the available actions of the package.

* fix: export useContractKit (#215)

* Some Network Change Errors (#216)

* Add tests for address handling in reducer
fix test file being misnamed
fix some error messages and code comments to be more clear

* fix #214 There was a destructuring error when init was not passed which is legal as its optional

* fixes #209 when switching network feeCurrency could be undefined. In that case lets skip setting it.

* fix: celo-wallet web connection (#217)

* fix: celo-wallet web connection

* refactor: rename getDesktopLink->getWebLink

* fix: destroy not re-rendering

* refactor: deeplinks and weblinks logic

* Allow updateTheme to take a null value (#219)

* Fix #211 Cleanup Init Errors (#223)

* Fix #211 Cleanup Init Errors when going to a new Wallet Screen or closing the modal

* lint: remove unused import

* fix: handle disconnect events coming from sessionUpdate events

* fix: show qrcode for mobile connectors

* chore: eslint warnings

* feat: show mobile disclaimer on apps with a deeplink

* fix dark toggle on example app (#227)

* Move the toggle down by the rest of the styling options this way it isnt  blocking everything on mobile.

also make it a little smaller

* update the used by list not to include projects that are dead or use a fork

* Change css classes to react-celo, include necessary TW css (#231)

* 4.0 Alpha 2

* fix example app dependencies (#233)

* fix example app dependencies

* attempt fix on deploy

* chore: configure test in example app (#234)

Sets up tests in the example app, using the configuration from the root (modified only to accept .test files outside of __tests__).

* docs: Add Migration Guide for v4 (#235)

* Add Guides





Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* style consistency

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* pr review @crondinini: clarify version needed

* add proper link to release notes

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* v4.0.0-beta.1 (React Celo Beta 1)

* refactor(useCelo types): make it explicit where types are coming from (#236)

The same types were repeated in 3 different places. This reuses existing types instead of repeating them. As a side effect, it also moves documentation to where it's implemented and adds some missing ones.

* fix add proper Type for initialState (#238)

* remove ethereumjs utils (#242)

* wip Removes ethereumjs-utils by copying the few functions we use from it and using alternatives

* rename files, add license, add tests

* remove name from jest config as it causes a warning

* Optimize SVGs (#239)

run svgs thru an optimizer then convert back to jsx to save bytes. (saved about 30%) (19k vs 30k) on wallet Icons

* fix: Celo Utils is not used in react-celo, only in the example app (#240)

Celo Utils is not used in react-celo, only in the example app

* feat: add packages publisher (#241)

* 4.0 release

* feat: a11y/colors (#221)

* feat: first pass at color checking

* test: add color tests

* Typed Local Storage (#243)

* Access Local Storage Thru specific getter and setter functions only

* remove extra file

* remove some unneeded code

* review: swtich to 2 typed functions rather than getter/setter per key
add tests

* lint and test

* refactor: extract connectors, icons and standardize filenames (#260)

* refactor: extract connectors and remove capitalization

* refactor: extract wallet icons

* chore: eslint

* refactor: move use-contracts-cache

* refactor: component naming

* refactor: remove unused variable

* fix 2 spots where old repo name was used (#262)

* Update issue templates (#228)

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* Fix npm Badge (#263)

* feat: wallet test plan (more tests and add to home) (#264)

* fixes #203 deprecated network prop (#269)

* fixes #203 deprecated network prop

add defaultNetworkProp

allow both for now. and favor network so that this is a nonbreaking change

unless you count that this fixes passing in a unfindable network now throws an error instead of silently defaulting to mainnet

* feat: create ressursurector, updator,  & persistor


* Persistor and Updator respond to events from Connectors

* add persistor test and lint

* Better emissions typing

* improve typings and add explicit event emitter package ( very small)

* add test for walletID (used by getRecent())

* When Modal is Open Dont Allow Background to scroll  (#270)

* Connect modal disable background scroll

* Action modal disable background scroll

* Fix linting

* Move to helper

* Remove unused imports

* Fix import order

* Use window scroll in useFixedBody

* Use document.body.style

Co-authored-by: zhaonancy <nancy.zhao@clabs.co>

* Accessibility Fixes (#273)

* Chrome Lighthouse accessibility fixes

* Fix URL

Co-authored-by: zhaonancy <nancy.zhao@clabs.co>

* Add coinbase wallet support (#266)

* Add coinbase wallet support

* Add dapp name and icon to coinbase wallet sdk

* feat: logger (#244)

* feat: logger

* test: add logging tests

* test: fix test

* Stable merge (#285)

* 4.0 release (#256)

* chore: Label all issues in repo as Applications so they show in zenhub

* FEAT: Allow developers to pass in any networks they wish

add passed networks as a return value of useContractKit
replace NetWorkNames Enum with POJO so that its extendable
Make Network interface support arbitrary networks and include option to pass in the nativeCurrency which is used when adding to metamask.
For non celo networks dont try to add celo tokens to metamask

* fix: update Fee Currency should only be an option for Connectors / wallets that support alternative  gas fee currencies

* lint extra imports

* expose supportsFeeCurrency so devs can use to display conditional fee currency setting ops + demo it in our example app

* make it clear why we are returning false

* conflict

* Append current browser location in Metamask mobile

* replacing use of contractkit with minicontractkit

* Missing Import

* Add optional contractCache builder and memoization

* Catch token not registered error, display balances

* Fix empty block

* Change value to be type string

* Log error

* upgrade to react 18
add testing utils
start testing of Provider and hook

* upgrade jest and friends

remove react-test-render as we dont use and its not cool

* feat: redesign and wc fixes (#169)

* added search bar

* added search bar and optimization

* made some changes

* feat: initial redesign

* chore: remove unused unstated-next

* chore: review feedback

* fix: bad merge + pr review

* perf: search

* feat: adjust install logic

Co-authored-by: Henry Nunez <henry.nunez@clabs.co>

* Balances has BigNumber value and string error

* chore: Add svg icon for celo terminal (#69)

Add svg icon for celo terminal

* docs: improve readme (#184)

* docs(readme): fix typo
* docs(readme): add better development instructions
* refactor: remove check for window
* docs(readme): remove v2 of WC from example
* docs(readme): add wallets to list
* docs(readme): add supported actions
* fix: issue labeler error
* fix(docs): original instructions with alternative

* fix: remove toggle z-index to not interfere

* fix: remove specific actions from wallet (#188)

* move to target es6

All major browsers support es6 and this should improve bundle size too.

https://www.typescriptlang.org/tsconfig#target

* Renames use-contract kit to react-celo

4.0 now requires contractkit 2.0 and greater

* fix typo

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* Add test for modal

* no message

* Add basic level testing for private-key and wallet connect connectors.

* If the network is not set here than initialise call will just re establish connection to metamask with this.network (probably the one it was constructed with)

* fix: adjust styles for mobile and specifically for ios safari (#192)

* codeReview from @dckesler

* Feat/theming (#198)

* feat: initial theming

* chore: codereview

* test: add updateTheme tests

* Add Aliases for old function names  (#204)

Add Aliases for old function names so its not a pain to upgrade to v4

* feat: wallet test plan page (#205)

adds a page to the Example app (hidden in this commit) where the user can go through a set of steps to check how well a wallet interacts with the available actions of the package.

* fix: export useContractKit (#215)

* Some Network Change Errors (#216)

* Add tests for address handling in reducer
fix test file being misnamed
fix some error messages and code comments to be more clear

* fix #214 There was a destructuring error when init was not passed which is legal as its optional

* fixes #209 when switching network feeCurrency could be undefined. In that case lets skip setting it.

* fix: celo-wallet web connection (#217)

* fix: celo-wallet web connection

* refactor: rename getDesktopLink->getWebLink

* fix: destroy not re-rendering

* refactor: deeplinks and weblinks logic

* Allow updateTheme to take a null value (#219)

* Fix #211 Cleanup Init Errors (#223)

* Fix #211 Cleanup Init Errors when going to a new Wallet Screen or closing the modal

* lint: remove unused import

* fix: handle disconnect events coming from sessionUpdate events

* fix: show qrcode for mobile connectors

* chore: eslint warnings

* feat: show mobile disclaimer on apps with a deeplink

* fix dark toggle on example app (#227)

* Move the toggle down by the rest of the styling options this way it isnt  blocking everything on mobile.

also make it a little smaller

* update the used by list not to include projects that are dead or use a fork

* Change css classes to react-celo, include necessary TW css (#231)

* 4.0 Alpha 2

* fix example app dependencies (#233)

* fix example app dependencies

* attempt fix on deploy

* chore: configure test in example app (#234)

Sets up tests in the example app, using the configuration from the root (modified only to accept .test files outside of __tests__).

* docs: Add Migration Guide for v4 (#235)

* Add Guides





Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* style consistency

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* pr review @crondinini: clarify version needed

* add proper link to release notes

Co-authored-by: Camila Rondinini <crondinini@gmail.com>

* v4.0.0-beta.1 (React Celo Beta 1)

* 4.0 release

Co-authored-by: zhaonancy <nancy.zhao@clabs.co>
Co-authored-by: Nancy Zhao <32007540+zhaonancy@users.noreply.github.com>
Co-authored-by: Nicolas Brugneaux <nicolas.brugneaux@gmail.com>
Co-authored-by: Henry Nunez <henry.nunez@clabs.co>
Co-authored-by: J M Rossy <jm.rossy@gmail.com>
Co-authored-by: Camila Rondinini <crondinini@gmail.com>
Co-authored-by: Daniel Kesler <danielckesler@gmail.com>

* Fixes #268 (-webkit-fill-available vs background gradient bug) 

use react modals custom classname to add the styles to html and body only when our modal is open

* Fix (hideFromDefaults option not hiding wallets) (#275)

* fixes #274 (hide from defaults not hiding wallets)

* return an array of which default providers are being used. rather than reuse all screens, which would have had extra and potentially gotten weird

* beta 1

* update example app

* measure once cut twice

* Fix handling of reactModalProp (#278)

* fixes the connect modal not recognizing when it receives style props externally.

* ensure out styles are not overwritten.

* Remove Extra Global Styles (#282)

* remove  tailwind base as it is messing with global styles

* remove unnessessary css resets for react-celo

* fix vertical allignments

* beta 2

* release

* Release/4.0.1 (#277)

* Fixes #268 (-webkit-fill-available vs background gradient bug) 

use react modals custom classname to add the styles to html and body only when our modal is open

* Fix (hideFromDefaults option not hiding wallets) (#275)

* fixes #274 (hide from defaults not hiding wallets)

* return an array of which default providers are being used. rather than reuse all screens, which would have had extra and potentially gotten weird


* Fix handling of reactModalProp (#278)

* fixes the connect modal not recognizing when it receives style props externally.

* Remove Extra Global Styles (#282)

* remove  tailwind base as it is messing with global styles

* remove unnessessary css resets for react-celo

* fix vertical allignments

* merge release/4.0.1 into master

* fix merge issues

* remove duplicated files

Co-authored-by: zhaonancy <nancy.zhao@clabs.co>
Co-authored-by: Nancy Zhao <32007540+zhaonancy@users.noreply.github.com>
Co-authored-by: Nicolas Brugneaux <nicolas.brugneaux@gmail.com>
Co-authored-by: Henry Nunez <henry.nunez@clabs.co>
Co-authored-by: J M Rossy <jm.rossy@gmail.com>
Co-authored-by: Camila Rondinini <crondinini@gmail.com>
Co-authored-by: Daniel Kesler <danielckesler@gmail.com>

* fix: regression in priority and style issue (#284)

* fix: regression in priority and style issue

* refactor: remove all variable shadowings

* chore(deps): bump parse-url from 6.0.0 to 6.0.2 (#286)

Bumps [parse-url](https://github.com/IonicaBizau/parse-url) from 6.0.0 to 6.0.2.
- [Release notes](https://github.com/IonicaBizau/parse-url/releases)
- [Commits](https://github.com/IonicaBizau/parse-url/commits)

---
updated-dependencies:
- dependency-name: parse-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* New Look for Demo Site (#290) fixes #258

* Make Top nav fixed to top and full width

* add footer

* add NPM link to nav

* redesign home and layout,

add nice colors,

add footer

more showcase like

* add dark mode to the home page

* make sure dark mode is ok on other pages

* Internal rewrite  (#288)

* All Connectors emit Disconnect Event

* Connectors emit connected events with params

* make emit protected, ONLY callable by connectors, also fix cew test

* switch address change to be emited event

* WIP

* replace loadConfig with resurector + loadPreviusState
Move celo provider helpers to their own files.
add listeners

* remove persists

* fix connector stub

* end reducer effecting local storage

* fix tests, no local storage

* connector listerns must be listening BEFORE initialise is called

* remove clearPreviousConfig calls from connectors

* split up client settup from fetching URI. allow getURI to be called multiple times without creating new clients

* expend test for wallet connect

* missed extra import

* WIP better netowkr changers

* a little cleanup

* remove unused code

* fix tests

* tests pass

* wip Wallet connect connector connecting steps, changing networks, disconnecting, and inbetween steps

* improve wc, handle CBW disconnect, remove account

* update todos

* fix lint errors

* fix ts build

* cleanup

* replace console.xxx with our custom logger

* self review

* clear up verbose test runs

* lint up

* clean up tests. remove weird exit code

* revert

* add second test condition

* more self review

* review (@nicolasbrugneaux) rename destroy to disconnect for linguistic symmetry with connect action

* a more reasonable time

* unmount in the tests

* mocking the balance might be why there is a balance

Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>

* 4.1.0 alpha 1

* fix versions

* Fix style bugs (#293)

* add a default zindex of 40 (can be over written)

(no need for mobile check here is both are the same)

* fix body height while modal is open (in cases where the content isnt enought to push to full screen)

* ensure full list of wallets is not bigger than viewable area / push up final by adding padding

* Alpha 2

* Fix improper error when metamask gets locked (#298)

* when metamask extension is locked it shows their being zero accounts available.

Before it would error out and disconnect,

Now we explicitly close (this is the same behavior rainbow wallet and uniswap.org did)

* add properties that were missing on type

* 4.1 Beta 1

* Fix z-index class not being properly prefixed

* Beta 2

* Fix regression  metamask network regression (#300)

Fix regression where metamask would not be automatically switched to the dapp network.

also fix token import to metamask to use new mento uri for logo

* 4.1 Beta 3

Co-authored-by: zhaonancy <nancy.zhao@clabs.co>
Co-authored-by: Nancy Zhao <32007540+zhaonancy@users.noreply.github.com>
Co-authored-by: Nicolas Brugneaux <nicolas.brugneaux@gmail.com>
Co-authored-by: Henry Nunez <henry.nunez@clabs.co>
Co-authored-by: J M Rossy <jm.rossy@gmail.com>
Co-authored-by: Camila Rondinini <crondinini@gmail.com>
Co-authored-by: Daniel Kesler <danielckesler@gmail.com>
Co-authored-by: cb-jake <95890768+cb-jake@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants