Skip to content

Commit

Permalink
Transfer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed May 1, 2024
1 parent 7dd95d2 commit 2a99ec5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions api/src/controllers/index.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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){
Expand Down
4 changes: 2 additions & 2 deletions api/src/libs/lit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2a99ec5

Please sign in to comment.