Skip to content

Tracking Issue: KeeeeeeksΒ #2

Description

@MariusVanDerWijden

Q:

Here's the repo, this file is the one giving me trouble
https://github.com/Keeeeeeeks/scaffold-eth/blob/master/packages/react-app/src/components/Vorple2.jsx
GitHub
Keeeeeeeks/scaffold-eth
πŸ— forkable Ethereum dev stack focused on fast product iterations - Keeeeeeeks/scaffold-eth

Basically i want to make it so that:
- If user logs in through MM/WC AND logs in with the right address, they're able to load the page
else
- The Vorple component doesn't load

At the moment, this seems to load the stuff for failing, and the stuff for it succeeding

Proposed solution: Only initializing the vorple if the userAddress was correct

diff --git a/packages/react-app/src/components/Vorple2.jsx b/packages/react-app/src/components/Vorple2.jsx
index 3beb7ed..7004d98 100644
--- a/packages/react-app/src/components/Vorple2.jsx
+++ b/packages/react-app/src/components/Vorple2.jsx
@@ -22,13 +22,13 @@ export default function Vorple2( address, vorpAddress, userProvider, mainnetProv
                 // Container for the interpreter
                 container: containerRef.current
             };
-            vorple.init();
+            //vorple.init();
         } 
     }, [ containerRef ]);
 
-
     if (userAddress == vorpAddress) {
         isRightAddress = true;
+        vorple.init();
         return (
             <Row align="middle">
                     <vorple-section>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions