@reef-chain/react-lib 4.0.3 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appState/util.d.ts +2 -9
- package/dist/components/AccountSelector/AccountInlineInfo.d.ts +0 -1
- package/dist/components/AccountSelector/AccountListModal.d.ts +0 -10
- package/dist/components/AccountSelector/AccountSelector.d.ts +0 -29
- package/dist/components/AddLiquidity/index.d.ts +0 -1
- package/dist/components/EvmBind/EvmBindComponent.d.ts +0 -10
- package/dist/components/Overlays/OverlayNFT.d.ts +0 -17
- package/dist/components/Overlays/OverlaySendNft.d.ts +0 -16
- package/dist/components/Overlays/OverlaySwap.d.ts +0 -18
- package/dist/components/PoolActions/ConfirmPopups/Address.d.ts +0 -1
- package/dist/components/PoolActions/ConfirmPopups/Bond.d.ts +0 -1
- package/dist/components/PoolActions/ConfirmPopups/Provide.d.ts +0 -1
- package/dist/components/PoolActions/ConfirmPopups/Send.d.ts +0 -1
- package/dist/components/PoolActions/ConfirmPopups/SummaryItem.d.ts +0 -1
- package/dist/components/PoolActions/ConfirmPopups/Token.d.ts +0 -1
- package/dist/components/PoolActions/ConfirmPopups/Trade.d.ts +0 -1
- package/dist/components/PoolActions/ConfirmPopups/Withdraw.d.ts +0 -1
- package/dist/components/PoolActions/Finalizing.d.ts +0 -1
- package/dist/components/PoolActions/Provide.d.ts +0 -19
- package/dist/components/PoolActions/TokenDropdown.d.ts +0 -1
- package/dist/components/PoolActions/TokenField.d.ts +0 -1
- package/dist/components/PoolActions/Trade.d.ts +0 -23
- package/dist/components/PoolActions/UsdAmountField.d.ts +0 -1
- package/dist/components/PoolActions/Withdraw.d.ts +0 -12
- package/dist/components/RemoveLiquidity/RemoveConfirmationModal.d.ts +0 -1
- package/dist/components/RemoveLiquidity/index.d.ts +0 -7
- package/dist/components/SelectToken/index.d.ts +0 -14
- package/dist/components/SwapComponent/SwapConfirmationModal.d.ts +0 -1
- package/dist/components/SwapComponent/index.d.ts +0 -11
- package/dist/components/TokenFields/TokenAmountField.d.ts +1 -5
- package/dist/components/TokenFields/TokenAmountView.d.ts +0 -8
- package/dist/components/Transfer/Send.d.ts +0 -14
- package/dist/components/Transfer/SendConfirmationModal.d.ts +0 -1
- package/dist/components/Transfer/TransferComponent.d.ts +0 -14
- package/dist/components/WalletSelector/WalletSelector.d.ts +0 -1
- package/dist/components/common/Button/index.d.ts +0 -5
- package/dist/components/common/Card/index.d.ts +0 -3
- package/dist/components/common/Icons/index.d.ts +0 -7
- package/dist/components/common/Input/index.d.ts +0 -40
- package/dist/components/common/Label/index.d.ts +0 -7
- package/dist/components/common/Loading/index.d.ts +0 -5
- package/dist/components/common/Logos/MetaMaskLogo.d.ts +0 -1
- package/dist/components/common/Logos/WalletConnectLogo.d.ts +0 -1
- package/dist/hooks/useInjectExtension.d.ts +5 -9
- package/dist/hooks/useInjectExtensions.d.ts +5 -9
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +4 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/l10n/l10n.d.ts +0 -1
- package/package.json +2 -2
package/dist/appState/util.d.ts
CHANGED
|
@@ -9,14 +9,7 @@ import { ReefSigner } from '../state';
|
|
|
9
9
|
export declare const reloadSignersSubj: Subject<UpdateDataCtx<ReefSigner[]>>;
|
|
10
10
|
export declare let _NFT_IPFS_RESOLVER_FN: ipfsUrlResolverFn | undefined;
|
|
11
11
|
export declare const setNftIpfsResolverFn: (val?: ipfsUrlResolverFn) => void;
|
|
12
|
-
export declare const combineTokensDistinct: ([tokens1, tokens2]: [
|
|
13
|
-
|
|
14
|
-
Token[]
|
|
15
|
-
]) => Token[];
|
|
16
|
-
export declare const toTokensWithPrice: ([tokens, reefPrice, pools]: [
|
|
17
|
-
Token[],
|
|
18
|
-
number,
|
|
19
|
-
PoolReserves[]
|
|
20
|
-
]) => TokenWithAmount[];
|
|
12
|
+
export declare const combineTokensDistinct: ([tokens1, tokens2]: [Token[], Token[]]) => Token[];
|
|
13
|
+
export declare const toTokensWithPrice: ([tokens, reefPrice, pools]: [Token[], number, PoolReserves[]]) => TokenWithAmount[];
|
|
21
14
|
export declare const onTxUpdateResetSigners: (txUpdateData: TxStatusUpdate, updateActions: UpdateAction[]) => void;
|
|
22
15
|
export declare const getContractTypeAbi: (contractType: ContractType) => ContractInterface;
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { ReefSigner } from '../../state';
|
|
3
|
-
interface AccountListModal {
|
|
4
|
-
id: string;
|
|
5
|
-
accounts: ReefSigner[];
|
|
6
|
-
selectAccount: (index: number, signer: ReefSigner) => void;
|
|
7
|
-
backButtonModalId?: string;
|
|
8
|
-
title?: string | ReactElement;
|
|
9
|
-
}
|
|
10
1
|
export declare const AccountListModal: ({ id, accounts, selectAccount, backButtonModalId, title, }: AccountListModal) => JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import "./AccountSelector.css";
|
|
3
|
-
import { AccountCreationData, Extension } from "@reef-chain/ui-kit/dist/ui-kit/components/organisms/AccountSelector/AccountSelector";
|
|
4
|
-
import { ReefSigner } from "../../state";
|
|
5
2
|
export type Network = "mainnet" | "testnet";
|
|
6
3
|
export type Language = "en" | "hi";
|
|
7
|
-
interface AccountSelector {
|
|
8
|
-
availableExtensions?: Extension[];
|
|
9
|
-
selExtName?: string;
|
|
10
|
-
selectExtension?: (name: string) => void;
|
|
11
|
-
accounts: ReefSigner[];
|
|
12
|
-
selectedSigner?: ReefSigner;
|
|
13
|
-
selectAccount: (index: number, signer: ReefSigner) => void;
|
|
14
|
-
selectedNetwork?: Network;
|
|
15
|
-
onNetworkSelect?: (network: Network) => any;
|
|
16
|
-
onLanguageSelect?: (language: Language) => any;
|
|
17
|
-
isBalanceHidden?: boolean;
|
|
18
|
-
showBalance?: (...args: any[]) => any;
|
|
19
|
-
availableNetworks: Network[];
|
|
20
|
-
showSnapOptions?: boolean;
|
|
21
|
-
onRename?: (address: string, newName: string) => any;
|
|
22
|
-
onExport?: (address: string, password: string) => any;
|
|
23
|
-
onImport?: (...args: any[]) => any;
|
|
24
|
-
onForget?: (address: string) => any;
|
|
25
|
-
onUpdateMetadata?: (network: Network) => any;
|
|
26
|
-
onStartAccountCreation?: () => Promise<AccountCreationData>;
|
|
27
|
-
onConfirmAccountCreation?: (seed: string, name: string) => any;
|
|
28
|
-
handleWalletConnect?: () => Promise<void>;
|
|
29
|
-
open?: boolean;
|
|
30
|
-
setOpen?: (val: boolean) => void;
|
|
31
|
-
}
|
|
32
4
|
export declare const AccountSelector: ({ selectedSigner, availableExtensions, selExtName, selectExtension, accounts, selectAccount, selectedNetwork, onNetworkSelect, onLanguageSelect, isBalanceHidden, showBalance, availableNetworks, showSnapOptions, onRename, onExport, onImport, onForget, onUpdateMetadata, onStartAccountCreation, onConfirmAccountCreation, handleWalletConnect, open, setOpen }: AccountSelector) => JSX.Element;
|
|
33
|
-
export {};
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ReefSigner } from '../../state';
|
|
3
|
-
import { TxStatusHandler } from '../../utils';
|
|
4
1
|
import './bind.css';
|
|
5
2
|
export declare enum EvmBindComponentTxType {
|
|
6
3
|
TRANSFER = "TRANSFER",
|
|
7
4
|
BIND = "BIND"
|
|
8
5
|
}
|
|
9
|
-
interface EvmBindComponent {
|
|
10
|
-
bindSigner: ReefSigner;
|
|
11
|
-
signers: ReefSigner[];
|
|
12
|
-
onTxUpdate?: TxStatusHandler;
|
|
13
|
-
onComplete?: () => void;
|
|
14
|
-
}
|
|
15
6
|
export declare const EvmBindComponent: ({ bindSigner, onTxUpdate, signers, onComplete, }: EvmBindComponent) => JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import './overlay.css';
|
|
3
|
-
interface OverlayNFT {
|
|
4
|
-
nftName?: string;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
isVideoNFT?: boolean;
|
|
7
|
-
iconUrl?: string;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
balance: string;
|
|
10
|
-
address: string;
|
|
11
|
-
contractType: string;
|
|
12
|
-
nftId: string;
|
|
13
|
-
accounts: any;
|
|
14
|
-
selectedSigner: any;
|
|
15
|
-
provider: any;
|
|
16
|
-
isDarkMode?: boolean;
|
|
17
|
-
}
|
|
18
2
|
export declare const OverlayNFT: ({ nftName, isOpen, isVideoNFT, iconUrl, onClose, balance, address, contractType, nftId, accounts, selectedSigner, provider, isDarkMode, }: OverlayNFT) => JSX.Element;
|
|
19
|
-
export {};
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import './overlay.css';
|
|
3
|
-
interface OverlaySendNFT {
|
|
4
|
-
nftName?: string;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
balance: string;
|
|
8
|
-
address: string;
|
|
9
|
-
nftId: string;
|
|
10
|
-
iconUrl?: string;
|
|
11
|
-
isVideoNFT?: boolean;
|
|
12
|
-
accounts: any;
|
|
13
|
-
selectedSigner: any;
|
|
14
|
-
provider: any;
|
|
15
|
-
isDarkMode?: boolean;
|
|
16
|
-
}
|
|
17
2
|
export declare const OverlaySendNFT: ({ nftName, isOpen, onClose, balance, isVideoNFT, iconUrl, address, nftId, accounts, selectedSigner, provider, isDarkMode }: OverlaySendNFT) => JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { network as libNet } from '@reef-chain/util-lib';
|
|
3
1
|
import './overlay.css';
|
|
4
|
-
import { Notify, PoolWithReserves, ReefSigner, Token, TokenPrices } from '../../state';
|
|
5
|
-
import { network as nw } from '@reef-chain/util-lib';
|
|
6
|
-
interface OverlaySwap {
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
tokenAddress: string;
|
|
9
|
-
onPoolsLoaded: (hasPools: boolean) => void;
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
tokens: Token[];
|
|
12
|
-
signer: ReefSigner | undefined;
|
|
13
|
-
nw: nw.Network;
|
|
14
|
-
tokenPrices: TokenPrices;
|
|
15
|
-
pools: PoolWithReserves[];
|
|
16
|
-
network: libNet.DexProtocolv2 | undefined;
|
|
17
|
-
notify: (message: string, type?: Notify) => void;
|
|
18
|
-
}
|
|
19
2
|
export declare const OverlaySwap: ({ tokenAddress, isOpen, onPoolsLoaded, onClose, signer, tokens, nw, tokenPrices, pools, network, notify }: OverlaySwap) => JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AddLiquidityState } from '../../store';
|
|
3
|
-
import { SelectToken } from './TokenField';
|
|
4
|
-
import { Token } from '../../state';
|
|
5
|
-
interface ProvideActions {
|
|
6
|
-
onAddLiquidity: () => Promise<void>;
|
|
7
|
-
setToken1Amount: (amount: string) => void;
|
|
8
|
-
setToken2Amount: (amount: string) => void;
|
|
9
|
-
setPercentage: (amount: number) => void;
|
|
10
|
-
selectToken1?: SelectToken;
|
|
11
|
-
selectToken2?: SelectToken;
|
|
12
|
-
}
|
|
13
|
-
interface Provide {
|
|
14
|
-
tokens: Token[];
|
|
15
|
-
state: AddLiquidityState;
|
|
16
|
-
actions: ProvideActions;
|
|
17
|
-
confirmText?: string;
|
|
18
|
-
}
|
|
19
1
|
export declare const Provide: ({ state, tokens, actions: { onAddLiquidity, setPercentage, setToken1Amount, setToken2Amount, selectToken1, selectToken2, }, }: Provide) => JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SwapState } from '../../store';
|
|
3
|
-
import { SelectToken } from './TokenField';
|
|
4
|
-
import { LastPoolReserves, Token } from '../../state';
|
|
5
|
-
interface TradeActions {
|
|
6
|
-
onSwitch: () => void;
|
|
7
|
-
onSwap: () => Promise<void>;
|
|
8
|
-
setToken1Amount: (amount: string) => void;
|
|
9
|
-
setToken2Amount: (amount: string) => void;
|
|
10
|
-
setPercentage: (amount: number) => void;
|
|
11
|
-
selectToken1?: SelectToken;
|
|
12
|
-
selectToken2?: SelectToken;
|
|
13
|
-
setSlippage?: (slippage: number) => void;
|
|
14
|
-
}
|
|
15
|
-
interface Trade {
|
|
16
|
-
pools: LastPoolReserves[];
|
|
17
|
-
tokens: Token[];
|
|
18
|
-
state: SwapState;
|
|
19
|
-
actions: TradeActions;
|
|
20
|
-
maxSlippage?: number;
|
|
21
|
-
confirmText?: string;
|
|
22
|
-
}
|
|
23
1
|
export declare const Trade: ({ state: { token1, percentage, token2, focus, isLoading, isValid, pool, settings, status, }, actions: { onSwap, onSwitch, setPercentage, setToken1Amount, setToken2Amount, selectToken1, selectToken2, setSlippage, }, pools, tokens, maxSlippage, }: Trade) => JSX.Element;
|
|
24
|
-
export {};
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RemoveLiquidityState } from '../../store';
|
|
3
|
-
interface WithdrawActions {
|
|
4
|
-
onRemoveLiquidity: () => Promise<void>;
|
|
5
|
-
setPercentage: (percentage: number) => void;
|
|
6
|
-
}
|
|
7
|
-
interface Withdraw {
|
|
8
|
-
state: RemoveLiquidityState;
|
|
9
|
-
actions: WithdrawActions;
|
|
10
|
-
confirmText?: string;
|
|
11
|
-
}
|
|
12
1
|
export declare const Withdraw: ({ state: { pool, isLoading, isValid, percentage, status, token1, token2, }, actions: { onRemoveLiquidity, setPercentage, }, }: Withdraw) => JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RemoveLiquidityComponentActions, RemoveLiquidityState } from '../../store';
|
|
3
|
-
interface RemoveLiquidityComponent {
|
|
4
|
-
state: RemoveLiquidityState;
|
|
5
|
-
actions: RemoveLiquidityComponentActions;
|
|
6
|
-
}
|
|
7
1
|
export declare const RemoveLiquidityComponent: ({ state: { settings, pool, isLoading, isValid, percentage: percentageAmount, status, token1, token2, }, actions: { back, onRemoveLiquidity, setPercentage, setSettings, }, }: RemoveLiquidityComponent) => JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ReefSigner, Token } from '../../state';
|
|
3
|
-
interface SelectToken {
|
|
4
|
-
id: string;
|
|
5
|
-
iconUrl: string;
|
|
6
|
-
fullWidth?: boolean;
|
|
7
|
-
selectedTokenName: string;
|
|
8
|
-
tokens: Token[];
|
|
9
|
-
onTokenSelect: (newToken: Token) => void;
|
|
10
|
-
onAddressChange?: (address: string) => Promise<void>;
|
|
11
|
-
hideCommonBaseView?: boolean;
|
|
12
|
-
signer: ReefSigner;
|
|
13
|
-
}
|
|
14
1
|
export declare const SelectToken: ({ id, tokens, selectedTokenName, onTokenSelect, fullWidth, iconUrl, onAddressChange, hideCommonBaseView, signer, }: SelectToken) => JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ReefSigner, Token } from '../../state';
|
|
3
|
-
import { SwapComponentActions } from '../../store/actions/swap';
|
|
4
|
-
import { SwapState } from '../../store/reducers/swap';
|
|
5
|
-
interface SwapComponent {
|
|
6
|
-
tokens: Token[];
|
|
7
|
-
account: ReefSigner;
|
|
8
|
-
state: SwapState;
|
|
9
|
-
actions: SwapComponentActions;
|
|
10
|
-
}
|
|
11
1
|
export declare const SwapComponent: ({ tokens, account, state: { token2: buy, token1: sell, status, isValid, settings, isLoading, }, actions: { onSwap, onSwitch, setSettings, selectToken1, selectToken2, setToken1Amount, setToken2Amount, onAddressChange, }, }: SwapComponent) => JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { ReefSigner, Token, TokenWithAmount } from '../../state';
|
|
3
3
|
interface TokenAmountFieldProps extends React.PropsWithChildren<{}> {
|
|
4
4
|
id?: string;
|
|
@@ -12,10 +12,6 @@ interface TokenAmountFieldProps extends React.PropsWithChildren<{}> {
|
|
|
12
12
|
signer: ReefSigner;
|
|
13
13
|
}
|
|
14
14
|
export declare const TokenAmountField: ({ id, token, tokens, signer, placeholder, onTokenSelect, onAmountChange, onAddressChange, }: TokenAmountFieldProps) => JSX.Element;
|
|
15
|
-
interface TokenAmountFieldMax extends TokenAmountFieldProps {
|
|
16
|
-
afterBalanceEl?: ReactElement;
|
|
17
|
-
hideSelectTokenCommonBaseView?: boolean;
|
|
18
|
-
}
|
|
19
15
|
export declare const TokenAmountFieldMax: ({ id, token, tokens, signer, placeholder, onTokenSelect, onAmountChange, onAddressChange, afterBalanceEl, hideSelectTokenCommonBaseView, }: TokenAmountFieldMax) => JSX.Element;
|
|
20
16
|
interface TokenAmountFieldImpactPriceProps extends TokenAmountFieldProps {
|
|
21
17
|
percentage: number;
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface TokenAmountView {
|
|
3
|
-
name: string;
|
|
4
|
-
amount: string;
|
|
5
|
-
usdAmount: number;
|
|
6
|
-
placeholder: string;
|
|
7
|
-
}
|
|
8
1
|
export declare const TokenAmountView: ({ name, amount, usdAmount, placeholder, }: TokenAmountView) => JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Provider } from "@reef-chain/evm-provider";
|
|
3
|
-
import { NotifyFun, ReefSigner, Token } from "../../state";
|
|
4
1
|
import "../PoolActions/pool-actions.css";
|
|
5
2
|
import "./Send.css";
|
|
6
|
-
interface Send {
|
|
7
|
-
tokens: Token[];
|
|
8
|
-
signer: ReefSigner;
|
|
9
|
-
provider: Provider;
|
|
10
|
-
accounts: ReefSigner[];
|
|
11
|
-
notify: NotifyFun;
|
|
12
|
-
tokenAddress?: string;
|
|
13
|
-
isWalletConnect?: boolean;
|
|
14
|
-
handleWalletConnectModal?: (val: boolean) => void;
|
|
15
|
-
}
|
|
16
3
|
export declare const Send: ({ signer, tokens, accounts, provider, tokenAddress, isWalletConnect, handleWalletConnectModal }: Send) => JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Provider } from '@reef-chain/evm-provider';
|
|
3
|
-
import { ReefSigner, Token, TokenWithAmount } from '../../state';
|
|
4
|
-
import { TxStatusHandler } from '../../utils/transactionUtil';
|
|
5
|
-
interface TransferComponent {
|
|
6
|
-
tokens: Token[];
|
|
7
|
-
from: ReefSigner;
|
|
8
|
-
token?: TokenWithAmount;
|
|
9
|
-
provider: Provider;
|
|
10
|
-
onTxUpdate?: TxStatusHandler;
|
|
11
|
-
accounts: ReefSigner[];
|
|
12
|
-
currentAccount: ReefSigner;
|
|
13
|
-
}
|
|
14
1
|
export declare const TransferComponent: ({ tokens, from, token, provider, onTxUpdate, currentAccount, accounts, }: TransferComponent) => JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -7,11 +7,6 @@ interface ButtonProps extends React.PropsWithChildren<{}> {
|
|
|
7
7
|
export declare const Button: React.FC<ButtonProps>;
|
|
8
8
|
export declare const EmptyButton: React.FC<ButtonProps>;
|
|
9
9
|
export declare const BackButton: ({ onClick }: ButtonProps) => JSX.Element;
|
|
10
|
-
interface SwitchTokenButton extends React.PropsWithChildren<{}> {
|
|
11
|
-
addIcon?: boolean;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
}
|
|
15
10
|
interface IconButton extends React.PropsWithChildren<{}> {
|
|
16
11
|
onClick?: () => void;
|
|
17
12
|
}
|
|
@@ -21,10 +21,6 @@ export declare const CloseIcon: ({ small }: BaseIcon) => JSX.Element;
|
|
|
21
21
|
export declare const ExploreIcon: ({ small }: BaseIcon) => JSX.Element;
|
|
22
22
|
export declare const CopyIcon: ({ small }: BaseIcon) => JSX.Element;
|
|
23
23
|
export declare const PlusIcon: ({ small }: BaseIcon) => JSX.Element;
|
|
24
|
-
interface TokenIcon extends BaseIcon {
|
|
25
|
-
src: string;
|
|
26
|
-
address?: string;
|
|
27
|
-
}
|
|
28
24
|
/**
|
|
29
25
|
* Returns icon url if exists, otherwise return sample icon based on calculated
|
|
30
26
|
* checksum from provided address. Returned sample icon is svg encoded to base64
|
|
@@ -32,7 +28,4 @@ interface TokenIcon extends BaseIcon {
|
|
|
32
28
|
*/
|
|
33
29
|
export declare const getIconUrl: (tokenAddress?: string) => string;
|
|
34
30
|
export declare const TokenIcon: ({ src, address }: TokenIcon) => JSX.Element;
|
|
35
|
-
interface ReefAddressIcon {
|
|
36
|
-
address: string;
|
|
37
|
-
}
|
|
38
31
|
export declare const ReefAddressIcon: ({ address }: ReefAddressIcon) => JSX.Element;
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface Input {
|
|
3
|
-
value?: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
maxLength?: number;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
className?: string;
|
|
8
|
-
onChange?: (value: string) => void;
|
|
9
|
-
}
|
|
10
2
|
export declare const Input: ({ value, disabled, maxLength, placeholder, className, onChange, }: Input) => JSX.Element;
|
|
11
|
-
interface InputAmount {
|
|
12
|
-
amount: string;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
min?: number;
|
|
15
|
-
max?: number;
|
|
16
|
-
placeholder?: string;
|
|
17
|
-
onAmountChange: (value: string) => void;
|
|
18
|
-
onValidityChange?: (error: InputAmountValidity) => void;
|
|
19
|
-
}
|
|
20
3
|
export interface InputAmountValidity {
|
|
21
4
|
valid: boolean;
|
|
22
5
|
errorMessage?: string;
|
|
@@ -24,29 +7,6 @@ export interface InputAmountValidity {
|
|
|
24
7
|
export declare const InputAmount: ({ amount, onAmountChange, min, max, placeholder, disabled, onValidityChange, }: InputAmount) => JSX.Element;
|
|
25
8
|
export declare const InputGroup: React.FC<React.PropsWithChildren<{}>>;
|
|
26
9
|
export declare const InputTextGroup: React.FC<React.PropsWithChildren<{}>>;
|
|
27
|
-
interface NumberInput {
|
|
28
|
-
min?: number;
|
|
29
|
-
max?: number;
|
|
30
|
-
step?: number;
|
|
31
|
-
value: string;
|
|
32
|
-
className?: string;
|
|
33
|
-
placeholder?: string;
|
|
34
|
-
onChange: (value: string) => void;
|
|
35
|
-
disableDecimals?: boolean;
|
|
36
|
-
}
|
|
37
10
|
export declare const NumberInput: ({ value, min, max, step, placeholder, onChange, disableDecimals, className, }: NumberInput) => JSX.Element;
|
|
38
|
-
interface PercentageRangeAmount {
|
|
39
|
-
value: number;
|
|
40
|
-
disabled?: boolean;
|
|
41
|
-
onChange: (value: number) => void;
|
|
42
|
-
}
|
|
43
11
|
export declare const PercentageRangeAmount: ({ value, disabled, onChange, }: PercentageRangeAmount) => JSX.Element;
|
|
44
|
-
interface CheckboxInput {
|
|
45
|
-
checked: boolean;
|
|
46
|
-
disabled?: boolean;
|
|
47
|
-
onChange: (value: any) => void;
|
|
48
|
-
id: string;
|
|
49
|
-
labelText?: string;
|
|
50
|
-
}
|
|
51
12
|
export declare const CheckboxInput: ({ checked, disabled, onChange, id, labelText, }: CheckboxInput) => JSX.Element;
|
|
52
|
-
export {};
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const Label: React.FC<React.PropsWithChildren<{}>>;
|
|
3
|
-
interface ConfirmLabel {
|
|
4
|
-
title: string;
|
|
5
|
-
value: string;
|
|
6
|
-
titleSize?: string;
|
|
7
|
-
valueSize?: string;
|
|
8
|
-
}
|
|
9
3
|
export declare const ConfirmLabel: ({ title, value, titleSize, valueSize, }: ConfirmLabel) => JSX.Element;
|
|
10
4
|
export declare const FormLabel: React.FC<React.PropsWithChildren<{}>>;
|
|
11
5
|
export declare const TransactionWarningLabel: React.FC<React.PropsWithChildren<{}>>;
|
|
12
|
-
export {};
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const Loading: () => JSX.Element;
|
|
3
2
|
export declare const LoadingButtonIcon: () => JSX.Element;
|
|
4
|
-
interface LoadingWithText {
|
|
5
|
-
text: string;
|
|
6
|
-
}
|
|
7
3
|
export declare const LoadingWithText: ({ text }: LoadingWithText) => JSX.Element;
|
|
8
4
|
export declare const LoadingComponent: ({ text }: LoadingWithText) => JSX.Element;
|
|
9
5
|
export declare const LoadingButtonIconWithText: ({ text, }: LoadingWithText) => JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -3,12 +3,8 @@ export interface ExtensionWithAccounts {
|
|
|
3
3
|
extension: extReef.InjectedExtension;
|
|
4
4
|
accounts: extReef.InjectedAccountWithMeta[];
|
|
5
5
|
}
|
|
6
|
-
export declare const useInjectExtension: (appDisplayName: string, extensionIdent: string | undefined) => [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
message: string;
|
|
12
|
-
url?: string;
|
|
13
|
-
} | undefined
|
|
14
|
-
];
|
|
6
|
+
export declare const useInjectExtension: (appDisplayName: string, extensionIdent: string | undefined) => [ExtensionWithAccounts | undefined, boolean, {
|
|
7
|
+
code?: number;
|
|
8
|
+
message: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
} | undefined];
|
|
@@ -3,12 +3,8 @@ export interface ExtensionWithAccounts {
|
|
|
3
3
|
extension: extReef.InjectedExtension;
|
|
4
4
|
accounts: extReef.InjectedAccountWithMeta[];
|
|
5
5
|
}
|
|
6
|
-
export declare const useInjectExtensions: (appDisplayName: string) => [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
message: string;
|
|
12
|
-
url?: string;
|
|
13
|
-
} | undefined
|
|
14
|
-
];
|
|
6
|
+
export declare const useInjectExtensions: (appDisplayName: string) => [ExtensionWithAccounts[], boolean, {
|
|
7
|
+
code?: number;
|
|
8
|
+
message: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
} | undefined];
|