Skip to content

Commit

Permalink
Refactor bulk pubkey export names
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBenc committed Jan 14, 2021
1 parent 589aab9 commit 4c7dba4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions app/frontend/actions.ts
Expand Up @@ -121,14 +121,12 @@ export default ({setState, getState}: {setState: SetStateFn; getState: GetStateF

const loadWallet = async (
state,
{cryptoProviderType, walletSecretDef, forceWebUsb, bulkExportPubKeys}
{cryptoProviderType, walletSecretDef, forceWebUsb, shouldExportPubKeyBulk}
) => {
// loadingAction(state, `Waiting for ${state.hwWalletName}...`)
loadingAction(state, 'Loading wallet data...', {
walletLoadingError: undefined,
})
const isShelleyCompatible = !(walletSecretDef && walletSecretDef.derivationScheme.type === 'v1')
const shouldExportPubKeyBulk = bulkExportPubKeys
const config = {...ADALITE_CONFIG, isShelleyCompatible, shouldExportPubKeyBulk}
try {
const cryptoProvider = await ShelleyCryptoProviderFactory.getCryptoProvider(
Expand Down
6 changes: 3 additions & 3 deletions app/frontend/components/pages/login/hardwareAuth.tsx
Expand Up @@ -61,7 +61,7 @@ const LoadByHardwareWalletSection = ({loadWallet}: Props) => {
onClick={() =>
loadWallet({
cryptoProviderType: CRYPTO_PROVIDER_TYPES.TREZOR,
bulkExportPubKeys: !dontBulkExportPubKeys,
shouldExportPubKeyBulk: !dontBulkExportPubKeys,
})
}
>
Expand Down Expand Up @@ -93,7 +93,7 @@ const LoadByHardwareWalletSection = ({loadWallet}: Props) => {
onClick={() =>
loadWallet({
cryptoProviderType: CRYPTO_PROVIDER_TYPES.LEDGER,
bulkExportPubKeys: !dontBulkExportPubKeys,
shouldExportPubKeyBulk: !dontBulkExportPubKeys,
})
}
>
Expand All @@ -110,7 +110,7 @@ const LoadByHardwareWalletSection = ({loadWallet}: Props) => {
loadWallet({
cryptoProviderType: CRYPTO_PROVIDER_TYPES.LEDGER,
forceWebUsb: true,
bulkExportPubKeys: !dontBulkExportPubKeys,
shouldExportPubKeyBulk: !dontBulkExportPubKeys,
})
}
>
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/components/pages/login/keyFileAuth.tsx
Expand Up @@ -82,7 +82,7 @@ class LoadKeyFileClass extends Component<Props, State> {
this.props.loadWallet({
cryptoProviderType: CRYPTO_PROVIDER_TYPES.WALLET_SECRET,
walletSecretDef,
bulkExportPubKeys: true,
shouldExportPubKeyBulk: true,
})
} catch (e) {
this.props.stopLoadingAction()
Expand Down Expand Up @@ -145,7 +145,7 @@ class LoadKeyFileClass extends Component<Props, State> {
this.props.loadWallet({
cryptoProviderType: CRYPTO_PROVIDER_TYPES.WALLET_SECRET,
walletSecretDef,
bulkExportPubKeys: true,
shouldExportPubKeyBulk: true,
})
this.setState({keyfileError: undefined})
}
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/components/pages/login/mnemonicAuth.tsx
Expand Up @@ -42,7 +42,7 @@ class LoadByMnemonicSectionClass extends Component<Props> {
await this.props.loadWallet({
cryptoProviderType: CRYPTO_PROVIDER_TYPES.WALLET_SECRET,
walletSecretDef: await mnemonicToWalletSecretDef(sanitizedMnemonic),
bulkExportPubKeys: true,
shouldExportPubKeyBulk: true,
})
}

Expand Down Expand Up @@ -96,7 +96,7 @@ class LoadByMnemonicSectionClass extends Component<Props> {
cryptoProviderType: CRYPTO_PROVIDER_TYPES.WALLET_SECRET,
// TODO(ppershing): get rid of mnemonic sanitization in this component
walletSecretDef: await mnemonicToWalletSecretDef(sanitizedMnemonic),
bulkExportPubKeys: true,
shouldExportPubKeyBulk: true,
})
}
{...tooltip(
Expand Down

0 comments on commit 4c7dba4

Please sign in to comment.