Wallet adapter fix (#292)

* minor fix to type declaration

* Some more typescript fixes
This commit is contained in:
Jordan Prince 2021-09-03 19:37:05 -05:00 committed by GitHub
parent 2bcd97ac04
commit 0ba4954762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ import {
} from '@oyster/common';
import { setupMintEditionIntoWalletInstructions } from './setupMintEditionIntoWalletInstructions';
import { Art } from '../types';
import { WalletAdapter } from '@solana/wallet-adapter-base';
import { WalletContextState } from '@solana/wallet-adapter-react';
// TODO: Refactor. Extract batching logic,
// as the similar one is used in settle.ts and convertMasterEditions.ts
@ -18,7 +18,7 @@ const BATCH_SIZE = 10;
export async function mintEditionsToWallet(
art: Art,
wallet: WalletAdapter,
wallet: WalletContextState,
connection: Connection,
mintTokenAccount: TokenAccount,
editions: number = 1,

View File

@ -8,11 +8,11 @@ import {
} from '@oyster/common';
import { createMintAndAccountWithOne } from './createMintAndAccountWithOne';
import { Art } from '../types';
import { WalletAdapter } from '@solana/wallet-base';
import { WalletContextState } from '@solana/wallet-adapter-react';
export async function setupMintEditionIntoWalletInstructions(
art: Art,
wallet: WalletAdapter,
wallet: WalletContextState,
connection: Connection,
mintTokenAccount: TokenAccount,
edition: BN,

View File

@ -11,13 +11,13 @@ import {
MetaplexOverlay,
useConnection,
useUserAccounts,
useWallet,
} from '@oyster/common';
import { useArt } from '../../hooks';
import { mintEditionsToWallet } from '../../actions/mintEditionsIntoWallet';
import { ArtType } from '../../types';
import { Confetti } from '../Confetti';
import { Link } from 'react-router-dom';
import { useWallet } from '@solana/wallet-adapter-react';
interface ArtMintingProps {
id: string;
@ -25,7 +25,7 @@ interface ArtMintingProps {
}
export const ArtMinting = ({ id, onMint }: ArtMintingProps) => {
const { wallet } = useWallet();
const wallet = useWallet();
const connection = useConnection();
const { accountByMint } = useUserAccounts();
const [showMintModal, setShowMintModal] = useState<boolean>(false);