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

fix: shift testnet env to sepolia #473

Merged
merged 7 commits into from
Nov 15, 2023
Merged

fix: shift testnet env to sepolia #473

merged 7 commits into from
Nov 15, 2023

Conversation

Aman035
Copy link
Member

@Aman035 Aman035 commented Jun 27, 2023

No description provided.

@Aman035 Aman035 linked an issue Jun 27, 2023 that may be closed by this pull request
@github-actions
Copy link

All looks good.

@github-actions
Copy link

In the file packages/demoreact/src/app/helpers.ts:

  1. Line 19: The closing brace for the AddressValidatorsType interface is missing.

    export interface AddressValidatorsType {
      [key: string]: ({ address }: { address: string }) => boolean;
    } // Add the closing brace here
  2. Line 21: The closing parenthesis for the isValidETHAddress function is missing.

    export function isValidETHAddress(address: string) {
      return ethers.utils.isAddress(address);
    } // Add the closing parenthesis here
  3. Line 35: The closing brace for the AddressValidators object is missing.

    const AddressValidators: AddressValidatorsType = {
      // Ethereum
      'eip155': ({ address }: { address: string }) => {
        return isValidETHAddress(address);
      }
      // Add a comma and the closing brace here
    };
  4. Line 37: The closing parenthesis for the validateCAIP function is missing.

    export function validateCAIP(addressInCAIP: string) {
      const [
        blockchain,
        networkId,
        address
      ] = addressInCAIP.split(':');
      if (!blockchain) return false;
      if (!networkId) return false;
      if (!address) return false;
      const validatorFn = AddressValidators[blockchain];
      return validatorFn({ address });
    } // Add the closing parenthesis here
  5. Line 42: The closing brace for the getFallbackETHCAIPAddress function is missing.

    export function getFallbackETHCAIPAddress(env: ENV, address: string) {
      let chainId = 1; // by default PROD
      if (env === Constants.ENV.DEV || env === Constants.ENV.STAGING) {
        chainId = 11155111;
      }
      return `eip155:${chainId}:${address}`;
    } // Add the closing brace here
  6. Line 51: The closing parenthesis for the getCAIPAddress function is missing.

    export function getCAIPAddress(env: ENV, address: string, msg?: string) {
      if (validateCAIP(address)) {
        return address;
      } else {
        if (isValidETHAddress(address)) {
          return getFallbackETHCAIPAddress(env, address);
        } else {
          throw Error(`Invalid Address! ${msg}`);
        }
      } // Add the closing parenthesis here
    }

@github-actions
Copy link

All looks good.

@Aman035
Copy link
Member Author

Aman035 commented Jun 28, 2023

To Do
Make sure sdk-node examples are working fine.
Review and testing of all packages

@mohammeds1992 mohammeds1992 merged commit 12f1392 into main Nov 15, 2023
1 check failed
@Aman035 Aman035 deleted the 472-shift-to-sepolia branch December 15, 2023 06:47
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.

Push SDK: Shift dev & stage env from Goerli to Sepolia
3 participants