File tree Expand file tree Collapse file tree 3 files changed +48
-4
lines changed
Expand file tree Collapse file tree 3 files changed +48
-4
lines changed Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ mod tests {
331331
332332 #[ test( tokio:: test) ]
333333 async fn test_current_accounts_v2 ( ) {
334- // Set up a mock escrow subgraph - V2 uses the same subgraph as V1
334+ // Set up a mock escrow subgraph for V2 with payer fields
335335 let mock_server = MockServer :: start ( ) . await ;
336336 let escrow_subgraph = Box :: leak ( Box :: new (
337337 SubgraphClient :: new (
@@ -354,7 +354,7 @@ mod tests {
354354 ) ) )
355355 . respond_with (
356356 ResponseTemplate :: new ( 200 )
357- . set_body_raw ( test_assets:: ESCROW_QUERY_RESPONSE , "application/json" ) ,
357+ . set_body_raw ( test_assets:: ESCROW_QUERY_RESPONSE_V2 , "application/json" ) ,
358358 ) ;
359359 mock_server. register ( mock) . await ;
360360
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ pub fn create_rav_v2(
329329 timestampNs : timestamp_ns,
330330 valueAggregate : value_aggregate,
331331 payer : SENDER . 1 ,
332- dataService : Address :: ZERO ,
332+ dataService : INDEXER . 1 , // Use the same indexer address as the context
333333 serviceProvider : INDEXER . 1 ,
334334 metadata : Bytes :: new ( ) ,
335335 } ,
@@ -369,7 +369,7 @@ impl CreateReceipt for Horizon {
369369 collection_id,
370370 payer : SENDER . 1 ,
371371 service_provider : INDEXER . 1 ,
372- data_service : Address :: ZERO ,
372+ data_service : INDEXER . 1 , // Use the same indexer address as the context
373373 nonce,
374374 timestamp_ns,
375375 value,
Original file line number Diff line number Diff line change @@ -113,6 +113,50 @@ pub const ESCROW_QUERY_RESPONSE: &str = r#"
113113 }
114114"# ;
115115
116+ pub const ESCROW_QUERY_RESPONSE_V2 : & str = r#"
117+ {
118+ "data": {
119+ "escrowAccounts": [
120+ {
121+ "balance": "34",
122+ "totalAmountThawing": "10",
123+ "payer": {
124+ "id": "0x9858EfFD232B4033E47d90003D41EC34EcaEda94",
125+ "signers": [
126+ {
127+ "id": "0x533661F0fb14d2E8B26223C86a610Dd7D2260892"
128+ },
129+ {
130+ "id": "0x2740f6fA9188cF53ffB6729DDD21575721dE92ce"
131+ }
132+ ]
133+ }
134+ },
135+ {
136+ "balance": "42",
137+ "totalAmountThawing": "0",
138+ "payer": {
139+ "id": "0x22d491bde2303f2f43325b2108d26f1eaba1e32b",
140+ "signers": [
141+ {
142+ "id": "0x245059163ff6ee14279aa7b35ea8f0fdb967df6e"
143+ }
144+ ]
145+ }
146+ },
147+ {
148+ "balance": "2987",
149+ "totalAmountThawing": "12",
150+ "payer": {
151+ "id": "0x192c3B6e0184Fa0Cc5B9D2bDDEb6B79Fb216a002",
152+ "signers": []
153+ }
154+ }
155+ ]
156+ }
157+ }
158+ "# ;
159+
116160pub const NETWORK_SUBGRAPH_DEPLOYMENT : DeploymentId =
117161 deployment_id ! ( "QmU7zqJyHSyUP3yFii8sBtHT8FaJn2WmUnRvwjAUTjwMBP" ) ;
118162
You can’t perform that action at this time.
0 commit comments