fix: resolve exported type stuttering issues (revive)
- Rename VaultMetadata to Metadata in internal/vault package to avoid stuttering - Rename BIP85DRNG to DRNG in pkg/bip85 package to avoid stuttering - Update all references in code and tests
This commit is contained in:
@@ -30,6 +30,7 @@ func NewVault(fs afero.Fs, stateDir string, name string) *Vault {
|
||||
longTermKey: nil,
|
||||
}
|
||||
secret.Debug("Created NewVault instance successfully")
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
@@ -92,6 +93,7 @@ func (v *Vault) GetOrDeriveLongTermKey() (*age.X25519Identity, error) {
|
||||
"derived_hash", derivedPubKeyHash,
|
||||
"stored_hash", metadata.PublicKeyHash,
|
||||
"derivation_index", metadata.DerivationIndex)
|
||||
|
||||
return nil, fmt.Errorf("derived public key does not match vault: mnemonic may be incorrect")
|
||||
}
|
||||
|
||||
@@ -178,7 +180,8 @@ func (v *Vault) GetOrDeriveLongTermKey() (*age.X25519Identity, error) {
|
||||
|
||||
// Cache the derived key by unlocking the vault
|
||||
v.Unlock(ltIdentity)
|
||||
secret.Debug("Vault is unlocked (lt key in memory) via unlocker", "vault_name", v.Name, "unlocker_type", unlocker.GetType())
|
||||
secret.Debug("Vault is unlocked (lt key in memory) via unlocker",
|
||||
"vault_name", v.Name, "unlocker_type", unlocker.GetType())
|
||||
|
||||
return ltIdentity, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user