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:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user