@@ -9,16 +9,16 @@ import {
9
9
createReactQueryMutationHooks ,
10
10
} from './react-query'
11
11
import { expectCode , makeContext } from '../../test-utils' ;
12
- import { createMessageBuilderClass } from '../message-builder' ;
13
-
14
- const execCtx = makeContext ( execute_msg ) ;
15
- const queryCtx = makeContext ( query_msg ) ;
16
12
17
13
it ( 'createReactQueryHooks' , ( ) => {
18
14
expectCode ( t . program (
19
15
createReactQueryHooks (
20
16
{
21
- context : queryCtx ,
17
+ context : makeContext ( query_msg , {
18
+ reactQuery : {
19
+ version : 'v3' ,
20
+ }
21
+ } ) ,
22
22
queryMsg : query_msg ,
23
23
contractName : 'Sg721' ,
24
24
QueryClient : 'Sg721QueryClient'
@@ -29,6 +29,7 @@ it('createReactQueryHooks', () => {
29
29
{
30
30
context : makeContext ( query_msg , {
31
31
reactQuery : {
32
+ version : 'v3' ,
32
33
optionalClient : true
33
34
}
34
35
} ) ,
@@ -84,7 +85,11 @@ it('createReactQueryHooks', () => {
84
85
expectCode ( t . program (
85
86
createReactQueryMutationHooks (
86
87
{
87
- context : execCtx ,
88
+ context : makeContext ( execute_msg , {
89
+ reactQuery : {
90
+ version : 'v3'
91
+ }
92
+ } ) ,
88
93
execMsg : execute_msg ,
89
94
contractName : 'Sg721' ,
90
95
ExecuteClient : 'Sg721Client' ,
@@ -93,11 +98,14 @@ it('createReactQueryHooks', () => {
93
98
} ) ;
94
99
95
100
it ( 'ownership' , ( ) => {
96
- const ownershipCtx = makeContext ( ownership ) ;
97
101
expectCode ( t . program (
98
102
createReactQueryMutationHooks (
99
103
{
100
- context : ownershipCtx ,
104
+ context : makeContext ( ownership , {
105
+ reactQuery : {
106
+ version : 'v3'
107
+ }
108
+ } ) ,
101
109
execMsg : ownership ,
102
110
contractName : 'Ownership' ,
103
111
ExecuteClient : 'OwnershipClient' ,
0 commit comments