File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed
Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ impl InnerContext {
200200 ) SELECT * FROM UNNEST(
201201 $1::CHAR(40)[],
202202 $2::BYTEA[],
203- $3::CHAR(40 )[],
203+ $3::CHAR(64 )[],
204204 $4::CHAR(40)[],
205205 $5::CHAR(40)[],
206206 $6::CHAR(40)[],
Original file line number Diff line number Diff line change @@ -814,17 +814,23 @@ impl State {
814814 . expect ( "should be able to fetch pending V2 receipts from the database" ) ;
815815
816816 for row in receipts_signer_collections_in_db {
817- let collection_ids = row
818- . collection_ids
819- . expect ( "all receipts V2 should have a collection_id" )
820- . iter ( )
821- . map ( |collection_id| {
822- AllocationId :: Horizon (
823- CollectionId :: from_str ( collection_id)
824- . expect ( "collection_id should be a valid collection ID" ) ,
825- )
826- } )
827- . collect :: < HashSet < _ > > ( ) ;
817+ let collection_ids =
818+ row. collection_ids
819+ . expect ( "all receipts V2 should have a collection_id" )
820+ . iter ( )
821+ . map ( |collection_id| {
822+ let trimmed = collection_id. trim ( ) ;
823+ let hex_str = if let Some ( stripped) = trimmed. strip_prefix ( "0x" ) {
824+ stripped
825+ } else {
826+ trimmed
827+ } ;
828+
829+ AllocationId :: Horizon ( CollectionId :: from_str ( hex_str) . unwrap_or_else ( |e| {
830+ panic ! ( "Invalid collection_id '{collection_id}': {e}" )
831+ } ) )
832+ } )
833+ . collect :: < HashSet < _ > > ( ) ;
828834 let signer_id = Address :: from_str ( & row. signer_address )
829835 . expect ( "signer_address should be a valid address" ) ;
830836 let sender_id = self
You can’t perform that action at this time.
0 commit comments