diff --git a/.github/workflows/motoko-threshold-schnorr-example.yaml b/.github/workflows/motoko-threshold-schnorr-example.yaml index 68e774f0d..2ef3f35c5 100644 --- a/.github/workflows/motoko-threshold-schnorr-example.yaml +++ b/.github/workflows/motoko-threshold-schnorr-example.yaml @@ -21,7 +21,6 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Threshold Schnorr Darwin run: | - dfxvm default 0.22.0-beta.0 dfx start --background npm install @noble/curves pushd motoko/threshold-schnorr @@ -34,7 +33,6 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Threshold Schnorr Linux run: | - dfxvm default 0.22.0-beta.0 dfx start --background npm install @noble/curves pushd motoko/threshold-schnorr diff --git a/rust/threshold-schnorr/Makefile b/rust/threshold-schnorr/Makefile index 07fd3fbfb..c277d4a9e 100644 --- a/rust/threshold-schnorr/Makefile +++ b/rust/threshold-schnorr/Makefile @@ -1,6 +1,11 @@ .PHONY: all all: build +.PHONY: build +.SILENT: build +build: + dfx build --check + .PHONY: deploy .SILENT: deploy deploy: @@ -8,7 +13,7 @@ deploy: .PHONY: test .SILENT: test -test: +test: build cargo test .PHONY: clean diff --git a/rust/threshold-schnorr/src/schnorr_example_rust/src/wasm_only.rs b/rust/threshold-schnorr/src/schnorr_example_rust/src/wasm_only.rs index 1aa02d4db..f9fef1fe7 100644 --- a/rust/threshold-schnorr/src/schnorr_example_rust/src/wasm_only.rs +++ b/rust/threshold-schnorr/src/schnorr_example_rust/src/wasm_only.rs @@ -42,7 +42,7 @@ async fn public_key(algorithm: SchnorrAlgorithm) -> Result Result Result = update( &pic, my_principal, example_canister_id, "sign", - encode_args((message_hex.clone(), algorithm)).unwrap(), + encode_args((message.clone(), algorithm)).unwrap(), ); let signature_hex = sig_reply.expect("failed to sign").signature_hex; @@ -63,7 +72,7 @@ fn test_impl(pic: &PocketIc, algorithm: SchnorrAlgorithm) { "verify", encode_args(( signature_hex.clone(), - message_hex.clone(), + message.clone(), public_key_hex.clone(), algorithm, )) @@ -81,7 +90,7 @@ fn test_impl(pic: &PocketIc, algorithm: SchnorrAlgorithm) { "verify", encode_args(( clone_and_reverse_chars(&signature_hex), - message_hex.clone(), + message.clone(), public_key_hex.clone(), algorithm, )) @@ -99,7 +108,7 @@ fn test_impl(pic: &PocketIc, algorithm: SchnorrAlgorithm) { "verify", encode_args(( signature_hex.clone(), - clone_and_reverse_chars(&message_hex), + clone_and_reverse_chars(&message), public_key_hex.clone(), algorithm, )) @@ -117,7 +126,7 @@ fn test_impl(pic: &PocketIc, algorithm: SchnorrAlgorithm) { "verify", encode_args(( signature_hex.clone(), - message_hex.clone(), + message.clone(), clone_and_reverse_chars(&public_key_hex), algorithm, )) @@ -138,7 +147,7 @@ fn test_impl(pic: &PocketIc, algorithm: SchnorrAlgorithm) { "verify", encode_args(( signature_hex.clone(), - message_hex.clone(), + message.clone(), public_key_hex.clone(), other_algorithm(algorithm), ))