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

EVM Staking - Add wallet connect and show connected network #1818

Merged
merged 30 commits into from
Nov 13, 2023

Conversation

devpavan04
Copy link
Member

Summary of changes

  • Adds wallet connect button.
  • Adds connected chain info.
  • Return token unit when balance is zero in validator tables.
  • Updates connect wallet mobile button to show message for bridge dapp and tangle dapp accordingly.

Proposed area of change

  • apps/bridge-dapp
  • apps/hubble-stats
  • apps/stats-dapp
  • apps/tangle-dapp
  • apps/faucet
  • libs/webb-ui-components

Reference issue to close (if applicable)

Screen Recording

CleanShot.2023-11-07.at.12.49.11.mp4

Copy link

netlify bot commented Nov 7, 2023

Deploy Preview for hubble-stats ready!

Name Link
🔨 Latest commit 5f4ec2e
🔍 Latest deploy log https://app.netlify.com/sites/hubble-stats/deploys/65518ff34402720008b28546
😎 Deploy Preview https://deploy-preview-1818--hubble-stats.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 7, 2023

Deploy Preview for tangle-dapp ready!

Name Link
🔨 Latest commit 5f4ec2e
🔍 Latest deploy log https://app.netlify.com/sites/tangle-dapp/deploys/65518ff334909600080db8b4
😎 Deploy Preview https://deploy-preview-1818--tangle-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@devpavan04 devpavan04 self-assigned this Nov 7, 2023
@devpavan04 devpavan04 added needs review 👓 Pull request needs a review tangle-dapp Tangle Staking dApp labels Nov 7, 2023
@drewstone
Copy link
Contributor

Awesome work @devpavan04 ! Designs look great @monaiuu

Copy link
Contributor

@drewstone drewstone left a comment

Choose a reason for hiding this comment

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

LG, a lot changed and small things removed/added. Can you explain rationale?

libs/api-provider-environment/src/store/index.tsx Outdated Show resolved Hide resolved
libs/note-manager/src/note-manager.ts Show resolved Hide resolved
libs/note-manager/src/note-manager.ts Show resolved Hide resolved
libs/note-manager/src/note-manager.ts Show resolved Hide resolved
@@ -450,11 +453,6 @@ export class NoteManager {

/**
* Generate a note
* @param sourceTypedChainId The source typed chain id
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove this?

Copy link
Member

Choose a reason for hiding this comment

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

Hey, @devpavan04, could you please assist me in reverting this documentation? I might have accidentally removed it. Please note that I removed the tokenDecimals argument.

@drewstone
Copy link
Contributor

CI is also failing @devpavan04

@devpavan04
Copy link
Member Author

@AtelyPham Could you provide more context regarding the changes made to resolve the build error encountered when importing api-provider-environment into tangle next app?

@devpavan04
Copy link
Member Author

@drewstone Sorry for the oversight regarding the use of use client. I made this change in my initial commit to prevent errors related to nextjs, but it is not necessary. I'm looking into CI errors.

@AtelyPham AtelyPham self-assigned this Nov 8, 2023
Copy link

Deploy Preview for stats-dapp development is ready! Thanks for the contribution @devpavan04

Name Link
🔨 Latest commit 819181209d27d4a6d3e74be01831580ea38cad69
🔍 Latest deploy log https://app.netlify.com/sites/development-stats/deploys/654dfaf1420f895d522b6810
😎 Deploy Preview https://654dfaf1420f895d522b6810--development-stats.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

Deploy Preview for stats-dapp development is ready! Thanks for the contribution @devpavan04

Name Link
🔨 Latest commit b3e4026c7fa03df2a945df894817b5222407daca
🔍 Latest deploy log https://app.netlify.com/sites/development-stats/deploys/654dfcb662fc395d640e8a0d
😎 Deploy Preview https://654dfcb662fc395d640e8a0d--development-stats.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @devpavan04

Name Link
🔨 Latest commit b3e4026c7fa03df2a945df894817b5222407daca
🔍 Latest deploy log https://app.netlify.com/sites/development-hubble-bridge/deploys/654dfd42c49a675b52e10bf6
😎 Deploy Preview https://654dfd42c49a675b52e10bf6--development-hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

Deploy Preview for stats-dapp development is ready! Thanks for the contribution @devpavan04

Name Link
🔨 Latest commit e6943c2b0030db50dadd0756fb1a71cf6ca32337
🔍 Latest deploy log https://app.netlify.com/sites/development-stats/deploys/654e10300c946c6a6248f9a9
😎 Deploy Preview https://654e10300c946c6a6248f9a9--development-stats.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @devpavan04

Name Link
🔨 Latest commit e6943c2b0030db50dadd0756fb1a71cf6ca32337
🔍 Latest deploy log https://app.netlify.com/sites/development-hubble-bridge/deploys/654e10314cd5d06b464d9650
😎 Deploy Preview https://654e10314cd5d06b464d9650--development-hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines 97 to 98
() => calculateTypedChainId(activeChain!.chainType, activeChain!.id),
[]
[activeChain]
Copy link
Member

Choose a reason for hiding this comment

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

Pass the activeChain as the prop here to prevent non-null assertion here.

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need to add this? This is not good actually.

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

Copy link
Member

Choose a reason for hiding this comment

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

Deduplicate this please, I think it is the same with the WalletModal on the bridge.

@devpavan04 devpavan04 marked this pull request as draft November 10, 2023 11:32
export interface ConnectWalletMobileButtonProps
extends IWebbComponentBase,
Pick<
ButtonProps,
'variant' | 'isFullWidth' | 'leftIcon' | 'rightIcon' | 'size' | 'variant'
> {}
>,
MobileButtonProps {}
Copy link
Member

@AtelyPham AtelyPham Nov 10, 2023

Choose a reason for hiding this comment

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

Why don't we just add the new properties inside the interface curly brackets {}? 🤔 Or why do you want to add the MobileButtonProps type here?

Copy link
Member

@AtelyPham AtelyPham left a comment

Choose a reason for hiding this comment

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

Left some comments.

@devpavan04 devpavan04 marked this pull request as ready for review November 12, 2023 04:23
Copy link

Deploy Preview for stats-dapp development is ready! Thanks for the contribution @devpavan04

Name Link
🔨 Latest commit 57e82516928c88008415098ce34c91c377b34cb7
🔍 Latest deploy log https://app.netlify.com/sites/development-stats/deploys/655055aa4389ab3a6f0f57c7
😎 Deploy Preview https://655055aa4389ab3a6f0f57c7--development-stats.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @devpavan04

Name Link
🔨 Latest commit 57e82516928c88008415098ce34c91c377b34cb7
🔍 Latest deploy log https://app.netlify.com/sites/development-hubble-bridge/deploys/655056156f8699394957cc24
😎 Deploy Preview https://655056156f8699394957cc24--development-hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

@AtelyPham AtelyPham merged commit e9d0ef4 into develop Nov 13, 2023
15 of 17 checks passed
@AtelyPham AtelyPham deleted the PS/tangle-dapp-wallet-connection branch November 13, 2023 02:59
Copy link

Deploy Preview for stats-dapp development is ready! Thanks for the contribution @AtelyPham

Name Link
🔨 Latest commit 5f4ec2e2caa3dec77e7aaeeb89d8b058cdff3aa8
🔍 Latest deploy log https://app.netlify.com/sites/development-stats/deploys/6551919352dd8a798e8067e3
😎 Deploy Preview https://6551919352dd8a798e8067e3--development-stats.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @AtelyPham

Name Link
🔨 Latest commit 5f4ec2e2caa3dec77e7aaeeb89d8b058cdff3aa8
🔍 Latest deploy log https://app.netlify.com/sites/development-hubble-bridge/deploys/65519199154d807682c5e160
😎 Deploy Preview https://65519199154d807682c5e160--development-hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review 👓 Pull request needs a review tangle-dapp Tangle Staking dApp
Projects
Status: Completed ✅
Development

Successfully merging this pull request may close these issues.

[TASK] Implement wallet and network connection
4 participants