toTransaction :: MonadIO m
              => Kernel.PassiveWallet
              -> TxMeta
              -> m (Either HD.UnknownHdAccount V1.Transaction)
toTransaction wallet meta = liftIO $ do
    db <- liftIO $ Kernel.getWalletSnapshot wallet
    sc <- liftIO $ Node.getSlotCount (wallet ^. Kernel.walletNode)
    currentSlot <- Node.getTipSlotId (wallet ^. Kernel.walletNode)
    return $ runExcept $ metaToTx db sc currentSlot meta

-- | Type Casting for Account filtering from V1 to MetaData Types.
toTransaction :: MonadIO m
              => Kernel.PassiveWallet
              -> TxMeta
              -> m (Either HD.UnknownHdAccount V1.Transaction)
toTransaction wallet meta = liftIO $ do
    db <- liftIO $ Kernel.getWalletSnapshot wallet
    sc <- liftIO $ Node.getSlotCount (wallet ^. Kernel.walletNode)
    currentSlot <- Node.getTipSlotId (wallet ^. Kernel.walletNode)
    return $ runExcept $ metaToTx db sc currentSlot meta

-- | Type Casting for Account filtering from V1 to MetaData Types.
toTransaction wallet meta = liftIO $ do
    db <- liftIO $ Kernel.getWalletSnapshot wallet
    sc <- liftIO $ Node.getSlotCount (wallet ^. Kernel.walletNode)
    currentSlot <- Node.getTipSlotId (wallet ^. Kernel.walletNode)
    return $ runExcept $ metaToTx db sc currentSlot meta

-- | Type Casting for Account filtering from V1 to MetaData Types.