Add correct etherscan url

Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
RcleydsonR
2023-01-19 18:12:41 -03:00
parent 3c4a629ed7
commit bb6be691af
3 changed files with 17 additions and 19 deletions

View File

@@ -6,12 +6,12 @@ import { getP2PixAddress } from "./addresses";
import p2pix from "../utils/smart_contract_files/P2PIX.json";
import { BigNumber, ethers } from "ethers";
import { formatEther, parseEther } from "ethers/lib/utils";
import { parseEther } from "ethers/lib/utils";
// Buyer Flow methods //
// Make lock
const addLock = async (depositId: BigNumber, amount: number): Promise<any> => {
const addLock = async (
depositId: BigNumber,
amount: number
): Promise<string> => {
const etherStore = useEtherStore();
const provider = getProvider();
@@ -34,7 +34,6 @@ const addLock = async (depositId: BigNumber, amount: number): Promise<any> => {
return t.args.lockID;
};
// Release lock
const releaseLock = async (
pixKey: string,
amount: number,
@@ -83,8 +82,6 @@ const cancelDeposit = async (depositId: BigNumber): Promise<boolean> => {
const contract = new ethers.Contract(getP2PixAddress(), p2pix.abi, signer);
await contract.cancelDeposit(depositId);
// await updateWalletBalance();
// await updateValidDeposits();
return true;
};
@@ -97,11 +94,7 @@ const withdrawDeposit = async (depositId: BigNumber): Promise<boolean> => {
const contract = new ethers.Contract(getP2PixAddress(), p2pix.abi, signer);
await contract.withdraw(depositId, []);
// // await updateWalletBalance();
// await updateValidDeposits();
return true;
};
// Releases lock by specific ID and other additional data
export { cancelDeposit, withdrawDeposit, addLock, releaseLock };