{
  "version": 3,
  "sources": ["../../src/store/selectors/accountSelectors.ts"],
  "sourcesContent": ["import { emptyAccount } from 'store/slices/account/emptyAccount';\nimport { StoreType } from 'store/store.types';\n\nconst privateAccountInfoSelector = ({ account }: StoreType) => account;\n\nexport const accountSelector = ({ account }: StoreType) =>\n  account.address && account.address in account.accounts\n    ? account.accounts[account.address]\n    : emptyAccount;\n\nexport const accountInfoSelector = (state: StoreType) => {\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const { accounts, ...info } = privateAccountInfoSelector(state);\n  const account = accountSelector(state);\n\n  return { ...info, address: account.address, account };\n};\n\nexport const addressSelector = ({ account: { address } }: StoreType) => address;\n\nexport const websocketEventSelector = ({\n  account: { websocketEvent }\n}: StoreType) => websocketEvent;\n\nexport const accountNonceSelector = (store: StoreType) =>\n  accountSelector(store)?.nonce || 0;\n\nexport const isLoggedInSelector = (store: StoreType) => {\n  const address = addressSelector(store);\n  const account = accountSelector(store);\n  return Boolean(address && account?.address === address);\n};\n\nexport const ledgerAccountSelector = ({\n  account: { ledgerAccount }\n}: StoreType) => ledgerAccount;\n"],
  "mappings": "yCAGA,IAAMA,EAA6B,CAAC,CAAE,QAAAC,CAAQ,IAAiBA,EAElDC,EAAkB,CAAC,CAAE,QAAAD,CAAQ,IACxCA,EAAQ,SAAWA,EAAQ,WAAWA,EAAQ,SAC1CA,EAAQ,SAASA,EAAQ,OAAO,EAChCE,EAEOC,EAAuBC,GAAqB,CAEvD,GAAM,CAAE,SAAAC,EAAU,GAAGC,CAAK,EAAIP,EAA2BK,CAAK,EACxDJ,EAAUC,EAAgBG,CAAK,EAErC,MAAO,CAAE,GAAGE,EAAM,QAASN,EAAQ,QAAS,QAAAA,CAAQ,CACtD,EAEaO,EAAkB,CAAC,CAAE,QAAS,CAAE,QAAAC,CAAQ,CAAE,IAAiBA,EAE3DC,EAAyB,CAAC,CACrC,QAAS,CAAE,eAAAC,CAAe,CAC5B,IAAiBA,EAEJC,EAAwBC,GACnCX,EAAgBW,CAAK,GAAG,OAAS,EAEtBC,EAAsBD,GAAqB,CACtD,IAAMJ,EAAUD,EAAgBK,CAAK,EAC/BZ,EAAUC,EAAgBW,CAAK,EACrC,MAAO,GAAQJ,GAAWR,GAAS,UAAYQ,EACjD,EAEaM,EAAwB,CAAC,CACpC,QAAS,CAAE,cAAAC,CAAc,CAC3B,IAAiBA",
  "names": ["privateAccountInfoSelector", "account", "accountSelector", "emptyAccount", "accountInfoSelector", "state", "accounts", "info", "addressSelector", "address", "websocketEventSelector", "websocketEvent", "accountNonceSelector", "store", "isLoggedInSelector", "ledgerAccountSelector", "ledgerAccount"]
}
