11use crate :: IRaindexV7 :: {
2- EvaluableV4 , OrderV4 , QuoteV2 , SignedContextV1 , TakeOrderConfigV4 , TakeOrdersConfigV5 , IOV2 ,
2+ EvaluableV4 , OrderV4 , QuoteV3 , SignedContextV2 , TakeOrderConfigV5 , TakeOrdersConfigV6 , IOV2 ,
33} ;
44use wasm_bindgen_utils:: { impl_custom_tsify, impl_wasm_traits, prelude:: * } ;
55
66impl_wasm_traits ! ( IOV2 ) ;
7- impl_wasm_traits ! ( QuoteV2 ) ;
7+ impl_wasm_traits ! ( QuoteV3 ) ;
88impl_wasm_traits ! ( OrderV4 ) ;
99impl_wasm_traits ! ( EvaluableV4 ) ;
10- impl_wasm_traits ! ( SignedContextV1 ) ;
11- impl_wasm_traits ! ( TakeOrderConfigV4 ) ;
12- impl_wasm_traits ! ( TakeOrdersConfigV5 ) ;
10+ impl_wasm_traits ! ( SignedContextV2 ) ;
11+ impl_wasm_traits ! ( TakeOrderConfigV5 ) ;
12+ impl_wasm_traits ! ( TakeOrdersConfigV6 ) ;
1313
1414impl_custom_tsify ! (
1515 IOV2 ,
@@ -19,12 +19,12 @@ impl_custom_tsify!(
1919}"
2020) ;
2121impl_custom_tsify ! (
22- QuoteV2 ,
23- "export interface QuoteV2 {
22+ QuoteV3 ,
23+ "export interface QuoteV3 {
2424 order: OrderV4;
2525 inputIOIndex: string;
2626 outputIOIndex: string;
27- signedContext: SignedContextV1 [];
27+ signedContext: SignedContextV2 [];
2828}"
2929) ;
3030impl_custom_tsify ! (
@@ -46,30 +46,31 @@ impl_custom_tsify!(
4646}"
4747) ;
4848impl_custom_tsify ! (
49- SignedContextV1 ,
50- "export interface SignedContextV1 {
49+ SignedContextV2 ,
50+ "export interface SignedContextV2 {
5151 signer: string;
52+ domainSeparator: string;
5253 context: string[];
5354 signature: string;
5455}"
5556) ;
5657impl_custom_tsify ! (
57- TakeOrderConfigV4 ,
58- "export interface TakeOrderConfigV4 {
58+ TakeOrderConfigV5 ,
59+ "export interface TakeOrderConfigV5 {
5960 order: OrderV4;
6061 inputIOIndex: string;
6162 outputIOIndex: string;
62- signedContext: SignedContextV1 [];
63+ signedContext: SignedContextV2 [];
6364}"
6465) ;
6566impl_custom_tsify ! (
66- TakeOrdersConfigV5 ,
67- "export interface TakeOrdersConfigV5 {
67+ TakeOrdersConfigV6 ,
68+ "export interface TakeOrdersConfigV6 {
6869 minimumIO: string;
6970 maximumIO: string;
7071 maximumIORatio: string;
7172 IOIsInput: string;
72- orders: TakeOrderConfigV4 [];
73+ orders: TakeOrderConfigV5 [];
7374 data: string;
7475}"
7576) ;
@@ -91,7 +92,7 @@ mod tests {
9192
9293 #[ wasm_bindgen_test]
9394 fn test_quote_tsify ( ) {
94- let js_quote = to_js_value ( & QuoteV2 :: default ( ) ) . unwrap ( ) ;
95+ let js_quote = to_js_value ( & QuoteV3 :: default ( ) ) . unwrap ( ) ;
9596 // validate serialized props match the tsify definition
9697 assert ! ( JsString :: from_str( "order" ) . unwrap( ) . js_in( & js_quote) ) ;
9798 assert ! ( JsString :: from_str( "inputIOIndex" ) . unwrap( ) . js_in( & js_quote) ) ;
@@ -126,12 +127,15 @@ mod tests {
126127 }
127128
128129 #[ wasm_bindgen_test]
129- fn test_signed_contextv1_tsify ( ) {
130- let js_signed_context = to_js_value ( & SignedContextV1 :: default ( ) ) . unwrap ( ) ;
130+ fn test_signed_contextv2_tsify ( ) {
131+ let js_signed_context = to_js_value ( & SignedContextV2 :: default ( ) ) . unwrap ( ) ;
131132 // validate serialized props match the tsify definition
132133 assert ! ( JsString :: from_str( "signer" )
133134 . unwrap( )
134135 . js_in( & js_signed_context) ) ;
136+ assert ! ( JsString :: from_str( "domainSeparator" )
137+ . unwrap( )
138+ . js_in( & js_signed_context) ) ;
135139 assert ! ( JsString :: from_str( "context" )
136140 . unwrap( )
137141 . js_in( & js_signed_context) ) ;
@@ -142,7 +146,7 @@ mod tests {
142146
143147 #[ wasm_bindgen_test]
144148 fn test_take_order_config_v4_tsify ( ) {
145- let js_take_order_config = to_js_value ( & TakeOrderConfigV4 :: default ( ) ) . unwrap ( ) ;
149+ let js_take_order_config = to_js_value ( & TakeOrderConfigV5 :: default ( ) ) . unwrap ( ) ;
146150 // validate serialized props match the tsify definition
147151 assert ! ( JsString :: from_str( "order" )
148152 . unwrap( )
@@ -160,7 +164,7 @@ mod tests {
160164
161165 #[ wasm_bindgen_test]
162166 fn test_take_orders_config_v4_tsify ( ) {
163- let js_take_orders_config = to_js_value ( & TakeOrdersConfigV5 :: default ( ) ) . unwrap ( ) ;
167+ let js_take_orders_config = to_js_value ( & TakeOrdersConfigV6 :: default ( ) ) . unwrap ( ) ;
164168 // validate serialized props match the tsify definition
165169 assert ! ( JsString :: from_str( "minimumIO" )
166170 . unwrap( )
0 commit comments