mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 11:34:26 +00:00
307e941684
* Parity Signer Squashed * ParitySigner to be a container * Parity Signer: style and polish * target blank on appstore links * PR fixes * Move QrSignerModal to SendTransaction container * Rework redux, use signing saga * Cleanup * Use new logo, change helpLink * Rework finalize actions and types a bit * Webcam info + wiki link on unlock screen * Make the Parity QR Signer its own component, that has error messaging and ismore robust about adding / removing cameras. * Unneded l10n
33 lines
991 B
TypeScript
33 lines
991 B
TypeScript
import { MiscWalletName, SecureWalletName, WalletName } from 'config';
|
||
|
||
export interface DisabledWallets {
|
||
wallets: WalletName[];
|
||
reasons: {
|
||
[key: string]: string;
|
||
};
|
||
}
|
||
|
||
enum WalletMode {
|
||
READ_ONLY = 'READ_ONLY',
|
||
UNABLE_TO_SIGN = 'UNABLE_TO_SIGN'
|
||
}
|
||
|
||
// Duplicating reasons is kind of tedious, but saves having to run through a
|
||
// bunch of loops to format it differently
|
||
export const DISABLE_WALLETS: { [key in WalletMode]: DisabledWallets } = {
|
||
[WalletMode.READ_ONLY]: {
|
||
wallets: [MiscWalletName.VIEW_ONLY],
|
||
reasons: {
|
||
[MiscWalletName.VIEW_ONLY]: 'Read only is not allowed'
|
||
}
|
||
},
|
||
[WalletMode.UNABLE_TO_SIGN]: {
|
||
wallets: [SecureWalletName.TREZOR, SecureWalletName.PARITY_SIGNER, MiscWalletName.VIEW_ONLY],
|
||
reasons: {
|
||
[SecureWalletName.TREZOR]: 'This wallet can’t sign messages',
|
||
[SecureWalletName.PARITY_SIGNER]: 'This wallet can’t sign messages',
|
||
[MiscWalletName.VIEW_ONLY]: 'This wallet can’t sign messages'
|
||
}
|
||
}
|
||
};
|