forked from cerc-io/laconic-wallet
* Add page for scanning qr code * Refactor code * Ask for permission to use camera * Change Qr to QR * Seperate imports * QR instead of Qr --------- Co-authored-by: Adw8 <adwait@deepstacksoft.com>
86 lines
1.7 KiB
TypeScript
86 lines
1.7 KiB
TypeScript
export type StackParamsList = {
|
|
Laconic: undefined;
|
|
SignMessage: { selectedNetwork: string; accountInfo: Account } | undefined;
|
|
SignRequest:
|
|
| { network: string; address: string; message: string }
|
|
| undefined;
|
|
InvalidPath: undefined;
|
|
QRScanner: undefined;
|
|
};
|
|
|
|
export type Account = {
|
|
counterId: number;
|
|
pubKey: string;
|
|
address: string;
|
|
hdPath: string;
|
|
};
|
|
|
|
export type WalletDetails = {
|
|
mnemonic: string;
|
|
ethAccounts: Account | undefined;
|
|
cosmosAccounts: Account | undefined;
|
|
};
|
|
|
|
export type AccountsProps = {
|
|
network: string;
|
|
accounts: {
|
|
ethAccounts: Account[];
|
|
cosmosAccounts: Account[];
|
|
};
|
|
currentIndex: number;
|
|
updateIndex: (index: number) => void;
|
|
updateAccounts: (account: Account) => void;
|
|
};
|
|
|
|
export type NetworkDropdownProps = {
|
|
selectedNetwork: string;
|
|
updateNetwork: (network: string) => void;
|
|
};
|
|
|
|
export type AccountsState = {
|
|
ethAccounts: Account[];
|
|
cosmosAccounts: Account[];
|
|
};
|
|
|
|
export type SignMessageParams = {
|
|
message: string;
|
|
network: string;
|
|
accountId: number;
|
|
};
|
|
|
|
export type CreateWalletProps = {
|
|
isWalletCreating: boolean;
|
|
createWalletHandler: () => Promise<void>;
|
|
};
|
|
|
|
export type ResetDialogProps = {
|
|
visible: boolean;
|
|
hideDialog: () => void;
|
|
onConfirm: () => void;
|
|
};
|
|
|
|
export type HDPathDialogProps = {
|
|
pathCode: string;
|
|
visible: boolean;
|
|
hideDialog: () => void;
|
|
updateIndex: (index: number) => void;
|
|
updateAccounts: (account: Account) => void;
|
|
};
|
|
|
|
export type CustomDialogProps = {
|
|
visible: boolean;
|
|
hideDialog: () => void;
|
|
contentText: string;
|
|
titleText?: string;
|
|
};
|
|
|
|
export type GridViewProps = {
|
|
words: string[];
|
|
};
|
|
|
|
export type PathState = {
|
|
firstNumber: string;
|
|
secondNumber: string;
|
|
thirdNumber: string;
|
|
};
|