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

LiisaPortfolioTracker_2 #1177

Merged
merged 5 commits into from
Jun 11, 2024
Merged

Conversation

paulogustavopeixoto
Copy link
Contributor

@paulogustavopeixoto paulogustavopeixoto commented May 16, 2024

Milestone Delivery Checklist

  • The milestone-delivery-template.md has been copied and updated.
  • This pull request is being made by the same account as the accepted application.
  • I have disclosed any and all sources of reused code in the submitted repositories and have done my due diligence to meet its license requirements.
  • In case of acceptance, invoices must be submitted and payments will be transferred to the Polkadot AssetHub and/or fiat account provided in the application.
  • The delivery is according to the Guidelines for Milestone Deliverables.

Link to the application pull request: w3f/Grants-Program#1855

@keeganquigley keeganquigley self-assigned this May 20, 2024
Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

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

Hi @paulogustavopeixoto I'm confused as to why you are trying to submit this as an evaluation. Is this intended to be a delivery? Typically deliveries are submitted by the original PR author to the deliveries folder.

Additionally, the application linked above appears to be the wrong one, I believe the correct grant is w3f/Grants-Program#1855 can you please fix this?

@paulogustavopeixoto
Copy link
Contributor Author

Hey @keeganquigley thanks for the the feedback. I will update the delivery to the correct folder. I have to submit with this account since the original PR author we converted the account into an organization on github.

@paulogustavopeixoto
Copy link
Contributor Author

Hi @paulogustavopeixoto I'm confused as to why you are trying to submit this as an evaluation. Is this intended to be a delivery? Typically deliveries are submitted by the original PR author to the deliveries folder.

Additionally, the application linked above appears to be the wrong one, I believe the correct grant is w3f/Grants-Program#1855 can you please fix this?

Hey @keeganquigley . Made the necessary changes. Removed the delivery file from the evaluations folder and moved it back to the deliveries. Also changed the the link for the correct grant

@keeganquigley
Copy link
Contributor

Thanks @paulogustavopeixoto much appreciated. Moving on, I have the following comments:

  • The article link gives a 404 error. Can you fix this?
  • Getting an error when running sqd build about not having Axios:
src/Astar/mappings/utils/common.ts:2:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

2 import axios from 'axios';

I'm able to fix it by running npm install axios --save. I think you just need to declare the dependency in package.json

  • Lastly, there are some errors in the unit tests currently. Can you take a look at my evaluation and provide fixes for these? Thanks!

@keeganquigley
Copy link
Contributor

Additionally, the React script and tests for the frontend can't be found even after the first steps are completed:

sh: 1: react-scripts: not found
ubuntu@ip-172-31-27-207:~/PolkadotNFTPortfolioTracker/frontend$ nvm use node
Now using node v22.2.0 (npm v10.7.0)
ubuntu@ip-172-31-27-207:~/PolkadotNFTPortfolioTracker/frontend$ npm start

> liisa-dashboard@0.1.0 start
> react-scripts start

sh: 1: react-scripts: not found
ubuntu@ip-172-31-27-207:~/PolkadotNFTPortfolioTracker/frontend$ npm test

> liisa-dashboard@0.1.0 test
> jest --coverage

sh: 1: jest: not found

@paulogustavopeixoto
Copy link
Contributor Author

hey @keeganquigley . Let me have a look at those and I will get back to you

@paulogustavopeixoto
Copy link
Contributor Author

Hello @keeganquigley , I made some adjustments to the readme file and instructions on how to test the frontend. Can you test it and let me know on your side if it is working? Its working fine on my side.

@keeganquigley
Copy link
Contributor

keeganquigley commented May 24, 2024

I tried with installs on both Ubuntu and MacOS but unfortunately I keep getting the same error when trying to build the squid:

Output
sqd build
CLEAN
BUILD
src/Astar/mappings/utils/common.ts:2:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

2 import axios from 'axios';
                    ~~~~~~~

src/AstarPSP/mappings/utils/common.ts:2:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

2 import axios from 'axios';
                    ~~~~~~~

src/Basilisk/mappings/utils/common.ts:2:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

2 import axios from 'axios';
                    ~~~~~~~

src/Enjin/cli-scripts/refresh-all-metadata.ts:1:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

1 import axios from 'axios'
                    ~~~~~~~

src/Enjin/mappings/util/marketplace.ts:1:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

1 import axios from 'axios'
                    ~~~~~~~

src/Enjin/mappings/util/marketplace.ts:76:52 - error TS7006: Parameter 'i' implicitly has an 'any' type.

76             const account = data.data.result.find((i) => i.publicKey === id)
                                                      ~

src/Enjin/mappings/util/metadata.ts:1:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

1 import Axios from 'axios'
                    ~~~~~~~

src/Enjin/mappings/utils/common.ts:2:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

2 import axios from 'axios';
                    ~~~~~~~

src/Moonbeam/mappings/utils/common.ts:2:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

2 import axios from 'axios';
                    ~~~~~~~

src/Moonriver/mappings/utils/common.ts:2:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

2 import axios from 'axios';
                    ~~~~~~~


Found 10 errors in 9 files.

Errors  Files
     1  src/Astar/mappings/utils/common.ts:2
     1  src/AstarPSP/mappings/utils/common.ts:2
     1  src/Basilisk/mappings/utils/common.ts:2
     1  src/Enjin/cli-scripts/refresh-all-metadata.ts:1
     2  src/Enjin/mappings/util/marketplace.ts:1
     1  src/Enjin/mappings/util/metadata.ts:1
     1  src/Enjin/mappings/utils/common.ts:2
     1  src/Moonbeam/mappings/utils/common.ts:2
     1  src/Moonriver/mappings/utils/common.ts:2

I was able to get around this so it's not a showstopper for delivery but recommended to look into fixing.

@keeganquigley
Copy link
Contributor

The front-end tests work now for me except for it fails to find one element:

npm test

> liisa-dashboard@0.1.0 test
> jest --coverage

 PASS  tests/NFTCard.test.js
 PASS  tests/OverviewBlock.test.js
 PASS  tests/CollectionItem.test.js
 PASS  tests/CollectionsDashboard.test.js
 PASS  tests/RecentlyBought.test.js
 PASS  tests/NFTPopup.test.js
 PASS  tests/TopGainers.test.js
 PASS  tests/TopLosers.test.js
 PASS  tests/NFTsDashboard.test.js
 PASS  tests/PortfolioEvolution.test.js
 PASS  tests/PortfolioScorecard.test.js
   Console

    console.log
      Gauge titles found: 3

      at tests/PortfolioScorecard.test.js:18:15

 PASS  tests/App.test.js
 FAIL  tests/Inventory.test.js
   Console

    console.log
      <div class="inventory"><h2 class="inventory-title">Inventory</h2><div class="recharts-responsive-container" style="width: 100%; height: 400px; min-width: 0;"></div></div>

      at call (tests/Inventory.test.js:29:13)

   Inventory  renders correctly with mock data

    Unable to find an element by: [data-testid="pie-chart"]

    Ignored nodes: comments, script, style
    <body>
      <div>
        <div
          class="inventory"
        >
          <h2
            class="inventory-title"
          >
            Inventory
          </h2>
          <div
            class="recharts-responsive-container"
            style="width: 100%; height: 400px; min-width: 0;"
          />
        </div>
      </div>
    </body>

      30 |
      31 |     // Wait for the PieChart to be in the document
    > 32 |     await waitFor(() => {
         |                  ^
      33 |       expect(getByTestId('pie-chart')).toBeInTheDocument();
      34 |     });
      35 |

      at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27)
      at call (tests/Inventory.test.js:32:18)
      at tryCatch (tests/Inventory.test.js:2:1)
      at Generator._invoke (tests/Inventory.test.js:2:1)
      at Generator.next (tests/Inventory.test.js:2:1)
      at asyncGeneratorStep (tests/Inventory.test.js:2:1)
      at _next (tests/Inventory.test.js:2:1)

------------------------------|---------|----------|---------|---------|-------------------
File                          | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------------------|---------|----------|---------|---------|-------------------
All files                     |   82.89 |    78.18 |    87.5 |   82.31 |
 src                          |   62.79 |    76.92 |      75 |   62.79 |
  App.js                      |   84.37 |     90.9 |      90 |   84.37 | 32-33,44-45,74
  index.js                    |       0 |      100 |     100 |       0 | 7-17
  reportWebVitals.js          |       0 |        0 |       0 |       0 | 1-8
  setupTests.js               |       0 |        0 |       0 |       0 |
 src/components/Collections   |   88.88 |       90 |     100 |   88.88 |
  CollectionItem.js           |     100 |     87.5 |     100 |     100 | 8
  CollectionsDashboard.js     |   86.66 |      100 |     100 |   86.66 | 19-20
 src/components/NFTs          |    90.9 |      100 |     100 |   90.47 |
  NFTCard.js                  |     100 |      100 |     100 |     100 |
  NFTsDashboard.js            |      90 |      100 |     100 |   89.47 | 35-36
 src/components/NFTs/Popup    |     100 |      100 |     100 |     100 |
  Popup.js                    |     100 |      100 |     100 |     100 |
 src/components/Overview      |   88.46 |    61.53 |      80 |   87.75 |
  Inventory.js                |    90.9 |      100 |      75 |    90.9 | 35
  OverviewBlock.js            |     100 |      100 |     100 |     100 |
  OverviewCard.js             |     100 |      100 |     100 |     100 |
  PortfolioEvolution.js       |   87.09 |        0 |   83.33 |   85.71 | 40-48
  PortfolioScorecard.js       |      80 |      100 |   66.66 |      80 | 23
 src/components/Overview/tops |     100 |      100 |     100 |     100 |
  RecentlyBought.js           |     100 |      100 |     100 |     100 |
  TopGainers.js               |     100 |      100 |     100 |     100 |
  TopLosers.js                |     100 |      100 |     100 |     100 |
------------------------------|---------|----------|---------|---------|-------------------
Test Suites: 1 failed, 12 passed, 13 total
Tests:       1 failed, 20 passed, 21 total
Snapshots:   0 total
Time:        4.322 s
Ran all test suites.

@keeganquigley keeganquigley added the last milestone The team delivered the last milestone of the project label May 28, 2024
@paulogustavopeixoto
Copy link
Contributor Author

hey @keeganquigley . I am currently having a look at this and will get back to you asap.

@paulogustavopeixoto
Copy link
Contributor Author

hey @keeganquigley I have updated the delivery file and altered the text on it as per your suggestion. In regards to the error found on the testing part of the code I fixed and committed the changes to the repository.

@keeganquigley
Copy link
Contributor

Thanks for the changes @paulogustavopeixoto much appreciated. Everything is working now and I'm happy to pass the milestone. Here is my final evaluation. Congrats on completion of the grant!

@keeganquigley keeganquigley merged commit de1adb3 into w3f:master Jun 11, 2024
3 checks passed
Copy link

🪙 Please fill out the invoice form in order to initiate the payment process. Thank you!

Copy link

We noticed that this is the last milestone of your project. Congratulations on completing your grant! 🎊

So, where to from here? First of all, you should join our Grants Community chat, if you haven't already, so we can stay in touch.
If you are looking for continuative support for your project, there are quite a few options. The main goal of the W3F grants program is to support research as well as early-stage technical projects. If your project still falls under one of those categories, you might want to apply for a follow-up grant. However, depending on your goals and project status, there are other support programs in our ecosystem that might be better suited as the next step. For example, projects with a Business Case/Token should look into the Substrate Builders Program or VC Funding and Common Good projects have a good chance of receiving Treasury Funding. If you are looking for guidance, the team at https://substrate.io/ecosystem/square-one/ has compiled a list of ecosystem support sources and are happy to help you navigate it.

For a more comprehensive list, see our Alternative Funding page. Let us know if you have any questions regarding the above. We are more than happy to point you to additional resources and help you determine the best course of action.
Lastly, we hope your W3F grant was a success and we want to thank you for being part of the journey!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last milestone The team delivered the last milestone of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants