Merge branch 'search-tokens' into list-tokens
This commit is contained in:
@@ -13,6 +13,12 @@ enum Step {
|
||||
const flowStep = ref<Step>(Step.Search)
|
||||
const tokenAmmount = ref()
|
||||
|
||||
// (TO DO) Tirar isso tudo daqui
|
||||
// import p2pix from "../utils/smart_contract_files/P2PIX.json";
|
||||
// import addresses from "../utils/smart_contract_files/localhost.json";
|
||||
// import { useEtherStore } from "@/store/ether";
|
||||
// import { ethers } from "ethers";
|
||||
|
||||
const confirmBuyClick = async ({ selectedDeposit, tokenValue }: any) => {
|
||||
// finish buy screen
|
||||
console.log(selectedDeposit);
|
||||
@@ -20,10 +26,38 @@ const confirmBuyClick = async ({ selectedDeposit, tokenValue }: any) => {
|
||||
await blockchain
|
||||
.mapDeposits(selectedDeposit["args"]["depositID"])
|
||||
.then((deposit) => (depositDetail = deposit));
|
||||
|
||||
console.log(tokenValue);
|
||||
tokenAmmount.value = tokenValue
|
||||
flowStep.value = Step.List
|
||||
console.log(depositDetail);
|
||||
console.log(depositDetail);
|
||||
|
||||
// Makes lock with deposit ID and the Amount
|
||||
// if (depositDetail) {
|
||||
// const lock = await blockchain.addLock(
|
||||
// depositDetail.args.depositID,
|
||||
// tokenValue
|
||||
// );
|
||||
// console.log(lock);
|
||||
|
||||
// // (TO DO) Tirar isso daqui
|
||||
// const window_ = window as any;
|
||||
// const connection = window_.ethereum;
|
||||
// let provider: ethers.providers.Web3Provider | null = null;
|
||||
// if (!connection) return;
|
||||
// provider = new ethers.providers.Web3Provider(connection);
|
||||
// const signer = provider.getSigner();
|
||||
// const etherStore = useEtherStore();
|
||||
// const p2pContract = new ethers.Contract(addresses.p2pix, p2pix.abi, signer);
|
||||
// const filterLocks = p2pContract.filters.LockAdded(null);
|
||||
// const eventsLocks = await p2pContract.queryFilter(filterLocks);
|
||||
// etherStore.setLocksAddedList(eventsLocks);
|
||||
|
||||
// Data to QRCode
|
||||
// Chave Pix = depositDetail.pixTarget
|
||||
// Valor = tokenValue
|
||||
// }
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user