Closed SvenDowideit closed 2 years ago
I'm having a hard time testing this, cause something on main seems to blow up when I go to Tokens page --
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?)
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.
Did our CI drop the ball somewhere?
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?
Do our existing tsc
commands in npm run lint
even do anything anymore?
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.
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"
.
oh yay, frustrating.
@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 :+1:, 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!
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.
ok, made https://github.com/workbenchapp/solana-workbench/pull/247 for that
no this is holding up too many other things. merging.
closes #232 closes #209