Wallet adapter fix (#292)
* minor fix to type declaration * Some more typescript fixes
This commit is contained in:
parent
2bcd97ac04
commit
0ba4954762
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue