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: multi currency support #1873

Merged
merged 57 commits into from
Jul 25, 2022
Merged

feat: multi currency support #1873

merged 57 commits into from
Jul 25, 2022

Conversation

0xdef1cafe
Copy link
Collaborator

@0xdef1cafe 0xdef1cafe commented May 24, 2022

Description

  • builds on top of other PR where data fetching is implemented
  • adds view layer changes required to consume this data
  • adds settings selection switcher behind flag
  • swapping is not implemented in this PR - and will be added in another PR

Notice

  • Have you followed the guidelines in our Contributing guide?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

wip

Risk

significant - touches pretty much everything.

Testing

full regression test of the app with the flag OFF (default) required

Screenshots (if applicable)

no visual changes should be present

@0xdef1cafe 0xdef1cafe changed the base branch from develop to fiat-market-data-slice May 24, 2022 17:25
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 24, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5978a6e
Status: ✅  Deploy successful!
Preview URL: https://4454269f.web-29e.pages.dev

View logs

Base automatically changed from fiat-market-data-slice to develop May 24, 2022 18:43
@0xdef1cafe
Copy link
Collaborator Author

0xdef1cafe commented Jul 20, 2022

update on this PR - the currency formatting issue on charts is fixed, and i can't see any chart regressions with this flag on and USD selected, or with the flag off.

@stackedq has implemented currency selection in the settings modal, i think we can merge this with the flag off, and tackle multi currency trade support in a separate PR, then get the flag on and feature released.

@0xdef1cafe
Copy link
Collaborator Author

next issue to implement trade support #1995

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

Tested both with the flag on and off:

  • With the flag on, I couldn't find any place where the selected currency wasn't displayed.

  • Seeing the right separator for Euro when selecting French as a language which seems to be the intent from looking at the implementation, but I'm not sure is right. Such separator should be determined by the currency, not the language. Happy for this to be improved in a follow-up PR.

  • The currency is always present before the value, which should be after by convention in the case of e.g Euro. I'm not sure if this is something we want to be granular with depending on the selected currency, but if so, it should be matching the convention of said currency. Again, happy for this to be tackled in a follow-up PR

  • I didn't notice any regressions on the existing behavior with the flag off, so I'm happy to merge this as is after the merge conflicts and the blocking comments are tackled.

GMSteuart and others added 6 commits July 21, 2022 07:11
* feat: init walletconnect integration

* chore: lint

* fix: wallet init

* fix: wallet init

* fix: add imagedelivery to headers

* chore: use package version

* chore: show/hide WalletConnect based on flag

* fix: headers for macos/ios safari

* fix: show feature flag nav item for alt host

* perf: add env var for better local development

* chore: remove unecessary code

* chore: remove package dep

* chore: add hdwallet-walletconnect alpha dependency

* fix: add walletconnect csp entries

* fix: utilize feature flag

* fix: add mobileEnabled field to WalletConnect config

* chore: run linter

* fix: remove usage of process.env

* chore: run linter

* fix: apply code review suggestions

* fix: use structured logging

* fix: apply code review suggestions

* fix: update csp for wallet logos

* chore: add flag to sample.env

* chore: yarn.lock

* docs: fleek info

* fix: img source csp

* chore: revert readme to develop

* fix: image fetched by walletconnect

* feat: WalletConnect rejection

* chore: lint

* chore: lint

* chore: update hdwallet-walletconnect dependency

* chore: upgrade hdwallet-walletconnect

* fix: set wc connect modal error to null on init

* chore: run linter

* fix: walletconnect refresh bug

* chore: upgrade hdwallet dependency

* chore: bump hdwallet dependencies

* fix: csp for walletconnect desktop logos

* chore: bump hdwallet package versions

* fix: disable trade max with walletconnect

* fix: disable sendmax with walletconnect

* chore: run linter

* chore: update hdwallet dependencies

* chore: run linter

* fix: hide fiat sendMax with WalletConnect

* fix: stylistic changes

* fix: typo

* feat: add copy to walletconnect option in selectmodal

* fix: constrain icon width for selectmodal options

* fix: update return value

Co-authored-by: pastaghost <[email protected]>
Co-authored-by: 0xdef1cafe <[email protected]>
Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

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

* add dogecoin

* use p2pkh accountType for dgubs
add dogecoin else if to handleSend :(
add dogecoin case to handleSendMax :( :(

* wrap doge plugin in a feature flag

* pass chainId to utxoAccountParams

* remove reference to dogecoin testnet

* web clean up

* fix: update old utility to new caip method

* chore: add REACT_APP_FEATURE_DOGECOIN=true to sample.env

* fix: update swapper logic to pass correct param

* chore: version bump doge libs

* fix: add dogecoin label to accounts page

* fix: don't show tokens under dogecoin account

Co-authored-by: 0xdef1cafe <[email protected]>
Co-authored-by: Apotheosis <[email protected]>
@gomesalexandre
Copy link
Contributor

@stackedq Some more conflicts after #2116 has been merged

@reallybeard
Copy link
Contributor

reallybeard commented Jul 22, 2022

Fixed the conflicts with my new defi ui stuff, a lot of it isn't needed anymore since we let the amount component do the heavy lifting.

@stackedq I do have a suggestion on the currency selection, can we not sort the list on click? I'm fine with it being sorted on mount, but its really weird that it jumps the item to the top when you make a selection. Same goes for the currency format selection.

@stackedq
Copy link
Contributor

@reallybeard changed some code to achieve the UX you described, please take a look to see if you're happy with the results.

gomesalexandre
gomesalexandre previously approved these changes Jul 23, 2022
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

Retested according to the previous criteria and it generally works as expected (minus a smallish comment WRT translations but that's for globalization and can be done separately) / didn't find any regression.

Re:

@stackedq I do have a suggestion on the currency selection, can we not sort the list on click? I'm fine with it being sorted on mount, but its really weird that it jumps the item to the top when you make a selection. Same goes for the currency format selection.

Tested this one out and that's behaving as suggested by @reallybeard as well.

Just me being a nit, but I've found it that the second "Currency Format" option isn't exactly matching the example in the option, see the option vs. the actual values formatting, missing the thousands separator:

image

Given this is such a small issue, and this is under feature flag, I'm going to accept this so we can move forward, and tackle small visual issues separately as follow-ups.
My biggest concern given the size of the PR would be whether or not this produces regressions, which from looking at the implementation and testing over, isn't the case.

🍬

@gomesalexandre
Copy link
Contributor

Given the high risk of this, let's get @shapeshift/operations to test the Fleek branch

@reallybeard
Copy link
Contributor

Looks good @stackedq working really nice!

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

Tested again as a sanity check, still working as previously.
The currency format option value is also now matching the actual formatting

🍬

@0xdef1cafe
Copy link
Collaborator Author

going to merge this for the following reasons

  • architecturally, this was previously discussed and approved by @cjthompson and recently tested and approved by @gomesalexandre and @reallybeard
  • @shapeshift/operations has signed off on this today
  • it's behind a flag
  • this branch is a bastard child

@0xdef1cafe 0xdef1cafe merged commit 56ba3b5 into develop Jul 25, 2022
@0xdef1cafe 0xdef1cafe deleted the multi-currency-support branch July 25, 2022 18:05
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.

Multi currency base support
10 participants