diff --git a/src/common/store/constants.ts b/src/common/store/constants.ts index 64dbb1b4..c589c2f6 100644 --- a/src/common/store/constants.ts +++ b/src/common/store/constants.ts @@ -155,6 +155,9 @@ export const PEGIN_TX_IS_HD_WALLET = 'PEGIN_TX_IS_HD_WALLET'; // Session getters export const SESSION_IN_TX_FLOW = 'SESSION_IN_TX_FLOW'; export const SESSION_IS_LEDGER_CONNECTED = 'SESSION_IS_LEDGER_CONNECTED'; +export const SESSION_IS_TREZOR_CONNECTED = 'SESSION_IS_TREZOR_CONNECTED'; +export const SESSION_IS_METAMASK_CONNECTED = 'SESSION_IS_METAMASK_CONNECTED'; +export const SESSION_IS_RLOGIN_DEFINED = 'SESSION_IS_RLOGIN_DEFINED'; // environment export const BTC_NETWORK_MAINNET = 'main'; diff --git a/src/common/store/session/getters.ts b/src/common/store/session/getters.ts index 77a9e467..ad19ca76 100644 --- a/src/common/store/session/getters.ts +++ b/src/common/store/session/getters.ts @@ -6,4 +6,8 @@ import { RootState } from '@/common/types/store'; export const getters: GetterTree = { [constants.SESSION_IN_TX_FLOW]: (state): boolean => state.txType !== undefined, [constants.SESSION_IS_LEDGER_CONNECTED]: (state): boolean => !!(state.rLogin?.provider.isLedger), + [constants.SESSION_IS_TREZOR_CONNECTED]: (state): boolean => !!(state.rLogin?.provider.isTrezor), + [constants.SESSION_IS_METAMASK_CONNECTED]: + (state): boolean => !!(state.rLogin?.provider.isMetamask), + [constants.SESSION_IS_RLOGIN_DEFINED]: (state): boolean => state.rLogin !== undefined, };