Clean up app strucutre deleting blockchain file and add methods on blockchain folder

Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
RcleydsonR
2023-01-17 19:31:25 -03:00
parent d78f7f1fdf
commit 8338064dcd
7 changed files with 155 additions and 304 deletions

View File

@@ -3,7 +3,7 @@ import { updateWalletStatus } from "./wallet";
import { getTokenAddress, getP2PixAddress } from "./addresses";
import { parseEther } from "ethers/lib/utils";
import { BigNumber, ethers } from "ethers";
import { ethers } from "ethers";
import p2pix from "../utils/smart_contract_files/P2PIX.json";
import mockToken from "../utils/smart_contract_files/MockToken.json";
@@ -51,15 +51,4 @@ const addDeposit = async (tokenQty: string, pixKey: string) => {
// await updateValidDeposits();
};
// Map deposit
const mapDeposits = async (depositId: BigNumber): Promise<any> => {
const provider = getProvider();
const signer = provider.getSigner();
const contract = new ethers.Contract(getP2PixAddress(), p2pix.abi, signer);
const deposit = await contract.mapDeposits(depositId);
return deposit;
};
export { approveTokens, addDeposit, mapDeposits };
export { approveTokens, addDeposit };