@@ -29,7 +29,7 @@ async function migrateBookUser(likeWallet: string, evmWallet: string) {
29
29
const { userExists, alreadyMigrated } = await db . runTransaction ( async ( t ) => {
30
30
const [ evmQuery , userDoc ] = await Promise . all ( [
31
31
t . get ( likeNFTBookUserCollection . where ( 'evmWallet' , '==' , evmWallet ) . limit ( 1 ) ) ,
32
- t . get ( likeNFTBookUserCollection . doc ( likeWallet ) . get ( ) ) ,
32
+ t . get ( likeNFTBookUserCollection . doc ( likeWallet ) ) ,
33
33
] ) ;
34
34
if ( evmQuery . docs . length > 0 ) {
35
35
if ( evmQuery . docs [ 0 ] . id !== userDoc ?. id ) {
@@ -52,7 +52,7 @@ async function migrateBookUser(likeWallet: string, evmWallet: string) {
52
52
if ( existingEvmWallet && existingEvmWallet !== evmWallet ) {
53
53
throw new Error ( 'EVM_WALLET_NOT_MATCH_USER_RECORD' ) ;
54
54
}
55
- t . update ( userDoc , {
55
+ t . update ( userDoc . ref , {
56
56
evmWallet,
57
57
likeWallet,
58
58
migrateTimestamp : FieldValue . serverTimestamp ( ) ,
@@ -131,7 +131,7 @@ export async function migrateBookClassId(likeClassId:string, evmClassId: string)
131
131
const migratedClassIds : string [ ] = [ ] ;
132
132
const migratedCollectionIds : string [ ] = [ ] ;
133
133
const [ bookListingDoc , collectionQuery ] = await Promise . all ( [
134
- t . get ( likeNFTBookCollection . doc ( likeClassId ) . get ( ) ) ,
134
+ t . get ( likeNFTBookCollection . doc ( likeClassId ) ) ,
135
135
t . get ( likeNFTCollectionCollection . where ( 'classIds' , 'array-contains' , likeClassId ) . limit ( 100 ) ) ,
136
136
] ) ;
137
137
if ( bookListingDoc . exists ) {
0 commit comments