File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
crates/bcr-ebill-persistence/src/db Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ impl MintStoreApi for SurrealMintStore {
45
45
match self
46
46
. db
47
47
. query :: < Option < BillIdDb > > (
48
- "SELECT bill_id FROM type::table($table) WHERE bill_id = $bill_id GROUP BY bill_id" ,
48
+ "SELECT bill_id FROM type::table($table) WHERE bill_id = $bill_id AND requester_node_id = $requester_node_id GROUP BY bill_id" ,
49
49
bindings,
50
50
)
51
51
. await
@@ -418,6 +418,28 @@ mod tests {
418
418
. await
419
419
. unwrap ( ) ;
420
420
assert ! ( store. exists_for_bill( "requester" , "bill_id" ) . await . unwrap( ) ) ;
421
+ assert ! (
422
+ !store
423
+ . exists_for_bill( "other_requester" , "bill_id" )
424
+ . await
425
+ . unwrap( )
426
+ ) ;
427
+ store
428
+ . add_request (
429
+ "other_requester" ,
430
+ "bill_id" ,
431
+ "mint_node_id" ,
432
+ "mint_req_id" ,
433
+ 1731593928 ,
434
+ )
435
+ . await
436
+ . unwrap ( ) ;
437
+ assert ! (
438
+ store
439
+ . exists_for_bill( "other_requester" , "bill_id" )
440
+ . await
441
+ . unwrap( )
442
+ ) ;
421
443
}
422
444
423
445
#[ tokio:: test]
You can’t perform that action at this time.
0 commit comments