mirror of
https://git.um-react.app/um/um-react.git
synced 2026-11-26 23:26:59 +00:00
feat: pass options to downstream decryptor
This commit is contained in:
1 parent
0038322ae9
commit
865dcae931
7 files changed
+49
-16
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import type { DecryptCommandOptions } from '~/decrypt-worker/types';
|
||||
import type { RootState } from '~/store';
|
||||
import { hasOwn } from '~/util/objects';
|
||||
|
||||
export const selectDecryptOptionByFile = (state: RootState, name: string): DecryptCommandOptions => {
|
||||
const qmc2Keys = state.settings.qmc2.keys;
|
||||
|
||||
return {
|
||||
qmc2Key: hasOwn(qmc2Keys, name) ? qmc2Keys[name] : undefined,
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user