Merge branch 'wallet-adapter' into latest

This commit is contained in:
Jordan Sexton 2021-08-16 16:21:52 -05:00
commit 42b6b060a7
79 changed files with 1108 additions and 1546 deletions

View File

@ -15,7 +15,7 @@
"build": "lerna run build",
"start": "cross-env CI=true lerna run start --scope @oyster/common --stream --parallel --scope web",
"lint": "eslint 'packages/*/{src,test}/**/*.ts' && prettier -c 'packages/*/{src,test}/**/*.ts'",
"lint:fix": "eslint --fix 'packages/*/{src,test}/**/*.ts' && prettier --write 'packages/*/{src,test}/**/*.ts'",
"lint:fix": "eslint --fix 'packages/*/{src,test}/**/*.ts' && prettier --write 'packages/*/{src,test}/**/*.{ts,tsx}'",
"deploy": "run-s deploy:docs build deploy:apps && gh-pages -d docs",
"deploy:docs": "lerna run docs",
"deploy:apps": "lerna run deploy:app",
@ -45,16 +45,14 @@
"dependencies": {
"cross-env": "^7.0.3",
"next": "^11.0.1",
"react": "17.0.2",
"react-dom": "17.0.2"
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@types/animejs": "^3.1.3",
"@types/jest": "^24.0.0",
"@types/react": "^16.9.50",
"@types/react-dom": "^16.9.8",
"@typescript-eslint/eslint-plugin": "^4.6.0",
"@typescript-eslint/parser": "^4.6.0",
"eslint": "^6.6.0",
@ -71,9 +69,5 @@
"ts-jest": "^24.0.0",
"ts-node": "^9.0.0",
"typescript": "^4.1.3"
},
"resolutions": {
"react": "17.0.2",
"react-dom": "17.0.2"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@oyster/common",
"version": "0.0.1",
"version": "0.0.2",
"description": "Oyster common utilities",
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
@ -30,11 +30,11 @@
},
"dependencies": {
"@project-serum/serum": "^0.13.52",
"@project-serum/sol-wallet-adapter": "^0.2.5",
"@solana/spl-token": "0.1.6",
"@solana/spl-token-registry": "0.2.202",
"@solana/wallet-base": "0.0.1",
"@solana/wallet-ledger": "0.0.1",
"@solana/wallet-adapter-base": "^0.4.1",
"@solana/wallet-adapter-react": "^0.7.0",
"@solana/wallet-adapter-wallets": "^0.6.0",
"@solana/web3.js": "^1.21.0",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
@ -76,9 +76,5 @@
"peerDependencies": {
"react": "*",
"react-dom": "*"
},
"resolutions": {
"react": "17.0.2",
"react-dom": "17.0.2"
}
}

View File

@ -5,7 +5,8 @@ import { SettingOutlined } from '@ant-design/icons';
import { Settings } from '../Settings';
import { LABELS } from '../../constants/labels';
import { ConnectButton } from '..';
import { useWallet } from '../../contexts/wallet';
import { useWallet } from '@solana/wallet-adapter-react';
export const AppBar = (props: {
left?: JSX.Element;
right?: JSX.Element;
@ -23,8 +24,8 @@ export const AppBar = (props: {
<ConnectButton
type="text"
size="large"
allowWalletChange={true}
style={{ color: '#2abdd2' }}
allowWalletChange
/>
)}
<Popover

View File

@ -1,42 +1,51 @@
import { Button, Dropdown, Menu } from "antd";
import { ButtonProps } from "antd/lib/button";
import React from "react";
import { useWallet } from './../../contexts/wallet';
import { Button, Dropdown, Menu } from 'antd';
import { ButtonProps } from 'antd/lib/button';
import React, { useCallback } from 'react';
import { useWallet } from '@solana/wallet-adapter-react';
import { useWalletModal } from '../../contexts';
export interface ConnectButtonProps extends ButtonProps, React.RefAttributes<HTMLElement> {
export interface ConnectButtonProps
extends ButtonProps,
React.RefAttributes<HTMLElement> {
allowWalletChange?: boolean;
}
export const ConnectButton = (
props: ConnectButtonProps
) => {
const { connected, connect, select, provider } = useWallet();
export const ConnectButton = (props: ConnectButtonProps) => {
const { onClick, children, disabled, allowWalletChange, ...rest } = props;
const { wallet, connect, connected } = useWallet();
const { setVisible } = useWalletModal();
const open = useCallback(() => setVisible(true), [setVisible]);
const handleClick = useCallback(
() => (wallet ? connect().catch(() => {}) : open()),
[wallet, connect, open],
);
// only show if wallet selected or user connected
const menu = (
<Menu>
<Menu.Item key="3" onClick={select}>Change Wallet</Menu.Item>
</Menu>
);
if(!provider || !allowWalletChange) {
return <Button
className="connector"
{...rest}
onClick={connected ? onClick : connect}
disabled={connected && disabled}
>
{connected ? children : 'Connect'}
</Button>;
if (!wallet || !allowWalletChange) {
return (
<Button
{...rest}
onClick={handleClick}
disabled={connected && disabled}
>
{connected ? props.children : 'Connect'}
</Button>
);
}
return (
<Dropdown.Button
onClick={connected ? onClick : connect}
disabled={connected && disabled}
overlay={menu}>
onClick={handleClick}
disabled={connected && disabled}
overlay={
<Menu>
<Menu.Item onClick={open}>Change Wallet</Menu.Item>
</Menu>
}
>
Connect
</Dropdown.Button>
);

View File

@ -1,10 +1,8 @@
import React from 'react';
import { Identicon } from '../Identicon';
import { LAMPORTS_PER_SOL } from '@solana/web3.js';
import { useWallet } from '../../contexts/wallet';
import { useWallet } from '@solana/wallet-adapter-react';
import { useNativeAccount } from '../../contexts/accounts';
import { formatNumber, shortenAddress } from '../../utils';
import { formatNumber } from '../../utils';
import { Popover } from 'antd';
import { Settings } from '../Settings';
@ -13,10 +11,10 @@ export const CurrentUserBadge = (props: {
showAddress?: boolean;
iconSize?: number;
}) => {
const { wallet } = useWallet();
const { wallet, publicKey } = useWallet();
const { account } = useNativeAccount();
if (!wallet || !wallet.publicKey) {
if (!wallet || !publicKey) {
return null;
}
@ -24,12 +22,12 @@ export const CurrentUserBadge = (props: {
? {
marginLeft: '0.5rem',
display: 'flex',
width: props.iconSize,
width: props.iconSize || 20,
borderRadius: 50,
}
: {
display: 'flex',
width: props.iconSize,
width: props.iconSize || 20,
paddingLeft: 0,
borderRadius: 50,
};
@ -43,20 +41,6 @@ export const CurrentUserBadge = (props: {
? baseWalletKey
: { ...baseWalletKey, paddingLeft: 0 };
let name = props.showAddress ? shortenAddress(`${wallet.publicKey}`) : '';
const unknownWallet = wallet as any;
if (unknownWallet.name) {
name = unknownWallet.name;
}
let image = (
<Identicon address={wallet.publicKey?.toBase58()} style={iconStyle} />
);
if (unknownWallet.image) {
image = <img src={unknownWallet.image} style={iconStyle} />;
}
return (
<div className="wallet-wrapper">
{props.showBalance && (
@ -72,8 +56,8 @@ export const CurrentUserBadge = (props: {
trigger="click"
>
<div className="wallet-key" style={walletKeyStyle}>
{name && <span style={{ marginRight: '0.5rem' }}>{name}</span>}
{image}
<span style={{ marginRight: '0.5rem' }}>{wallet.name}</span>
<img src={wallet.icon} style={iconStyle} />
</div>
</Popover>
</div>

View File

@ -3,7 +3,7 @@ import { Typography } from 'antd';
import { shortenAddress } from '../../utils/utils';
export const EtherscanLink = (props: {
address: string ;
address: string;
type: string;
code?: boolean;
style?: React.CSSProperties;

View File

@ -1,7 +1,7 @@
import { Button, Popover } from "antd";
import React from "react";
import { Button, Popover } from 'antd';
import React from 'react';
import { InfoCircleOutlined } from "@ant-design/icons";
import { InfoCircleOutlined } from '@ant-design/icons';
export const Info = (props: {
text: React.ReactElement;

View File

@ -1,11 +1,11 @@
import React from "react";
import { Input } from "antd";
import React from 'react';
import { Input } from 'antd';
export class NumericInput extends React.Component<any, any> {
onChange = (e: any) => {
const { value } = e.target;
const reg = /^-?\d*(\.\d*)?$/;
if (reg.test(value) || value === "" || value === "-") {
if (reg.test(value) || value === '' || value === '-') {
this.props.onChange(value);
}
};
@ -17,14 +17,14 @@ export class NumericInput extends React.Component<any, any> {
if (value === undefined || value === null) return;
if (
value.charAt &&
(value.charAt(value.length - 1) === "." || value === "-")
(value.charAt(value.length - 1) === '.' || value === '-')
) {
valueTemp = value.slice(0, -1);
}
if (value.startsWith && (value.startsWith(".") || value.startsWith("-."))) {
valueTemp = valueTemp.replace(".", "0.");
if (value.startsWith && (value.startsWith('.') || value.startsWith('-.'))) {
valueTemp = valueTemp.replace('.', '0.');
}
if (valueTemp.replace) onChange?.(valueTemp.replace(/0*(\d+)/, "$1"));
if (valueTemp.replace) onChange?.(valueTemp.replace(/0*(\d+)/, '$1'));
if (onBlur) {
onBlur();
}

View File

@ -2,18 +2,21 @@ import React from 'react';
import { Modal } from 'antd';
export const MetaplexOverlay = (props: any) => {
const { children, ...rest } = props;
const { children, ...rest } = props
const content = <div style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
pointerEvents: "auto",
justifyContent: "center"
}}>
{children}
</div>
const content = (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
pointerEvents: 'auto',
justifyContent: 'center',
}}
>
{children}
</div>
);
return (
<Modal

View File

@ -1,8 +1,9 @@
import React from 'react';
import React, { useCallback } from 'react';
import { Button, Select } from 'antd';
import { useWallet } from '../../contexts/wallet';
import { useWallet } from '@solana/wallet-adapter-react';
import { ENDPOINTS, useConnectionConfig } from '../../contexts/connection';
import { shortenAddress } from '../../utils';
import { useWalletModal } from '../../contexts';
import { notify, shortenAddress } from '../../utils';
import { CopyOutlined } from '@ant-design/icons';
export const Settings = ({
@ -10,8 +11,10 @@ export const Settings = ({
}: {
additionalSettings?: JSX.Element;
}) => {
const { connected, disconnect, select, wallet } = useWallet();
const { connected, disconnect, publicKey } = useWallet();
const { endpoint, setEndpoint } = useConnectionConfig();
const { setVisible } = useWalletModal();
const open = useCallback(() => setVisible(true), [setVisible]);
return (
<>
@ -31,26 +34,30 @@ export const Settings = ({
{connected && (
<>
<span>Wallet:</span>
{wallet?.publicKey && (
{publicKey && (
<Button
style={{ marginBottom: 5 }}
onClick={() =>
navigator.clipboard.writeText(
wallet.publicKey?.toBase58() || '',
)
}
onClick={async () => {
if (publicKey) {
await navigator.clipboard.writeText(publicKey.toBase58());
notify({
message: 'Wallet update',
description: 'Address copied to clipboard',
});
}
}}
>
<CopyOutlined />
{shortenAddress(wallet?.publicKey.toBase58())}
{shortenAddress(publicKey.toBase58())}
</Button>
)}
<Button onClick={select} style={{ marginBottom: 5 }}>
<Button onClick={open} style={{ marginBottom: 5 }}>
Change
</Button>
<Button
type="primary"
onClick={disconnect}
onClick={() => disconnect().catch()}
style={{ marginBottom: 5 }}
>
Disconnect

View File

@ -1,6 +1,6 @@
import React from 'react';
import { PublicKey } from '@solana/web3.js';
import {getTokenIcon, KnownTokenMap} from '../../utils';
import { getTokenIcon, KnownTokenMap } from '../../utils';
import { useConnectionConfig } from '../../contexts/connection';
import { Identicon } from '../Identicon';
@ -9,7 +9,7 @@ export const TokenIcon = (props: {
style?: React.CSSProperties;
size?: number;
className?: string;
tokenMap?: KnownTokenMap,
tokenMap?: KnownTokenMap;
}) => {
let icon: string | undefined = '';
if (props.tokenMap) {

View File

@ -6,7 +6,7 @@ import React, {
useState,
} from 'react';
import { useConnection } from '../contexts/connection';
import { useWallet } from '../contexts/wallet';
import { useWallet } from '@solana/wallet-adapter-react';
import { AccountInfo, Connection, PublicKey } from '@solana/web3.js';
import { AccountLayout, MintInfo, MintLayout, u64 } from '@solana/spl-token';
import { TokenAccount } from '../models';
@ -312,26 +312,26 @@ export const getCachedAccount = (
const UseNativeAccount = () => {
const connection = useConnection();
const { wallet } = useWallet();
const { publicKey } = useWallet();
const [nativeAccount, setNativeAccount] = useState<AccountInfo<Buffer>>();
const updateCache = useCallback(
account => {
if (wallet && wallet.publicKey) {
if (publicKey) {
const wrapped = wrapNativeAccount(
wallet.publicKey?.toBase58(),
publicKey.toBase58(),
account,
);
if (wrapped !== undefined && wallet) {
const id = wallet.publicKey?.toBase58();
if (wrapped !== undefined) {
const id = publicKey.toBase58();
cache.registerParser(id, TokenAccountParser);
genericCache.set(id, wrapped as TokenAccount);
cache.emitter.raiseCacheUpdated(id, false, TokenAccountParser, true);
}
}
},
[wallet],
[publicKey],
);
useEffect(() => {
@ -344,14 +344,14 @@ const UseNativeAccount = () => {
};
(async () => {
if (!connection || !wallet?.publicKey) {
if (!connection || !publicKey) {
return;
}
const account = await connection.getAccountInfo(wallet.publicKey);
const account = await connection.getAccountInfo(publicKey);
updateAccount(account);
subId = connection.onAccountChange(wallet.publicKey, updateAccount);
subId = connection.onAccountChange(publicKey, updateAccount);
})();
return () => {
@ -359,7 +359,7 @@ const UseNativeAccount = () => {
connection.removeAccountChangeListener(subId);
}
};
}, [setNativeAccount, wallet, wallet?.publicKey, connection, updateCache]);
}, [setNativeAccount, publicKey, connection, updateCache]);
return { nativeAccount };
};
@ -388,11 +388,11 @@ const precacheUserTokenAccounts = async (
export function AccountsProvider({ children = null as any }) {
const connection = useConnection();
const { wallet, connected } = useWallet();
const { publicKey } = useWallet();
const [tokenAccounts, setTokenAccounts] = useState<TokenAccount[]>([]);
const [userAccounts, setUserAccounts] = useState<TokenAccount[]>([]);
const { nativeAccount } = UseNativeAccount();
const walletKey = wallet?.publicKey?.toBase58();
const walletKey = publicKey?.toBase58();
const selectUserAccounts = useCallback(() => {
return cache
@ -407,7 +407,7 @@ export function AccountsProvider({ children = null as any }) {
a => a !== undefined,
) as TokenAccount[];
setUserAccounts(accounts);
}, [nativeAccount, wallet, tokenAccounts, selectUserAccounts]);
}, [nativeAccount, tokenAccounts, selectUserAccounts]);
useEffect(() => {
const subs: number[] = [];
@ -426,7 +426,6 @@ export function AccountsProvider({ children = null as any }) {
};
}, [connection]);
const publicKey = wallet?.publicKey;
useEffect(() => {
if (!connection || !publicKey) {
setTokenAccounts([]);
@ -460,7 +459,7 @@ export function AccountsProvider({ children = null as any }) {
connection.removeProgramAccountChangeListener(tokenSubID);
};
}
}, [connection, connected, publicKey, selectUserAccounts]);
}, [connection, publicKey, selectUserAccounts]);
return (
<AccountsContext.Provider

View File

@ -1,7 +1,6 @@
import { sleep, useLocalStorageState } from '../utils/utils';
import {
Keypair,
BlockhashAndFeeCalculator,
clusterApiUrl,
Commitment,
Connection,
@ -11,6 +10,8 @@ import {
Transaction,
TransactionInstruction,
TransactionSignature,
Blockhash,
FeeCalculator,
} from '@solana/web3.js';
import React, { useContext, useEffect, useMemo, useState } from 'react';
import { notify } from '../utils/notifications';
@ -21,6 +22,13 @@ import {
TokenListProvider,
ENV as ChainId,
} from '@solana/spl-token-registry';
import { WalletSigner } from './wallet';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
interface BlockhashAndFeeCalculator {
blockhash: Blockhash;
feeCalculator: FeeCalculator;
}
export type ENV =
| 'mainnet-beta'
@ -211,7 +219,7 @@ export enum SequenceType {
export async function sendTransactionsWithManualRetry(
connection: Connection,
wallet: any,
wallet: WalletSigner,
instructions: TransactionInstruction[][],
signers: Keypair[][],
) {
@ -273,7 +281,7 @@ export async function sendTransactionsWithManualRetry(
export const sendTransactions = async (
connection: Connection,
wallet: any,
wallet: WalletSigner,
instructionSet: TransactionInstruction[][],
signersSet: Keypair[][],
sequenceType: SequenceType = SequenceType.Parallel,
@ -282,6 +290,8 @@ export const sendTransactions = async (
failCallback: (reason: string, ind: number) => boolean = (txid, ind) => false,
block?: BlockhashAndFeeCalculator,
): Promise<number> => {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const unsignedTxns: Transaction[] = [];
if (!block) {
@ -334,6 +344,7 @@ export const sendTransactions = async (
successCallback(txid, i);
})
.catch(reason => {
// @ts-ignore
failCallback(signedTxns[i], i);
if (sequenceType === SequenceType.StopOnFailure) {
breakEarlyObject.breakEarly = true;
@ -365,7 +376,7 @@ export const sendTransactions = async (
export const sendTransaction = async (
connection: Connection,
wallet: any,
wallet: WalletSigner,
instructions: TransactionInstruction[],
signers: Keypair[],
awaitConfirmation = true,
@ -373,6 +384,8 @@ export const sendTransaction = async (
includesFeePayer: boolean = false,
block?: BlockhashAndFeeCalculator,
) => {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let transaction = new Transaction();
instructions.forEach(instruction => transaction.add(instruction));
transaction.recentBlockhash = (
@ -443,7 +456,7 @@ export const sendTransaction = async (
export const sendTransactionWithRetry = async (
connection: Connection,
wallet: any,
wallet: WalletSigner,
instructions: TransactionInstruction[],
signers: Keypair[],
commitment: Commitment = 'singleGossip',
@ -451,6 +464,8 @@ export const sendTransactionWithRetry = async (
block?: BlockhashAndFeeCalculator,
beforeSend?: () => void,
) => {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let transaction = new Transaction();
instructions.forEach(instruction => transaction.add(instruction));
transaction.recentBlockhash = (

View File

@ -1,8 +1,6 @@
export * as Accounts from './accounts';
export * as Connection from './connection';
export * as Wallet from './wallet';
export { ParsedAccount, ParsedAccountBase } from './accounts';
export * from './accounts';
export * from './wallet';
export * as Connection from './connection';
export * from './connection';
export * as Wallet from './wallet';
export * from './wallet';

View File

@ -1,277 +1,231 @@
import { WalletAdapter } from '@solana/wallet-base';
import Wallet from '@project-serum/sol-wallet-adapter';
import { WalletAdapter, WalletError } from '@solana/wallet-adapter-base';
import {
useWallet,
WalletProvider as BaseWalletProvider,
} from '@solana/wallet-adapter-react';
import {
getLedgerWallet,
getMathWallet,
getPhantomWallet,
getSolflareWallet,
getSolletWallet,
getSolongWallet,
getTorusWallet,
WalletName,
} from '@solana/wallet-adapter-wallets';
import { Button } from 'antd';
import React, {
createContext,
FC,
ReactNode,
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from 'react';
import { notify } from './../utils/notifications';
import { useConnectionConfig } from './connection';
import { useLocalStorageState } from '../utils/utils';
import { PhantomWalletAdapter } from '../wallet-adapters/phantom';
import { useLocation } from 'react-router';
import { MetaplexModal } from '../components/MetaplexModal';
import { TorusWalletAdapter } from '../wallet-adapters/torus';
import { SolflareWalletAdapter } from '../wallet-adapters/solflare';
import { notify } from '../utils';
import { MetaplexModal } from '../components';
const ASSETS_URL =
'https://raw.githubusercontent.com/solana-labs/oyster/main/assets/wallets/';
export const WALLET_PROVIDERS = [
{
name: 'Phantom',
url: 'https://www.phantom.app',
icon: `https://www.phantom.app/img/logo.png`,
adapter: PhantomWalletAdapter,
},
{
name: 'Solflare',
url: 'https://solflare.com',
icon: `${ASSETS_URL}solflare.svg`,
adapter: SolflareWalletAdapter,
},
{
name: 'Sollet',
url: 'https://www.sollet.io',
icon: `${ASSETS_URL}sollet.svg`,
},
{
name: 'MathWallet',
url: 'https://mathwallet.org',
icon: `${ASSETS_URL}mathwallet.svg`,
},
{
name: 'Torus',
url: 'https://tor.us',
icon: `${ASSETS_URL}torus.svg`,
adapter: TorusWalletAdapter,
},
];
export interface WalletModalContextState {
visible: boolean;
setVisible: (open: boolean) => void;
}
const WalletContext = React.createContext<{
wallet: WalletAdapter | undefined;
connected: boolean;
select: () => void;
provider: typeof WALLET_PROVIDERS[number] | undefined;
}>({
wallet: undefined,
connected: false,
select() {},
provider: undefined,
});
export const WalletModalContext = createContext<WalletModalContextState>(
{} as WalletModalContextState,
);
export function WalletProvider({ children = null as any }) {
const { endpoint } = useConnectionConfig();
const location = useLocation();
const [autoConnect, setAutoConnect] = useState(
location.pathname.indexOf('result=') >= 0 || false,
export function useWalletModal(): WalletModalContextState {
return useContext(WalletModalContext);
}
export const WalletModal: FC = () => {
const { wallets, wallet: selected, select } = useWallet();
const { visible, setVisible } = useWalletModal();
const [showWallets, setShowWallets] = useState(false);
const close = useCallback(() => {
setVisible(false);
setShowWallets(false);
}, [setVisible, setShowWallets]);
return (
<MetaplexModal visible={visible} onCancel={close}>
<div
style={{
background:
'linear-gradient(180deg, #D329FC 0%, #8F6DDE 49.48%, #19E6AD 100%)',
borderRadius: 36,
width: 50,
height: 50,
textAlign: 'center',
verticalAlign: 'middle',
fontWeight: 700,
fontSize: '1.3rem',
lineHeight: 2.4,
marginBottom: 10,
}}
>
M
</div>
<h2>{selected ? 'Change provider' : 'Welcome to Metaplex'}</h2>
<p>
{selected
? 'Feel free to switch wallet provider'
: 'You must be signed in to place a bid'}
</p>
<br />
{selected || showWallets ? (
wallets.map(wallet => {
return (
<Button
key={wallet.name}
size="large"
type={wallet === selected ? 'primary' : 'ghost'}
onClick={() => {
select(wallet.name);
close();
}}
icon={
<img
alt={`${wallet.name}`}
width={20}
height={20}
src={wallet.icon}
style={{ marginRight: 8 }}
/>
}
style={{
display: 'block',
width: '100%',
textAlign: 'left',
marginBottom: 8,
}}
>
{wallet.name}
</Button>
);
})
) : (
<>
<Button
className="metaplex-button"
style={{
width: '80%',
fontWeight: 'unset',
}}
onClick={() => {
select(WalletName.Phantom);
close();
}}
>
<span>
<img
src="https://www.phantom.app/img/logo.png"
style={{ width: '1.2rem' }}
/>
&nbsp;Sign in with Phantom
</span>
<span>&gt;</span>
</Button>
<p
onClick={() => setShowWallets(true)}
style={{ cursor: 'pointer', marginTop: 10 }}
>
Select a different Solana wallet
</p>
</>
)}
</MetaplexModal>
);
const [providerUrl, setProviderUrl] = useLocalStorageState('walletProvider');
};
const provider = useMemo(
() => WALLET_PROVIDERS.find(({ url }) => url === providerUrl),
[providerUrl],
);
const wallet = useMemo(
function () {
if (provider) {
return new (provider.adapter || Wallet)(
providerUrl,
endpoint,
) as WalletAdapter;
}
},
[provider, providerUrl, endpoint],
);
const [connected, setConnected] = useState(false);
export const WalletModalProvider: FC<{ children: ReactNode }> = ({
children,
}) => {
const { publicKey } = useWallet();
const [connected, setConnected] = useState(!!publicKey);
const [visible, setVisible] = useState(false);
useEffect(() => {
if (wallet?.publicKey && connected) {
const walletPublicKey = wallet.publicKey.toBase58();
if (publicKey) {
const base58 = publicKey.toBase58();
const keyToDisplay =
walletPublicKey.length > 20
? `${walletPublicKey.substring(0, 7)}.....${walletPublicKey.substring(
walletPublicKey.length - 7,
walletPublicKey.length,
base58.length > 20
? `${base58.substring(0, 7)}.....${base58.substring(
base58.length - 7,
base58.length,
)}`
: walletPublicKey;
: base58;
notify({
message: 'Wallet update',
description: 'Connected to wallet ' + keyToDisplay,
});
}
}, [connected]);
}, [publicKey]);
useEffect(() => {
if (wallet) {
wallet.on('connect', () => {
if (wallet.publicKey) {
setConnected(true);
}
});
wallet.on('disconnect', () => {
setConnected(false);
notify({
message: 'Wallet update',
description: 'Disconnected from wallet',
});
if (!publicKey && connected) {
notify({
message: 'Wallet update',
description: 'Disconnected from wallet',
});
}
return () => {
setConnected(false);
if (wallet) {
wallet.disconnect();
}
};
}, [wallet]);
useEffect(() => {
if (wallet && autoConnect) {
wallet.connect();
setAutoConnect(false);
}
return () => {};
}, [wallet, autoConnect]);
const [isModalVisible, setIsModalVisible] = useState(false);
const [showProviders, setShowProviders] = useState(false);
const select = useCallback(() => setIsModalVisible(true), []);
const close = useCallback(() => {
setIsModalVisible(false);
setShowProviders(false);
}, []);
const pp = WALLET_PROVIDERS.find(wp => wp.name === 'Phantom');
setConnected(!!publicKey);
}, [publicKey, connected, setConnected]);
return (
<WalletContext.Provider
<WalletModalContext.Provider
value={{
wallet,
connected,
select,
provider,
visible,
setVisible,
}}
>
{children}
<MetaplexModal visible={isModalVisible} onCancel={close}>
<div
style={{
background:
'linear-gradient(180deg, #D329FC 0%, #8F6DDE 49.48%, #19E6AD 100%)',
borderRadius: 36,
width: 50,
height: 50,
textAlign: 'center',
verticalAlign: 'middle',
fontWeight: 700,
fontSize: '1.3rem',
lineHeight: 2.4,
marginBottom: 10,
}}
>
M
</div>
<h2>{provider ? 'Change provider' : 'Welcome to Metaplex'}</h2>
<p>
{provider
? 'Feel free to switch wallet provider'
: 'You must be signed in to place a bid'}
</p>
<br />
{provider || showProviders ? (
<>
{WALLET_PROVIDERS.map((provider, idx) => {
if (providerUrl === provider.url) return null;
const onClick = function () {
setProviderUrl(provider.url);
setAutoConnect(true);
close();
};
return (
<Button
key={idx}
size="large"
type={providerUrl === provider.url ? 'primary' : 'ghost'}
onClick={onClick}
icon={
<img
alt={`${provider.name}`}
width={20}
height={20}
src={provider.icon}
style={{ marginRight: 8 }}
/>
}
style={{
display: 'block',
width: '100%',
textAlign: 'left',
marginBottom: 8,
}}
>
{provider.name}
</Button>
);
})}
</>
) : (
<>
<Button
className="metaplex-button"
style={{
width: '80%',
fontWeight: 'unset',
}}
onClick={_ => {
setProviderUrl(pp?.url);
setAutoConnect(true);
close();
}}
>
<span>
<img src={pp?.icon} style={{ width: '1.2rem' }} />
&nbsp;Sign in with Phantom
</span>
<span>&gt;</span>
</Button>
<p
onClick={_ => setShowProviders(true)}
style={{ cursor: 'pointer', marginTop: 10 }}
>
Select a different Solana wallet
</p>
</>
)}
</MetaplexModal>
</WalletContext.Provider>
<WalletModal />
</WalletModalContext.Provider>
);
}
export const useWallet = () => {
const { wallet, connected, provider, select } = useContext(WalletContext);
return {
wallet,
connected,
provider,
select,
connect() {
wallet ? wallet.connect() : select();
},
disconnect() {
wallet?.disconnect();
},
};
};
export const WalletProvider: FC<{ children: ReactNode }> = ({ children }) => {
const wallets = useMemo(
() => [
getPhantomWallet(),
getSolflareWallet(),
getTorusWallet({
options: {
// @FIXME: this should be changed for Metaplex, and by each Metaplex storefront
clientId:
'BOM5Cl7PXgE9Ylq1Z1tqzhpydY0RVr8k90QQ85N7AKI5QGSrr9iDC-3rvmy0K_hF0JfpLMiXoDhta68JwcxS1LQ',
},
}),
getLedgerWallet(),
getSolongWallet(),
getMathWallet(),
getSolletWallet(),
],
[],
);
const onError = useCallback((error: WalletError) => {
console.error(error);
notify({
message: 'Wallet error',
description: error.message,
});
}, []);
return (
<BaseWalletProvider wallets={wallets} onError={onError} autoConnect>
<WalletModalProvider>{children}</WalletModalProvider>
</BaseWalletProvider>
);
};
export type WalletSigner = Pick<
WalletAdapter,
'publicKey' | 'signTransaction' | 'signAllTransactions'
>;

View File

@ -11,16 +11,17 @@ import {
Account,
SystemProgram,
} from '@solana/web3.js';
import { WalletSigner } from '../contexts';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
export const mintNFT = async (
connection: Connection,
wallet: {
publicKey: PublicKey;
signTransaction: (tx: Transaction) => Transaction;
},
wallet: WalletSigner,
// SOL account
owner: PublicKey,
) => {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const TOKEN_PROGRAM_ID = new PublicKey(
'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
);

View File

@ -1,17 +1,14 @@
export * as actions from './actions';
export * from './actions';
export * as components from './components';
export * from './components'; // Allow direct exports too
export * from './components';
export * as constants from './constants';
export * from './constants';
export * as hooks from './hooks';
export * from './hooks';
export * as contexts from './contexts';
export * from './contexts';
export * as models from './models';
export * from './models';
export * as utils from './utils';
export * from './utils';
export * as walletAdapters from './wallet-adapters';
export { TokenAccount } from './models';
export { ParsedAccount, ParsedAccountBase } from './contexts';
export { KnownTokenMap, EventEmitter, Layout } from './utils';

View File

@ -0,0 +1,4 @@
declare module 'jazzicon' {
const jazzicon: any;
export = jazzicon;
}

View File

@ -1,4 +0,0 @@
declare module '@project-serum/sol-wallet-adapter' {
const adapter: any;
export = adapter;
}

View File

@ -1,13 +1,13 @@
import React from "react";
import { notification } from "antd";
import React from 'react';
import { notification } from 'antd';
// import Link from '../components/Link';
export function notify({
message = "",
message = '',
description = undefined as any,
txid = "",
type = "info",
placement = "bottomLeft",
txid = '',
type = 'info',
placement = 'bottomLeft',
}) {
if (txid) {
// <Link
@ -21,13 +21,13 @@ export function notify({
description = <></>;
}
(notification as any)[type]({
message: <span style={{ color: "black" }}>{message}</span>,
message: <span style={{ color: 'black' }}>{message}</span>,
description: (
<span style={{ color: "black", opacity: 0.5 }}>{description}</span>
<span style={{ color: 'black', opacity: 0.5 }}>{description}</span>
),
placement,
style: {
backgroundColor: "white",
backgroundColor: 'white',
},
});
}

View File

@ -1,4 +0,0 @@
export * from './solong';
export * from './phantom';
export * from './torus';
export * as solong_adapter from './solong_adapter';

View File

@ -1,108 +0,0 @@
import EventEmitter from 'eventemitter3';
import { PublicKey, Transaction } from '@solana/web3.js';
import { notify } from '../../utils/notifications';
import { WalletAdapter } from '@solana/wallet-base';
type PhantomEvent = 'disconnect' | 'connect';
type PhantomRequestMethod =
| 'connect'
| 'disconnect'
| 'signTransaction'
| 'signAllTransactions';
interface PhantomProvider {
publicKey?: PublicKey;
isConnected?: boolean;
autoApprove?: boolean;
signTransaction: (transaction: Transaction) => Promise<Transaction>;
signAllTransactions: (transactions: Transaction[]) => Promise<Transaction[]>;
connect: () => Promise<void>;
disconnect: () => Promise<void>;
on: (event: PhantomEvent, handler: (args: any) => void) => void;
request: (method: PhantomRequestMethod, params: any) => Promise<any>;
}
export class PhantomWalletAdapter
extends EventEmitter
implements WalletAdapter {
_provider: PhantomProvider | undefined;
_cachedCorrectKey?: PublicKey;
constructor() {
super();
this.connect = this.connect.bind(this);
}
get connected() {
return this._provider?.isConnected || false;
}
get autoApprove() {
return this._provider?.autoApprove || false;
}
async signAllTransactions(
transactions: Transaction[],
): Promise<Transaction[]> {
if (!this._provider) {
return transactions;
}
return this._provider.signAllTransactions(transactions);
}
get publicKey() {
// Due to weird phantom bug where their public key isnt quite like ours
if (!this._cachedCorrectKey && this._provider?.publicKey)
this._cachedCorrectKey = new PublicKey(
this._provider.publicKey.toBase58(),
);
return this._cachedCorrectKey || null;
}
async signTransaction(transaction: Transaction) {
if (!this._provider) {
return transaction;
}
return this._provider.signTransaction(transaction);
}
connect = async () => {
if (this._provider) {
return;
}
let provider: PhantomProvider;
if ((window as any)?.solana?.isPhantom) {
provider = (window as any).solana;
} else {
window.open('https://phantom.app/', '_blank');
notify({
message: 'Phantom Error',
description: 'Please install Phantom wallet from Chrome ',
});
return;
}
provider.on('connect', () => {
this._provider = provider;
this.emit('connect');
});
if (!provider.isConnected) {
await provider.connect();
}
this._provider = provider;
this.emit('connect');
};
disconnect() {
if (this._provider) {
this._provider.disconnect();
this._provider = undefined;
this.emit('disconnect');
}
}
}

View File

@ -1,112 +0,0 @@
import EventEmitter from 'eventemitter3';
import { PublicKey, Transaction } from '@solana/web3.js';
import { notify } from '../../utils/notifications';
import { WalletAdapter } from '@solana/wallet-base';
interface SolflareWalletEvents {
connect: (...args: unknown[]) => unknown;
disconnect: (...args: unknown[]) => unknown;
}
interface SolflareWallet extends EventEmitter<SolflareWalletEvents> {
isSolflare?: boolean;
publicKey?: { toBuffer(): Buffer };
isConnected: boolean;
autoApprove: boolean;
signTransaction: (transaction: Transaction) => Promise<Transaction>;
signAllTransactions: (transactions: Transaction[]) => Promise<Transaction[]>;
connect: () => Promise<boolean>;
disconnect: () => Promise<boolean>;
}
interface SolflareWindow extends Window {
solflare?: SolflareWallet;
}
declare const window: SolflareWindow;
export class SolflareWalletAdapter
extends EventEmitter
implements WalletAdapter {
_wallet: SolflareWallet | undefined;
_publicKey: PublicKey | undefined;
constructor() {
super();
this.connect = this.connect.bind(this);
}
get connected() {
return !!this._wallet?.isConnected;
}
get autoApprove() {
return !!this._wallet?.autoApprove;
}
async signAllTransactions(
transactions: Transaction[],
): Promise<Transaction[]> {
if (!this._wallet) {
return transactions;
}
return this._wallet.signAllTransactions(transactions);
}
get publicKey() {
if (!this._publicKey && this._wallet?.publicKey)
this._publicKey = new PublicKey(
this._wallet.publicKey.toBuffer(),
);
return this._publicKey || null;
}
async signTransaction(transaction: Transaction) {
if (!this._wallet) {
return transaction;
}
return this._wallet.signTransaction(transaction);
}
connect = async () => {
if (this._wallet) {
return;
}
let wallet: SolflareWallet;
if (window.solflare?.isSolflare) {
wallet = window.solflare;
} else {
window.open('https://solflare.com', '_blank');
notify({
message: 'Solflare Error',
description: 'Please install Solflare wallet',
});
return;
}
wallet.on('connect', () => {
this._wallet = wallet;
this.emit('connect');
});
if (!wallet.isConnected) {
await wallet.connect();
}
this._wallet = wallet;
this.emit('connect');
};
disconnect() {
if (this._wallet) {
this._wallet.disconnect();
this._wallet = undefined;
this.emit('disconnect');
}
}
}

View File

@ -1,62 +0,0 @@
import EventEmitter from "eventemitter3";
import {PublicKey, Transaction} from "@solana/web3.js";
import { WalletAdapter } from "@solana/wallet-base";
import { notify } from "../../utils/notifications";
export class SolongWalletAdapter extends EventEmitter implements WalletAdapter {
_publicKey: PublicKey | null;
_onProcess: boolean;
constructor() {
super();
this._publicKey = null;
this._onProcess = false;
this.connect = this.connect.bind(this);
}
get publicKey() {
return this._publicKey;
}
async signTransaction(transaction: Transaction) {
return (window as any).solong.signTransaction(transaction);
}
async signAllTransactions(transactions: Transaction[]) {
return transactions;
}
connect() {
if (this._onProcess) {
return;
}
if ((window as any).solong === undefined) {
notify({
message: "Solong Error",
description: "Please install solong wallet from Chrome ",
});
return;
}
this._onProcess = true;
(window as any).solong
.selectAccount()
.then((account: any) => {
this._publicKey = new PublicKey(account);
this.emit("connect", this._publicKey);
})
.catch(() => {
this.disconnect();
})
.finally(() => {
this._onProcess = false;
});
}
disconnect() {
if (this._publicKey) {
this._publicKey = null;
this.emit("disconnect");
}
}
}

View File

@ -1,57 +0,0 @@
import EventEmitter from "eventemitter3";
import { PublicKey } from "@solana/web3.js";
import { notify } from "../utils/notifications";
export class SolongAdapter extends EventEmitter {
_publicKey: any;
_onProcess: boolean;
constructor(providerUrl: string, network: string) {
super();
this._publicKey = null;
this._onProcess = false;
this.connect = this.connect.bind(this);
}
get publicKey() {
return this._publicKey;
}
async signTransaction(transaction: any) {
return (window as any).solong.signTransaction(transaction);
}
connect() {
if (this._onProcess) {
return;
}
if ((window as any).solong === undefined) {
notify({
message: "Solong Error",
description: "Please install solong wallet from Chrome ",
});
return;
}
this._onProcess = true;
(window as any).solong
.selectAccount()
.then((account: any) => {
this._publicKey = new PublicKey(account);
this.emit("connect", this._publicKey);
})
.catch(() => {
this.disconnect();
})
.finally(() => {
this._onProcess = false;
});
}
disconnect() {
if (this._publicKey) {
this._publicKey = null;
this.emit("disconnect");
}
}
}

View File

@ -1,97 +0,0 @@
import EventEmitter from "eventemitter3"
import { Keypair, PublicKey, Transaction } from "@solana/web3.js"
import { WalletAdapter } from "@solana/wallet-base"
import OpenLogin from "@toruslabs/openlogin"
import { getED25519Key } from "@toruslabs/openlogin-ed25519"
const getSolanaPrivateKey = (openloginKey: string)=>{
const { sk } = getED25519Key(openloginKey)
return sk
}
export class TorusWalletAdapter extends EventEmitter implements WalletAdapter {
_provider: OpenLogin | undefined;
endpoint: string;
providerUrl: string;
account: Keypair | undefined;
image: string = '';
name: string = '';
constructor(providerUrl: string, endpoint: string) {
super()
this.connect = this.connect.bind(this)
this.endpoint = endpoint;
this.providerUrl = providerUrl;
}
async signAllTransactions(transactions: Transaction[]): Promise<Transaction[]> {
if(this.account) {
let account = this.account;
transactions.forEach(t => t.partialSign(account));
}
return transactions
}
get publicKey() {
return this.account?.publicKey || null;
}
async signTransaction(transaction: Transaction) {
if(this.account) {
transaction.partialSign(this.account)
}
return transaction
}
connect = async () => {
this._provider = new OpenLogin({
clientId: process.env.REACT_APP_CLIENT_ID || 'BKBTX-SmaEFGddZQrwqd65YFoImRQLca_Tj2IdmKyD2UbDpzrtN2WQ-NYLuej6gP0DfF3jSpEkI13wPt1uPedm0',
network: "mainnet", // mainnet, testnet, development
uxMode: 'popup'
});
try {
await this._provider.init();
} catch (ex) {
console.error('init failed', ex)
}
console.error(this._provider?.state.store);
if (this._provider.privKey) {
const privateKey = this._provider.privKey;
console.log(privateKey);
const secretKey = getSolanaPrivateKey(privateKey);
console.log(secretKey);
this.account = Keypair.fromSecretKey(secretKey);
} else {
try {
const { privKey } = await this._provider.login();
console.log(privKey);
const secretKey = getSolanaPrivateKey(privKey);
console.log(secretKey);
this.account = Keypair.fromSecretKey(secretKey);
} catch(ex) {
console.error('login failed', ex);
}
}
console.log(this.account?.publicKey.toBase58());
this.name = this._provider?.state.store.get('name');;
this.image = this._provider?.state.store.get('profileImage');;
this.emit("connect");
}
disconnect = async () => {
console.log("Disconnecting...")
if (this._provider) {
await this._provider.logout();
await this._provider._cleanup();
this._provider = undefined;
this.emit("disconnect");
}
}
}

View File

@ -5,18 +5,14 @@
"@ant-design/icons": "^4.4.0",
"@babel/preset-typescript": "^7.12.13",
"@cloudflare/stream-react": "^1.1.0",
"@oyster/common": "0.0.1",
"@oyster/common": "0.0.2",
"@project-serum/serum": "^0.13.52",
"@project-serum/sol-wallet-adapter": "^0.2.5",
"@solana/spl-name-service": "0.1.3",
"@solana/spl-token": "0.1.6",
"@solana/spl-token-registry": "^0.2.202",
"@solana/wallet-base": "0.0.1",
"@solana/wallet-ledger": "0.0.1",
"@solana/wallet-adapter-base": "^0.4.1",
"@solana/wallet-adapter-react": "^0.7.0",
"@solana/web3.js": "^1.21.0",
"@toruslabs/openlogin": "0.9.0",
"@toruslabs/openlogin-ed25519": "0.9.0",
"@toruslabs/openlogin-utils": "0.9.0",
"@welldone-software/why-did-you-render": "^6.0.5",
"bn.js": "^5.1.3",
"borsh": "^0.4.0",
@ -31,10 +27,10 @@
"next": "^11.0.1",
"next-compose-plugins": "^2.2.1",
"next-with-less": "^1.0.0",
"react": "16.13.1",
"react": "17.0.2",
"react-chartjs-2": "^3.0.4",
"react-content-loader": "^6.0.3",
"react-dom": "16.13.1",
"react-dom": "17.0.2",
"react-intersection-observer": "^8.32.0",
"react-masonry-css": "^1.0.16",
"react-router-dom": "^5.2.0",
@ -100,10 +96,5 @@
"react": "*",
"react-dom": "*"
},
"resolutions": {
"next": "11.0.1",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"license": "MIT"
}

View File

@ -7,12 +7,14 @@ import {
MetadataKey,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { AccountLayout } from '@solana/spl-token';
import BN from 'bn.js';
import { SafetyDepositDraft } from './createAuctionManager';
import { SafetyDepositConfig } from '../models/metaplex';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
const { createTokenAccount, addTokenToInactiveVault, VAULT_PREFIX } = actions;
const { approve } = models;
@ -31,7 +33,7 @@ const BATCH_SIZE = 1;
// the vault for use. It issues a series of transaction instructions and signers for the sendTransactions batch.
export async function addTokensToVault(
connection: Connection,
wallet: any,
wallet: WalletSigner,
vault: StringPublicKey,
nfts: SafetyDepositInstructionTemplate[],
): Promise<{
@ -39,6 +41,8 @@ export async function addTokensToVault(
signers: Array<Keypair[]>;
safetyDepositTokenStores: StringPublicKey[];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const PROGRAM_IDS = utils.programIds();
const accountRentExempt = await connection.getMinimumBalanceForRentExemption(

View File

@ -10,6 +10,7 @@ import {
ParsedAccount,
BidderMetadata,
StringPublicKey,
WalletSigner,
} from '@oyster/common';
import { AccountLayout } from '@solana/spl-token';
import { TransactionInstruction, Keypair, Connection } from '@solana/web3.js';
@ -17,10 +18,11 @@ import { AuctionView } from '../hooks';
import { BidRedemptionTicket, PrizeTrackingTicket } from '../models/metaplex';
import { claimUnusedPrizes } from './claimUnusedPrizes';
import { setupPlaceBid } from './sendPlaceBid';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
export async function sendCancelBid(
connection: Connection,
wallet: any,
wallet: WalletSigner,
payingAccount: StringPublicKey,
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
@ -28,6 +30,8 @@ export async function sendCancelBid(
bidRedemptions: Record<string, ParsedAccount<BidRedemptionTicket>>,
prizeTrackingTickets: Record<string, ParsedAccount<PrizeTrackingTicket>>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let signers: Array<Keypair[]> = [];
let instructions: Array<TransactionInstruction[]> = [];
if (
@ -60,7 +64,7 @@ export async function sendCancelBid(
);
if (
wallet?.publicKey?.equals(auctionView.auctionManager.authority) &&
wallet.publicKey.toBase58() === auctionView.auctionManager.authority &&
auctionView.auction.info.ended()
) {
await claimUnusedPrizes(
@ -98,10 +102,12 @@ export async function setupCancelBid(
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
accountRentExempt: number,
wallet: any,
wallet: WalletSigner,
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let cancelSigners: Keypair[] = [];
let cancelInstructions: TransactionInstruction[] = [];
let cleanupInstructions: TransactionInstruction[] = [];

View File

@ -13,8 +13,9 @@ import {
MetadataKey,
BidderMetadata,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import { AccountLayout, MintLayout } from '@solana/spl-token';
import { AuctionView, AuctionViewItem } from '../hooks';
import {
@ -74,7 +75,7 @@ export async function findEligibleParticipationBidsForRedemption(
export async function claimUnusedPrizes(
connection: Connection,
wallet: any,
wallet: WalletSigner,
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
bids: ParsedAccount<BidderMetadata>[],
@ -264,12 +265,14 @@ async function setupRedeemInstructions(
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
accountRentExempt: number,
wallet: any,
wallet: WalletSigner,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
winningConfigIndex: number,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let winningPrizeSigner: Keypair[] = [];
let winningPrizeInstructions: TransactionInstruction[] = [];
@ -315,13 +318,15 @@ async function setupRedeemFullRightsTransferInstructions(
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
accountRentExempt: number,
wallet: any,
wallet: WalletSigner,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
item: AuctionViewItem,
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
winningConfigIndex: number,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let winningPrizeSigner: Keypair[] = [];
let winningPrizeInstructions: TransactionInstruction[] = [];
const claimed = auctionView.auctionManager.isItemClaimed(
@ -363,12 +368,14 @@ async function setupRedeemFullRightsTransferInstructions(
async function setupWithdrawMasterEditionInstructions(
connection: Connection,
auctionView: AuctionView,
wallet: any,
wallet: WalletSigner,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
item: AuctionViewItem,
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
if (!item.masterEdition || !item.metadata) {
return;
}
@ -416,13 +423,15 @@ async function deprecatedSetupRedeemPrintingInstructions(
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
accountRentExempt: number,
wallet: any,
wallet: WalletSigner,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
item: AuctionViewItem,
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
winningConfigIndex: number,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
if (!item.masterEdition || !item.metadata) {
return;
}

View File

@ -4,8 +4,9 @@ import {
sendTransactionWithRetry,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import { Token } from '@solana/spl-token';
// When you are an artist and you receive royalties, due to the design of the system
// it is to a permanent ATA WSOL account. This is because the auctioneer can't transfer monies
@ -15,9 +16,11 @@ import { Token } from '@solana/spl-token';
// notification. All we do is then transfer the lamports out of the account.
export async function closePersonalEscrow(
connection: Connection,
wallet: any,
wallet: WalletSigner,
ata: StringPublicKey,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const PROGRAM_IDS = utils.programIds();
let signers: Keypair[] = [];

View File

@ -1,6 +1,12 @@
import { Keypair, Connection, TransactionInstruction } from '@solana/web3.js';
import { actions, models, StringPublicKey, toPublicKey } from '@oyster/common';
import {
actions,
models,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import { AccountLayout } from '@solana/spl-token';
import BN from 'bn.js';
const { createTokenAccount, activateVault, combineVault } = actions;
@ -10,7 +16,7 @@ const { approve } = models;
// authority (that may or may not exist yet.)
export async function closeVault(
connection: Connection,
wallet: any,
wallet: WalletSigner,
vault: StringPublicKey,
fractionMint: StringPublicKey,
fractionTreasury: StringPublicKey,
@ -21,6 +27,8 @@ export async function closeVault(
instructions: TransactionInstruction[];
signers: Keypair[];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const accountRentExempt = await connection.getMinimumBalanceForRentExemption(
AccountLayout.span,
);
@ -32,7 +40,7 @@ export async function closeVault(
vault,
fractionMint,
fractionTreasury,
wallet.publicKey,
wallet.publicKey.toBase58(),
instructions,
);

View File

@ -12,8 +12,11 @@ import {
TokenAccount,
programIds,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import { Token } from '@solana/spl-token';
const BATCH_SIZE = 10;
const CONVERT_TRANSACTION_SIZE = 10;
@ -29,8 +32,8 @@ export async function filterMetadata(
available: ParsedAccount<MasterEditionV1>[];
unavailable: ParsedAccount<MasterEditionV1>[];
}> {
const available = [];
const unavailable = [];
const available: ParsedAccount<MasterEditionV1>[] = [];
const unavailable: ParsedAccount<MasterEditionV1>[] = [];
let batchWaitCounter = 0;
for (let i = 0; i < metadata.length; i++) {
@ -123,10 +126,12 @@ export async function filterMetadata(
// Given a vault you own, unwind all the tokens out of it.
export async function convertMasterEditions(
connection: Connection,
wallet: any,
wallet: WalletSigner,
masterEditions: ParsedAccount<MasterEditionV1>[],
accountsByMint: Map<string, TokenAccount>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const PROGRAM_IDS = programIds();
let signers: Array<Array<Keypair[]>> = [];
let instructions: Array<Array<TransactionInstruction[]>> = [];

View File

@ -25,8 +25,9 @@ import {
MetadataKey,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import { AccountLayout, Token } from '@solana/spl-token';
import BN from 'bn.js';
import {
@ -56,6 +57,7 @@ import { setVaultAndAuctionAuthorities } from './setVaultAndAuctionAuthorities';
import { markItemsThatArentMineAsSold } from './markItemsThatArentMineAsSold';
import { validateSafetyDepositBoxV2 } from '../models/metaplex/validateSafetyDepositBoxV2';
import { initAuctionManagerV2 } from '../models/metaplex/initAuctionManagerV2';
const { createTokenAccount } = actions;
interface normalPattern {
@ -67,6 +69,7 @@ interface arrayPattern {
instructions: TransactionInstruction[][];
signers: Keypair[][];
}
interface byType {
markItemsThatArentMineAsSold: arrayPattern;
addTokens: arrayPattern;
@ -99,7 +102,7 @@ export interface SafetyDepositDraft {
// from some AuctionManagerSettings.
export async function createAuctionManager(
connection: Connection,
wallet: any,
wallet: WalletSigner,
whitelistedCreatorsByCreator: Record<
string,
ParsedAccount<WhitelistedCreator>
@ -320,7 +323,7 @@ export async function createAuctionManager(
let stopPoint = 0;
let tries = 0;
let lastInstructionsLength = null;
let lastInstructionsLength: number | null = null;
while (stopPoint < instructions.length && tries < 3) {
instructions = instructions.slice(stopPoint, instructions.length);
filteredSigners = filteredSigners.slice(stopPoint, filteredSigners.length);
@ -368,10 +371,12 @@ export async function createAuctionManager(
}
async function buildSafetyDepositArray(
wallet: any,
wallet: WalletSigner,
safetyDeposits: SafetyDepositDraft[],
participationSafetyDepositDraft: SafetyDepositDraft | undefined,
): Promise<SafetyDepositInstructionTemplate[]> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let safetyDepositTemplates: SafetyDepositInstructionTemplate[] = [];
safetyDeposits.forEach((s, i) => {
const maxAmount = [...s.amountRanges.map(a => a.amount)]
@ -500,7 +505,7 @@ async function buildSafetyDepositArray(
}
async function setupAuctionManagerInstructions(
wallet: any,
wallet: WalletSigner,
vault: StringPublicKey,
paymentMint: StringPublicKey,
accountRentExempt: number,
@ -511,6 +516,8 @@ async function setupAuctionManagerInstructions(
signers: Keypair[];
auctionManager: StringPublicKey;
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let store = programIds().store?.toBase58();
if (!store) {
throw new Error('Store not initialized');
@ -557,22 +564,24 @@ async function setupAuctionManagerInstructions(
}
async function setupStartAuction(
wallet: any,
wallet: WalletSigner,
vault: StringPublicKey,
): Promise<{
instructions: TransactionInstruction[];
signers: Keypair[];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let signers: Keypair[] = [];
let instructions: TransactionInstruction[] = [];
await startAuction(vault, wallet.publicKey, instructions);
await startAuction(vault, wallet.publicKey.toBase58(), instructions);
return { instructions, signers };
}
async function deprecatedValidateParticipationHelper(
wallet: any,
wallet: WalletSigner,
auctionManager: StringPublicKey,
whitelistedCreatorsByCreator: Record<
string,
@ -583,6 +592,8 @@ async function deprecatedValidateParticipationHelper(
participationSafetyDepositDraft: SafetyDepositDraft,
accountRentExempt: number,
): Promise<{ instructions: TransactionInstruction[]; signers: Keypair[] }> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const store = programIds().store?.toBase58();
if (!store) {
throw new Error('Store not initialized');
@ -655,7 +666,7 @@ async function findValidWhitelistedCreator(
}
async function validateBoxes(
wallet: any,
wallet: WalletSigner,
whitelistedCreatorsByCreator: Record<
string,
ParsedAccount<WhitelistedCreator>
@ -667,6 +678,8 @@ async function validateBoxes(
instructions: TransactionInstruction[][];
signers: Keypair[][];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const store = programIds().store?.toBase58();
if (!store) {
throw new Error('Store not initialized');
@ -739,12 +752,14 @@ async function validateBoxes(
async function deprecatedBuildAndPopulateOneTimeAuthorizationAccount(
connection: Connection,
wallet: any,
wallet: WalletSigner,
oneTimePrintingAuthorizationMint: StringPublicKey | undefined,
): Promise<{
instructions: TransactionInstruction[];
signers: Keypair[];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
if (!oneTimePrintingAuthorizationMint)
return { instructions: [], signers: [] };
let signers: Keypair[] = [];

View File

@ -4,10 +4,17 @@ import {
SystemProgram,
TransactionInstruction,
} from '@solana/web3.js';
import { utils, actions, StringPublicKey, toPublicKey } from '@oyster/common';
import {
utils,
actions,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import BN from 'bn.js';
import { QUOTE_MINT } from '../constants';
const {
updateExternalPriceAccount,
ExternalPriceAccount,
@ -17,13 +24,15 @@ const {
// This command creates the external pricing oracle
export async function createExternalPriceAccount(
connection: Connection,
wallet: any,
wallet: WalletSigner,
): Promise<{
priceMint: StringPublicKey;
externalPriceAccount: StringPublicKey;
instructions: TransactionInstruction[];
signers: Keypair[];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const PROGRAM_IDS = utils.programIds();
let signers: Keypair[] = [];

View File

@ -11,16 +11,19 @@ import {
findProgramAddress,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { AccountLayout, MintLayout } from '@solana/spl-token';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
const { createTokenAccount, initVault, MAX_VAULT_SIZE, VAULT_PREFIX } = actions;
// This command creates the external pricing oracle a vault
// This gets the vault ready for adding the tokens.
export async function createVault(
connection: Connection,
wallet: any,
wallet: WalletSigner,
priceMint: StringPublicKey,
externalPriceAccount: StringPublicKey,
): Promise<{
@ -31,6 +34,8 @@ export async function createVault(
instructions: TransactionInstruction[];
signers: Keypair[];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const PROGRAM_IDS = utils.programIds();
let signers: Keypair[] = [];

View File

@ -4,19 +4,23 @@ import {
setAuctionAuthority,
setVaultAuthority,
TokenAccount,
WalletSigner,
} from '@oyster/common';
import { AuctionView } from '../hooks';
import { AuctionManagerStatus } from '../models/metaplex';
import { decommissionAuctionManager } from '../models/metaplex/decommissionAuctionManager';
import { claimUnusedPrizes } from './claimUnusedPrizes';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
export async function decommAuctionManagerAndReturnPrizes(
connection: Connection,
wallet: any,
wallet: WalletSigner,
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let signers: Array<Keypair[]> = [];
let instructions: Array<TransactionInstruction[]> = [];

View File

@ -2,8 +2,9 @@ import { Keypair, TransactionInstruction } from '@solana/web3.js';
import {
deprecatedCreateReservationList,
StringPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import { SafetyDepositInstructionTemplate } from './addTokensToVault';
import { WinningConfigType } from '../models/metaplex';
@ -11,13 +12,15 @@ const BATCH_SIZE = 10;
// This command batches out creating reservation lists for those tokens who are being sold in PrintingV1 mode.
// Reservation lists are used to insure printing order among limited editions.
export async function deprecatedCreateReservationListForTokens(
wallet: any,
wallet: WalletSigner,
auctionManager: StringPublicKey,
safetyDepositInstructionTemplates: SafetyDepositInstructionTemplate[],
): Promise<{
instructions: Array<TransactionInstruction[]>;
signers: Array<Keypair[]>;
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let batchCounter = 0;
let signers: Array<Keypair[]> = [];

View File

@ -8,8 +8,9 @@ import {
ParsedAccount,
MetadataKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import BN from 'bn.js';
import { SafetyDepositInstructionTemplate } from './addTokensToVault';
@ -18,13 +19,15 @@ const BATCH_SIZE = 4;
// for all relevant NFTs.
export async function deprecatedPopulatePrintingTokens(
connection: Connection,
wallet: any,
wallet: WalletSigner,
safetyDepositConfigs: SafetyDepositInstructionTemplate[],
): Promise<{
instructions: Array<TransactionInstruction[]>;
signers: Array<Keypair[]>;
safetyDepositConfigs: SafetyDepositInstructionTemplate[];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const PROGRAM_IDS = utils.programIds();
let batchCounter = 0;

View File

@ -7,13 +7,15 @@ import {
CreateAuctionArgs,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
const { AUCTION_PREFIX, createAuction } = actions;
// This command makes an auction
export async function makeAuction(
wallet: any,
wallet: WalletSigner,
vault: StringPublicKey,
auctionSettings: IPartialCreateAuctionArgs,
): Promise<{
@ -21,6 +23,8 @@ export async function makeAuction(
instructions: TransactionInstruction[];
signers: Keypair[];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const PROGRAM_IDS = utils.programIds();
let signers: Keypair[] = [];

View File

@ -1,12 +1,18 @@
import { Keypair, Connection, TransactionInstruction } from '@solana/web3.js';
import { updatePrimarySaleHappenedViaToken } from '@oyster/common';
import {
updatePrimarySaleHappenedViaToken,
WalletSigner,
} from '@oyster/common';
import { SafetyDepositDraft } from './createAuctionManager';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
const SALE_TRANSACTION_SIZE = 10;
export async function markItemsThatArentMineAsSold(
wallet: any,
wallet: WalletSigner,
safetyDepositDrafts: SafetyDepositDraft[],
): Promise<{ instructions: TransactionInstruction[][]; signers: Keypair[][] }> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let signers: Array<Keypair[]> = [];
let instructions: Array<TransactionInstruction[]> = [];
@ -20,7 +26,7 @@ export async function markItemsThatArentMineAsSold(
if (
!item.info.data.creators?.find(
c => c.address === wallet.publicKey.toBase58(),
c => c.address === wallet.publicKey!.toBase58(),
) &&
!item.info.primarySaleHappened
) {

View File

@ -13,10 +13,10 @@ import {
findProgramAddress,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import React from 'react';
import { MintLayout, Token } from '@solana/spl-token';
import { WalletAdapter } from '@solana/wallet-base';
import {
Keypair,
Connection,
@ -41,7 +41,7 @@ interface IArweaveResult {
export const mintNFT = async (
connection: Connection,
wallet: WalletAdapter | undefined,
wallet: WalletSigner | undefined,
env: ENV,
files: File[],
metadata: {
@ -59,9 +59,7 @@ export const mintNFT = async (
): Promise<{
metadataAccount: StringPublicKey;
} | void> => {
if (!wallet?.publicKey) {
return;
}
if (!wallet?.publicKey) return;
const metadataContent = {
name: metadata.name,
@ -305,7 +303,7 @@ export const mintNFT = async (
};
export const prepPayForFilesTxn = async (
wallet: WalletAdapter,
wallet: WalletSigner,
files: File[],
metadata: any,
): Promise<{

View File

@ -3,20 +3,24 @@ import {
SequenceType,
sendTransactions,
sendTransactionWithRetry,
WalletSigner,
} from '@oyster/common';
import { WhitelistedCreator } from '../models/metaplex';
import { setStore } from '../models/metaplex/setStore';
import { setWhitelistedCreator } from '../models/metaplex/setWhitelistedCreator';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
// TODO if this becomes very slow move to batching txns like we do with settle.ts
// but given how little this should be used keep it simple
export async function saveAdmin(
connection: Connection,
wallet: any,
wallet: WalletSigner,
isPublic: boolean,
whitelistedCreators: WhitelistedCreator[],
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let signers: Array<Keypair[]> = [];
let instructions: Array<TransactionInstruction[]> = [];

View File

@ -10,19 +10,21 @@ import {
toLamports,
ParsedAccount,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import { AccountLayout, MintInfo } from '@solana/spl-token';
import { AuctionView } from '../hooks';
import BN from 'bn.js';
import { setupCancelBid } from './cancelBid';
import { QUOTE_MINT } from '../constants';
const { createTokenAccount } = actions;
const { approve } = models;
export async function sendPlaceBid(
connection: Connection,
wallet: any,
wallet: WalletSigner,
bidderTokenAccount: string | undefined,
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
@ -57,7 +59,7 @@ export async function sendPlaceBid(
export async function setupPlaceBid(
connection: Connection,
wallet: any,
wallet: WalletSigner,
bidderTokenAccount: string | undefined,
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
@ -66,6 +68,8 @@ export async function setupPlaceBid(
overallInstructions: TransactionInstruction[][],
overallSigners: Keypair[][],
): Promise<BN> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let signers: Keypair[] = [];
let instructions: TransactionInstruction[] = [];
let cleanupInstructions: TransactionInstruction[] = [];

View File

@ -27,8 +27,9 @@ import {
BidStateType,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
import { AccountLayout, MintLayout, Token } from '@solana/spl-token';
import { AuctionView, AuctionViewItem } from '../hooks';
import {
@ -86,7 +87,7 @@ export function eligibleForParticipationPrizeGivenWinningIndex(
export async function sendRedeemBid(
connection: Connection,
wallet: any,
wallet: WalletSigner,
payingAccount: StringPublicKey,
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
@ -94,6 +95,8 @@ export async function sendRedeemBid(
bidRedemptions: Record<string, ParsedAccount<BidRedemptionTicket>>,
bids: ParsedAccount<BidderMetadata>[],
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let signers: Array<Keypair[]> = [];
let instructions: Array<TransactionInstruction[]> = [];
@ -121,7 +124,7 @@ export async function sendRedeemBid(
MintLayout.span,
);
let winnerIndex = null;
let winnerIndex: number | null = null;
if (auctionView.myBidderPot?.pubkey)
winnerIndex = auctionView.auction.info.bidState.getWinnerIndex(
auctionView.myBidderPot?.info.bidderAct,
@ -296,12 +299,14 @@ async function setupRedeemInstructions(
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
accountRentExempt: number,
wallet: any,
wallet: WalletSigner,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
winnerIndex: number,
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let winningPrizeSigner: Keypair[] = [];
let winningPrizeInstructions: TransactionInstruction[] = [];
@ -353,13 +358,15 @@ async function setupRedeemFullRightsTransferInstructions(
auctionView: AuctionView,
accountsByMint: Map<string, TokenAccount>,
accountRentExempt: number,
wallet: any,
wallet: WalletSigner,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
item: AuctionViewItem,
winnerIndex: number,
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let winningPrizeSigner: Keypair[] = [];
let winningPrizeInstructions: TransactionInstruction[] = [];
@ -400,7 +407,7 @@ async function setupRedeemFullRightsTransferInstructions(
const metadata = await getMetadata(safetyDeposit.info.tokenMint);
await updatePrimarySaleHappenedViaToken(
metadata,
wallet.publicKey,
wallet.publicKey.toBase58(),
newTokenAccount,
winningPrizeInstructions,
);
@ -408,12 +415,14 @@ async function setupRedeemFullRightsTransferInstructions(
}
async function createMintAndAccountWithOne(
wallet: any,
wallet: WalletSigner,
receiverWallet: StringPublicKey,
mintRent: any,
instructions: TransactionInstruction[],
signers: Keypair[],
): Promise<{ mint: StringPublicKey; account: StringPublicKey }> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const mint = createMint(
instructions,
wallet.publicKey,
@ -463,7 +472,7 @@ export async function setupRedeemPrintingV2Instructions(
connection: Connection,
auctionView: AuctionView,
mintRentExempt: number,
wallet: any,
wallet: WalletSigner,
receiverWallet: StringPublicKey,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
item: AuctionViewItem,
@ -472,6 +481,8 @@ export async function setupRedeemPrintingV2Instructions(
winningIndex: number,
prizeTrackingTickets: Record<string, ParsedAccount<PrizeTrackingTicket>>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
if (!item.masterEdition || !item.metadata) {
return;
}
@ -579,13 +590,15 @@ async function deprecatedSetupRedeemPrintingV1Instructions(
accountsByMint: Map<string, TokenAccount>,
accountRentExempt: number,
mintRentExempt: number,
wallet: any,
wallet: WalletSigner,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
item: AuctionViewItem,
winnerIndex: number,
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
if (!item.masterEdition || !item.metadata) {
return;
}
@ -666,7 +679,7 @@ async function deprecatedSetupRedeemPrintingV1Instructions(
}
async function deprecatedRedeemPrintingV1Token(
wallet: any,
wallet: WalletSigner,
updateAuth: StringPublicKey,
item: AuctionViewItem,
newTokenAccount: StringPublicKey,
@ -676,6 +689,8 @@ async function deprecatedRedeemPrintingV1Token(
instructions: TransactionInstruction[][],
reservationList?: StringPublicKey,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
if (!item.masterEdition) return;
let cashInLimitedPrizeAuthorizationTokenSigner: Keypair[] = [];
let cashInLimitedPrizeAuthorizationTokenInstruction: TransactionInstruction[] =
@ -752,7 +767,7 @@ export async function setupRedeemParticipationInstructions(
accountsByMint: Map<string, TokenAccount>,
accountRentExempt: number,
mintRentExempt: number,
wallet: any,
wallet: WalletSigner,
receiverWallet: StringPublicKey,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
bidRedemption: ParsedAccount<BidRedemptionTicket> | undefined,
@ -761,6 +776,8 @@ export async function setupRedeemParticipationInstructions(
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
if (!item.masterEdition || !item.metadata) {
return;
}
@ -886,12 +903,14 @@ async function deprecatedSetupRedeemParticipationInstructions(
accountsByMint: Map<string, TokenAccount>,
accountRentExempt: number,
mintRentExempt: number,
wallet: any,
wallet: WalletSigner,
safetyDeposit: ParsedAccount<SafetyDepositBox>,
item: AuctionViewItem,
signers: Array<Keypair[]>,
instructions: Array<TransactionInstruction[]>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const me = item.masterEdition as ParsedAccount<MasterEditionV1>;
const participationState: ParticipationStateV1 | null = (
auctionView.auctionManager.instance.info as AuctionManagerV1

View File

@ -3,13 +3,17 @@ import {
sendTransactionWithRetry,
signMetadata,
StringPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
export async function sendSignMetadata(
connection: Connection,
wallet: any,
wallet: WalletSigner,
metadata: StringPublicKey,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let signers: Keypair[] = [];
let instructions: TransactionInstruction[] = [];

View File

@ -3,11 +3,13 @@ import {
setAuctionAuthority,
setVaultAuthority,
StringPublicKey,
WalletSigner,
} from '@oyster/common';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
// This command sets the authorities on the vault and auction to be the newly created auction manager.
export async function setVaultAndAuctionAuthorities(
wallet: any,
wallet: WalletSigner,
vault: StringPublicKey,
auction: StringPublicKey,
auctionManager: StringPublicKey,
@ -15,6 +17,8 @@ export async function setVaultAndAuctionAuthorities(
instructions: TransactionInstruction[];
signers: Keypair[];
}> {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let signers: Keypair[] = [];
let instructions: TransactionInstruction[] = [];

View File

@ -16,6 +16,7 @@ import {
AuctionState,
TokenAccount,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { AuctionView } from '../hooks';
@ -24,13 +25,14 @@ import { claimBid } from '../models/metaplex/claimBid';
import { emptyPaymentAccount } from '../models/metaplex/emptyPaymentAccount';
import { QUOTE_MINT } from '../constants';
import { setupPlaceBid } from './sendPlaceBid';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
const BATCH_SIZE = 10;
const SETTLE_TRANSACTION_SIZE = 6;
const CLAIM_TRANSACTION_SIZE = 6;
export async function settle(
connection: Connection,
wallet: any,
wallet: WalletSigner,
auctionView: AuctionView,
bidsToClaim: ParsedAccount<BidderPot>[],
payingAccount: string | undefined,
@ -68,9 +70,11 @@ export async function settle(
async function emptyPaymentAccountForAllTokens(
connection: Connection,
wallet: any,
wallet: WalletSigner,
auctionView: AuctionView,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
const PROGRAM_IDS = programIds();
let signers: Array<Array<Keypair[]>> = [];
let instructions: Array<Array<TransactionInstruction[]>> = [];
@ -211,7 +215,7 @@ async function emptyPaymentAccountForAllTokens(
async function claimAllBids(
connection: Connection,
wallet: any,
wallet: WalletSigner,
auctionView: AuctionView,
bids: ParsedAccount<BidderPot>[],
) {

View File

@ -1,11 +1,11 @@
import { Connection, Keypair, TransactionInstruction } from '@solana/web3.js';
import { startAuction } from '../models/metaplex';
import { notify, sendTransactionWithRetry } from '@oyster/common';
import { notify, sendTransactionWithRetry, WalletSigner } from '@oyster/common';
import { AuctionView } from '../hooks';
export async function startAuctionManually(
connection: Connection,
wallet: any,
wallet: WalletSigner,
auctionView: AuctionView,
) {
try {

View File

@ -11,23 +11,27 @@ import {
decodeExternalPriceAccount,
findProgramAddress,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import BN from 'bn.js';
import { closeVault } from './closeVault';
import { WalletNotConnectedError } from '@solana/wallet-adapter-base';
const BATCH_SIZE = 1;
// Given a vault you own, unwind all the tokens out of it.
export async function unwindVault(
connection: Connection,
wallet: any,
wallet: WalletSigner,
vault: ParsedAccount<Vault>,
safetyDepositBoxesByVaultAndIndex: Record<
string,
ParsedAccount<SafetyDepositBox>
>,
) {
if (!wallet.publicKey) throw new WalletNotConnectedError();
let batchCounter = 0;
const PROGRAM_IDS = programIds();
let signers: Array<Keypair[]> = [];

View File

@ -1,16 +1,17 @@
import React, { useMemo } from 'react';
import { Link } from 'react-router-dom';
import { Button, Dropdown, Menu } from 'antd';
import { ConnectButton, CurrentUserBadge, useWallet } from '@oyster/common';
import { ConnectButton, CurrentUserBadge } from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { Notifications } from '../Notifications';
import useWindowDimensions from '../../utils/layout';
import { MenuOutlined } from '@ant-design/icons';
import { useMeta } from '../../contexts';
const UserActions = () => {
const { wallet } = useWallet();
const { publicKey } = useWallet();
const { whitelistedCreatorsByCreator, store } = useMeta();
const pubkey = wallet?.publicKey?.toBase58() || '';
const pubkey = publicKey?.toBase58() || '';
const canCreate = useMemo(() => {
return (
@ -115,8 +116,7 @@ export const AppBar = () => {
<div className="divider" />
<MetaplexMenu />
</div>
{!connected && <ConnectButton type="primary" />}
{connected && (
{connected ? (
<div className="app-right app-bar-box">
<UserActions />
<CurrentUserBadge
@ -125,6 +125,8 @@ export const AppBar = () => {
iconSize={24}
/>
</div>
) : (
<ConnectButton type="primary" allowWalletChange />
)}
</>
);

View File

@ -22,19 +22,25 @@ const MeshArtContent = ({
style?: React.CSSProperties;
files?: (MetadataFile | string)[];
}) => {
const renderURL = files && files.length > 0 && typeof files[0] === 'string' ? files[0] : animationUrl;
const renderURL =
files && files.length > 0 && typeof files[0] === 'string'
? files[0]
: animationUrl;
const { isLoading } = useCachedImage(renderURL || '', true);
if (isLoading) {
return <CachedImageContent
uri={uri}
className={className}
preview={false}
style={{ width: 300, ...style }}/>;
return (
<CachedImageContent
uri={uri}
className={className}
preview={false}
style={{ width: 300, ...style }}
/>
);
}
return <MeshViewer url={renderURL} className={className} style={style} />;
}
};
const CachedImageContent = ({
uri,
@ -50,7 +56,8 @@ const CachedImageContent = ({
const [loaded, setLoaded] = useState<boolean>(false);
const { cachedBlob } = useCachedImage(uri || '');
return <Image
return (
<Image
src={cachedBlob}
preview={preview}
wrapperClassName={className}
@ -62,7 +69,8 @@ const CachedImageContent = ({
placeholder={<ThreeDots />}
{...(loaded ? {} : { height: 200 })}
/>
}
);
};
const VideoArtContent = ({
className,
@ -95,7 +103,7 @@ const VideoArtContent = ({
}, [active, playerApi]);
const likelyVideo = (files || []).filter((f, index, arr) => {
if(typeof f !== 'string') {
if (typeof f !== 'string') {
return false;
}
@ -103,8 +111,9 @@ const VideoArtContent = ({
return arr.length >= 2 ? index === 1 : index === 0;
})?.[0] as string;
const content = (
likelyVideo && likelyVideo.startsWith('https://watch.videodelivery.net/') ? (
const content =
likelyVideo &&
likelyVideo.startsWith('https://watch.videodelivery.net/') ? (
<div className={`${className} square`}>
<Stream
streamRef={(e: any) => playerRef(e)}
@ -133,19 +142,23 @@ const VideoArtContent = ({
loop={true}
poster={uri}
>
{likelyVideo && <source src={likelyVideo} type="video/mp4" style={style} />}
{animationURL && <source src={animationURL} type="video/mp4" style={style} />}
{files?.filter(f => typeof f !== 'string').map((f: any) => <source src={f.uri} type={f.type} style={style} />)}
{likelyVideo && (
<source src={likelyVideo} type="video/mp4" style={style} />
)}
{animationURL && (
<source src={animationURL} type="video/mp4" style={style} />
)}
{files
?.filter(f => typeof f !== 'string')
.map((f: any) => (
<source src={f.uri} type={f.type} style={style} />
))}
</video>
)
);
);
return content;
};
export const ArtContent = ({
category,
className,
@ -168,7 +181,7 @@ export const ArtContent = ({
ref?: Ref<HTMLDivElement>;
active?: boolean;
allowMeshRender?: boolean;
pubkey?: PublicKey | string,
pubkey?: PublicKey | string;
uri?: string;
animationURL?: string;
files?: (MetadataFile | string)[];
@ -189,32 +202,56 @@ export const ArtContent = ({
animationURL = animationURL || '';
const animationUrlExt = new URLSearchParams(getLast(animationURL.split("?"))).get("ext");
const animationUrlExt = new URLSearchParams(
getLast(animationURL.split('?')),
).get('ext');
if (allowMeshRender && (category === 'vr' || animationUrlExt === 'glb' || animationUrlExt === 'gltf')) {
return <MeshArtContent
uri={uri}
animationUrl={animationURL}
className={className}
style={style}
files={files}/>;
if (
allowMeshRender &&
(category === 'vr' ||
animationUrlExt === 'glb' ||
animationUrlExt === 'gltf')
) {
return (
<MeshArtContent
uri={uri}
animationUrl={animationURL}
className={className}
style={style}
files={files}
/>
);
}
const content = category === 'video' ? (
<VideoArtContent
className={className}
style={style}
files={files}
uri={uri}
animationURL={animationURL}
active={active}
/>
) : (
<CachedImageContent uri={uri}
className={className}
preview={preview}
style={style}/>
);
const content =
category === 'video' ? (
<VideoArtContent
className={className}
style={style}
files={files}
uri={uri}
animationURL={animationURL}
active={active}
/>
) : (
<CachedImageContent
uri={uri}
className={className}
preview={preview}
style={style}
/>
);
return <div ref={ref as any} style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>{content}</div>;
return (
<div
ref={ref as any}
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
{content}
</div>
);
};

View File

@ -1,11 +1,10 @@
import React, { useMemo, useState } from 'react';
import React, { useCallback, useMemo, useState } from 'react';
import { Col, Button, InputNumber, Spin } from 'antd';
import { MemoryRouter, Route, Redirect, Link } from 'react-router-dom';
import {
useConnection,
useUserAccounts,
contexts,
MetaplexModal,
MetaplexOverlay,
formatAmount,
@ -20,7 +19,9 @@ import {
BidderMetadata,
MAX_METADATA_LEN,
MAX_EDITION_LEN,
useWalletModal,
} from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { AuctionView, useBidsForAuction, useUserBalance } from '../../hooks';
import { sendPlaceBid } from '../../actions/sendPlaceBid';
import { AuctionNumbers } from './../AuctionNumbers';
@ -43,8 +44,6 @@ import {
MAX_PRIZE_TRACKING_TICKET_SIZE,
} from '../../models/metaplex';
const { useWallet } = contexts.Wallet;
async function calculateTotalCostOfRedeemingOtherPeoplesBids(
connection: Connection,
auctionView: AuctionView,
@ -183,7 +182,14 @@ export const AuctionCard = ({
action?: JSX.Element;
}) => {
const connection = useConnection();
const { wallet, connected, connect } = useWallet();
const wallet = useWallet();
const { setVisible } = useWalletModal();
const connect = useCallback(
() => (wallet.wallet ? wallet.connect().catch() : setVisible(true)),
[wallet.wallet, wallet.connect, setVisible],
);
const mintInfo = useMint(auctionView.auction.info.tokenMint);
const { prizeTrackingTickets, bidRedemptions } = useMeta();
const bids = useBidsForAuction(auctionView.auction.pubkey);
@ -207,7 +213,7 @@ export const AuctionCard = ({
const balance = useUserBalance(mintKey);
const myPayingAccount = balance.accounts[0];
let winnerIndex = null;
let winnerIndex: number | null = null;
if (auctionView.myBidderPot?.pubkey)
winnerIndex = auctionView.auction.info.bidState.getWinnerIndex(
auctionView.myBidderPot?.info.bidderAct,
@ -256,7 +262,7 @@ export const AuctionCard = ({
again.
</span>
)}
{!hideDefaultAction && connected && auctionView.auction.info.ended() && (
{!hideDefaultAction && wallet.connected && auctionView.auction.info.ended() && (
<Button
type="primary"
size="large"
@ -334,7 +340,7 @@ export const AuctionCard = ({
)}
{!hideDefaultAction &&
connected &&
wallet.connected &&
!auctionView.auction.info.ended() &&
(isAuctionNotStarted && !isAuctionManagerAuthorityNotWalletOwner ? (
<Button
@ -368,7 +374,7 @@ export const AuctionCard = ({
</Button>
))}
{!hideDefaultAction && !connected && (
{!hideDefaultAction && !wallet.connected && (
<Button
type="primary"
size="large"
@ -644,7 +650,7 @@ export const AuctionCard = ({
<Button
onClick={() => {
window.open(
`https://ftx.com/pay/request?coin=SOL&address=${wallet?.publicKey?.toBase58()}&tag=&wallet=sol&memoIsRequired=false`,
`https://ftx.com/pay/request?coin=SOL&address=${wallet.publicKey?.toBase58()}&tag=&wallet=sol&memoIsRequired=false`,
'_blank',
'resizable,width=680,height=860',
);

View File

@ -1,39 +1,42 @@
import React, { useContext, useEffect, useMemo, useRef } from "react";
import React, { useContext, useEffect, useMemo, useRef } from 'react';
import confetti from 'canvas-confetti';
export interface ConfettiContextState {
dropConfetti: () => void;
}
const ConfettiContext = React.createContext<ConfettiContextState | null>(
null,
);
const ConfettiContext = React.createContext<ConfettiContextState | null>(null);
export const ConfettiProvider = ({ children = null as any }) => {
const canvasRef = useRef<HTMLCanvasElement>();
const confettiRef = useRef<confetti.CreateTypes>();
const dropConfetti = useMemo(() => (() => {
if(confettiRef.current && canvasRef.current){
canvasRef.current.style.visibility = 'visible';
confettiRef.current({
particleCount: 400,
spread: 160,
origin: { y: 0.3 },
})?.finally(() => {
if(canvasRef.current) {
canvasRef.current.style.visibility = 'hidden';
}
});
}
}), []);
const dropConfetti = useMemo(
() => () => {
if (confettiRef.current && canvasRef.current) {
canvasRef.current.style.visibility = 'visible';
confettiRef
.current({
particleCount: 400,
spread: 160,
origin: { y: 0.3 },
})
?.finally(() => {
if (canvasRef.current) {
canvasRef.current.style.visibility = 'hidden';
}
});
}
},
[],
);
useEffect(() => {
if(canvasRef.current && !confettiRef.current) {
if (canvasRef.current && !confettiRef.current) {
canvasRef.current.style.visibility = 'hidden';
confettiRef.current = confetti.create(canvasRef.current, {
resize: true,
useWorker: true
useWorker: true,
});
}
}, []);
@ -44,7 +47,7 @@ export const ConfettiProvider = ({ children = null as any }) => {
position: 'absolute',
zIndex: 1,
top: 0,
left: 0
left: 0,
};
return (
@ -53,19 +56,19 @@ export const ConfettiProvider = ({ children = null as any }) => {
{children}
</ConfettiContext.Provider>
);
}
};
export const Confetti = () => {
const { dropConfetti} = useConfetti();
const { dropConfetti } = useConfetti();
useEffect(() => {
dropConfetti();
}, [dropConfetti]);
return <></>;
}
};
export const useConfetti = () => {
const context = useContext(ConfettiContext);
return context as ConfettiContextState;
}
};

View File

@ -1,48 +1,55 @@
import React from 'react'
import React from 'react';
import { DatePicker, TimePicker } from 'antd'
import { DatePicker, TimePicker } from 'antd';
interface IDateTimePicker {
momentObj: moment.Moment,
setMomentObj: Function,
datePickerProps?: Object,
timePickerProps?: Object,
momentObj: moment.Moment;
setMomentObj: Function;
datePickerProps?: Object;
timePickerProps?: Object;
}
export const DateTimePicker = (props: IDateTimePicker) => {
const { momentObj, setMomentObj, datePickerProps = {}, timePickerProps = {} } = props
return <>
<DatePicker
className="field-date"
size="large"
value={momentObj}
onChange={value => {
if (!value) return;
if (!momentObj) return setMomentObj(value);
const {
momentObj,
setMomentObj,
datePickerProps = {},
timePickerProps = {},
} = props;
return (
<>
<DatePicker
className="field-date"
size="large"
value={momentObj}
onChange={value => {
if (!value) return;
if (!momentObj) return setMomentObj(value);
const currentMoment = momentObj.clone();
currentMoment.year(value.year());
currentMoment.month(value.month());
currentMoment.date(value.date());
setMomentObj(currentMoment);
}}
{...datePickerProps}
/>
<TimePicker
className="field-date"
size="large"
value={momentObj}
onChange={value => {
if (!value) return;
if (!momentObj) return setMomentObj(value);
const currentMoment = momentObj.clone();
currentMoment.year(value.year());
currentMoment.month(value.month());
currentMoment.date(value.date());
setMomentObj(currentMoment);
}}
{...datePickerProps}
/>
<TimePicker
className="field-date"
size="large"
value={momentObj}
onChange={value => {
if (!value) return;
if (!momentObj) return setMomentObj(value);
const currentMoment = momentObj.clone();
currentMoment.hour(value.hour());
currentMoment.minute(value.minute());
currentMoment.second(value.second());
setMomentObj(currentMoment);
}}
{...timePickerProps}
/>
</>
}
const currentMoment = momentObj.clone();
currentMoment.hour(value.hour());
currentMoment.minute(value.minute());
currentMoment.second(value.second());
setMomentObj(currentMoment);
}}
{...timePickerProps}
/>
</>
);
};

View File

@ -56,7 +56,7 @@ export class MeshViewer extends React.Component<MeshViewerProps, {}> {
return;
}
// === THREE.JS CODE START ===
this.renderer = new THREE.WebGLRenderer({ antialias: true });
this.renderer = new THREE.WebGLRenderer({ antialias: true });
const width = this.threeMountRef.current.clientWidth;
const height = this.threeMountRef.current.clientHeight;
@ -119,7 +119,7 @@ export class MeshViewer extends React.Component<MeshViewerProps, {}> {
this.gltfLoader.load(
meshURL,
(gltf) => {
gltf => {
const gltfScene = gltf.scene;
if (
@ -222,7 +222,14 @@ export class MeshViewer extends React.Component<MeshViewerProps, {}> {
return (
<div
ref={this.threeMountRef}
style={{ width: `100%`, height: `100%`, minHeight: `300px`, minWidth: 150, maxHeight: 300, ...this.props.style }}
style={{
width: `100%`,
height: `100%`,
minHeight: `300px`,
minWidth: 150,
maxHeight: 300,
...this.props.style,
}}
className={`three-orbit ${this.props.className || ''}`.trim()}
/>
);

View File

@ -4,38 +4,54 @@ import { Artist } from '../../types';
import { Identicon } from '@oyster/common';
const MetaAvatarItem = (props: {
creator: Artist,
size: number,
alt?: string,
creator: Artist;
size: number;
alt?: string;
}) => {
const { creator, size, alt } = props;
const [noImage, setNoImage] = useState(false);
const image = creator.image || '';
return (<Avatar alt={alt} size={size} src={noImage ? <Identicon alt={alt} address={creator.address} style={{ width: size }} /> : image} onError={() => {
setNoImage(true);
return false;
}} /> );
}
return (
<Avatar
alt={alt}
size={size}
src={
noImage ? (
<Identicon
alt={alt}
address={creator.address}
style={{ width: size }}
/>
) : (
image
)
}
onError={() => {
setNoImage(true);
return false;
}}
/>
);
};
export const MetaAvatar = (props: {
creators?: Artist[],
showMultiple?: boolean,
size?: number
creators?: Artist[];
showMultiple?: boolean;
size?: number;
}) => {
const {
creators,
showMultiple,
} = props;
const { creators, showMultiple } = props;
let size = props.size || 32;
if(!creators || creators.length === 0) {
if (!creators || creators.length === 0) {
return <Avatar size={size} src={false} />;
}
let controls = (creators || []).map(creator => (<MetaAvatarItem creator={creator} alt={creator.name} size={size} />));
let controls = (creators || []).map(creator => (
<MetaAvatarItem creator={creator} alt={creator.name} size={size} />
));
if(!showMultiple) {
if (!showMultiple) {
return controls[0];
}

View File

@ -1,8 +1,8 @@
import React from "react"
import ContentLoader from "react-content-loader"
import React from 'react';
import ContentLoader from 'react-content-loader';
export const CardLoader = () => (
<ContentLoader
<ContentLoader
speed={2}
width={223}
height={400}
@ -10,13 +10,13 @@ export const CardLoader = () => (
backgroundColor="#0c0c0c"
foregroundColor="#595959"
>
<rect x="9" y="0" rx="14" ry="14" width="232" height="240" />
<circle cx="39" cy="296" r="15" />
<rect x="24" y="251" rx="0" ry="6" width="123" height="21" />
<rect x="24" y="322" rx="6" ry="6" width="44" height="25" />
<rect x="9" y="0" rx="14" ry="14" width="232" height="240" />
<circle cx="39" cy="296" r="15" />
<rect x="24" y="251" rx="0" ry="6" width="123" height="21" />
<rect x="24" y="322" rx="6" ry="6" width="44" height="25" />
{/* <rect x="9" y="320" rx="5" ry="6" width="232" height="54" /> */}
</ContentLoader>
)
);
export const ThreeDots = () => (
<ContentLoader
@ -25,12 +25,12 @@ export const ThreeDots = () => (
width={212}
backgroundColor="transparent"
style={{
width: "100%",
margin: "auto",
width: '100%',
margin: 'auto',
}}
>
<circle cx="86" cy="100" r="8" />
<circle cx="106" cy="100" r="8" />
<circle cx="126" cy="100" r="8" />
</ContentLoader>
)
);

View File

@ -11,10 +11,11 @@ import {
toPublicKey,
useConnection,
useUserAccounts,
useWallet,
VaultState,
WalletSigner,
} from '@oyster/common';
import { Connection, PublicKey } from '@solana/web3.js';
import { useWallet } from '@solana/wallet-adapter-react';
import { Connection } from '@solana/web3.js';
import { Badge, Popover, List } from 'antd';
import React, { useEffect, useMemo, useState } from 'react';
import { Link } from 'react-router-dom';
@ -24,11 +25,10 @@ import { sendSignMetadata } from '../../actions/sendSignMetadata';
import { unwindVault } from '../../actions/unwindVault';
import { settle } from '../../actions/settle';
import { startAuctionManually } from '../../actions/startAuctionManually';
import { QUOTE_MINT } from '../../constants';
import { useMeta } from '../../contexts';
import { AuctionViewState, useAuctions } from '../../hooks';
import { WalletAdapter } from '@solana/wallet-base';
interface NotificationCard {
id: string;
title: string;
@ -99,10 +99,11 @@ function RunAction({
}
export async function getPersonalEscrowAta(
wallet: WalletAdapter | undefined,
wallet: WalletSigner | undefined,
): Promise<StringPublicKey | undefined> {
const PROGRAM_IDS = programIds();
if (!wallet?.publicKey) return undefined;
if (!wallet?.publicKey) return;
return (
await findProgramAddress(
[
@ -121,7 +122,7 @@ export function useCollapseWrappedSol({
notifications,
}: {
connection: Connection;
wallet: WalletAdapter | undefined;
wallet: WalletSigner;
notifications: NotificationCard[];
}) {
const [showNotification, setShowNotification] = useState(false);
@ -173,7 +174,7 @@ export function useSettlementAuctions({
notifications,
}: {
connection: Connection;
wallet: WalletAdapter | undefined;
wallet: WalletSigner;
notifications: NotificationCard[];
}) {
const { accountByMint } = useUserAccounts();
@ -272,7 +273,7 @@ export function useSettlementAuctions({
myPayingAccount?.pubkey,
accountByMint,
);
if (wallet?.publicKey) {
if (wallet.publicKey) {
const ata = await getPersonalEscrowAta(wallet);
if (ata) await closePersonalEscrow(connection, wallet, ata);
}
@ -300,12 +301,12 @@ export function Notifications() {
const upcomingAuctions = useAuctions(AuctionViewState.Upcoming);
const connection = useConnection();
const { wallet } = useWallet();
const wallet = useWallet();
const { accountByMint } = useUserAccounts();
const notifications: NotificationCard[] = [];
const walletPubkey = wallet?.publicKey?.toBase58() || '';
const walletPubkey = wallet.publicKey?.toBase58() || '';
useCollapseWrappedSol({ connection, wallet, notifications });

View File

@ -1,8 +1,8 @@
import React from 'react';
import { Button, Select } from 'antd';
import { contexts } from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
const { useWallet } = contexts.Wallet;
const { ENDPOINTS, useConnectionConfig } = contexts.Connection;
export const Settings = () => {

View File

@ -1,11 +1,7 @@
import React from 'react';
import { Col, Button } from 'antd';
import {
useArt,
} from '../../hooks';
import {
useConnectionConfig,
} from '@oyster/common';
import { useArt } from '../../hooks';
import { useConnectionConfig } from '@oyster/common';
export const ViewOn = ({ id }: { id: string }) => {
const { env } = useConnectionConfig();

View File

@ -13,9 +13,8 @@ export const solToUSD = async (): Promise<number> => {
return resp.solana.usd;
};
const CoingeckoContext = React.createContext<CoingeckoContextState | null>(
null,
);
const CoingeckoContext =
React.createContext<CoingeckoContextState | null>(null);
export function CoingeckoProvider({ children = null as any }) {
const [solPrice, setSolPrice] = useState<number>(0);
@ -31,10 +30,10 @@ export function CoingeckoProvider({ children = null as any }) {
timerId = window.setTimeout(async () => {
queryPrice();
}, COINGECKO_POOL_INTERVAL);
}
};
queryPrice();
return () => {
return () => {
clearTimeout(timerId);
};
}, [setSolPrice]);
@ -55,4 +54,4 @@ export const useSolPrice = () => {
const { solPrice } = useCoingecko();
return solPrice;
}
};

View File

@ -205,7 +205,10 @@ export const loadAccounts = async (connection: Connection, all: boolean) => {
if (additionalPromises.length > 0) {
console.log('Pulling editions for optimized metadata');
let setOf100MetadataEditionKeys: string[] = [];
const editionPromises = [];
const editionPromises: Promise<{
keys: string[];
array: AccountInfo<Buffer>[];
}>[] = [];
for (let i = 0; i < tempCache.metadata.length; i++) {
let edition: StringPublicKey;

View File

@ -87,7 +87,10 @@ export function MetaProvider({ children = null as any }) {
async metadataByMint => {
try {
if (!all) {
const {metadata, mintToMetadata} = await queryExtendedMetadata(connection, metadataByMint);
const { metadata, mintToMetadata } = await queryExtendedMetadata(
connection,
metadataByMint,
);
setState(current => ({
...current,
metadata,
@ -122,7 +125,7 @@ export function MetaProvider({ children = null as any }) {
const updateStateValue = useMemo<UpdateStateValueFunc>(
() => (prop, key, value) => {
setState(current => makeSetter({...current})(prop, key, value));
setState(current => makeSetter({ ...current })(prop, key, value));
},
[setState],
);
@ -221,4 +224,3 @@ export const useMeta = () => {
const context = useContext(MetaContext);
return context;
};

View File

@ -12,7 +12,7 @@ import {
MasterEditionV2,
PublicKeyStringAndAccount,
} from '@oyster/common';
import { AccountInfo, PublicKey, PublicKeyAndAccount } from '@solana/web3.js';
import { AccountInfo, PublicKey } from '@solana/web3.js';
import {
BidRedemptionTicket,
Store,

View File

@ -1,4 +1,5 @@
import { StringPublicKey, useWallet } from '@oyster/common';
import { StringPublicKey } from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { useEffect, useState } from 'react';
import {
AuctionView,
@ -8,12 +9,12 @@ import {
import { useMeta } from '../contexts';
export const useAuction = (id: StringPublicKey) => {
const { wallet } = useWallet();
const { publicKey } = useWallet();
const cachedRedemptionKeys = useCachedRedemptionKeysByWallet();
const [existingAuctionView, setAuctionView] =
useState<AuctionView | undefined>(undefined);
const walletPubkey = wallet?.publicKey?.toBase58();
const walletPubkey = publicKey?.toBase58();
const {
auctions,
auctionManagersByAuction,

View File

@ -9,9 +9,9 @@ import {
Vault,
MasterEditionV1,
MasterEditionV2,
useWallet,
StringPublicKey,
} from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import BN from 'bn.js';
import { useEffect, useState } from 'react';
import { useMeta } from '../contexts';
@ -62,7 +62,7 @@ export interface AuctionView {
export function useCachedRedemptionKeysByWallet() {
const { auctions, bidRedemptions } = useMeta();
const { wallet } = useWallet();
const { publicKey } = useWallet();
const [cachedRedemptionKeys, setCachedRedemptionKeys] = useState<
Record<
@ -74,27 +74,25 @@ export function useCachedRedemptionKeysByWallet() {
useEffect(() => {
(async () => {
if (wallet && wallet.publicKey) {
if (publicKey) {
const temp: Record<
string,
| ParsedAccount<BidRedemptionTicket>
| { pubkey: StringPublicKey; info: null }
> = {};
const keys = Object.keys(auctions);
const tasks = [];
const tasks: Promise<void>[] = [];
for (let i = 0; i < keys.length; i++) {
const a = keys[i];
if (!cachedRedemptionKeys[a])
//@ts-ignore
tasks.push(
getBidderKeys(
auctions[a].pubkey,
wallet.publicKey.toBase58(),
).then(key => {
temp[a] = bidRedemptions[key.bidRedemption]
? bidRedemptions[key.bidRedemption]
: { pubkey: key.bidRedemption, info: null };
}),
getBidderKeys(auctions[a].pubkey, publicKey.toBase58()).then(
key => {
temp[a] = bidRedemptions[key.bidRedemption]
? bidRedemptions[key.bidRedemption]
: { pubkey: key.bidRedemption, info: null };
},
),
);
else if (!cachedRedemptionKeys[a].info) {
temp[a] =
@ -108,16 +106,14 @@ export function useCachedRedemptionKeysByWallet() {
setCachedRedemptionKeys(temp);
}
})();
}, [auctions, bidRedemptions, wallet?.publicKey]);
}, [auctions, bidRedemptions, publicKey]);
return cachedRedemptionKeys;
}
export const useAuctions = (state?: AuctionViewState) => {
const [auctionViews, setAuctionViews] = useState<AuctionView[]>([]);
const { wallet } = useWallet();
const pubkey = wallet?.publicKey?.toBase58();
const { publicKey } = useWallet();
const cachedRedemptionKeys = useCachedRedemptionKeysByWallet();
const {
@ -140,7 +136,7 @@ export const useAuctions = (state?: AuctionViewState) => {
const map = Object.keys(auctions).reduce((agg, a) => {
const auction = auctions[a];
const nextAuctionView = processAccountsIntoAuctionView(
pubkey,
publicKey?.toBase58(),
auction,
auctionManagersByAuction,
safetyDepositBoxesByVaultAndIndex,
@ -185,7 +181,7 @@ export const useAuctions = (state?: AuctionViewState) => {
masterEditionsByPrintingMint,
masterEditionsByOneTimeAuthMint,
metadataByMasterEdition,
pubkey,
publicKey,
cachedRedemptionKeys,
setAuctionViews,
]);

View File

@ -663,7 +663,7 @@ export class SafetyDepositConfig {
// pick up participation config manually
const winnerConstraintAsNumber = args.data[offset + 1];
const nonWinnerConstraintAsNumber = args.data[offset + 2];
let fixedPrice = null;
let fixedPrice: BN | null = null;
offset += 3;
if (args.data[offset] == 1) {

View File

@ -1,4 +0,0 @@
declare module '@project-serum/sol-wallet-adapter' {
const adapter: any;
export = adapter;
}

View File

@ -19,12 +19,12 @@ import {
shortenAddress,
useConnection,
useUserAccounts,
useWallet,
StringPublicKey,
WalletSigner,
} from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { Connection } from '@solana/web3.js';
import { saveAdmin } from '../../actions/saveAdmin';
import { WalletAdapter } from '@solana/wallet-base';
import { useMemo } from 'react';
import {
convertMasterEditions,
@ -35,15 +35,15 @@ const { Content } = Layout;
export const AdminView = () => {
const { store, whitelistedCreatorsByCreator } = useMeta();
const connection = useConnection();
const { wallet, connected } = useWallet();
const wallet = useWallet();
return store && connection && wallet && connected ? (
return store && connection && wallet.connected ? (
<InnerAdminView
store={store}
whitelistedCreatorsByCreator={whitelistedCreatorsByCreator}
connection={connection}
wallet={wallet}
connected={connected}
connected={wallet.connected}
/>
) : (
<Spin />
@ -124,7 +124,7 @@ function InnerAdminView({
ParsedAccount<WhitelistedCreator>
>;
connection: Connection;
wallet: WalletAdapter;
wallet: WalletSigner;
connected: boolean;
}) {
const [newStore, setNewStore] = useState(
@ -133,10 +133,11 @@ function InnerAdminView({
const [updatedCreators, setUpdatedCreators] = useState<
Record<string, WhitelistedCreator>
>({});
const [filteredMetadata, setFilteredMetadata] = useState<{
available: ParsedAccount<MasterEditionV1>[];
unavailable: ParsedAccount<MasterEditionV1>[];
}>();
const [filteredMetadata, setFilteredMetadata] =
useState<{
available: ParsedAccount<MasterEditionV1>[];
unavailable: ParsedAccount<MasterEditionV1>[];
}>();
const [loading, setLoading] = useState<boolean>();
const { metadata, masterEditions } = useMeta();

View File

@ -4,7 +4,8 @@ import { useParams } from 'react-router-dom';
import { useArt, useExtendedArt } from './../../hooks';
import { ArtContent } from '../../components/ArtContent';
import { shortenAddress, useConnection, useWallet } from '@oyster/common';
import { shortenAddress, useConnection } from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { MetaAvatar } from '../../components/MetaAvatar';
import { sendSignMetadata } from '../../actions/sendSignMetadata';
import { ViewOn } from './../../components/ViewOn';
@ -14,7 +15,7 @@ const { Content } = Layout;
export const ArtView = () => {
const { id } = useParams<{ id: string }>();
const { wallet } = useWallet();
const wallet = useWallet();
const connection = useConnection();
const art = useArt(id);
@ -37,7 +38,7 @@ export const ArtView = () => {
const description = data?.description;
const pubkey = wallet?.publicKey?.toBase58() || '';
const pubkey = wallet.publicKey?.toBase58() || '';
const tag = (
<div className="info-header">
@ -166,7 +167,7 @@ export const ArtView = () => {
return;
}
const owner = wallet?.publicKey;
const owner = wallet.publicKey;
if(!owner) {
return;

View File

@ -21,7 +21,6 @@ import { mintNFT } from '../../actions';
import {
MAX_METADATA_LEN,
useConnection,
useWallet,
IMetadataExtension,
MetadataCategory,
useConnectionConfig,
@ -32,6 +31,7 @@ import {
MetadataFile,
StringPublicKey,
} from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { getAssetCostToStore, LAMPORT_MULTIPLIER } from '../../utils/assets';
import { Connection } from '@solana/web3.js';
import { MintLayout } from '@solana/spl-token';
@ -47,7 +47,7 @@ const { Text } = Typography;
export const ArtCreateView = () => {
const connection = useConnection();
const { env } = useConnectionConfig();
const { wallet } = useWallet();
const wallet = useWallet();
const { step_param }: { step_param: string } = useParams();
const history = useHistory();
const { width } = useWindowDimensions();
@ -742,8 +742,7 @@ const RoyaltiesStep = (props: {
confirm: () => void;
}) => {
// const file = props.attributes.image;
const { wallet, connected } = useWallet();
const { publicKey, connected } = useWallet();
const [creators, setCreators] = useState<Array<UserValue>>([]);
const [fixedCreators, setFixedCreators] = useState<Array<UserValue>>([]);
const [royalties, setRoyalties] = useState<Array<Royalty>>([]);
@ -752,8 +751,8 @@ const RoyaltiesStep = (props: {
const [isShowErrors, setIsShowErrors] = useState<boolean>(false);
useEffect(() => {
if (wallet?.publicKey) {
const key = wallet.publicKey.toBase58();
if (publicKey) {
const key = publicKey.toBase58();
setFixedCreators([
{
key,
@ -899,7 +898,7 @@ const RoyaltiesStep = (props: {
c =>
new Creator({
address: c.value,
verified: c.value === wallet?.publicKey?.toBase58(),
verified: c.value === publicKey?.toBase58(),
share:
royalties.find(r => r.creatorKey === c.value)?.amount ||
Math.round(100 / royalties.length),

View File

@ -6,7 +6,7 @@ import { Link } from 'react-router-dom';
import { useCreatorArts, useUserArts } from '../../hooks';
import { useMeta } from '../../contexts';
import { CardLoader } from '../../components/MyLoader';
import { useWallet } from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
const { TabPane } = Tabs;
@ -19,9 +19,9 @@ export enum ArtworkViewState {
}
export const ArtworksView = () => {
const { connected, wallet } = useWallet();
const { connected, publicKey } = useWallet();
const ownedMetadata = useUserArts();
const createdMetadata = useCreatorArts(wallet?.publicKey?.toBase58() || '');
const createdMetadata = useCreatorArts(publicKey?.toBase58() || '');
const { metadata, isLoading } = useMeta();
const [activeKey, setActiveKey] = useState(ArtworkViewState.Metaplex);
const breakpointColumnsObj = {
@ -32,14 +32,14 @@ export const ArtworksView = () => {
};
const items =
(activeKey === ArtworkViewState.Owned
activeKey === ArtworkViewState.Owned
? ownedMetadata.map(m => m.metadata)
: (activeKey === ArtworkViewState.Created
? createdMetadata
: metadata));
: metadata);
useEffect(() => {
if(connected) {
if (connected) {
setActiveKey(ArtworkViewState.Owned);
} else {
setActiveKey(ArtworkViewState.Metaplex);

View File

@ -11,7 +11,6 @@ import {
import { ArtContent } from '../../components/ArtContent';
import {
useConnection,
contexts,
BidderMetadata,
ParsedAccount,
cache,
@ -24,7 +23,9 @@ import {
useUserAccounts,
StringPublicKey,
toPublicKey,
WalletSigner,
} from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { useMeta } from '../../contexts';
import {
getBidderKeys,
@ -33,18 +34,16 @@ import {
PayoutTicket,
WinningConstraint,
} from '../../models/metaplex';
import { WalletAdapter } from '@solana/wallet-base';
import { Connection } from '@solana/web3.js';
import { settle } from '../../actions/settle';
import { MintInfo } from '@solana/spl-token';
const { useWallet } = contexts.Wallet;
const { Content } = Layout;
export const BillingView = () => {
const { id } = useParams<{ id: string }>();
const auctionView = useAuction(id);
const connection = useConnection();
const { wallet } = useWallet();
const wallet = useWallet();
const mint = useMint(auctionView?.auction.info.tokenMint);
return auctionView && wallet && connection && mint ? (
@ -371,7 +370,7 @@ export const InnerBillingView = ({
mint,
}: {
auctionView: AuctionView;
wallet: WalletAdapter;
wallet: WalletSigner;
connection: Connection;
mint: MintInfo;
}) => {

View File

@ -23,11 +23,11 @@ import {
useConnectionConfig,
fromLamports,
useMint,
useWallet,
AuctionState,
StringPublicKey,
toPublicKey,
} from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { MintInfo } from '@solana/spl-token';
import { getHandleAndRegistryKey } from '@solana/spl-name-service';
import useWindowDimensions from '../../utils/layout';
@ -227,9 +227,9 @@ const BidLine = (props: {
isActive?: boolean;
}) => {
const { bid, index, mint, isCancelled, isActive } = props;
const { wallet } = useWallet();
const { publicKey } = useWallet();
const bidder = bid.info.bidderPubkey;
const isme = wallet?.publicKey?.toBase58() === bidder;
const isme = publicKey?.toBase58() === bidder;
// Get Twitter Handle from address
const connection = useConnection();

View File

@ -21,7 +21,6 @@ import { ArtSelector } from './artSelector';
import {
MAX_METADATA_LEN,
useConnection,
useWallet,
WinnerLimit,
WinnerLimitType,
toLamports,
@ -34,6 +33,7 @@ import {
StringPublicKey,
} from '@oyster/common';
import { Connection, LAMPORTS_PER_SOL } from '@solana/web3.js';
import { useWallet } from '@solana/wallet-adapter-react';
import { MintLayout } from '@solana/spl-token';
import { useHistory, useParams } from 'react-router-dom';
import { capitalize } from 'lodash';
@ -125,7 +125,7 @@ export interface AuctionState {
export const AuctionCreateView = () => {
const connection = useConnection();
const { wallet } = useWallet();
const wallet = useWallet();
const { whitelistedCreatorsByCreator } = useMeta();
const { step_param }: { step_param: string } = useParams();
const history = useHistory();

View File

@ -1,4 +1,4 @@
import React, { useState, useMemo } from 'react';
import React, { useState, useMemo, useCallback } from 'react';
import { Layout, Row, Col, Tabs, Button } from 'antd';
import Masonry from 'react-masonry-css';
@ -10,11 +10,11 @@ import { Link, useHistory } from 'react-router-dom';
import { CardLoader } from '../../components/MyLoader';
import { useMeta } from '../../contexts';
import BN from 'bn.js';
import { programIds, useConnection, useWallet } from '@oyster/common';
import { programIds, useConnection, useWalletModal } from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { saveAdmin } from '../../actions/saveAdmin';
import { WhitelistedCreator } from '../../models/metaplex';
const { TabPane } = Tabs;
const { Content } = Layout;
@ -24,7 +24,7 @@ export enum LiveAuctionViewState {
Participated = '1',
Ended = '2',
Resale = '3',
};
}
export const HomeView = () => {
const auctions = useAuctions(AuctionViewState.Live);
@ -34,7 +34,14 @@ export const HomeView = () => {
const [isInitalizingStore, setIsInitalizingStore] = useState(false);
const connection = useConnection();
const history = useHistory();
const { wallet, connect, connected } = useWallet();
const wallet = useWallet();
const { setVisible } = useWalletModal();
const connect = useCallback(
() => (wallet.wallet ? wallet.connect().catch() : setVisible(true)),
[wallet.wallet, wallet.connect, setVisible],
);
const breakpointColumnsObj = {
default: 4,
1100: 3,
@ -43,7 +50,7 @@ export const HomeView = () => {
};
// Check if the auction is primary sale or not
const checkPrimarySale = (auc:AuctionView) => {
const checkPrimarySale = (auc: AuctionView) => {
var flag = 0;
auc.items.forEach(i =>
{
@ -58,13 +65,23 @@ export const HomeView = () => {
};
const resaleAuctions = auctions
.sort((a, b) => a.auction.info.endedAt?.sub(b.auction.info.endedAt || new BN(0)).toNumber() || 0)
.filter(m => checkPrimarySale(m) == true);
.sort(
(a, b) =>
a.auction.info.endedAt
?.sub(b.auction.info.endedAt || new BN(0))
.toNumber() || 0,
)
.filter(m => checkPrimarySale(m) == true);
// Removed resales from live auctions
const liveAuctions = auctions
.sort((a, b) => a.auction.info.endedAt?.sub(b.auction.info.endedAt || new BN(0)).toNumber() || 0)
.filter(a => !resaleAuctions.includes(a));
.sort(
(a, b) =>
a.auction.info.endedAt
?.sub(b.auction.info.endedAt || new BN(0))
.toNumber() || 0,
)
.filter(a => !resaleAuctions.includes(a));
let items = liveAuctions;
@ -102,9 +119,9 @@ export const HomeView = () => {
>
{!isLoading
? items.map((m, idx) => {
if (m === heroAuction) {
return;
}
if (m === heroAuction) {
return;
}
const id = m.auction.pubkey;
return (
@ -123,11 +140,10 @@ export const HomeView = () => {
columnClassName="my-masonry-grid_column"
>
{!isLoading
? auctionsEnded
.map((m, idx) => {
if (m === heroAuction) {
return;
}
? auctionsEnded.map((m, idx) => {
if (m === heroAuction) {
return;
}
const id = m.auction.pubkey;
return (
@ -153,7 +169,7 @@ export const HomeView = () => {
inside <em>packages/web/.env</em> and restart yarn
</p>
)}
{CURRENT_STORE && !wallet?.publicKey && (
{CURRENT_STORE && !wallet.publicKey && (
<p>
<Button type="primary" className="app-btn" onClick={connect}>
Connect
@ -161,7 +177,7 @@ export const HomeView = () => {
to configure store.
</p>
)}
{CURRENT_STORE && wallet?.publicKey && (
{CURRENT_STORE && wallet.publicKey && (
<>
<p>
Initializing store will allow you to control list of creators.
@ -173,7 +189,7 @@ export const HomeView = () => {
loading={isInitalizingStore}
disabled={!CURRENT_STORE}
onClick={async () => {
if (!wallet?.publicKey) {
if (!wallet.publicKey) {
return;
}
@ -181,7 +197,7 @@ export const HomeView = () => {
await saveAdmin(connection, wallet, false, [
new WhitelistedCreator({
address: wallet?.publicKey.toBase58(),
address: wallet.publicKey.toBase58(),
activated: true,
}),
]);
@ -201,9 +217,12 @@ export const HomeView = () => {
<Layout>
<Content style={{ display: 'flex', flexWrap: 'wrap' }}>
<Col style={{ width: '100%', marginTop: 10 }}>
{liveAuctions.length >= 0 && (<Row>
<Tabs activeKey={activeKey}
onTabClick={key => setActiveKey(key as LiveAuctionViewState)}>
{liveAuctions.length >= 0 && (
<Row>
<Tabs
activeKey={activeKey}
onTabClick={key => setActiveKey(key as LiveAuctionViewState)}
>
<TabPane
tab={<span className="tab-title">Live Auctions</span>}
key={LiveAuctionViewState.All}
@ -211,25 +230,27 @@ export const HomeView = () => {
{liveAuctionsView}
</TabPane>
{auctionsEnded.length > 0 && (
<TabPane
tab={<span className="tab-title">Secondary Marketplace</span>}
key={LiveAuctionViewState.Resale}
>
{liveAuctionsView}
</TabPane>
<TabPane
tab={
<span className="tab-title">Secondary Marketplace</span>
}
key={LiveAuctionViewState.Resale}
>
{liveAuctionsView}
</TabPane>
)}
{auctionsEnded.length > 0 && (
<TabPane
tab={<span className="tab-title">Ended Auctions</span>}
key={LiveAuctionViewState.Ended}
>
{endedAuctions}
</TabPane>
<TabPane
tab={<span className="tab-title">Ended Auctions</span>}
key={LiveAuctionViewState.Ended}
>
{endedAuctions}
</TabPane>
)}
{
// Show all participated live and ended auctions except hero auction
}
{connected && (
{wallet.connected && (
<TabPane
tab={<span className="tab-title">Participated</span>}
key={LiveAuctionViewState.Participated}
@ -237,8 +258,9 @@ export const HomeView = () => {
{liveAuctionsView}
</TabPane>
)}
</Tabs>
</Row>)}
</Tabs>
</Row>
)}
</Col>
</Content>
</Layout>

View File

@ -15,6 +15,7 @@
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"noImplicitAny": false,
"resolveJsonModule": true,
"isolatedModules": true,
"downlevelIteration": true,

View File

@ -339,7 +339,7 @@
dependencies:
regenerator-runtime "^0.12.0"
"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.4", "@babel/runtime@^7.10.5", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7":
"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.4", "@babel/runtime@^7.10.5", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.5.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7":
version "7.14.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.0.tgz#46794bc20b612c5f75e62dd071e24dfd95f1cbe6"
integrity sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==
@ -992,44 +992,44 @@
dependencies:
"@json-rpc-tools/types" "^1.6.1"
"@ledgerhq/devices@^5.51.1":
version "5.51.1"
resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.51.1.tgz#d741a4a5d8f17c2f9d282fd27147e6fe1999edb7"
integrity sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA==
"@ledgerhq/devices@^6.3.0":
version "6.3.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-6.3.0.tgz#7ee59614198882311d1805912e368451527d05b2"
integrity sha512-DmVxqMAf3FhkpKjkbBCFVJ5DmesfplujeCLzFwO/zF5VGuwY7xxPqeSxlpusXJkqhEq+DbFzIDRWJYDf7rtXqg==
dependencies:
"@ledgerhq/errors" "^5.50.0"
"@ledgerhq/logs" "^5.50.0"
"@ledgerhq/errors" "^6.2.0"
"@ledgerhq/logs" "^6.2.0"
rxjs "6"
semver "^7.3.5"
"@ledgerhq/errors@^5.50.0":
version "5.50.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.50.0.tgz#e3a6834cb8c19346efca214c1af84ed28e69dad9"
integrity sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==
"@ledgerhq/errors@^6.2.0":
version "6.2.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.2.0.tgz#7dc2b3bf6bdedccdaa1b97dccacfa912c4fc22f8"
integrity sha512-eO03x8HJmG60WtlrMuahigW/rwywFdcGzCnihta/MjkM8BD9A660cKVkyIuheCcpaB7UV/r+QsRl9abHbjjaag==
"@ledgerhq/hw-transport-webusb@^5.41.0":
version "5.51.1"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-5.51.1.tgz#664a46dcde36ff78107dea44e32a1647d8e2e93f"
integrity sha512-k35KUlMT8I4X/Zj89sRrIyQ8ApSWSRc/uF/eu6Qv+0cp9mMIty/cfg9v0sBwJ3EA9FHQGY5jJHxJrWPWnZLMOg==
"@ledgerhq/hw-transport-webhid@^6.2.0":
version "6.4.1"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.4.1.tgz#81f0939c95154b47e00c7e95d6ccdfdbd3f883bc"
integrity sha512-usMuN/WpbReNk7/bKCCM9MKuqM2DlidJbgMFUqXpa1VAlDPI0M7lVhcutXTzILzgDNySMb0HLmRkio8zRXgRZg==
dependencies:
"@ledgerhq/devices" "^5.51.1"
"@ledgerhq/errors" "^5.50.0"
"@ledgerhq/hw-transport" "^5.51.1"
"@ledgerhq/logs" "^5.50.0"
"@ledgerhq/devices" "^6.3.0"
"@ledgerhq/errors" "^6.2.0"
"@ledgerhq/hw-transport" "^6.3.0"
"@ledgerhq/logs" "^6.2.0"
"@ledgerhq/hw-transport@^5.51.1":
version "5.51.1"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz#8dd14a8e58cbee4df0c29eaeef983a79f5f22578"
integrity sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==
"@ledgerhq/hw-transport@^6.2.0", "@ledgerhq/hw-transport@^6.3.0":
version "6.3.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.3.0.tgz#4fc966b1a68c991c0a6b5384841f99c4f8304ce9"
integrity sha512-kdnVrgmxrFtKaRdkoaQBEa02RXgLzEBiooYbxA65BGSJig3PGWDS9LrqNpzLTZM1RQlivd9NLBmfwU2ze4chWA==
dependencies:
"@ledgerhq/devices" "^5.51.1"
"@ledgerhq/errors" "^5.50.0"
"@ledgerhq/devices" "^6.3.0"
"@ledgerhq/errors" "^6.2.0"
events "^3.3.0"
"@ledgerhq/logs@^5.50.0":
version "5.50.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.50.0.tgz#29c6419e8379d496ab6d0426eadf3c4d100cd186"
integrity sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==
"@ledgerhq/logs@^6.2.0":
version "6.2.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.2.0.tgz#9fb2d6f1811316697f7b3cc14607f6c608912419"
integrity sha512-SLyFyD7ElMhgKWPYedFGCT/ilcbGPgL5hXXYHxOM79Fs5fWi0zaUpt5oGqGMsOAAFaMa9/rbun0pokzPhEFz8A==
"@lerna/add@3.21.0":
version "3.21.0"
@ -2067,52 +2067,74 @@
buffer-layout "^1.2.0"
dotenv "10.0.0"
"@solana/wallet-base@0.0.1", "@solana/wallet-base@^0.0.1":
version "0.0.1"
resolved "https://registry.yarnpkg.com/@solana/wallet-base/-/wallet-base-0.0.1.tgz#9b1a898b0d4ca029fe2cf1dad1b00f63448e394c"
integrity sha512-9trTSPktrXuZMOSbGFgBn9V+bcnCkUfJOCJeE7UcisqZUhrxUsuryUUsmUtHn3pblGsTpZqHOdto/IMtsvQ32w==
"@solana/wallet-adapter-base@^0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-base/-/wallet-adapter-base-0.4.1.tgz#3264220c7eef5abaf7eca0e77cc51403f4f0fcf6"
integrity sha512-VkMB0g89FNnfBY3PSrZh6gULWvLcvAUrQtAzKpojYdkSxL/Cm2sH9JsLylXXhT0r1vOvEc72aR/otwrX5YHm2g==
dependencies:
"@solana/web3.js" "^0.86.2"
eventemitter3 "^4.0.7"
typescript "^4.1.3"
"@solana/wallet-ledger@0.0.1":
version "0.0.1"
resolved "https://registry.yarnpkg.com/@solana/wallet-ledger/-/wallet-ledger-0.0.1.tgz#485dbf00072cf5f1ad5e0586885f84dad8e13e85"
integrity sha512-AKj/xeg50nyuBMx+c6TSIfA03pzM2z1u4uQJQGNF1p4P5mSjgabo2r3ABYlTt+vuRAG5XSxQQNuKD2Zsv5AnEA==
"@solana/wallet-adapter-ledger@^0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-ledger/-/wallet-adapter-ledger-0.4.1.tgz#4ca71b8bab1e3c2aa90c9794891652447c40fc42"
integrity sha512-r9RgXwZNtqqy3v0hXvvWNh+pc2qT7JjAn1XMSuoa6S9SPET/X8Dut7GTuYqI3rb8WSJYUTtlxVD5qJq/amzLvA==
dependencies:
"@ledgerhq/hw-transport-webusb" "^5.41.0"
"@solana/wallet-base" "^0.0.1"
"@solana/web3.js" "^0.86.2"
bn.js "^5.1.3"
bs58 "^4.0.1"
buffer-layout "^1.2.0"
eventemitter3 "^4.0.7"
lodash "^4.17.20"
typescript "^4.1.3"
"@ledgerhq/hw-transport" "^6.2.0"
"@ledgerhq/hw-transport-webhid" "^6.2.0"
"@solana/web3.js@^0.86.2":
version "0.86.4"
resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-0.86.4.tgz#69216d3928ca4727c25a1ea96c405e897156ac3b"
integrity sha512-FpabDmdyxBN5aHIVUWc9Q6pXJFWiLRm/xeyxFg9O9ICHjiUkd38omds7G0CAmykIccG7zaMziwtkXp+0KvQOhA==
"@solana/wallet-adapter-mathwallet@^0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-mathwallet/-/wallet-adapter-mathwallet-0.4.1.tgz#f5eb5eaef6874b25f50d1a412a9c39d04d5f3505"
integrity sha512-7HMp5E2ZRw2CJnj/q81/BaaXR/BdY+PuLRAXQk+JhAJTLqxKZXMYOy9IiTCgLfvrY82WVU6EbqlwgtC+ZwsGmw==
"@solana/wallet-adapter-phantom@^0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-phantom/-/wallet-adapter-phantom-0.4.1.tgz#db5f70aa1cf293314b447a902995099e7a3a1c16"
integrity sha512-2Y3625SyQi0Kz9crqzrYOJD76jfDlcFhUEfJYlWWc+aJTnKwLECd91qGoBmms40PyBuTmdB9eJWTYT0Ev0NAig==
"@solana/wallet-adapter-react@^0.7.0":
version "0.7.0"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-react/-/wallet-adapter-react-0.7.0.tgz#b8d19a9619adb012667456edc033c1d076d0dfdd"
integrity sha512-1ZPxWcbvcvsw4oE22XBtDr7jtKCOof0PGWsDsWhhW04wXqMNNKq+pxqYzjKlY9+WJpe0dx8Kyzar3PWN+wqJUg==
"@solana/wallet-adapter-solflare@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-solflare/-/wallet-adapter-solflare-0.1.0.tgz#28e8bb9572a1f5fb43396168252e27f13c0b369a"
integrity sha512-UR0puHUlVQZVZPpEaGXPJPj5A0qzCq69eEqbFIHtVXogYwIRpS5w84fakzBw34DobgnELX0ODb913jS+hbz2sw==
"@solana/wallet-adapter-sollet@^0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-sollet/-/wallet-adapter-sollet-0.4.1.tgz#e376ee2a2ad2167b6bde9285c1a176250284808a"
integrity sha512-GvGGtitK4nqK/1zGXM66+xrZAWX7rsdNofOT06g5iL87WyZ+oiTneA9VdJYH8UcCJSPU+J8th3Eou+TyvaYUaA==
dependencies:
"@babel/runtime" "^7.3.1"
bn.js "^5.0.0"
bs58 "^4.0.1"
buffer "^5.4.3"
buffer-layout "^1.2.0"
crypto-hash "^1.2.2"
esdoc-inject-style-plugin "^1.0.0"
jayson "^3.0.1"
keccak "^3.0.1"
mz "^2.7.0"
node-fetch "^2.2.0"
npm-run-all "^4.1.5"
rpc-websockets "^7.4.2"
secp256k1 "^4.0.2"
superstruct "^0.8.3"
tweetnacl "^1.0.0"
ws "^7.0.0"
"@project-serum/sol-wallet-adapter" "^0.2.5"
"@solana/wallet-adapter-solong@^0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-solong/-/wallet-adapter-solong-0.4.1.tgz#4adba03cf30cf4ac835813a1e1ebd48f1bc00129"
integrity sha512-rf2fDB2JY8mYwqjmN3hvh/5eOzHMG+7J8MMbntwR8EWBp7nEhDNz5QUZfeDuFW2VKc4Iqdm4WzB0WOMFtNlEhA==
"@solana/wallet-adapter-torus@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-torus/-/wallet-adapter-torus-0.5.0.tgz#79ad003ebdae61f838b6bf97055304fec798fecc"
integrity sha512-NP9WGBfxMwTLjvyi/WICffcGLvdnVymcNIStawGqzryWlrTgzeVF7v5GYVwyt0DLnZRbVy0+oJdIs6M2U0uHsQ==
dependencies:
"@toruslabs/openlogin" "^0.9.2"
"@toruslabs/openlogin-ed25519" "^0.9.2"
"@types/keccak" "^3.0.1"
"@solana/wallet-adapter-wallets@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@solana/wallet-adapter-wallets/-/wallet-adapter-wallets-0.6.0.tgz#03117cb2d102de10da5d975da71da45f17cd1076"
integrity sha512-MazpY4QiGl/ljdZrTGsQnEZFEIcas+nmceeleSCz9L1BEu8AqovcqmW0Ak//yhGZm6C/3RfxgwpV+4PKOrrexQ==
dependencies:
"@solana/wallet-adapter-ledger" "^0.4.1"
"@solana/wallet-adapter-mathwallet" "^0.4.1"
"@solana/wallet-adapter-phantom" "^0.4.1"
"@solana/wallet-adapter-solflare" "^0.1.0"
"@solana/wallet-adapter-sollet" "^0.4.1"
"@solana/wallet-adapter-solong" "^0.4.1"
"@solana/wallet-adapter-torus" "^0.5.0"
"@solana/web3.js@^1.12.0", "@solana/web3.js@^1.17.0", "@solana/web3.js@^1.21.0":
version "1.21.0"
@ -2210,6 +2232,18 @@
optionalDependencies:
secp256k1 "^3.8.0"
"@toruslabs/eccrypto@^1.1.7":
version "1.1.7"
resolved "https://registry.yarnpkg.com/@toruslabs/eccrypto/-/eccrypto-1.1.7.tgz#962954d6416f56ca2ba9bb9948cd08bd3b8cd0c4"
integrity sha512-zU4GnrH21yDY179fgp5Ovi4YjLdHy3WXM3QHCHAomYNxa03eAw2lxNR2bZ7kb698yk40s4WMrbnauukgabXH4Q==
dependencies:
acorn "^8.4.1"
elliptic "^6.5.4"
es6-promise "^4.2.8"
nan "^2.14.2"
optionalDependencies:
secp256k1 "^3.8.0"
"@toruslabs/fetch-node-details@^2.6.1":
version "2.6.1"
resolved "https://registry.yarnpkg.com/@toruslabs/fetch-node-details/-/fetch-node-details-2.6.1.tgz#33b33d4dc825c47666a4e96df22ac0ba7f2296d6"
@ -2225,42 +2259,49 @@
dependencies:
deepmerge "^4.2.2"
"@toruslabs/openlogin-ed25519@0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@toruslabs/openlogin-ed25519/-/openlogin-ed25519-0.9.0.tgz#919c83b35d50f25d68605b44669741805f5e7817"
integrity sha512-wzD6bCi0Ka1gJ5m39HGRLdAE6Ocuc8j/5eeCkQMvhoHfVZK8lfTubxFev/YKWhOwQRdr8HqcLsRYyCdrqvfueg==
"@toruslabs/http-helpers@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@toruslabs/http-helpers/-/http-helpers-1.4.0.tgz#6d2d4129d1126876b0616b7dffec3f4b339739b5"
integrity sha512-lPRhTWeChQunds2CGV70xvaoFMMebZAqZLpTYZjUJfziumQjT12w9HWLIzlRfGFVKoYUsUiZLpGHl0JEwHCcqg==
dependencies:
deepmerge "^4.2.2"
"@toruslabs/openlogin-ed25519@^0.9.2":
version "0.9.5"
resolved "https://registry.yarnpkg.com/@toruslabs/openlogin-ed25519/-/openlogin-ed25519-0.9.5.tgz#2435fdb45f0bd021ccdcbdb35fa0ed6615869427"
integrity sha512-zlwVR6nQD+mFVlmCEogmSGb0+fCKphfrIZ19XDTidlWoqSRFBDl/daditf33aTH58rrEmb2l7JKkwEYkxhdZJA==
dependencies:
"@toruslabs/tweetnacl-js" "^1.0.3"
"@toruslabs/openlogin-jrpc@^0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@toruslabs/openlogin-jrpc/-/openlogin-jrpc-0.9.0.tgz#56dbfb1675856e8b280049959e884f6c3e5bc521"
integrity sha512-Hkj9oR8ROavWRqptorFv8R4ka0GJY0O5VXuF+9bnGyWxY0kEcRKsDvOZpS4XO31GXThUGyLusHY4prwYGhUQ9Q==
"@toruslabs/openlogin-jrpc@^0.9.5":
version "0.9.5"
resolved "https://registry.yarnpkg.com/@toruslabs/openlogin-jrpc/-/openlogin-jrpc-0.9.5.tgz#6fb14e7908967ab610ae48e9204a617830e556e7"
integrity sha512-jLvOMhsCZlpFT3lA2PZzaUlXbtwYEXRIUDWVXIWWquuRI5zgH9Pg19HtQ2+i46ikEDl+KAiEoGKo5QuuY6iDXA==
dependencies:
"@toruslabs/openlogin-utils" "^0.9.0"
"@toruslabs/openlogin-utils" "^0.9.5"
end-of-stream "^1.4.4"
fast-safe-stringify "^2.0.7"
fast-safe-stringify "^2.0.8"
once "^1.4.0"
pump "^3.0.0"
"@toruslabs/openlogin-utils@0.9.0", "@toruslabs/openlogin-utils@^0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@toruslabs/openlogin-utils/-/openlogin-utils-0.9.0.tgz#817c352284de786577df5ab11ec34152013cdebe"
integrity sha512-OJTjqD/b3eUhkQkTZVywT++qKqejtx/4lNUeLwNjrOVrURLFClnjiqa6QFM+lVBD3OJpEdrNXTyzHcUhDBMwAg==
"@toruslabs/openlogin-utils@^0.9.5":
version "0.9.5"
resolved "https://registry.yarnpkg.com/@toruslabs/openlogin-utils/-/openlogin-utils-0.9.5.tgz#b334cab762e8b3e24224cc2b4ebd96812c05288d"
integrity sha512-1SvgRvxW+PARIppW/w9UxXgMtMTvnDucWznDhzJC8JlvdIObJBcmFkzL1gh2nctXEwJJeUIusXz/v6EsDCVkNA==
dependencies:
base64url "^3.0.1"
keccak "^3.0.1"
randombytes "^2.1.0"
"@toruslabs/openlogin@0.9.0":
version "0.9.0"
resolved "https://registry.yarnpkg.com/@toruslabs/openlogin/-/openlogin-0.9.0.tgz#cef446291ab6ca81b98e148afa90eae8a8124e1a"
integrity sha512-K+VjTOYAIKnxkuEhVL7I6ZRdvMQSCzdIghixlTxNq/Of9ge4/5PDfWDB8PYeb1Tsqm+SU3AwVtgHkfnY4tOhxA==
"@toruslabs/openlogin@^0.9.2":
version "0.9.5"
resolved "https://registry.yarnpkg.com/@toruslabs/openlogin/-/openlogin-0.9.5.tgz#417abadc7796c584c043e59d5574687fe864eca6"
integrity sha512-wtYPpWQs+8BluA8NBowYzZ9COR1hi53W1QT43SDvlGy6JkMidyISK/waLpA5l2hTDGd2OFbcHaGVi41p9co6IQ==
dependencies:
"@toruslabs/eccrypto" "^1.1.6"
"@toruslabs/http-helpers" "^1.3.7"
"@toruslabs/openlogin-jrpc" "^0.9.0"
"@toruslabs/openlogin-utils" "^0.9.0"
"@toruslabs/eccrypto" "^1.1.7"
"@toruslabs/http-helpers" "^1.4.0"
"@toruslabs/openlogin-jrpc" "^0.9.5"
"@toruslabs/openlogin-utils" "^0.9.5"
lodash.merge "^4.6.2"
pump "^3.0.0"
@ -2467,6 +2508,13 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad"
integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==
"@types/keccak@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@types/keccak/-/keccak-3.0.1.tgz#1dfad12395f32927cf409707534dd796d57aa84c"
integrity sha512-/MxAVmtyyeOvZ6dGf3ciLwFRuV5M8DRIyYNFGHYI6UyBW4/XqyO0LZw+JFMvaeY3cHItQAkELclBU1x5ank6mg==
dependencies:
"@types/node" "*"
"@types/lodash@^4.14.159":
version "4.14.170"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.170.tgz#0d67711d4bf7f4ca5147e9091b847479b87925d6"
@ -2536,13 +2584,6 @@
dependencies:
"@types/react" "*"
"@types/react-dom@^16.9.8":
version "16.9.13"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.13.tgz#5898f0ee68fe200685e6b61d3d7d8828692814d0"
integrity sha512-34Hr3XnmUSJbUVDxIw/e7dhQn2BJZhJmlAaPyPwfTQyuVS9mV/CeyghFcXyvkJXxI7notQJz8mF8FeCVvloJrA==
dependencies:
"@types/react" "^16"
"@types/react-router-dom@^5.1.6":
version "5.1.7"
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.7.tgz#a126d9ea76079ffbbdb0d9225073eb5797ab7271"
@ -2569,15 +2610,6 @@
"@types/scheduler" "*"
csstype "^3.0.2"
"@types/react@^16", "@types/react@^16.9.50":
version "16.14.8"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.8.tgz#4aee3ab004cb98451917c9b7ada3c7d7e52db3fe"
integrity sha512-QN0/Qhmx+l4moe7WJuTxNiTsjBwlBGHqKGvInSQCBdo7Qio0VtOqwsC0Wq7q3PbJlB0cR4Y4CVo1OOe6BOsOmA==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"
"@types/scheduler@*":
version "0.16.1"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.1.tgz#18845205e86ff0038517aab7a18a62a6b9f71275"
@ -3026,6 +3058,11 @@ acorn@^7.1.1, acorn@^7.4.0:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
acorn@^8.4.1:
version "8.4.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c"
integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==
aes-js@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d"
@ -4300,11 +4337,6 @@ bonjour@^3.5.0:
multicast-dns "^6.0.1"
multicast-dns-service-types "^1.1.0"
boolbase@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
borsh@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.4.0.tgz#9dd6defe741627f1315eac2a73df61421f6ddb9f"
@ -4806,28 +4838,6 @@ checkpoint-store@^1.1.0:
dependencies:
functional-red-black-tree "^1.0.1"
cheerio@0.22.0:
version "0.22.0"
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e"
integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=
dependencies:
css-select "~1.2.0"
dom-serializer "~0.1.0"
entities "~1.1.1"
htmlparser2 "^3.9.1"
lodash.assignin "^4.0.9"
lodash.bind "^4.1.4"
lodash.defaults "^4.0.1"
lodash.filter "^4.4.0"
lodash.flatten "^4.2.0"
lodash.foreach "^4.3.0"
lodash.map "^4.4.0"
lodash.merge "^4.4.0"
lodash.pick "^4.2.1"
lodash.reduce "^4.4.0"
lodash.reject "^4.4.0"
lodash.some "^4.4.0"
chokidar@3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a"
@ -5503,21 +5513,6 @@ crypto@^1.0.1:
resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037"
integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==
css-select@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858"
integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=
dependencies:
boolbase "~1.0.0"
css-what "2.1"
domutils "1.5.1"
nth-check "~1.0.1"
css-what@2.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2"
integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==
css.escape@1.5.1, css.escape@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb"
@ -5944,22 +5939,6 @@ dom-helpers@^5.1.3:
"@babel/runtime" "^7.8.7"
csstype "^3.0.2"
dom-serializer@0:
version "0.2.2"
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51"
integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==
dependencies:
domelementtype "^2.0.1"
entities "^2.0.0"
dom-serializer@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0"
integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==
dependencies:
domelementtype "^1.3.0"
entities "^1.1.1"
dom-walk@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84"
@ -5975,16 +5954,6 @@ domain-browser@^1.1.1:
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==
domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f"
integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
domelementtype@^2.0.1:
version "2.2.0"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57"
integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==
domexception@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90"
@ -5992,29 +5961,6 @@ domexception@^1.0.1:
dependencies:
webidl-conversions "^4.0.2"
domhandler@^2.3.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803"
integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==
dependencies:
domelementtype "1"
domutils@1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=
dependencies:
dom-serializer "0"
domelementtype "1"
domutils@^1.5.1:
version "1.7.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a"
integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==
dependencies:
dom-serializer "0"
domelementtype "1"
dot-case@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751"
@ -6178,16 +6124,6 @@ enquirer@^2.3.6:
dependencies:
ansi-colors "^4.1.1"
entities@^1.1.1, entities@~1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==
entities@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==
env-paths@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
@ -6323,14 +6259,6 @@ escodegen@^1.9.1:
optionalDependencies:
source-map "~0.6.1"
esdoc-inject-style-plugin@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/esdoc-inject-style-plugin/-/esdoc-inject-style-plugin-1.0.0.tgz#a13597368bb9fb89c365e066495caf97a4decbb1"
integrity sha1-oTWXNou5+4nDZeBmSVyvl6Tey7E=
dependencies:
cheerio "0.22.0"
fs-extra "1.0.0"
eslint-config-prettier@^6.15.0:
version "6.15.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9"
@ -7190,11 +7118,16 @@ fast-levenshtein@~2.0.6:
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
fast-safe-stringify@^2.0.6, fast-safe-stringify@^2.0.7:
fast-safe-stringify@^2.0.6:
version "2.0.7"
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743"
integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==
fast-safe-stringify@^2.0.8:
version "2.0.8"
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz#dc2af48c46cf712b683e849b2bbd446b32de936f"
integrity sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag==
fastq@^1.6.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858"
@ -7476,15 +7409,6 @@ from2@^2.1.0:
inherits "^2.0.1"
readable-stream "^2.0.0"
fs-extra@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950"
integrity sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=
dependencies:
graceful-fs "^4.1.2"
jsonfile "^2.1.0"
klaw "^1.0.0"
fs-extra@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
@ -7835,7 +7759,7 @@ globby@^9.2.0:
pify "^4.0.1"
slash "^2.0.0"
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2:
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2:
version "4.2.6"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
@ -8055,18 +7979,6 @@ html-escaper@^2.0.0:
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
htmlparser2@^3.9.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f"
integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==
dependencies:
domelementtype "^1.3.1"
domhandler "^2.3.0"
domutils "^1.5.1"
entities "^1.1.1"
inherits "^2.0.1"
readable-stream "^3.1.1"
http-cache-semantics@^3.8.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
@ -8909,7 +8821,7 @@ istanbul-reports@^2.2.6:
dependencies:
html-escaper "^2.0.0"
jayson@^3.0.1, jayson@^3.4.4:
jayson@^3.4.4:
version "3.6.3"
resolved "https://registry.yarnpkg.com/jayson/-/jayson-3.6.3.tgz#b0bb8d2e37e34e39e68044ab925fd92f103f1bd9"
integrity sha512-H/JuWKaJwU8FbwofPHROvtGoMF6R3DB0GGPpYyIaRzXU50Ser/4likFVfo/bpTGe0csB7n/+uybxJpBvX40VOQ==
@ -9504,13 +9416,6 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"
jsonfile@^2.1.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug=
optionalDependencies:
graceful-fs "^4.1.6"
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
@ -9605,13 +9510,6 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
klaw@^1.0.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk=
optionalDependencies:
graceful-fs "^4.1.9"
kleur@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
@ -9882,16 +9780,6 @@ lodash._reinterpolate@^3.0.0:
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=
lodash.assignin@^4.0.9:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2"
integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI=
lodash.bind@^4.1.4:
version "4.2.1"
resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35"
integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=
lodash.clonedeep@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
@ -9902,26 +9790,6 @@ lodash.debounce@^4.0.8:
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
lodash.defaults@^4.0.1:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=
lodash.filter@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace"
integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=
lodash.flatten@^4.2.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f"
integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=
lodash.foreach@^4.3.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53"
integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=
lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
@ -9932,46 +9800,21 @@ lodash.ismatch@^4.4.0:
resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37"
integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=
lodash.map@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=
lodash.memoize@4.x:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=
lodash.merge@^4.4.0, lodash.merge@^4.6.2:
lodash.merge@^4.6.2:
version "4.6.2"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
lodash.pick@^4.2.1:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=
lodash.reduce@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b"
integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=
lodash.reject@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415"
integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=
lodash.set@^4.3.2:
version "4.3.2"
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=
lodash.some@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=
lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
@ -10569,7 +10412,7 @@ mute-stream@0.0.8, mute-stream@~0.0.4:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
mz@^2.5.0, mz@^2.7.0:
mz@^2.5.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32"
integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==
@ -10583,6 +10426,11 @@ nan@^2.12.1, nan@^2.13.2, nan@^2.14.0, nan@^2.14.1, nan@^2.2.1:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
nan@^2.14.2:
version "2.15.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee"
integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==
nanoid@^3.1.22:
version "3.1.23"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81"
@ -10746,7 +10594,7 @@ node-fetch@2.1.2:
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5"
integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=
node-fetch@2.6.1, node-fetch@^2.2.0, node-fetch@^2.5.0, node-fetch@^2.6.0, node-fetch@^2.6.1:
node-fetch@2.6.1, node-fetch@^2.5.0, node-fetch@^2.6.0, node-fetch@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
@ -11011,13 +10859,6 @@ npmlog@^4.1.2:
gauge "~2.7.3"
set-blocking "~2.0.0"
nth-check@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==
dependencies:
boolbase "~1.0.0"
number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
@ -12470,7 +12311,7 @@ react-content-loader@^6.0.3:
resolved "https://registry.yarnpkg.com/react-content-loader/-/react-content-loader-6.0.3.tgz#32e28ca7120e0a2552fc26655d0d4448cc1fc0c5"
integrity sha512-CIRgTHze+ls+jGDIfCitw27YkW2XcaMpsYORTUdBxsMFiKuUYMnlvY76dZE4Lsaa9vFXVw+41ieBEK7SJt0nug==
react-dom@16.13.1, react-dom@17.0.2:
react-dom@17.0.2, react-dom@^17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
@ -12550,7 +12391,7 @@ react-virtualized@^9.22.3:
prop-types "^15.7.2"
react-lifecycles-compat "^3.0.4"
react@16.13.1, react@17.0.2:
react@17.0.2, react@^17.0.2:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
@ -12665,7 +12506,7 @@ read@1, read@~1.0.1:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.5.0, readable-stream@^3.6.0:
"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.5.0, readable-stream@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
@ -14170,14 +14011,6 @@ superstruct@^0.14.2:
resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.14.2.tgz#0dbcdf3d83676588828f1cf5ed35cda02f59025b"
integrity sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==
superstruct@^0.8.3:
version "0.8.4"
resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.8.4.tgz#478a19649f6b02c6319c02044db6a1f5863c391f"
integrity sha512-48Ors8IVWZm/tMr8r0Si6+mJiB7mkD7jqvIzktjJ4+EnP5tBp0qOpiM1J8sCUorKx+TXWrfb3i1UcjdD1YK/wA==
dependencies:
kind-of "^6.0.2"
tiny-invariant "^1.0.6"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
@ -15654,7 +15487,7 @@ ws@^6.2.1:
dependencies:
async-limiter "~1.0.0"
ws@^7.0.0, ws@^7.4.5:
ws@^7.4.5:
version "7.4.6"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"
integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==