diff --git a/api/src/controllers/index.js b/api/src/controllers/index.js index 96f15b89..da1263d3 100644 --- a/api/src/controllers/index.js +++ b/api/src/controllers/index.js @@ -1,7 +1,7 @@ import { getAddress } from "@ethersproject/address"; import axios from "axios"; import RedisClient from '../clients/redis.js'; -import { getOwner, getPKPSession, getRolesFromSession, mintPKP, transferOwnership, writeAuthMethods } from "../libs/lit/index.js"; +import { getPKPSession, getRolesFromSession, mintPKP, transferOwnership, writeAuthMethods } from "../libs/lit/index.js"; import { getAuthSigFromDIDSession } from "../utils/helpers.js"; import { DIDService } from "../services/did.js"; import { IndexService } from "../services/index.js"; @@ -142,8 +142,8 @@ export const transferIndex = async (req, res, next) => { userAuthSig: userAuthSig, signerPublicKey: index?.signerPublicKey, signerFunction: index.signerFunction, - previousOwner: previousOwner, - newOwner: newOwnerWallet, + previousOwner: previousOwner.toLowerCase(), + newOwner: newOwnerWallet.toLowerCase(), }); if(vals){ diff --git a/api/src/libs/lit/index.js b/api/src/libs/lit/index.js index 4a2cfd79..8122e211 100644 --- a/api/src/libs/lit/index.js +++ b/api/src/libs/lit/index.js @@ -298,7 +298,7 @@ export const transferOwnership = async ({ [previousOwner] ); - const res = await transaction.wait(3) + const res = await transaction.wait(1) console.log("broadcast txn result:", JSON.stringify(transaction)); if(res){ @@ -428,7 +428,7 @@ export const mintPKP = async (ownerAddress, actionCID) => { await litContracts.pkpHelperContract.write.mintNextAndAddAuthMethods( 2, [AuthMethodType.EthWallet, AuthMethodType.LitAction], - [ownerAddress, acid], + [ownerAddress.toLowerCase(), acid], ["0x", "0x"], [[BigInt(1)], [BigInt(1)]], true,