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/Base Chain support #1608

Closed
wants to merge 26 commits into from
Closed

Conversation

corlard3y
Copy link
Collaborator

@corlard3y corlard3y commented Jun 5, 2024

Pull Request Template

#1607

Description

CoinBase has invited us to deploy on Base chain, with the biggest incentive being the integration of Push Notifications in Coinbase Wallet.
So we are basically just adding Base chain support, it’s just going to be a new chain like the others we have, from polygon, Arbitrum, cyber and the rest that have been added beforehand. So this is a new one called Base Chain - IIntegration of Push will enable native visibility of notifications from base ecosystem in coinbase wallet. So you can create channels, send notifications on this chain.

  • Problem/Feature:
    Base Chain support

Type of Change

  • Bug fix
  • New feature
  • Code refactor
  • Documentation update
  • Other (please describe):

Checklist

  • Quick PR: Is this a quick PR? Can be approved before finishing a coffee.
    • Quick PR label added
  • Not Merge Ready: Is this PR dependent on some other PR/tasks and not ready to be merged right now.
    • DO NOT Merge PR label added

Frontend Guidelines

Build & Testing

  • No errors in the build terminal
  • Engineer has tested the changes on their local environment
  • Engineer has tested the changes on deploy preview

Screenshots/Video with Explanation

  • Before: Explain the previous behavior

  • After: What's changed now
    Added a channel on Base chain, and can send notifications from the chain as well
    Screenshot 2024-06-07 at 16 48 33

Additional Context

Review & Approvals

  • Self-review completed
  • Code review by at least one other engineer
  • Documentation updates if applicable

Notes

@corlard3y corlard3y added feature enhancement Enhancement in existing feature DO NOT MERGE If the PR/task is dependent on some other task add this label to the PR. labels Jun 5, 2024
@corlard3y corlard3y linked an issue Jun 5, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Jun 5, 2024

In the file src/components/Faucets.tsx:

  • There are syntax errors in the Faucets object. The objects inside are missing closing brackets.
  • The checkAlias function is missing closing brackets.
  • The submitAlias function is missing closing brackets and setLoading('Loading...'); should be moved outside setTimeout block.
  • The checkAliasVerification function is missing closing brackets.
  • Inside the config object, there is a typo Analaytics, it should be corrected to Analytics.
  • There are multiple properties inside the config object without proper key-value pairs.
  • The VerifyAlias function is missing closing brackets at the end.

In the file src/config/config-dev.js:

  • There are issues with objects inside objects. They are missing closing brackets.

In the file src/config/config-prod.js:

  • Similar to the config-dev.js file, there are issues with objects inside objects missing closing brackets.

In the file src/helpers/CaipHelper.ts:

  • The array Eip155EnabledIds should have Number instead of number.

Kindly make the necessary corrections based on the observations mentioned above.

@corlard3y corlard3y requested a review from 0xNilesh June 5, 2024 15:23
Copy link

github-actions bot commented Jun 5, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-07-16 11:36 UTC

@corlard3y corlard3y self-assigned this Jun 5, 2024
Copy link

github-actions bot commented Jun 7, 2024

In the file src/components/Faucets.tsx, there are multiple syntax errors such as missing commas between object properties, incorrect formatting of object literals, and missing closing braces. Here are the corrections:

{
  id: '97',
  value: 'BNB',
  title: 'BNB Faucet',
  function: () => {},
  link: 'https://testnet.bnbchain.org/faucet-smart',
},
{
  id: '11155420',
  value: 'Optimism',
  title: 'Optimism Sepolia Faucet',
  link: 'https://faucet.quicknode.com/optimism/sepolia',
},
{
  id: '2442',
  value: 'Polygon zkEVM',
  title: 'Polygon zkEVM Bridge',
  link: 'https://faucet.polygon.technology/',
},
{
  id: '421614',
  value: 'Arbitrum',
  title: 'Arbitrum Testnet Faucet',
  link: 'https://faucet.quicknode.com/arbitrum/sepolia',
},
{
  id: '123',
  value: 'Fuse',
  title: 'Fuse Sparknet Faucet',
  link: 'https://chaindrop.org/?chainid=123&token=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
},
{
  id: '111557560',
  value: 'Cyber',
  title: 'Cyber Faucet',
  link: 'https://cyber-testnet.testnets.rollbridge.app/',
},
{
  id: '84532',
  value: 'Base Sepolia',
  title: 'Base Sepolia Faucet',
  link: 'https://www.alchemy.com/faucets/base-sepolia',
}

In the file src/config/config-dev.js, there are missing curly braces in the objects defining Faucets information. Here are the corrected lines:

80002: {
  label: 'Amoy MATIC',
  url: 'https://faucet.polygon.technology/',
},
97: {
  label: 'Testnet BNB',
  url: 'https://testnet.bnbchain.org/faucet-smart',
},
11155420: {
  label: 'Sepolia OpETH',
  url: 'https://faucet.quicknode.com/optimism/sepolia',
},
2442: {
  label: 'Polygon zkEVM ETH',
},
421614: {
  label: 'Sepolia ArbETH',
  url: 'https://faucet.quicknode.com/arbitrum/sepolia',
},
123: {
  label: 'Fuse SPARK',
  url: 'https://chaindrop.org/?chainid=123&token=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
},
111557560: {
  label: 'Cyber ETH',
  url: 'https://cyber-testnet.testnets.rollbridge.app/',
},
84532: {
  label: 'Base Sepolia',
  url: 'https://www.alchemy.com/faucets/base-sepolia',
}

In the same file src/config/config-dev.js, there are syntax errors in the aliasRPC object. Here is the corrected format:

aliasRPC: {
  80002: 'https://polygon-amoy.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7',
  97: 'https://data-seed-prebsc-1-s1.binance.org:8545',
  11155420: 'https://optimism-sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7',
  2442: 'https://rpc.cardona.zkevm-rpc.com',
  421614: 'https://arbitrum-sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7',
},

In the file src/helpers/CaipHelper.ts, there is a missing closing brace at the end of the getCAIPObj function. Here is the corrected line:

} // Add this closing brace

Additionally, there is an if block in the convertAddrCaipToAddress function that does not have a corresponding closing brace. Here is the corrected block:

if (caipArr.length == 3 && caipArr[0] == 'eip155') {
  return caipArr[2];
}
throw new Error('Invalid CAIP Format');

After these corrections are made, the code should be free of syntax errors.

Copy link

github-actions bot commented Jun 7, 2024

I have reviewed the provided code and found some issues and potential improvements:

File: package.json

  1. In the "scripts" section, there are multiple commands listed with syntax errors such as missing closing braces } and misplaced characters <Button, which need to be corrected.

File: public/svg/Base.svg

  1. The SVG <path> tag is using an incorrect closing tag syntax. It should be <path ... /> instead of <path ... "></>.

File: src/components/ChangeNetwork.tsx

  1. It seems there are missing closing braces on the "if" conditions within the checkUserForAlias function. The logic structure needs to be reviewed.

File: src/components/Faucets.tsx

  1. The array of testnet faucets seems to have incorrect object structures. Each object should have {} surrounding them.
  2. There are missing closing tags in the JSX markup, make sure all opening tags have corresponding closing tags.
  3. The <Dropdown> component may not be properly implemented. Ensure it is imported correctly.

File: src/components/InitState.tsx

  1. There seems to be an issue with the checkUserForEthAlias function call, it's missing implementation.

File: src/components/VerifyAlias.tsx

  1. There are syntax errors in defining the testnet faucets array. Each object should be enclosed in {}.
  2. There is an incomplete if condition block in the checkAlias function. Make sure it is properly closed.
  3. Check the implementation of the submitAlias function.

File: src/helpers/CaipHelper.ts

  1. The Eip155EnabledIds array might have a typo with value 122, which should be confirmed.

File: src/connectors/chains.ts

  1. The file content is missing in the provided code snippet.

File: Other files

Files like src/config/*.js, src/helpers/UtilityHelper.ts, src/hooks/useInactiveListener.ts, src/redux/slices/adminSlice.js, and src/structure/Header.tsx were mentioned but not provided in the snippet for review.

General

  1. The overall syntax and structure of the code need to be carefully reviewed for correctness.
  2. Check if all required modules are imported and used properly.

Please address the above-mentioned issues in the respective files. Let me know if you need any further assistance.

Copy link
Collaborator

@mishramonalisha76 mishramonalisha76 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -9,6 +9,7 @@ type Props = {
};

export const getAliasDetails = async ({ account, chainId }: Props) => {
console.log(account, aliasChainIdToChainName[chainId], appConfig.appEnv);
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's remove this.

corlard3y and others added 3 commits July 16, 2024 10:53
* resolve qa comments

* add verifying state

* update button size

* fix review comments
… components (#1716)

* update changes

* add props type

* update version and remove on dash

* added support for new css variables

* deleted curropted file

* added gap type

---------

Co-authored-by: corlard3y <[email protected]>
kalashshah and others added 12 commits July 16, 2024 10:53
…nt (#1700)

* chore: support auto icon sizing in blocks button component

* chore: update css selector for button icon styles
* add context

* add create

* add line

* remove unused

* fixed the error message logic for unlock profile

* fixed the loading state of verify button for activities

---------

Co-authored-by: rohitmalhotra1420 <[email protected]>
* refactored the input code

* refactored the input code

* Update PointsVaultLogin.tsx
* fix leaderboard issues

* add scroll bar visible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE If the PR/task is dependent on some other task add this label to the PR. feature enhancement Enhancement in existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants