Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add signature arguement when creat Order(fix #21) #22

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions binding_tests/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func TestSignOrderMatching(t *testing.T) {
true,
2,
5,
nil,
)
taker, err = sdk.CreateSignedOrder(
zklink_signer,
Expand All @@ -166,6 +167,7 @@ func TestSignOrderMatching(t *testing.T) {
false,
2,
5,
nil,
)
maker, err = sdk.CreateSignedOrder(
zklink_signer,
Expand Down
3 changes: 2 additions & 1 deletion bindings/sdk/src/ffi.udl
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ interface Order {
BigUint price,
boolean is_sell,
u8 fee_ratio1,
u8 fee_ratio2
u8 fee_ratio2,
ZkLinkSignature ?signature
);
ZkLinkSignature signature();
sequence<u8> get_bytes();
Expand Down
2 changes: 2 additions & 0 deletions examples/Golang/5_order_matching.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func HighLevelOrderMatching() {
true,
2,
5,
nil,
)
taker, err = sdk.CreateSignedOrder(
zklinkSigner,
Expand All @@ -54,6 +55,7 @@ func HighLevelOrderMatching() {
false,
2,
5,
nil,
)
maker, err = sdk.CreateSignedOrder(
zklinkSigner,
Expand Down
3 changes: 2 additions & 1 deletion types/src/tx_type/order_matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ impl Order {
is_sell: bool,
fee_ratio1: u8,
fee_ratio2: u8,
signature: Option<ZkLinkSignature>,
) -> Self {
Self {
account_id,
Expand All @@ -84,7 +85,7 @@ impl Order {
is_sell: u8::from(is_sell),
fee_ratio1,
fee_ratio2,
signature: ZkLinkSignature::default(),
signature: signature.unwrap_or_default(),
}
}

Expand Down
Loading