Skip to content

Commit

Permalink
fix globalThis.cardano type
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrokonrad committed Jan 29, 2025
1 parent 443dd99 commit c33f2cb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/always_succeeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const lucid = new Lucid({
),
});

const api = await globalThis.cardano.nami.enable();
const api = await (globalThis as any).cardano.nami.enable();
// Assumes you are in a browser environment
lucid.selectWalletFromApi(api);

Expand Down
11 changes: 9 additions & 2 deletions examples/mint_simple_nft.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { Addresses, Blockfrost, Codec, fromText, Lucid } from "../mod.ts";
import {
Addresses,
Blockfrost,
Cardano,
Codec,
fromText,
Lucid,
} from "../mod.ts";

/*
MintSimpleNFT Example
Expand All @@ -12,7 +19,7 @@ const lucid = new Lucid({
),
});

const api = await globalThis.cardano.nami.enable();
const api = await (globalThis as any).cardano.nami.enable();
// Assumes you are in a browser environment
lucid.selectWalletFromApi(api);

Expand Down
2 changes: 1 addition & 1 deletion examples/parameterized_script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const lucid = new Lucid({
),
});

const api = await globalThis.cardano.nami.enable();
const api = await (globalThis as any).cardano.nami.enable();
// Assumes you are in a browser environment
lucid.selectWalletFromApi(api);

Expand Down
2 changes: 1 addition & 1 deletion examples/typed_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const lucid = new Lucid({
),
});

const api = await globalThis.cardano.nami.enable();
const api = await (globalThis as any).cardano.nami.enable();
// Assumes you are in a browser environment
lucid.selectWalletFromApi(api);

Expand Down

0 comments on commit c33f2cb

Please sign in to comment.