@@ -16,13 +16,12 @@ public unsafe class ToriiClient
16
16
private dojo . Subscription * entitySubscription ;
17
17
private dojo . Subscription * eventMessagesSubscription ;
18
18
19
- public ToriiClient ( string toriiUrl , string rpcUrl , string relayUrl , FieldElement worldAddress , bool dispatchEventsToMainThread = true )
19
+ public ToriiClient ( string toriiUrl , string relayUrl , FieldElement worldAddress , bool dispatchEventsToMainThread = true )
20
20
{
21
21
CString ctoriiUrl = CString . FromString ( toriiUrl ) ;
22
- CString crpcUrl = CString . FromString ( rpcUrl ) ;
23
22
CString crelayUrl = CString . FromString ( relayUrl ) ;
24
23
25
- var result = dojo . client_new ( ctoriiUrl , crpcUrl , crelayUrl , worldAddress . Inner ) ;
24
+ var result = dojo . client_new ( ctoriiUrl , crelayUrl , worldAddress . Inner ) ;
26
25
if ( result . tag == dojo . ResultToriiClient_Tag . ErrToriiClient )
27
26
{
28
27
throw new Exception ( result . err . message ) ;
@@ -48,9 +47,13 @@ public ToriiClient(string toriiUrl, string rpcUrl, string relayUrl, FieldElement
48
47
public dojo . WorldMetadata WorldMetadata ( )
49
48
{
50
49
// TODO: implement a managed type for WorldMetadata too
51
- dojo . WorldMetadata worldMetadata = dojo . client_metadata ( client ) ;
50
+ dojo . ResultWorldMetadata result = dojo . client_metadata ( client ) ;
51
+ if ( result . tag == dojo . ResultWorldMetadata_Tag . ErrWorldMetadata )
52
+ {
53
+ throw new Exception ( result . err . message ) ;
54
+ }
52
55
53
- return worldMetadata ;
56
+ return result . ok ;
54
57
}
55
58
56
59
// NOT USED? potentially deprecated
0 commit comments