@reef-chain/react-lib 2.5.4 → 2.6.0

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.
@@ -1,9 +1,13 @@
1
1
  import "./AccountSelector.css";
2
2
  import { AccountCreationData } from "@reef-chain/ui-kit/dist/ui-kit/components/organisms/AccountSelector/AccountSelector";
3
3
  import { ReefSigner } from "../../state";
4
+ import { extension as reefExt } from "@reef-chain/util-lib";
4
5
  export type Network = "mainnet" | "testnet";
5
6
  export type Language = "en" | "hi";
6
7
  interface AccountSelector {
8
+ injectedExtensions?: reefExt.InjectedExtension[];
9
+ selExtName?: string;
10
+ selectExtension?: (name: string) => void;
7
11
  accounts: ReefSigner[];
8
12
  selectedSigner?: ReefSigner;
9
13
  selectAccount: (index: number, signer: ReefSigner) => void;
@@ -14,15 +18,13 @@ interface AccountSelector {
14
18
  showBalance?: (...args: any[]) => any;
15
19
  availableNetworks: Network[];
16
20
  showSnapOptions?: boolean;
17
- isDefaultWallet?: boolean;
18
21
  onRename?: (address: string, newName: string) => any;
19
- onExport?: (address: string) => any;
22
+ onExport?: (address: string, password: string) => any;
20
23
  onImport?: (...args: any[]) => any;
21
24
  onForget?: (address: string) => any;
22
- onDefaultWalletSelect?: (isDefault: boolean) => any;
23
25
  onUpdateMetadata?: (network: Network) => any;
24
26
  onStartAccountCreation?: () => Promise<AccountCreationData>;
25
27
  onConfirmAccountCreation?: (seed: string, name: string) => any;
26
28
  }
27
- export declare const AccountSelector: ({ selectedSigner, accounts, selectAccount, selectedNetwork, onNetworkSelect, onLanguageSelect, isBalanceHidden, showBalance, availableNetworks, showSnapOptions, isDefaultWallet, onRename, onExport, onImport, onForget, onDefaultWalletSelect, onUpdateMetadata, onStartAccountCreation, onConfirmAccountCreation, }: AccountSelector) => JSX.Element;
29
+ export declare const AccountSelector: ({ selectedSigner, injectedExtensions, selExtName, selectExtension, accounts, selectAccount, selectedNetwork, onNetworkSelect, onLanguageSelect, isBalanceHidden, showBalance, availableNetworks, showSnapOptions, onRename, onExport, onImport, onForget, onUpdateMetadata, onStartAccountCreation, onConfirmAccountCreation, }: AccountSelector) => JSX.Element;
28
30
  export {};
@@ -0,0 +1,5 @@
1
+ export interface Props {
2
+ className?: string;
3
+ }
4
+ declare const MetaMaskIcon: ({ className }: Props) => JSX.Element;
5
+ export default MetaMaskIcon;
@@ -0,0 +1,10 @@
1
+ import { Token } from '../../state';
2
+ import './token-field.css';
3
+ export type SelectToken = (token: Token) => void;
4
+ interface UsdAmountField {
5
+ value: string;
6
+ onInput: (amount: string) => void;
7
+ reefPrice: string;
8
+ }
9
+ declare const UsdAmountField: ({ value, onInput, reefPrice }: UsdAmountField) => JSX.Element;
10
+ export default UsdAmountField;
@@ -1,7 +1,8 @@
1
- import { reefState, network as nw, extension as extReef } from '@reef-chain/util-lib';
2
- import { Provider } from '@reef-chain/evm-provider';
3
- import { ReefSigner } from '../state';
1
+ import { reefState, network as nw, extension as extReef } from "@reef-chain/util-lib";
2
+ import { Provider } from "@reef-chain/evm-provider";
3
+ import { ReefSigner } from "../state";
4
4
  type Network = nw.Network;
5
+ export declare const SELECTED_ADDRESS_IDENT = "selected_address_reef";
5
6
  interface State {
6
7
  error: {
7
8
  code?: number;
@@ -14,7 +15,7 @@ interface State {
14
15
  signers: ReefSigner[];
15
16
  selectedReefSigner?: ReefSigner;
16
17
  reefState: any;
17
- extension: extReef.InjectedExtension | undefined;
18
+ extensions: extReef.InjectedExtension[];
18
19
  }
19
20
  export interface InitReefStateOptions {
20
21
  network?: Network;
@@ -1,7 +1,10 @@
1
- import { extension as extReef } from '@reef-chain/util-lib';
1
+ import { extension as extReef } from "@reef-chain/util-lib";
2
+ export interface ExtensionWithAccounts {
3
+ extension: extReef.InjectedExtension;
4
+ accounts: extReef.InjectedAccountWithMeta[];
5
+ }
2
6
  export declare const useInjectExtension: (appDisplayName: string) => [
3
- extReef.InjectedAccountWithMeta[],
4
- extReef.InjectedExtension | undefined,
7
+ ExtensionWithAccounts[],
5
8
  boolean,
6
9
  {
7
10
  code?: number;
@@ -29,6 +29,7 @@ interface UsePoolData {
29
29
  decimals1: number;
30
30
  decimals2: number;
31
31
  timeData: TimeData;
32
+ poolUpdatedAt: string;
32
33
  }
33
- export declare const usePoolData: ({ address, decimals1, decimals2, price1, price2, timeData, }: UsePoolData, httpClient: AxiosInstance) => UsePoolDataOutput;
34
+ export declare const usePoolData: ({ address, decimals1, decimals2, price1, price2, timeData, poolUpdatedAt }: UsePoolData, httpClient: AxiosInstance) => UsePoolDataOutput;
34
35
  export {};