Skip to content

Commit

Permalink
fix make_signer
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Mar 5, 2025
1 parent 8c42690 commit 9c661f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/evm-bridge-withdrawer/templates/configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data:
OTEL_SERVICE_NAME: "{{ tpl .Values.otel.serviceName . }}"
{{- if not .Values.global.dev }}
{{- else }}
ASTRIA_BRIDGE_WITHDRAWER_NO_FROST_THRESHOLD_SIGNING: "{{ .Values.config.frostThresholdSigningDisabled }}"
ASTRIA_BRIDGE_WITHDRAWER_NO_FROST_THRESHOLD_SIGNING: "{{ .Values.config.noFrostThresholdSigning }}"
ASTRIA_BRIDGE_WITHDRAWER_FROST_MIN_SIGNERS: "{{ .Values.config.frostMinSigners }}"
ASTRIA_BRIDGE_WITHDRAWER_FROST_PUBLIC_KEY_PACKAGE_PATH: "{{ .Values.config.frostPublicKeyPackagePath }}"
ASTRIA_BRIDGE_WITHDRAWER_FROST_PARTICIPANT_ENDPOINTS: "{{ .Values.config.frostParticipantEndpoints }}"
Expand Down
2 changes: 1 addition & 1 deletion charts/evm-bridge-withdrawer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ config:
rollupAssetDenom: ""
evmContractAddress: "0x"
evmRpcEndpoint: ""
frostThresholdSigningDisabled: "true"
noFrostThresholdSigning: "true"
frostMinSigners: "0"
frostPublicKeyPackagePath: ""
frostParticipantEndpoints: "[]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ pub(crate) async fn make_signer(
sequencer_address_prefix: String,
) -> eyre::Result<Signer> {
let signer = if no_frost_threshold_signing {
Signer::Single(Box::new(
sequencer_key::SequencerKey::builder()
.path(sequencer_key_path)
.prefix(sequencer_address_prefix)
.try_build()
.wrap_err("failed to load sequencer private key")?,
))
} else {
let public_key_package =
read_frost_key(&frost_public_key_package_path).wrap_err_with(|| {
format!(
Expand All @@ -62,14 +70,6 @@ pub(crate) async fn make_signer(
.try_build()
.wrap_err("failed to initialize frost signer")?,
)
} else {
Signer::Single(Box::new(
sequencer_key::SequencerKey::builder()
.path(sequencer_key_path)
.prefix(sequencer_address_prefix)
.try_build()
.wrap_err("failed to load sequencer private key")?,
))
};
Ok(signer)
}
Expand Down

0 comments on commit 9c661f5

Please sign in to comment.