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

Clean up token page when no data #241

Merged
merged 15 commits into from
Jul 18, 2022
Merged

Conversation

SvenDowideit
Copy link
Member

closes #232
closes #209

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
…ton' errors

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
f
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
@SvenDowideit SvenDowideit added this to the 0.4.0 milestone Jul 15, 2022
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
@nathanleclaire
Copy link
Contributor

I'm having a hard time testing this, cause something on main seems to blow up when I go to Tokens page --

Screen Shot 2022-07-15 at 10 02 38 AM

I'll have a looksie and see if I can spot the issue

(Side note, my screen goes black and I can't navigate anywhere when that happens, can we prevent that type of thing from happening somehow?)

@nathanleclaire
Copy link
Contributor

Weird, it's grumpy about mintPubkey being undefined, and my VSCode complains about string | undefined, so I wonder if we might have caught that bug somehow.

Screen Shot 2022-07-15 at 10 05 08 AM

Did our CI drop the ball somewhere?

@nathanleclaire
Copy link
Contributor

mmm, I think it's related to the ~100 errors we see with npm exec tsc directly, which is known issue from vite port iirc? do we have something to track that anywhere?

Screen Shot 2022-07-15 at 10 26 27 AM

Do our existing tsc commands in npm run lint even do anything anymore?

@bluskript
Copy link
Collaborator

The problem is that npx run tsc isn't accurate because there is a tsconfig.json sitting inside of the renderer directory. I think this can be resolved by adding **.* to "include" in that json file, but yea running tsc directly will use the root tsconfig which isn't accurate.

@nathanleclaire
Copy link
Contributor

The problem is that npx run tsc isn't accurate because there is a tsconfig.json sitting inside of the renderer directory. I think this can be resolved by adding *. to "include" in that json file, but yea running tsc directly will use the root tsconfig which isn't accurate.

I don't follow you. It isn't accurate how? It's printing what seem to be a bunch of valid errors. And the main and renderer tsconfigs look like they link back to the root one using "extends": "../../tsconfig.json".

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
@SvenDowideit
Copy link
Member Author

oh yay, frustrating.

@SvenDowideit
Copy link
Member Author

SvenDowideit commented Jul 17, 2022

@nathanleclaire so I get the

MetaplexTokenData.tsx:29 Uncaught TypeError: Cannot read properties of undefined (reading 'toString')
    at DataPopover (MetaplexTokenData.tsx:29:29)
    at MetaplexTokenDataButton (MetaplexTokenData.tsx:214:16)

WTF?

the code in question looks like

function DataPopover(props: { mintPubKey: sol.PublicKey }) {
  const { mintPubKey } = props;
  const selectedWallet = useWallet();
  const { connection } = useConnection();
  const { net } = useAppSelector(selectValidatorNetworkState);

  const pubKey = mintPubKey.toString();

so assuming we're typesafe, because magic unicorn TypeScript, mintPubKey: sol.PublicKey should mean that no, mintPubKey isn't allowed to be undefined. and yet ... its undefined?

er, its 10 years since i last wrote a rant about "typescript". FRUSTRATED.

(and no, its not good enough for npm run lint, tsc -p ./src/renderer, and tsc -p ./src/main to say 👍, no errors, but hidden in a gui IDE, is MetaplexTokenData.tsx(23, 31): The expected type comes from property 'mintPubKey' which is declared here on type '{ mintPubKey: PublicKey; }'

argh!

@nathanleclaire
Copy link
Contributor

Yea same when I tested, seems to be a problem on main.

Got distracted w/ the TS errors, but we should just wait until after 0.4.0 to chip away at those.

@SvenDowideit
Copy link
Member Author

ok, made #247 for that

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
… view not horrible

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
@SvenDowideit
Copy link
Member Author

no this is holding up too many other things. merging.

@SvenDowideit SvenDowideit merged commit 9cfd333 into main Jul 18, 2022
@SvenDowideit SvenDowideit deleted the clean-up-token-page-when-no-data branch July 18, 2022 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants