<p>I was using the instructor's old API key instead of creating one for myself through blockfrost. I just had to modify the section:</p>
<pre><code>async function loadCardano() {
    const nami = window.cardano.nami;
    if (!nami) {
        setTimeout(loadCardano);
    } else {
        const api = await nami.enable();
        console.log('nami enabled');
        const lucid = await L.Lucid.new(
            new L.Blockfrost(&quot;https://cardano-preview.blockfrost.io/api/v0&quot;, &quot;XXXX&quot;),
            &quot;Preview&quot;,
        );
        console.log('lucid active');
        lucid.selectWallet(api);
        return lucid;
    }
}
</code></pre>

CC BY-SA 4.0
2023-06-24T22:13:06.597Z
2023-06-24T22:13:06.597Z
tyvan266
<p>I'm working through week3 of PPP#4:</p>
<p><a href="https://www.youtube.com/watch?v=C8TuGSzhqXU&amp;list=PLNEK_Ejlx3x2zXSjHRKLSc5Jn9vJFA3_O&amp;index=5%5D" rel="nofollow noreferrer">https://www.youtube.com/watch?v=C8TuGSzhqXU&amp;list=PLNEK_Ejlx3x2zXSjHRKLSc5Jn9vJFA3_O&amp;index=5]</a></p>
<p>Here, the Vesting example using Lucid is demo and while I'm able to load the dApp on my browser with <code>npm start</code> and I have a Nami wallet connected to the Preview network, its info/ PubKeyHash is failing to populate dApp like in the video. I'm not sure how to get the dApp to link with the browser wallet to create example transactions locally</p>

<plutus-pioneer-program><nami>
How to load test Nami with Vesting example?
# How to load test Nami with Vesting example?

(Asked by: username_0 on 2023-06-24)

I'm working through week3 of PPP#4:

[https://www.youtube.com/watch?v=C8TuGSzhqXU&list=PLNEK\_Ejlx3x2zXSjHRKLSc5Jn9vJFA3\_O&index=5]](https://www.youtube.com/watch?v=C8TuGSzhqXU&list=PLNEK_Ejlx3x2zXSjHRKLSc5Jn9vJFA3_O&index=5%5D)

Here, the Vesting example using Lucid is demo and while I'm able to load the dApp on my browser with `npm start` and I have a Nami wallet connected to the Preview network, its info/ PubKeyHash is failing to populate dApp like in the video. I'm not sure how to get the dApp to link with the browser wallet to create example transactions locally

**Tags:** plutus-pioneer-program, nami

---

## 1 answers

### Answer by username_0 on 2023-06-24. Score: 1 | Accepted answer

I was using the instructor's old API key instead of creating one for myself through blockfrost. I just had to modify the section:
async function loadCardano() {
    const nami = window.cardano.nami;
    if (!nami) {
        setTimeout(loadCardano);
    } else {
        const api = await nami.enable();
        console.log('nami enabled');
        const lucid = await L.Lucid.new(
            new L.Blockfrost("https://cardano-preview.blockfrost.io/api/v0", "XXXX"),
            "Preview",
        );
        console.log('lucid active');
        lucid.selectWallet(api);
        return lucid;
    }
}


---

