Skip to content

Commit

Permalink
feat: support Crossmint staging.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdethier committed Nov 21, 2023
1 parent d35028b commit 019f9cc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/__mocks__/@crossmint/connect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ export class CrossmintEVMWalletAdapter {
return "0xb21edd3dc671484F34075B038a68A76F6362F980";
}
}

export enum CrossmintEnvironment {
STAGING,
PROD
}
2 changes: 1 addition & 1 deletion src/certificate/Authenticate.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { render } from '@testing-library/react';
import { render, screen } from '@testing-library/react';
import { clickByName, shallowRender } from '../tests';
import { UUID, Hash } from "@logion/node-api";
import { HashString, ClientToken } from "@logion/client";
Expand Down
3 changes: 2 additions & 1 deletion src/certificate/Authenticate.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BlockchainTypes, CrossmintEVMWalletAdapter } from "@crossmint/connect";
import { BlockchainTypes, CrossmintEVMWalletAdapter, CrossmintEnvironment } from "@crossmint/connect";
import { Token, LogionClient, CollectionItem } from "@logion/client";
import { CrossmintSigner } from "@logion/crossmint";
import { allMetamaskAccounts, enableMetaMask } from "@logion/extension";
Expand Down Expand Up @@ -283,6 +283,7 @@ async function authenticateWithCrossmint(context: LogionChainContextType): Promi
const crossmint = new CrossmintEVMWalletAdapter({
apiKey: config.crossmintApiKey,
chain: BlockchainTypes.ETHEREUM,
environment: config.crossmintApiKey.startsWith("sk_test") ? CrossmintEnvironment.STAGING : CrossmintEnvironment.PROD,
});

const address = await crossmint.connect();
Expand Down

0 comments on commit 019f9cc

Please sign in to comment.