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

Create tests with alternative wallets #675

Open
0xJem opened this issue Nov 13, 2021 · 5 comments
Open

Create tests with alternative wallets #675

0xJem opened this issue Nov 13, 2021 · 5 comments
Assignees

Comments

@0xJem
Copy link
Contributor

0xJem commented Nov 13, 2021

E.g. Trust Wallet, Coinbase Wallet,

@ivelin
Copy link
Contributor

ivelin commented Dec 18, 2021

Is anyone working on this issue? I might be interested to dive in if noone else is.

@0xJem
Copy link
Contributor Author

0xJem commented Dec 18, 2021

You're welcome to! Please assign it to yourself if you do work on it.

@ivelin
Copy link
Contributor

ivelin commented Dec 19, 2021

@0xJem I'll get started.

I don't seem to have permission to assign to myself. Screenshot attached.

Screen Shot 2021-12-19 at 12 09 50 PM

@ivelin
Copy link
Contributor

ivelin commented Dec 20, 2021

@0xJem FYI. Looking through the code today.

Nice to see a one-click experience from repo to a running gitpod instance.

Test-wise, in the default develop branch, I only see one test and it currently fails.

Am I looking at the wrong branch? There is not much info in README.md about branch conventions and unit test code organization. Any guidance would be appreciated. Thank you!

> yarn test

 FAIL  src/App.test.js
  ● Test suite failed to run

    TypeError: CSS.supports is not a function

      22 |  */
      23 | export const handleBackdropFilter = rgbaString => {
    > 24 |   const supported = CSS.supports("(-webkit-backdrop-filter: none)") || CSS.supports("(backdrop-filter: none)");
         |                         ^
      25 |   if (!supported) {
      26 |     // make the opacity == 0.9;
      27 |     rgbaString = rgbaString.replace(/[\d\.]+\)$/g, "0.9)");

      at handleBackdropFilter (src/themes/global.js:24:25)
      at Object.<anonymous> (src/themes/dark.js:26:11)
      at Object.<anonymous> (src/App.tsx:30:1)
      at Object.<anonymous> (src/App.test.js:3:1)

  console.warn
    API keys must be set in the .env, reverting to fallbacks

      168 |     let ALL_URIs = EnvHelper.getSelfHostedNode(networkId);
      169 |     if (ALL_URIs.length === 0) {
    > 170 |       console.warn("API keys must be set in the .env, reverting to fallbacks");
          |               ^
      171 |       ALL_URIs = EnvHelper.getFallbackURIs(networkId);
      172 |     }
      173 |     return ALL_URIs;

      at Function.getAPIUris (src/helpers/Environment.ts:170:15)
      at Function.getNodesUris (src/helpers/NodeHelper.ts:134:29)
      at Function.getMainnetURI (src/helpers/NodeHelper.ts:112:32)
      at Object.uri (src/constants.ts:214:27)
      at Object.<anonymous> (src/hooks/web3Context.tsx:65:26)

  console.warn
    API keys must be set in the .env, reverting to fallbacks

      168 |     let ALL_URIs = EnvHelper.getSelfHostedNode(networkId);
      169 |     if (ALL_URIs.length === 0) {
    > 170 |       console.warn("API keys must be set in the .env, reverting to fallbacks");
          |               ^
      171 |       ALL_URIs = EnvHelper.getFallbackURIs(networkId);
      172 |     }
      173 |     return ALL_URIs;

      at Function.getAPIUris (src/helpers/Environment.ts:170:15)
      at Function.getNodesUris (src/helpers/NodeHelper.ts:134:29)
      at Function.getMainnetURI (src/helpers/NodeHelper.ts:112:32)
      at Object.uri (src/constants.ts:228:27)
      at Object.<anonymous> (src/hooks/web3Context.tsx:66:26)

  console.warn
    API keys must be set in the .env, reverting to fallbacks

      168 |     let ALL_URIs = EnvHelper.getSelfHostedNode(networkId);
      169 |     if (ALL_URIs.length === 0) {
    > 170 |       console.warn("API keys must be set in the .env, reverting to fallbacks");
          |               ^
      171 |       ALL_URIs = EnvHelper.getFallbackURIs(networkId);
      172 |     }
      173 |     return ALL_URIs;

      at Function.getAPIUris (src/helpers/Environment.ts:170:15)
      at Function.getNodesUris (src/helpers/NodeHelper.ts:134:29)
      at Function.getMainnetURI (src/helpers/NodeHelper.ts:112:32)
      at Object.uri (src/constants.ts:242:27)
      at Object.<anonymous> (src/hooks/web3Context.tsx:67:34)

  console.warn
    API keys must be set in the .env, reverting to fallbacks

      168 |     let ALL_URIs = EnvHelper.getSelfHostedNode(networkId);
      169 |     if (ALL_URIs.length === 0) {
    > 170 |       console.warn("API keys must be set in the .env, reverting to fallbacks");
          |               ^
      171 |       ALL_URIs = EnvHelper.getFallbackURIs(networkId);
      172 |     }
      173 |     return ALL_URIs;

      at Function.getAPIUris (src/helpers/Environment.ts:170:15)
      at Function.getNodesUris (src/helpers/NodeHelper.ts:134:29)
      at Function.getMainnetURI (src/helpers/NodeHelper.ts:112:32)
      at Object.uri (src/constants.ts:284:27)
      at Object.<anonymous> (src/hooks/web3Context.tsx:70:34)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        26.781 s
Ran all test suites.

Screen Shot 2021-12-20 at 3 52 41 PM

@ivelin
Copy link
Contributor

ivelin commented Dec 22, 2021

@0xJem Not sure if you noticed my question above ^^^.

I realize the core team is tied up with v2 migration at the moment. Just making sure the comment is not lost so I can keep working on the issue when you get a chance to respond. Thanks!

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

No branches or pull requests

2 participants